Property | Type | Description | |
---|---|---|---|
$_capabilities | string[] | Capabilites of this driver. | |
$_colors | int[] | Allocated color resources. | |
$_im | resource | GD image resource for the current image data. |
Method | Description | |
---|---|---|
__construct ( $params, $context = [] ) | Constructor. | |
__get ( $property ) | ||
applyMask ( resource $mask ) | Applies the specified mask to the image. | |
arc ( integer $x, integer $y, integer $r, integer $start, integer $end, string $color = 'black', string $fill = null ) | Draws an arc. | |
call ( string $function, array $params = null ) : mixed | Wraps a call to a function of the gd extension. | |
circle ( integer $x, integer $y, integer $r, string $color, string $fill = null ) | Draws a circle. | |
create ( integer $width, integer $height ) : resource | Creates an image of the given size. | |
crop ( integer $x1, integer $y1, integer $x2, integer $y2 ) | Crops the current image. | |
dashedLine ( integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1, integer $dash_length = 2, integer $dash_space = 2 ) | Draws a dashed line. | |
display ( ) | Displays the current image. | |
flip ( ) | Flips the current image. | |
getDimensions ( ) : array | Returns the height and width of the current image data. | |
grayscale ( ) | Converts the current image to grayscale. | |
line ( integer $x1, integer $y1, $x2, $y2, string $color = 'black', string $width = 1 ) | Draws a line. | |
loadFile ( string $filename ) | Loads the image data from a file. | |
loadString ( string $image_data ) | Loads the image data from a string. | |
mirror ( ) | Mirrors the current image. | |
polygon ( $verts, string $color, string $fill = 'none' ) | Draws a polygon based on a set of vertices. | |
polyline ( $verts, string $color, string $width = 1 ) | Draws a polyline (a non-closed, non-filled polygon) based on a set of vertices. | |
raw ( boolean $convert = false ) : string | Returns the raw data for this image. | |
rectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill = 'none' ) | Draws a rectangle. | |
reset ( ) | Resets the image data to defaults. | |
resize ( integer $width, integer $height, boolean $ratio = true, boolean $keepProfile = false ) | Resizes the current image. | |
rotate ( integer $angle, string $background = 'white' ) | Rotates the current image. | |
roundedRectangle ( integer $x, integer $y, integer $width, integer $height, integer $round, string $color = 'black', string $fill = 'none' ) | Draws a rounded rectangle. | |
sepia ( integer $threshold = 85 ) | Applies a sepia filter. | |
text ( $string, integer $x, integer $y, string $font = '', string $color = 'black', integer $direction, string $fontsize = 'small' ) | Draws a text string on the image in a specified location, with the specified style information. | |
yellowize ( integer $intensityY = 50, integer $intensityB = 3 ) | Applies a yellow filter. |
Method | Description | |
---|---|---|
_allocateColor ( string $name, integer $alpha ) : integer | Creates a color that can be accessed in this object. | |
_getFont ( string $font ) : integer | Returns the numeric font size a from textual description. |
public applyMask ( resource $mask ) | ||
$mask | resource | The gd image resource representing the mask |
public arc ( integer $x, integer $y, integer $r, integer $start, integer $end, string $color = 'black', string $fill = null ) | ||
$x | integer | The x coordinate of the centre. |
$y | integer | The y coordinate of the centre. |
$r | integer | The radius of the arc. |
$start | integer | The start angle of the arc. |
$end | integer | The end angle of the arc. |
$color | string | The line color of the arc. |
$fill | string | The fill color of the arc (defaults to none). |
public dashedLine ( integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1, integer $dash_length = 2, integer $dash_space = 2 ) | ||
$x0 | integer | The x co-ordinate of the start. |
$y0 | integer | The y co-ordinate of the start. |
$x1 | integer | The x co-ordinate of the end. |
$y1 | integer | The y co-ordinate of the end. |
$color | string | The line color. |
$width | string | The width of the line. |
$dash_length | integer | The length of a dash on the dashed line. |
$dash_space | integer | The length of a space in the dashed line. |
public getDimensions ( ) : array | ||
return | array | An hash with 'width' containing the width, 'height' containing the height of the image. |
public loadString ( string $image_data ) | ||
$image_data | string | The data to use for the image. |
public rectangle ( integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill = 'none' ) | ||
$x | integer | The left x-coordinate of the rectangle. |
$y | integer | The top y-coordinate of the rectangle. |
$width | integer | The width of the rectangle. |
$height | integer | The height of the rectangle. |
$color | string | The line color of the rectangle. |
$fill | string | The color to fill the rectangle. |
public roundedRectangle ( integer $x, integer $y, integer $width, integer $height, integer $round, string $color = 'black', string $fill = 'none' ) | ||
$x | integer | The left x-coordinate of the rectangle. |
$y | integer | The top y-coordinate of the rectangle. |
$width | integer | The width of the rectangle. |
$height | integer | The height of the rectangle. |
$round | integer | The width of the corner rounding. |
$color | string | The line color of the rectangle. |
$fill | string | The color to fill the rounded rectangle with. |
public text ( $string, integer $x, integer $y, string $font = '', string $color = 'black', integer $direction, string $fontsize = 'small' ) | ||
$x | integer | The left x coordinate of the start of the text string. |
$y | integer | The top y coordinate of the start of the text string. |
$font | string | The font identifier you want to use for the text. |
$color | string | The color that you want the text displayed in. |
$direction | integer | An integer that specifies the orientation of the text. |
$fontsize | string | Size of the font (small, medium, large, giant) |
protected string[] $_capabilities | ||
return | string[] |