nanovg-0.8.1.0: Haskell bindings for nanovg
Safe HaskellSafe-Inferred
LanguageHaskell2010

NanoVG.Internal.Path

Synopsis

Documentation

data Winding Source #

Constructors

CCW 
CW 

beginPath :: Context -> IO () Source #

Clears the current path and sub-paths.

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

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

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

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

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

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 () Source #

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 () Source #

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

closePath :: Context -> IO () Source #

Closes current sub-path with a line segment.

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

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

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

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 () Source #

Creates new rectangle shaped sub-path. Receives x, y, w and h

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

Creates new rounded rectangle shaped sub-path. In addition to x, y, w and h, it receives | r, indicating the radius (equal in all corners)

roundedRectVarying :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO () Source #

Creates new rounded rectangle shaped sub-path. In addition to x, y, w and h, it receives | rtl, rtr, rbr, rbl, the radius of each corner in clockwise order starting from top left

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

Creates new ellipse shaped sub-path.

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

Creates new circle shaped sub-path.

fill :: Context -> IO () Source #

Fills the current path with current fill style.

stroke :: Context -> IO () Source #

Fills the current path with current stroke style.

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