nanovg-0.2.0.0: Haskell bindings for nanovg

Safe HaskellSafe
LanguageHaskell2010

NanoVG.Internal.Path

Synopsis

Documentation

data Winding

Constructors

CCW 
CW 

beginPath :: Context -> IO ()

Clears the current path and sub-paths.

moveTo :: Context -> CFloat -> CFloat -> IO ()

Starts new sub-path with specified point as first point.

lineTo :: Context -> CFloat -> CFloat -> IO ()

Adds line segment from the last point in the path to the specified point.

bezierTo :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Adds cubic bezier segment from last point in the path via two control points to the specified point.

quadTo :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Adds quadratic bezier segment from last point in the path via a control point to the specified point

arcTo :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Adds an arc segment at the corner defined by the last path point, and two specified points.

closePath :: Context -> IO ()

Closes current sub-path with a line segment.

pathWinding :: Context -> CInt -> IO ()

Sets the current sub-path winding, see NVGwinding and NVGsolidity.

arc :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Winding -> IO ()

Creates new circle arc shaped sub-path. The arc center is at cx,cy, the arc radius is r, and the arc is drawn from angle a0 to a1, and swept in direction dir (NVG_CCW, or NVG_CW). Angles are specified in radians.

rect :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Creates new rectangle shaped sub-path.

roundedRect :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Creates new rounded rectangle shaped sub-path.

ellipse :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

Creates new ellipse shaped sub-path.

circle :: Context -> CFloat -> CFloat -> CFloat -> IO ()

Creates new circle shaped sub-path.

fill :: Context -> IO ()

Fills the current path with current fill style.

stroke :: Context -> IO ()

Fills the current path with current stroke style.

arcTo'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

arc'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> IO ()

rect'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()

fill'_ :: Context -> IO ()