GmagickDraw
class GmagickDraw (View source)
Methods
Draws text on the image.
Draws an arc falling within a specified bounding rectangle on the image.
Draws a bezier curve through a set of points on the image.
Draws an ellipse on the image.
Returns the fill color used for drawing filled objects.
Returns the opacity used when drawing.
Returns a string specifying the font used when annotating with text.
Returns the font pointsize used when annotating with text.
Returns the font style used when annotating with text.
Returns the font weight used when annotating with text.
Returns the color used for stroking object outlines.
Returns the opacity of stroked object outlines.
Returns the width of the stroke used to draw object outlines.
Returns the decoration applied when annotating with text.
Returns the code set used for text annotations.
Draws a line on the image using the current stroke color, stroke opacity, and stroke width.
Draws a point using the current stroke color and stroke thickness at the specified coordinates.
Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
Draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.
Applies the specified rotation to the current coordinate space.
Draws a rounded rectangle given two coordinates, x and y corner radiuses and using the current stroke, stroke width, and fill settings.
Adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.
Sets the opacity to use when drawing using the fill color or fill texture. Setting it to 1.0 will make fill full opaque.
Sets the fully-specified font to use when annotating with text.
Sets the font pointsize to use when annotating with text.
Sets the font style to use when annotating with text.
Sets the font weight to use when annotating with text.
Specifies the opacity of stroked object outlines.
Sets the width of the stroke used to draw object outlines.
Specifies a decoration to be applied when annotating with text.
Specifies the code set to use for text annotations.
Details
GmagickDraw
annotate(float $x, float $y, string $text)
Draws text on the image.
GmagickDraw
arc(float $sx, float $sy, float $ex, float $ey, float $sd, float $ed)
Draws an arc falling within a specified bounding rectangle on the image.
GmagickDraw
bezier(array $coordinate_array)
Draws a bezier curve through a set of points on the image.
GmagickDraw
ellipse(float $ox, float $oy, float $rx, float $ry, float $start, float $end)
Draws an ellipse on the image.
GmagickPixel
getfillcolor()
Returns the fill color used for drawing filled objects.
float
getfillopacity()
Returns the opacity used when drawing.
string|false
getfont()
Returns a string specifying the font used when annotating with text.
float
getfontsize()
Returns the font pointsize used when annotating with text.
int
getfontstyle()
Returns the font style used when annotating with text.
int
getfontweight()
Returns the font weight used when annotating with text.
GmagickPixel
getstrokecolor()
Returns the color used for stroking object outlines.
float
getstrokeopacity()
Returns the opacity of stroked object outlines.
float
getstrokewidth()
Returns the width of the stroke used to draw object outlines.
int
gettextdecoration()
Returns the decoration applied when annotating with text.
string|false
gettextencoding()
Returns the code set used for text annotations.
GmagickDraw
line(float $sx, float $sy, float $ex, float $ey)
Draws a line on the image using the current stroke color, stroke opacity, and stroke width.
GmagickDraw
point(float $x, float $y)
Draws a point using the current stroke color and stroke thickness at the specified coordinates.
GmagickDraw
polygon(array $coordinates)
Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
GmagickDraw
polyline(array $coordinate_array)
Draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
GmagickDraw
rectangle(float $x1, float $y1, float $x2, float $y2)
Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.
GmagickDraw
rotate(float $degrees)
Applies the specified rotation to the current coordinate space.
GmagickDraw
roundrectangle(float $x1, float $y1, float $x2, float $y2, float $rx, float $ry)
Draws a rounded rectangle given two coordinates, x and y corner radiuses and using the current stroke, stroke width, and fill settings.
GmagickDraw
scale(float $x, float $y)
Adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.
GmagickDraw
setfillcolor(GmagickPixel|string $color)
Sets the fill color to be used for drawing filled objects.
GmagickDraw
setfillopacity(float $fill_opacity)
Sets the opacity to use when drawing using the fill color or fill texture. Setting it to 1.0 will make fill full opaque.
GmagickDraw
setfont(string $font)
Sets the fully-specified font to use when annotating with text.
GmagickDraw
setfontsize(float $pointsize)
Sets the font pointsize to use when annotating with text.
GmagickDraw
setfontstyle(int $style)
Sets the font style to use when annotating with text.
The AnyStyle enumeration acts as a wild-card "don't care" option.
GmagickDraw
setfontweight(int $weight)
Sets the font weight to use when annotating with text.
GmagickDraw
setstrokecolor(GmagickPixel|string $color)
Sets the color used for stroking object outlines.
GmagickDraw
setstrokeopacity(float $stroke_opacity)
Specifies the opacity of stroked object outlines.
GmagickDraw
setstrokewidth(float $width)
Sets the width of the stroke used to draw object outlines.
GmagickDraw
settextdecoration(int $decoration)
Specifies a decoration to be applied when annotating with text.
GmagickDraw
settextencoding(string $encoding)
Specifies the code set to use for text annotations.
The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode.