class ImagickDraw (View source)

Methods

resetVectorGraphics()

No description

getTextKerning()

No description

setTextKerning(float $kerning)

No description

getTextInterWordSpacing()

No description

setTextInterWordSpacing($spacing)

No description

getTextInterLineSpacing()

No description

setTextInterLineSpacing($spacing)

No description

__construct()

(PECL imagick 2.0.0)
The ImagickDraw constructor

bool
setFillColor(ImagickPixel $fill_pixel)

(PECL imagick 2.0.0)
Sets the fill color to be used for drawing filled objects

bool
setFillAlpha(float $opacity)

(PECL imagick 2.0.0)
Sets the opacity to use when drawing using the fill color or fill texture

bool
setResolution(float $x_resolution, float $y_resolution)

Sets the image resolution

bool
setStrokeColor(ImagickPixel $stroke_pixel)

(PECL imagick 2.0.0)
Sets the color used for stroking object outlines

bool
setStrokeAlpha(float $opacity)

(PECL imagick 2.0.0)
Specifies the opacity of stroked object outlines

bool
setStrokeWidth(float $stroke_width)

(PECL imagick 2.0.0)
Sets the width of the stroke used to draw object outlines

bool
clear()

(PECL imagick 2.0.0)
Clears the ImagickDraw

bool
circle(float $ox, float $oy, float $px, float $py)

(PECL imagick 2.0.0)
Draws a circle

bool
annotation(float $x, float $y, string $text)

(PECL imagick 2.0.0)
Draws text on the image

bool
setTextAntialias(bool $antiAlias)

(PECL imagick 2.0.0)
Controls whether text is antialiased

bool
setTextEncoding(string $encoding)

(PECL imagick 2.0.0)
Specifies specifies the text code set

bool
setFont(string $font_name)

(PECL imagick 2.0.0)
Sets the fully-specified font to use when annotating with text

bool
setFontFamily(string $font_family)

(PECL imagick 2.0.0)
Sets the font family to use when annotating with text

bool
setFontSize(float $pointsize)

(PECL imagick 2.0.0)
Sets the font pointsize to use when annotating with text

bool
setFontStyle(int $style)

(PECL imagick 2.0.0)
Sets the font style to use when annotating with text

bool
setFontWeight(int $font_weight)

(PECL imagick 2.0.0)
Sets the font weight

string|false
getFont()

(PECL imagick 2.0.0)
Returns the font

string|false
getFontFamily()

(PECL imagick 2.0.0)
Returns the font family

float
getFontSize()

(PECL imagick 2.0.0)
Returns the font pointsize

int
getFontStyle()

(PECL imagick 2.0.0)
Returns the font style

int
getFontWeight()

(PECL imagick 2.0.0)
Returns the font weight

bool
destroy()

(PECL imagick 2.0.0)
Frees all associated resources

bool
rectangle(float $x1, float $y1, float $x2, float $y2)

(PECL imagick 2.0.0)
Draws a rectangle

bool
roundRectangle(float $x1, float $y1, float $x2, float $y2, float $rx, float $ry)

(PECL imagick 2.0.0)
Draws a rounded rectangle

bool
ellipse(float $ox, float $oy, float $rx, float $ry, float $start, float $end)

(PECL imagick 2.0.0)
Draws an ellipse on the image

bool
skewX(float $degrees)

(PECL imagick 2.0.0)
Skews the current coordinate system in the horizontal direction

bool
skewY(float $degrees)

(PECL imagick 2.0.0)
Skews the current coordinate system in the vertical direction

bool
translate(float $x, float $y)

(PECL imagick 2.0.0)
Applies a translation to the current coordinate system

bool
line(float $sx, float $sy, float $ex, float $ey)

(PECL imagick 2.0.0)
Draws a line

bool
arc(float $sx, float $sy, float $ex, float $ey, float $sd, float $ed)

(PECL imagick 2.0.0)
Draws an arc

bool
matte(float $x, float $y, int $paintMethod)

(PECL imagick 2.0.0)
Paints on the image's opacity channel

bool
polygon(array $coordinates)

(PECL imagick 2.0.0)
Draws a polygon

bool
point(float $x, float $y)

(PECL imagick 2.0.0)
Draws a point

int
getTextDecoration()

(PECL imagick 2.0.0)
Returns the text decoration

string
getTextEncoding()

(PECL imagick 2.0.0)
Returns the code set used for text annotations

getFontStretch()

No description

bool
setFontStretch(int $fontStretch)

(PECL imagick 2.0.0)
Sets the font stretch to use when annotating with text

bool
setStrokeAntialias(bool $stroke_antialias)

(PECL imagick 2.0.0)
Controls whether stroked outlines are antialiased

bool
setTextAlignment(int $alignment)

(PECL imagick 2.0.0)
Specifies a text alignment

bool
setTextDecoration(int $decoration)

(PECL imagick 2.0.0)
Specifies a decoration

bool
setTextUnderColor(ImagickPixel $under_color)

(PECL imagick 2.0.0)
Specifies the color of a background rectangle

bool
setViewbox(int $x1, int $y1, int $x2, int $y2)

(PECL imagick 2.0.0)
Sets the overall canvas size

bool
affine(array $affine)

(PECL imagick 2.0.0)
Adjusts the current affine transformation matrix

bool
bezier(array $coordinates)

(PECL imagick 2.0.0)
Draws a bezier curve

bool
composite(int $compose, float $x, float $y, float $width, float $height, Imagick $compositeWand)

(PECL imagick 2.0.0)
Composites an image onto the current image

bool
color(float $x, float $y, int $paintMethod)

(PECL imagick 2.0.0)
Draws color on image

bool
comment(string $comment)

(PECL imagick 2.0.0)
Adds a comment

string|false
getClipPath()

(PECL imagick 2.0.0)
Obtains the current clipping path ID

int
getClipRule()

(PECL imagick 2.0.0)
Returns the current polygon fill rule

int
getClipUnits()

(PECL imagick 2.0.0)
Returns the interpretation of clip path units

getFillColor()

(PECL imagick 2.0.0)
Returns the fill color

float
getFillOpacity()

(PECL imagick 2.0.0)
Returns the opacity used when drawing

int
getFillRule()

(PECL imagick 2.0.0)
Returns the fill rule

int
getGravity()

(PECL imagick 2.0.0)
Returns the text placement gravity

bool
getStrokeAntialias()

(PECL imagick 2.0.0)
Returns the current stroke antialias setting

getStrokeColor()

(PECL imagick 2.0.0)
Returns the color used for stroking object outlines

array
getStrokeDashArray()

(PECL imagick 2.0.0)
Returns an array representing the pattern of dashes and gaps used to stroke paths

float
getStrokeDashOffset()

(PECL imagick 2.0.0)
Returns the offset into the dash pattern to start the dash

int
getStrokeLineCap()

(PECL imagick 2.0.0)
Returns the shape to be used at the end of open subpaths when they are stroked

int
getStrokeLineJoin()

(PECL imagick 2.0.0)
Returns the shape to be used at the corners of paths when they are stroked

int
getStrokeMiterLimit()

(PECL imagick 2.0.0)
Returns the stroke miter limit

float
getStrokeOpacity()

(PECL imagick 2.0.0)
Returns the opacity of stroked object outlines

float
getStrokeWidth()

(PECL imagick 2.0.0)
Returns the width of the stroke used to draw object outlines

int
getTextAlignment()

(PECL imagick 2.0.0)
Returns the text alignment

bool
getTextAntialias()

(PECL imagick 2.0.0)
Returns the current text antialias setting

string
getVectorGraphics()

(PECL imagick 2.0.0)
Returns a string containing vector graphics

getTextUnderColor()

(PECL imagick 2.0.0)
Returns the text under color

bool
pathClose()

(PECL imagick 2.0.0)
Adds a path element to the current path

bool
pathCurveToAbsolute(float $x1, float $y1, float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

bool
pathCurveToRelative(float $x1, float $y1, float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

bool
pathCurveToQuadraticBezierAbsolute(float $x1, float $y1, float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

bool
pathCurveToQuadraticBezierRelative(float $x1, float $y1, float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

bool
pathCurveToQuadraticBezierSmoothAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

bool
pathCurveToQuadraticBezierSmoothRelative(float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

bool
pathCurveToSmoothAbsolute(float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

bool
pathCurveToSmoothRelative(float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

bool
pathEllipticArcAbsolute(float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y)

(PECL imagick 2.0.0)
Draws an elliptical arc

bool
pathEllipticArcRelative(float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y)

(PECL imagick 2.0.0)
Draws an elliptical arc

bool
pathFinish()

(PECL imagick 2.0.0)
Terminates the current path

bool
pathLineToAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Draws a line path

bool
pathLineToRelative(float $x, float $y)

(PECL imagick 2.0.0)
Draws a line path

bool
pathLineToHorizontalAbsolute(float $x)

(PECL imagick 2.0.0)
Draws a horizontal line path

bool
pathLineToHorizontalRelative(float $x)

(PECL imagick 2.0.0)
Draws a horizontal line

bool
pathLineToVerticalAbsolute(float $y)

(PECL imagick 2.0.0)
Draws a vertical line

bool
pathLineToVerticalRelative(float $y)

(PECL imagick 2.0.0)
Draws a vertical line path

bool
pathMoveToAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Starts a new sub-path

bool
pathMoveToRelative(float $x, float $y)

(PECL imagick 2.0.0)
Starts a new sub-path

bool
pathStart()

(PECL imagick 2.0.0)
Declares the start of a path drawing list

bool
polyline(array $coordinates)

(PECL imagick 2.0.0)
Draws a polyline

bool
popClipPath()

(PECL imagick 2.0.0)
Terminates a clip path definition

bool
popDefs()

(PECL imagick 2.0.0)
Terminates a definition list

bool
popPattern()

(PECL imagick 2.0.0)
Terminates a pattern definition

bool
pushClipPath(string $clip_mask_id)

(PECL imagick 2.0.0)
Starts a clip path definition

bool
pushDefs()

(PECL imagick 2.0.0)
Indicates that following commands create named elements for early processing

bool
pushPattern(string $pattern_id, float $x, float $y, float $width, float $height)

(PECL imagick 2.0.0)
Indicates that subsequent commands up to a ImagickDraw::opPattern() command comprise the definition of a named pattern

bool
render()

(PECL imagick 2.0.0)
Renders all preceding drawing commands onto the image

bool
rotate(float $degrees)

(PECL imagick 2.0.0)
Applies the specified rotation to the current coordinate space

bool
scale(float $x, float $y)

(PECL imagick 2.0.0)
Adjusts the scaling factor

bool
setClipPath(string $clip_mask)

(PECL imagick 2.0.0)
Associates a named clipping path with the image

bool
setClipRule(int $fill_rule)

(PECL imagick 2.0.0)
Set the polygon fill rule to be used by the clipping path

bool
setClipUnits(int $clip_units)

(PECL imagick 2.0.0)
Sets the interpretation of clip path units

bool
setFillOpacity(float $fillOpacity)

(PECL imagick 2.0.0)
Sets the opacity to use when drawing using the fill color or fill texture

bool
setFillPatternURL(string $fill_url)

(PECL imagick 2.0.0)
Sets the URL to use as a fill pattern for filling objects

bool
setFillRule(int $fill_rule)

(PECL imagick 2.0.0)
Sets the fill rule to use while drawing polygons

bool
setGravity(int $gravity)

(PECL imagick 2.0.0)
Sets the text placement gravity

bool
setStrokePatternURL(string $stroke_url)

(PECL imagick 2.0.0)
Sets the pattern used for stroking object outlines

bool
setStrokeDashOffset(float $dash_offset)

(PECL imagick 2.0.0)
Specifies the offset into the dash pattern to start the dash

bool
setStrokeLineCap(int $linecap)

(PECL imagick 2.0.0)
Specifies the shape to be used at the end of open subpaths when they are stroked

bool
setStrokeLineJoin(int $linejoin)

(PECL imagick 2.0.0)
Specifies the shape to be used at the corners of paths when they are stroked

bool
setStrokeMiterLimit(int $miterlimit)

(PECL imagick 2.0.0)
Specifies the miter limit

bool
setStrokeOpacity(float $stroke_opacity)

(PECL imagick 2.0.0)
Specifies the opacity of stroked object outlines

bool
setVectorGraphics(string $xml)

(PECL imagick 2.0.0)
Sets the vector graphics

bool
pop()

(PECL imagick 2.0.0)
Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw

bool
push()

(PECL imagick 2.0.0)
Clones the current ImagickDraw and pushes it to the stack

bool
setStrokeDashArray(array $dashArray)

(PECL imagick 2.0.0)
Specifies the pattern of dashes and gaps used to stroke paths

void
setOpacity(float $opacity)

Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.

float
getOpacity()

Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.

bool
setFontResolution(float $x, float $y)

Sets the image font resolution.

array
getFontResolution()

Gets the image X and Y resolution.

bool
getTextDirection()

Returns the direction that will be used when annotating with text.

bool
setTextDirection(int $direction)

Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.

getBorderColor()

Returns the border color used for drawing bordered objects.

bool
setBorderColor(ImagickPixel $color)

Sets the border color to be used for drawing bordered objects.

string|null
getDensity()

Obtains the vertical and horizontal resolution.

bool
setDensity(string $density_string)

Sets the vertical and horizontal resolution.

clone() $PECL imagick 2.0.0)


Makes an exact copy of the specified ImagickDraw object

Details

resetVectorGraphics()

No description

getTextKerning()

No description

setTextKerning(float $kerning)

No description

Parameters

float $kerning

getTextInterWordSpacing()

No description

setTextInterWordSpacing($spacing)

No description

Parameters

$spacing

getTextInterLineSpacing()

No description

setTextInterLineSpacing($spacing)

No description

Parameters

$spacing

__construct()

(PECL imagick 2.0.0)
The ImagickDraw constructor

bool setFillColor(ImagickPixel $fill_pixel)

(PECL imagick 2.0.0)
Sets the fill color to be used for drawing filled objects

Parameters

ImagickPixel $fill_pixel

ImagickPixel to use to set the color

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool setFillAlpha(float $opacity)

(PECL imagick 2.0.0)
Sets the opacity to use when drawing using the fill color or fill texture

Parameters

float $opacity

fill alpha

Return Value

bool

No value is returned.

bool setResolution(float $x_resolution, float $y_resolution)

Sets the image resolution

Parameters

float $x_resolution

The horizontal resolution.

float $y_resolution

The vertical resolution.

Return Value

bool

Exceptions

ImagickDrawException

bool setStrokeColor(ImagickPixel $stroke_pixel)

(PECL imagick 2.0.0)
Sets the color used for stroking object outlines

Parameters

ImagickPixel $stroke_pixel

the stroke color

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool setStrokeAlpha(float $opacity)

(PECL imagick 2.0.0)
Specifies the opacity of stroked object outlines

Parameters

float $opacity

opacity

Return Value

bool

No value is returned.

bool setStrokeWidth(float $stroke_width)

(PECL imagick 2.0.0)
Sets the width of the stroke used to draw object outlines

Parameters

float $stroke_width

stroke width

Return Value

bool

No value is returned.

bool clear()

(PECL imagick 2.0.0)
Clears the ImagickDraw

Return Value

bool

an ImagickDraw object.

bool circle(float $ox, float $oy, float $px, float $py)

(PECL imagick 2.0.0)
Draws a circle

Parameters

float $ox

origin x coordinate

float $oy

origin y coordinate

float $px

perimeter x coordinate

float $py

perimeter y coordinate

Return Value

bool

No value is returned.

bool annotation(float $x, float $y, string $text)

(PECL imagick 2.0.0)
Draws text on the image

Parameters

float $x

The x coordinate where text is drawn

float $y

The y coordinate where text is drawn

string $text

The text to draw on the image

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool setTextAntialias(bool $antiAlias)

(PECL imagick 2.0.0)
Controls whether text is antialiased

Parameters

bool $antiAlias

Return Value

bool

No value is returned.

bool setTextEncoding(string $encoding)

(PECL imagick 2.0.0)
Specifies specifies the text code set

Parameters

string $encoding

the encoding name

Return Value

bool

No value is returned.

bool setFont(string $font_name)

(PECL imagick 2.0.0)
Sets the fully-specified font to use when annotating with text

Parameters

string $font_name

Return Value

bool

TRUE on success.

Exceptions

ImagickDrawException
ImagickException

bool setFontFamily(string $font_family)

(PECL imagick 2.0.0)
Sets the font family to use when annotating with text

Parameters

string $font_family

the font family

Return Value

bool

TRUE on success.

Exceptions

ImagickDrawException
ImagickException

bool setFontSize(float $pointsize)

(PECL imagick 2.0.0)
Sets the font pointsize to use when annotating with text

Parameters

float $pointsize

the point size

Return Value

bool

No value is returned.

bool setFontStyle(int $style)

(PECL imagick 2.0.0)
Sets the font style to use when annotating with text

Parameters

int $style

STYLETYPE_ constant

Return Value

bool

No value is returned.

bool setFontWeight(int $font_weight)

(PECL imagick 2.0.0)
Sets the font weight

Parameters

int $font_weight

Return Value

bool

Exceptions

ImagickDrawException

string|false getFont()

(PECL imagick 2.0.0)
Returns the font

Return Value

string|false

a string on success and false if no font is set.

string|false getFontFamily()

(PECL imagick 2.0.0)
Returns the font family

Return Value

string|false

the font family currently selected or false if font family is not set.

float getFontSize()

(PECL imagick 2.0.0)
Returns the font pointsize

Return Value

float

the font size associated with the current ImagickDraw object.

int getFontStyle()

(PECL imagick 2.0.0)
Returns the font style

Return Value

int

the font style constant (STYLE_) associated with the ImagickDraw object or 0 if no style is set.

int getFontWeight()

(PECL imagick 2.0.0)
Returns the font weight

Return Value

int

an int on success and 0 if no weight is set.

bool destroy()

(PECL imagick 2.0.0)
Frees all associated resources

Return Value

bool

No value is returned.

bool rectangle(float $x1, float $y1, float $x2, float $y2)

(PECL imagick 2.0.0)
Draws a rectangle

Parameters

float $x1

x coordinate of the top left corner

float $y1

y coordinate of the top left corner

float $x2

x coordinate of the bottom right corner

float $y2

y coordinate of the bottom right corner

Return Value

bool

No value is returned.

bool roundRectangle(float $x1, float $y1, float $x2, float $y2, float $rx, float $ry)

(PECL imagick 2.0.0)
Draws a rounded rectangle

Parameters

float $x1

x coordinate of the top left corner

float $y1

y coordinate of the top left corner

float $x2

x coordinate of the bottom right

float $y2

y coordinate of the bottom right

float $rx

x rounding

float $ry

y rounding

Return Value

bool

No value is returned.

bool ellipse(float $ox, float $oy, float $rx, float $ry, float $start, float $end)

(PECL imagick 2.0.0)
Draws an ellipse on the image

Parameters

float $ox
float $oy
float $rx
float $ry
float $start
float $end

Return Value

bool

No value is returned.

bool skewX(float $degrees)

(PECL imagick 2.0.0)
Skews the current coordinate system in the horizontal direction

Parameters

float $degrees

degrees to skew

Return Value

bool

No value is returned.

bool skewY(float $degrees)

(PECL imagick 2.0.0)
Skews the current coordinate system in the vertical direction

Parameters

float $degrees

degrees to skew

Return Value

bool

No value is returned.

bool translate(float $x, float $y)

(PECL imagick 2.0.0)
Applies a translation to the current coordinate system

Parameters

float $x

horizontal translation

float $y

vertical translation

Return Value

bool

No value is returned.

bool line(float $sx, float $sy, float $ex, float $ey)

(PECL imagick 2.0.0)
Draws a line

Parameters

float $sx

starting x coordinate

float $sy

starting y coordinate

float $ex

ending x coordinate

float $ey

ending y coordinate

Return Value

bool

No value is returned.

bool arc(float $sx, float $sy, float $ex, float $ey, float $sd, float $ed)

(PECL imagick 2.0.0)
Draws an arc

Parameters

float $sx

Starting x ordinate of bounding rectangle

float $sy

starting y ordinate of bounding rectangle

float $ex

ending x ordinate of bounding rectangle

float $ey

ending y ordinate of bounding rectangle

float $sd

starting degrees of rotation

float $ed

ending degrees of rotation

Return Value

bool

No value is returned.

bool matte(float $x, float $y, int $paintMethod)

(PECL imagick 2.0.0)
Paints on the image's opacity channel

Parameters

float $x

x coordinate of the matte

float $y

y coordinate of the matte

int $paintMethod

PAINT_ constant

Return Value

bool

TRUE on success or FALSE on failure.

bool polygon(array $coordinates)

(PECL imagick 2.0.0)
Draws a polygon

Parameters

array $coordinates

multidimensional array like array( array( 'x' => 3, 'y' => 4 ), array( 'x' => 2, 'y' => 6 ) );

Return Value

bool

TRUE on success.

Exceptions

ImagickDrawException

bool point(float $x, float $y)

(PECL imagick 2.0.0)
Draws a point

Parameters

float $x

point's x coordinate

float $y

point's y coordinate

Return Value

bool

No value is returned.

int getTextDecoration()

(PECL imagick 2.0.0)
Returns the text decoration

Return Value

int

one of the DECORATION_ constants and 0 if no decoration is set.

string getTextEncoding()

(PECL imagick 2.0.0)
Returns the code set used for text annotations

Return Value

string

a string specifying the code set or false if text encoding is not set.

getFontStretch()

No description

bool setFontStretch(int $fontStretch)

(PECL imagick 2.0.0)
Sets the font stretch to use when annotating with text

Parameters

int $fontStretch

STRETCH_ constant

Return Value

bool

No value is returned.

bool setStrokeAntialias(bool $stroke_antialias)

(PECL imagick 2.0.0)
Controls whether stroked outlines are antialiased

Parameters

bool $stroke_antialias

the antialias setting

Return Value

bool

No value is returned.

bool setTextAlignment(int $alignment)

(PECL imagick 2.0.0)
Specifies a text alignment

Parameters

int $alignment

ALIGN_ constant

Return Value

bool

No value is returned.

bool setTextDecoration(int $decoration)

(PECL imagick 2.0.0)
Specifies a decoration

Parameters

int $decoration

DECORATION_ constant

Return Value

bool

No value is returned.

bool setTextUnderColor(ImagickPixel $under_color)

(PECL imagick 2.0.0)
Specifies the color of a background rectangle

Parameters

ImagickPixel $under_color

the under color

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool setViewbox(int $x1, int $y1, int $x2, int $y2)

(PECL imagick 2.0.0)
Sets the overall canvas size

Parameters

int $x1

left x coordinate

int $y1

left y coordinate

int $x2

right x coordinate

int $y2

right y coordinate

Return Value

bool

No value is returned.

bool affine(array $affine)

(PECL imagick 2.0.0)
Adjusts the current affine transformation matrix

Parameters

array $affine

Affine matrix parameters

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool bezier(array $coordinates)

(PECL imagick 2.0.0)
Draws a bezier curve

Parameters

array $coordinates

Multidimensional array like array( array( 'x' => 1, 'y' => 2 ), array( 'x' => 3, 'y' => 4 ) )

Return Value

bool

No value is returned.

Exceptions

ImagickDrawException

bool composite(int $compose, float $x, float $y, float $width, float $height, Imagick $compositeWand)

(PECL imagick 2.0.0)
Composites an image onto the current image

Parameters

int $compose

composition operator. One of COMPOSITE_ constants

float $x

x coordinate of the top left corner

float $y

y coordinate of the top left corner

float $width

width of the composition image

float $height

height of the composition image

Imagick $compositeWand

the Imagick object where composition image is taken from

Return Value

bool

TRUE on success.

Exceptions

ImagickException

bool color(float $x, float $y, int $paintMethod)

(PECL imagick 2.0.0)
Draws color on image

Parameters

float $x

x coordinate of the paint

float $y

y coordinate of the paint

int $paintMethod

one of the PAINT_ constants

Return Value

bool

No value is returned.

bool comment(string $comment)

(PECL imagick 2.0.0)
Adds a comment

Parameters

string $comment

The comment string to add to vector output stream

Return Value

bool

No value is returned.

string|false getClipPath()

(PECL imagick 2.0.0)
Obtains the current clipping path ID

Return Value

string|false

a string containing the clip path ID or false if no clip path exists.

int getClipRule()

(PECL imagick 2.0.0)
Returns the current polygon fill rule

Return Value

int

one of the FILLRULE_ constants.

int getClipUnits()

(PECL imagick 2.0.0)
Returns the interpretation of clip path units

Return Value

int

an int on success.

ImagickPixel getFillColor()

(PECL imagick 2.0.0)
Returns the fill color

Return Value

ImagickPixel

an ImagickPixel object.

float getFillOpacity()

(PECL imagick 2.0.0)
Returns the opacity used when drawing

Return Value

float

The opacity.

int getFillRule()

(PECL imagick 2.0.0)
Returns the fill rule

Return Value

int

a FILLRULE_ constant

int getGravity()

(PECL imagick 2.0.0)
Returns the text placement gravity

Return Value

int

a GRAVITY_ constant on success and 0 if no gravity is set.

bool getStrokeAntialias()

(PECL imagick 2.0.0)
Returns the current stroke antialias setting

Return Value

bool

TRUE if antialiasing is on and false if it is off.

ImagickPixel getStrokeColor()

(PECL imagick 2.0.0)
Returns the color used for stroking object outlines

Return Value

ImagickPixel

an ImagickPixel object which describes the color.

array getStrokeDashArray()

(PECL imagick 2.0.0)
Returns an array representing the pattern of dashes and gaps used to stroke paths

Return Value

array

an array on success and empty array if not set.

float getStrokeDashOffset()

(PECL imagick 2.0.0)
Returns the offset into the dash pattern to start the dash

Return Value

float

a float representing the offset and 0 if it's not set.

int getStrokeLineCap()

(PECL imagick 2.0.0)
Returns the shape to be used at the end of open subpaths when they are stroked

Return Value

int

one of the LINECAP_ constants or 0 if stroke linecap is not set.

int getStrokeLineJoin()

(PECL imagick 2.0.0)
Returns the shape to be used at the corners of paths when they are stroked

Return Value

int

one of the LINEJOIN_ constants or 0 if stroke line join is not set.

int getStrokeMiterLimit()

(PECL imagick 2.0.0)
Returns the stroke miter limit

Return Value

int

an int describing the miter limit and 0 if no miter limit is set.

float getStrokeOpacity()

(PECL imagick 2.0.0)
Returns the opacity of stroked object outlines

Return Value

float

a float describing the opacity.

float getStrokeWidth()

(PECL imagick 2.0.0)
Returns the width of the stroke used to draw object outlines

Return Value

float

a float describing the stroke width.

int getTextAlignment()

(PECL imagick 2.0.0)
Returns the text alignment

Return Value

int

one of the ALIGN_ constants and 0 if no align is set.

bool getTextAntialias()

(PECL imagick 2.0.0)
Returns the current text antialias setting

Return Value

bool

TRUE if text is antialiased and false if not.

string getVectorGraphics()

(PECL imagick 2.0.0)
Returns a string containing vector graphics

Return Value

string

a string containing the vector graphics.

ImagickPixel getTextUnderColor()

(PECL imagick 2.0.0)
Returns the text under color

Return Value

ImagickPixel

an ImagickPixel object describing the color.

Exceptions

ImagickDrawException

bool pathClose()

(PECL imagick 2.0.0)
Adds a path element to the current path

Return Value

bool

No value is returned.

bool pathCurveToAbsolute(float $x1, float $y1, float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

Parameters

float $x1

x coordinate of the first control point

float $y1

y coordinate of the first control point

float $x2

x coordinate of the second control point

float $y2

y coordinate of the first control point

float $x

x coordinate of the curve end

float $y

y coordinate of the curve end

Return Value

bool

No value is returned.

bool pathCurveToRelative(float $x1, float $y1, float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

Parameters

float $x1

x coordinate of starting control point

float $y1

y coordinate of starting control point

float $x2

x coordinate of ending control point

float $y2

y coordinate of ending control point

float $x

ending x coordinate

float $y

ending y coordinate

Return Value

bool

No value is returned.

bool pathCurveToQuadraticBezierAbsolute(float $x1, float $y1, float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

Parameters

float $x1

x coordinate of the control point

float $y1

y coordinate of the control point

float $x

x coordinate of the end point

float $y

y coordinate of the end point

Return Value

bool

No value is returned.

bool pathCurveToQuadraticBezierRelative(float $x1, float $y1, float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

Parameters

float $x1

starting x coordinate

float $y1

starting y coordinate

float $x

ending x coordinate

float $y

ending y coordinate

Return Value

bool

No value is returned.

bool pathCurveToQuadraticBezierSmoothAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

Parameters

float $x

ending x coordinate

float $y

ending y coordinate

Return Value

bool

No value is returned.

bool pathCurveToQuadraticBezierSmoothRelative(float $x, float $y)

(PECL imagick 2.0.0)
Draws a quadratic Bezier curve

Parameters

float $x

ending x coordinate

float $y

ending y coordinate

Return Value

bool

No value is returned.

bool pathCurveToSmoothAbsolute(float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

Parameters

float $x2

x coordinate of the second control point

float $y2

y coordinate of the second control point

float $x

x coordinate of the ending point

float $y

y coordinate of the ending point

Return Value

bool

No value is returned.

bool pathCurveToSmoothRelative(float $x2, float $y2, float $x, float $y)

(PECL imagick 2.0.0)
Draws a cubic Bezier curve

Parameters

float $x2

x coordinate of the second control point

float $y2

y coordinate of the second control point

float $x

x coordinate of the ending point

float $y

y coordinate of the ending point

Return Value

bool

No value is returned.

bool pathEllipticArcAbsolute(float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y)

(PECL imagick 2.0.0)
Draws an elliptical arc

Parameters

float $rx

x radius

float $ry

y radius

float $x_axis_rotation

x axis rotation

bool $large_arc_flag

large arc flag

bool $sweep_flag

sweep flag

float $x

x coordinate

float $y

y coordinate

Return Value

bool

No value is returned.

bool pathEllipticArcRelative(float $rx, float $ry, float $x_axis_rotation, bool $large_arc_flag, bool $sweep_flag, float $x, float $y)

(PECL imagick 2.0.0)
Draws an elliptical arc

Parameters

float $rx

x radius

float $ry

y radius

float $x_axis_rotation

x axis rotation

bool $large_arc_flag

large arc flag

bool $sweep_flag

sweep flag

float $x

x coordinate

float $y

y coordinate

Return Value

bool

No value is returned.

bool pathFinish()

(PECL imagick 2.0.0)
Terminates the current path

Return Value

bool

No value is returned.

bool pathLineToAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Draws a line path

Parameters

float $x

starting x coordinate

float $y

ending x coordinate

Return Value

bool

No value is returned.

bool pathLineToRelative(float $x, float $y)

(PECL imagick 2.0.0)
Draws a line path

Parameters

float $x

starting x coordinate

float $y

starting y coordinate

Return Value

bool

No value is returned.

bool pathLineToHorizontalAbsolute(float $x)

(PECL imagick 2.0.0)
Draws a horizontal line path

Parameters

float $x

x coordinate

Return Value

bool

No value is returned.

bool pathLineToHorizontalRelative(float $x)

(PECL imagick 2.0.0)
Draws a horizontal line

Parameters

float $x

x coordinate

Return Value

bool

No value is returned.

bool pathLineToVerticalAbsolute(float $y)

(PECL imagick 2.0.0)
Draws a vertical line

Parameters

float $y

y coordinate

Return Value

bool

No value is returned.

bool pathLineToVerticalRelative(float $y)

(PECL imagick 2.0.0)
Draws a vertical line path

Parameters

float $y

y coordinate

Return Value

bool

No value is returned.

bool pathMoveToAbsolute(float $x, float $y)

(PECL imagick 2.0.0)
Starts a new sub-path

Parameters

float $x

x coordinate of the starting point

float $y

y coordinate of the starting point

Return Value

bool

No value is returned.

bool pathMoveToRelative(float $x, float $y)

(PECL imagick 2.0.0)
Starts a new sub-path

Parameters

float $x

target x coordinate

float $y

target y coordinate

Return Value

bool

No value is returned.

bool pathStart()

(PECL imagick 2.0.0)
Declares the start of a path drawing list

Return Value

bool

No value is returned.

bool polyline(array $coordinates)

(PECL imagick 2.0.0)
Draws a polyline

Parameters

array $coordinates

array of x and y coordinates: array( array( 'x' => 4, 'y' => 6 ), array( 'x' => 8, 'y' => 10 ) )

Return Value

bool

TRUE on success.

Exceptions

ImagickDrawException

bool popClipPath()

(PECL imagick 2.0.0)
Terminates a clip path definition

Return Value

bool

No value is returned.

bool popDefs()

(PECL imagick 2.0.0)
Terminates a definition list

Return Value

bool

No value is returned.

bool popPattern()

(PECL imagick 2.0.0)
Terminates a pattern definition

Return Value

bool

TRUE on success or FALSE on failure.

Exceptions

ImagickException

bool pushClipPath(string $clip_mask_id)

(PECL imagick 2.0.0)
Starts a clip path definition

Parameters

string $clip_mask_id

Clip mask Id

Return Value

bool

No value is returned.

bool pushDefs()

(PECL imagick 2.0.0)
Indicates that following commands create named elements for early processing

Return Value

bool

No value is returned.

bool pushPattern(string $pattern_id, float $x, float $y, float $width, float $height)

(PECL imagick 2.0.0)
Indicates that subsequent commands up to a ImagickDraw::opPattern() command comprise the definition of a named pattern

Parameters

string $pattern_id

the pattern Id

float $x

x coordinate of the top-left corner

float $y

y coordinate of the top-left corner

float $width

width of the pattern

float $height

height of the pattern

Return Value

bool

TRUE on success or FALSE on failure.

bool render()

(PECL imagick 2.0.0)
Renders all preceding drawing commands onto the image

Return Value

bool

TRUE on success or FALSE on failure.

Exceptions

ImagickException

bool rotate(float $degrees)

(PECL imagick 2.0.0)
Applies the specified rotation to the current coordinate space

Parameters

float $degrees

degrees to rotate

Return Value

bool

No value is returned.

bool scale(float $x, float $y)

(PECL imagick 2.0.0)
Adjusts the scaling factor

Parameters

float $x

horizontal factor

float $y

vertical factor

Return Value

bool

No value is returned.

bool setClipPath(string $clip_mask)

(PECL imagick 2.0.0)
Associates a named clipping path with the image

Parameters

string $clip_mask

the clipping path name

Return Value

bool

No value is returned.

Exceptions

ImagickException

bool setClipRule(int $fill_rule)

(PECL imagick 2.0.0)
Set the polygon fill rule to be used by the clipping path

Parameters

int $fill_rule

FILLRULE_ constant

Return Value

bool

No value is returned.

bool setClipUnits(int $clip_units)

(PECL imagick 2.0.0)
Sets the interpretation of clip path units

Parameters

int $clip_units

the number of clip units

Return Value

bool

No value is returned.

bool setFillOpacity(float $fillOpacity)

(PECL imagick 2.0.0)
Sets the opacity to use when drawing using the fill color or fill texture

Parameters

float $fillOpacity

the fill opacity

Return Value

bool

No value is returned.

bool setFillPatternURL(string $fill_url)

(PECL imagick 2.0.0)
Sets the URL to use as a fill pattern for filling objects

Parameters

string $fill_url

URL to use to obtain fill pattern.

Return Value

bool

TRUE on success or FALSE on failure.

Exceptions

ImagickException

bool setFillRule(int $fill_rule)

(PECL imagick 2.0.0)
Sets the fill rule to use while drawing polygons

Parameters

int $fill_rule

FILLRULE_ constant

Return Value

bool

No value is returned.

bool setGravity(int $gravity)

(PECL imagick 2.0.0)
Sets the text placement gravity

Parameters

int $gravity

GRAVITY_ constant

Return Value

bool

No value is returned.

bool setStrokePatternURL(string $stroke_url)

(PECL imagick 2.0.0)
Sets the pattern used for stroking object outlines

Parameters

string $stroke_url

stroke URL

Return Value

bool imagick.imagickdraw.return.success;

Exceptions

ImagickException

bool setStrokeDashOffset(float $dash_offset)

(PECL imagick 2.0.0)
Specifies the offset into the dash pattern to start the dash

Parameters

float $dash_offset

dash offset

Return Value

bool

No value is returned.

bool setStrokeLineCap(int $linecap)

(PECL imagick 2.0.0)
Specifies the shape to be used at the end of open subpaths when they are stroked

Parameters

int $linecap

LINECAP_ constant

Return Value

bool

No value is returned.

bool setStrokeLineJoin(int $linejoin)

(PECL imagick 2.0.0)
Specifies the shape to be used at the corners of paths when they are stroked

Parameters

int $linejoin

LINEJOIN_ constant

Return Value

bool

No value is returned.

bool setStrokeMiterLimit(int $miterlimit)

(PECL imagick 2.0.0)
Specifies the miter limit

Parameters

int $miterlimit

the miter limit

Return Value

bool

No value is returned.

bool setStrokeOpacity(float $stroke_opacity)

(PECL imagick 2.0.0)
Specifies the opacity of stroked object outlines

Parameters

float $stroke_opacity

stroke opacity. 1.0 is fully opaque

Return Value

bool

No value is returned.

bool setVectorGraphics(string $xml)

(PECL imagick 2.0.0)
Sets the vector graphics

Parameters

string $xml

xml containing the vector graphics

Return Value

bool

TRUE on success or FALSE on failure.

bool pop()

(PECL imagick 2.0.0)
Destroys the current ImagickDraw in the stack, and returns to the previously pushed ImagickDraw

Return Value

bool

TRUE on success and false on failure.

Exceptions

ImagickException

bool push()

(PECL imagick 2.0.0)
Clones the current ImagickDraw and pushes it to the stack

Return Value

bool

TRUE on success or FALSE on failure.

Exceptions

ImagickException

bool setStrokeDashArray(array $dashArray)

(PECL imagick 2.0.0)
Specifies the pattern of dashes and gaps used to stroke paths

Parameters

array $dashArray

array of floats

Return Value

bool

TRUE on success.

void setOpacity(float $opacity)

Since: 3.4.1

Sets the opacity to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.

Parameters

float $opacity

Return Value

void

float getOpacity()

Since: 3.4.1

Returns the opacity used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.

Return Value

float

bool setFontResolution(float $x, float $y)

Since: 3.4.1

Sets the image font resolution.

Parameters

float $x
float $y

Return Value

bool

Exceptions

ImagickException

array getFontResolution()

Since: 3.4.1

Gets the image X and Y resolution.

Return Value

array

Exceptions

ImagickException

bool getTextDirection()

Since: 3.4.1

Returns the direction that will be used when annotating with text.

Return Value

bool

bool setTextDirection(int $direction)

Since: 3.4.1

Sets the font style to use when annotating with text. The AnyStyle enumeration acts as a wild-card "don't care" option.

Parameters

int $direction

Return Value

bool

ImagickPixel getBorderColor()

Since: 3.4.1

Returns the border color used for drawing bordered objects.

Return Value

ImagickPixel

bool setBorderColor(ImagickPixel $color)

Since: 3.4.1

Sets the border color to be used for drawing bordered objects.

Parameters

ImagickPixel $color

Return Value

bool

Exceptions

ImagickDrawException

string|null getDensity()

Since: 3.4.1

Obtains the vertical and horizontal resolution.

Return Value

string|null

bool setDensity(string $density_string)

Since: 3.4.1

Sets the vertical and horizontal resolution.

Parameters

string $density_string

Return Value

bool

Exceptions

ImagickException

ImagickDraw clone() $PECL imagick 2.0.0)


Makes an exact copy of the specified ImagickDraw object

Parameters

) $PECL imagick 2.0.0

Return Value

ImagickDraw