imagemagick-0.0.3.6: bindings to imagemagick library

Safe HaskellNone
LanguageHaskell98

Graphics.ImageMagick.MagickWand.FFI.DrawingWand

Synopsis

Documentation

newDrawingWand :: IO (Ptr DrawingWand)

NewDrawingWand() returns a drawing wand required for all other methods in the API.

destroyDrawingWand :: Ptr DrawingWand -> IO (Ptr DrawingWand)

DestroyDrawingWand() frees all resources associated with the drawing wand. Once the drawing wand has been freed, it should not be used and further unless it re-allocated.

drawGetException :: Ptr DrawingWand -> Ptr ExceptionType -> IO CString

PixelGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.

drawGetFillColor :: Ptr DrawingWand -> Ptr PixelWand -> IO ()

DrawGetFillColor() returns the fill color used for drawing filled objects.

drawSetFillColor :: Ptr DrawingWand -> Ptr PixelWand -> IO ()

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

drawSetFillPatternURL :: Ptr DrawingWand -> CString -> IO MagickBooleanType

DrawSetFillPatternURL() 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 DrawPushPattern/DrawPopPattern.

drawSetFillRule :: Ptr DrawingWand -> FillRule -> IO ()

DrawSetFillRule() sets the fill rule to use while drawing polygons.

drawSetFont :: Ptr DrawingWand -> CString -> IO ()

DrawSetFont() sets the fully-sepecified font to use when annotating with text.

drawSetFontSize :: Ptr DrawingWand -> CDouble -> IO ()

DrawSetFontSize() sets the font pointsize to use when annotating with text.

drawSetGravity :: Ptr DrawingWand -> GravityType -> IO ()

DrawSetGravity() sets the text placement gravity to use when annotating with text.

drawSetStrokeAntialias

Arguments

:: Ptr DrawingWand 
-> MagickBooleanType

stroke_antialias

-> IO () 

DrawSetStrokeAntialias() controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.

drawSetStrokeColor

Arguments

:: Ptr DrawingWand 
-> Ptr PixelWand

stroke_wand

-> IO () 

DrawSetStrokeColor() sets the color used for stroking object outlines.

drawSetStrokeDashArray

Arguments

:: Ptr DrawingWand 
-> CSize

number of elements in dash array

-> Ptr CDouble

dash array values

-> IO () 

DrawSetStrokeDashArray() 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 a zero number_elements argument and null dash_array. A typical stroke dash array might contain the members 5 3 2.

drawSetStrokeLineCap

Arguments

:: Ptr DrawingWand 
-> LineCap

linecap

-> IO () 

DrawSetStrokeLineCap() 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.

drawSetStrokeLineJoin

Arguments

:: Ptr DrawingWand 
-> LineJoin

linejoin

-> IO () 

DrawSetStrokeLineJoin() 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.

drawSetStrokeOpacity

Arguments

:: Ptr DrawingWand 
-> CDouble

stroke_opacity

-> IO () 

DrawSetStrokeOpacity() specifies the opacity of stroked object outlines.

drawSetTextAntialias

Arguments

:: Ptr DrawingWand 
-> MagickBooleanType

antialias boolean. Set to false (0) to disable antialiasing.

-> IO () 

DrawSetStrokeOpacity() specifies the opacity of stroked object outlines.

drawSetStrokeWidth

Arguments

:: Ptr DrawingWand 
-> CDouble

stroke_width

-> IO () 

DrawSetStrokeWidth() sets the width of the stroke used to draw object outlines.

drawAnnotation

Arguments

:: Ptr DrawingWand 
-> CDouble

x ordinate to left of text

-> CDouble

y ordinate to text baseline

-> CString

text to draw

-> IO () 

DrawAnnotation() draws text on the image.

drawCircle

Arguments

:: Ptr DrawingWand 
-> CDouble

origin x ordinate

-> CDouble

origin y ordinate

-> CDouble

perimeter x ordinate

-> CDouble

perimeter y ordinate

-> IO () 

DrawCircle() draws a circle on the image.

drawComposite

Arguments

:: Ptr DrawingWand 
-> CompositeOperator

composition operator

-> CDouble

x ordinate of top left corner

-> CDouble

y ordinate of top left corner

-> CDouble

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

-> CDouble

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

-> Ptr MagickWand

image to composite is obtained from this wand

-> IO MagickBooleanType 

DrawComposite() composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.

drawEllipse

Arguments

:: Ptr DrawingWand 
-> CDouble

origin x ordinate

-> CDouble

origin y ordinate

-> CDouble

radius in x

-> CDouble

radius in y

-> CDouble

starting rotation in degrees

-> CDouble

ending rotation in degrees

-> IO () 

DrawEllipse() draws an ellipse on the image.

drawLine

Arguments

:: Ptr DrawingWand 
-> CDouble

starting x ordinate

-> CDouble

starting y ordinate

-> CDouble

ending x ordinate

-> CDouble

ending y ordinate

-> IO () 

DrawLine() draws a line on the image using the current stroke color, stroke opacity, and stroke width.

drawPolygon

Arguments

:: Ptr DrawingWand 
-> CSize

number of coordinates

-> Ptr PointInfo

coordinate array

-> IO () 

DrawPolygon() draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.

drawRectangle

Arguments

:: Ptr DrawingWand 
-> CDouble

x ordinate of first coordinate

-> CDouble

y ordinate of first coordinate

-> CDouble

x ordinate of second coordinate

-> CDouble

y ordinate of second coordinate

-> IO () 

DrawRectangle() draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.

drawRoundRectangle

Arguments

:: Ptr DrawingWand 
-> CDouble

x ordinate of first coordinate

-> CDouble

y ordinate of first coordinate

-> CDouble

x ordinate of second coordinate

-> CDouble

y ordinate of second coordinate

-> CDouble

radius of corner in horizontal direction

-> CDouble

radius of corner in vertical direction

-> IO () 

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

pushDrawingWand :: Ptr DrawingWand -> IO MagickBooleanType

PushDrawingWand() 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 :: Ptr DrawingWand -> IO MagickBooleanType

PopDrawingWand() 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.

drawRotate

Arguments

:: Ptr DrawingWand 
-> CDouble

degrees of rotation

-> IO () 

DrawRotate() applies the specified rotation to the current coordinate space.

drawTranslate

Arguments

:: Ptr DrawingWand 
-> CDouble

new x ordinate for coordinate system origin

-> CDouble

new y ordinate for coordinate system origin

-> IO () 

DrawTranslate() applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.

drawPushPattern

Arguments

:: Ptr DrawingWand 
-> CString

pattern identification for later reference

-> CDouble 
-> CDouble 
-> CDouble 
-> CDouble 
-> IO MagickBooleanType 

DrawPushPattern() indicates that subsequent commands up to a DrawPopPattern() 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.

drawPopPattern :: Ptr DrawingWand -> IO MagickBooleanType

DrawPopPattern() terminates a pattern definition.

drawColor :: Ptr DrawingWand -> CDouble -> CDouble -> PaintMethod -> IO ()

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.

drawPoint

Arguments

:: Ptr DrawingWand 
-> CDouble

target x coordinate

-> CDouble

target y coordinate

-> IO () 

DrawPoint() draws a point using the current fill color.