Свойство | Тип | Описание | |
---|---|---|---|
$allowed | array | Array of allowed file types. | |
$allowedUnits | array | Array of allowed units. | |
$backgroundColor | mixed | SVG image background color | |
$clippingPaths | array | SVG image available clipping paths | |
$curClippingPath | integer | Current clipping path to use. | |
$curGradient | integer | Current gradient to use. | |
$fillColor | mixed | SVG image fill color | |
$gradients | array | SVG image available gradients | |
$height | integer | SVG image height | |
$opacity | float | SVG image color opacity | |
$resource | SimpleXMLElement | SVG image resource | |
$strokeColor | mixed | SVG image stroke color | |
$strokeDashGap | integer | Stroke dash gap | |
$strokeDashLength | integer | Stroke dash length | |
$strokeWidth | array | SVG image stroke width | |
$units | string | SVG image units | |
$width | integer | SVG image width |
Метод | Описание | |
---|---|---|
__construct ( string $svg, integer | string $w = null, integer | string $h = null, Pop\Color\Space\ColorInterface $color = null ) : |
Constructor | |
__toString ( ) : string | To string method to output the image | |
addGradient ( Pop\Color\Space\ColorInterface $color1, Pop\Color\Space\ColorInterface $color2, integer $type = Svg::HORIZONTAL ) : |
Add a gradient. | |
border ( integer $w ) : |
Method to add a border to the image. | |
drawArc ( integer $x, integer $y, integer $start, integer $end, integer $w, integer $h = null ) : |
Method to add an arc to the image. | |
drawCircle ( integer $x, integer $y, integer $w ) : |
Method to add a circle to the image. | |
drawClippingCircle ( integer $x, integer $y, integer $w ) : |
Add a clipping circle. | |
drawClippingEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : |
Add a clipping ellipse. | |
drawClippingPolygon ( array $points ) : |
Add a clipping polygon. | |
drawClippingRectangle ( integer $x, integer $y, integer $w, integer $h = null ) : |
Add a clipping rectangle. | |
drawClippingSquare ( integer $x, integer $y, integer $w ) : |
Add a clipping square. | |
drawEllipse ( integer $x, integer $y, integer $w, integer $h = null ) : |
Method to add an ellipse to the image. | |
drawLine ( integer $x1, integer $y1, integer $x2, integer $y2 ) : void | Method to add a line to the image. | |
drawPolygon ( array $points ) : |
Method to add a polygon to the image. | |
drawRectangle ( integer $x, integer $y, integer $w, integer $h = null ) : void | Method to add a rectangle to the image. | |
drawSquare ( integer $x, integer $y, integer $w ) : |
Method to add a square to the image. | |
getHeight ( ) : integer | Get the SVG image height. | |
getUnits ( ) : string | Get the SVG image units. | |
getWidth ( ) : integer | Get the SVG image width. | |
output ( boolean $download = false ) : void | Method to output the SVG image. | |
setBackgroundColor ( Pop\Color\Space\ColorInterface $color = null ) : |
Set the background color. | |
setClippingPath ( integer $index = null ) : |
Set the clipping path to use. | |
setFillColor ( Pop\Color\Space\ColorInterface $color = null ) : |
Set the fill color. | |
setGradient ( integer $index = null ) : |
Set the gradient to use. | |
setOpacity ( float $opac ) : |
Set the opacity. | |
setStrokeColor ( Pop\Color\Space\ColorInterface $color = null ) : |
Set the stroke color. | |
setStrokeWidth ( integer $wid = null, integer $dash_len = null, integer $dash_gap = null ) : |
Set the stroke width. | |
text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = 'Arial', integer | string $rotate = null, boolean $bold = false ) : |
Create text within the an SVG image object. |
Метод | Описание | |
---|---|---|
getQuadrant ( array $point, array $center ) : integer | Method to calculate which quadrant a point is in. | |
setStyles ( SimpleXMLElement $obj ) : SimpleXMLElement | Method to set the styles. |
public __toString ( ) : string | ||
Результат | string |
public addGradient ( Pop\Color\Space\ColorInterface $color1, Pop\Color\Space\ColorInterface $color2, integer $type = Svg::HORIZONTAL ) : |
||
$color1 | Pop\Color\Space\ColorInterface | |
$color2 | Pop\Color\Space\ColorInterface | |
$type | integer | |
Результат |
public drawClippingPolygon ( array $points ) : |
||
$points | array | |
Результат |
public drawPolygon ( array $points ) : |
||
$points | array | |
Результат |
public setBackgroundColor ( Pop\Color\Space\ColorInterface $color = null ) : |
||
$color | Pop\Color\Space\ColorInterface | |
Результат |
public setClippingPath ( integer $index = null ) : |
||
$index | integer | |
Результат |
public setFillColor ( Pop\Color\Space\ColorInterface $color = null ) : |
||
$color | Pop\Color\Space\ColorInterface | |
Результат |
public setGradient ( integer $index = null ) : |
||
$index | integer | |
Результат |
public setOpacity ( float $opac ) : |
||
$opac | float | |
Результат |
public setStrokeColor ( Pop\Color\Space\ColorInterface $color = null ) : |
||
$color | Pop\Color\Space\ColorInterface | |
Результат |
protected setStyles ( SimpleXMLElement $obj ) : SimpleXMLElement | ||
$obj | SimpleXMLElement | |
Результат | SimpleXMLElement |
public text ( string $str, integer | string $size, integer | string $x, integer | string $y, string $font = 'Arial', integer | string $rotate = null, boolean $bold = false ) : |
||
$str | string | |
$size | integer | string | |
$x | integer | string | |
$y | integer | string | |
$font | string | |
$rotate | integer | string | |
$bold | boolean | |
Результат |
protected array $allowedUnits | ||
Результат | array |
protected mixed $backgroundColor | ||
Результат | mixed |
protected array $clippingPaths | ||
Результат | array |
protected int $curClippingPath | ||
Результат | integer |
protected int $curGradient | ||
Результат | integer |
protected array $gradients | ||
Результат | array |
protected SimpleXMLElement $resource | ||
Результат | SimpleXMLElement |
protected mixed $strokeColor | ||
Результат | mixed |
protected int $strokeDashLength | ||
Результат | integer |
protected array $strokeWidth | ||
Результат | array |