diagrams-hsqml-0.2.0.0: HsQML (Qt5) backend for Diagrams

Copyright(c) Marcin Mrotek, 2015
LicenseBSD-3
Maintainermarcin.jan.mrotek@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Diagrams.Backend.HsQML.DiagramObj.Commands

Description

As DiagramObj is a Monoid, complex diagrams may be obtained by mappending simple ones together. This module provides functions creating DiagramObjs containing a single command each.

Synopsis

Documentation

save :: DiagramObj () Source

Push the current state (style, font, etc) onto the state stack.

restore :: DiagramObj () Source

Pop the current state (style, font, etc) from the state stack.

text :: String -> Double -> Double -> DiagramObj () Source

Display text on a specified point.

beginPath :: DiagramObj () Source

Start assembling a new path.

closePath :: DiagramObj () Source

Connect the current path vertex to the start of the path.

moveTo :: P2 Double -> DiagramObj () Source

Change the current position.

stroke :: DiagramObj () Source

Stroke the current path.

fill :: DiagramObj () Source

Fill the current path. Works only on paths that were previously closed.

lineTo :: P2 Double -> DiagramObj () Source

Draw a straight line from the current position to a given point.

bezierCurveTo Source

Arguments

:: P2 Double

First control point.

-> P2 Double

Second control point

-> P2 Double

End point.

-> DiagramObj () 

Draw a bezier curve from the current position to a given point, using two control points.

setLineCap :: LineCap -> DiagramObj () Source

Set the line cap style.

setLineJoin :: LineJoin -> DiagramObj () Source

Set the line join style.

setLineMiterLimit :: LineMiterLimit -> DiagramObj () Source

Set the miter limit.

setOpacity :: Opacity -> DiagramObj () Source

Set the global alpha (subject to save and restore).

setLineWidth :: LineWidth Double -> DiagramObj () Source

Set the line width (output coordinates assumed).

getRGBA :: SomeColor -> (Double, Double, Double, Double) Source

Convert a colour to a tuple of (r,g,b,a) components.

setStrokeColour :: SomeColor -> DiagramObj () Source

Set stroke style to a flat colour.

setLineGradient :: DiagramObj () Source

Set stroke style to a previously assembled gradient.

setGradient :: [GradientStop Double] -> ObjRef GradientObj -> IO () Source

Add colour stops to a gradient.

setFillColour :: SomeColor -> DiagramObj () Source

Set fill style to a flat colour.

setFillGradient :: DiagramObj () Source

Set fill style to a previously defined gradient.

setFont :: Font -> DiagramObj () Source

Set font.

setFillRule :: FillRule -> DiagramObj () Source

Set fill rule.