imagemagick-0.0.3.6: bindings to imagemagick library

Safe HaskellNone
LanguageHaskell98

Graphics.ImageMagick.MagickWand.DrawingWand

Synopsis

Documentation

getFillColor :: MonadResource m => PDrawingWand -> PPixelWand -> m ()

returns the fill color used for drawing filled objects.

setFillColor :: MonadResource m => PDrawingWand -> PPixelWand -> m ()

DrawSetFillColor() sets the fill color to be used for drawing filled objects.

setFillPatternURL :: MonadResource m => PDrawingWand -> Text -> m ()

Sets the URL to use as a fill pattern for filling objects. Only local URLs ("#identifier") are supported at this time. These local URLs are normally created by defining a named fill pattern with pushPattern/popPattern.

setFillRule :: MonadResource m => PDrawingWand -> FillRule -> m ()

Sets the fill rule to use while drawing polygons.

setFont :: MonadResource m => PDrawingWand -> ByteString -> m ()

Sets the fully-sepecified font to use when annotating with text.

setFontSize :: MonadResource m => PDrawingWand -> Double -> m ()

Sets the font pointsize to use when annotating with text.

setGravity :: MonadResource m => PDrawingWand -> GravityType -> m ()

Sets the text placement gravity to use when annotating with text.

setStrokeColor :: MonadResource m => PDrawingWand -> PPixelWand -> m ()

sets the color used for stroking object outlines.

setStrokeDashArray :: MonadResource m => PDrawingWand -> [Double] -> m ()

Specifies the pattern of dashes and gaps used to stroke paths. The stroke dash array represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass an emtpy list. A typical stroke dash array might contain the members 5 3 2.

setStrokeLineCap :: MonadResource m => PDrawingWand -> LineCap -> m ()

Specifies the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are undefinedCap, `buttCap, roundCap and squareCap.

setStrokeLineJoin :: MonadResource m => PDrawingWand -> LineJoin -> m ()

Specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are undefinedJoin, miterJoin, roundJoin and bevelJoin.

setStrokeOpacity :: MonadResource m => PDrawingWand -> Double -> m ()

specifies the opacity of stroked object outlines.

setStrokeWidth :: MonadResource m => PDrawingWand -> Double -> m ()

sets the width of the stroke used to draw object outlines.

setTextAntialias :: MonadResource m => PDrawingWand -> Bool -> m ()

Controls whether text is antialiased. Text is antialiased by default.

drawAnnotation

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

x ordinate to left of text

-> Double

y ordinate to text baseline

-> Text

text to draw

-> m () 

Draws text on the image.

drawCircle

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

origin x ordinate

-> Double

origin y ordinate

-> Double

perimeter x ordinate

-> Double

perimeter y ordinate

-> m () 

Draws a circle on the image.

drawComposite

Arguments

:: MonadResource m 
=> PDrawingWand 
-> CompositeOperator

composition operator

-> Double

x ordinate of top left corner

-> Double

y ordinate of top left corner

-> Double

width to resize image to prior to compositing, specify zero to use existing width

-> Double

height to resize image to prior to compositing, specify zero to use existing height

-> PMagickWand

image to composite is obtained from this wand

-> m () 

Composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.

drawEllipse

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

origin x ordinate

-> Double

origin y ordinate

-> Double

radius in x

-> Double

radius in y

-> Double

starting rotation in degrees

-> Double

ending rotation in degrees

-> m () 

Draws an ellipse on the image.

drawLine

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

starting x ordinate

-> Double

starting y ordinate

-> Double

ending x ordinate

-> Double

ending y ordinate

-> m () 

Draws a line on the image using the current stroke color, stroke opacity, and stroke width.

drawPoint :: MonadResource m => PDrawingWand -> Double -> Double -> m ()

Draws a point using the current fill color.

drawPolygon

Arguments

:: MonadResource m 
=> PDrawingWand 
-> [PointInfo]

coordinates

-> m () 

Draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

drawRectangle

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

x ordinate of first coordinate

-> Double

y ordinate of first coordinate

-> Double

x ordinate of second coordinate

-> Double

y ordinate of second coordinate

-> m () 

Draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.

drawRoundRectangle

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Double

x ordinate of first coordinate

-> Double

y ordinate of first coordinate

-> Double

x ordinate of second coordinate

-> Double

y ordinate of second coordinate

-> Double

radius of corner in horizontal direction

-> Double

radius of corner in vertical direction

-> m () 

DrawRoundRectangle() draws a rounted rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings.

drawColor :: MonadResource m => PDrawingWand -> Double -> Double -> PaintMethod -> m ()

DrawColor() draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:

PointMethod: Recolors the target pixel ReplaceMethod: Recolor any pixel that matches the target pixel. FloodfillMethod: Recolors target pixels and matching neighbors. ResetMethod: Recolor all pixels.

pushDrawingWand :: MonadResource m => PDrawingWand -> m ()

Clones the current drawing wand to create a new drawing wand. The original drawing wand(s) may be returned to by invoking popDrawingWand. The drawing wands are stored on a drawing wand stack. For every Pop there must have already been an equivalent Push.

popDrawingWand :: MonadResource m => PDrawingWand -> m ()

Destroys the current drawing wand and returns to the previously pushed drawing wand. Multiple drawing wands may exist. It is an error to attempt to pop more drawing wands than have been pushed, and it is proper form to pop all drawing wands which have been pushed.

rotate :: MonadResource m => PDrawingWand -> Double -> m ()

Applies the specified rotation to the current coordinate space.

translate :: MonadResource m => PDrawingWand -> Double -> Double -> m ()

Applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.

pushPattern

Arguments

:: MonadResource m 
=> PDrawingWand 
-> Text

pattern identification for later reference

-> Double 
-> Double 
-> Double 
-> Double 
-> m () 

Indicates that subsequent commands up to a popPattern command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.

popPattern :: MonadResource m => PDrawingWand -> m ()

Terminates a pattern definition.