class
VectorPath
Represents a vector path containing curves and geometric shapes that can be rasterized to any dimension.
Public
Constructors
VectorPath
Methods
SetCanvasSize
Determines the size of the coordinate system in which to draw the path.
This will be used for scaling/offset when rasterizing the path and for bounds testing.
GetCanvasSize
SetDrawCursor
Changes the current location of the draw cursor.
Any command using a draw cursor will use this value as the starting point.
SetSolidity
Sets the solidity of the drawn path.
By default paths will draw solid shapes, but changing the solidity to Hole allows you to create holes in previously drawn paths. Solidity should be set /after/ recording a path, and will be applied to the last recorded path.
ClosePath
Closes a path by connecting the first and last path points.
This should be called before starting a new path.
DrawLineTo
Draws a line from the current cursor position to the target position.
Advances the cursor to the target position.
DrawArcTo
Draws an arc using three points on the arc (last cursor position, and two provided points), and a radius of the circle that the arc would be a part of..
Advances the cursor to the arc end point.
DrawQuadraticBezierTo
Draws a quadratic bezier curve using the current cursor position as the starting point.
Advanced the cursor to the curve end point.
DrawCubicBezierTo
Draws a cubic bezier curve using the current cursor position as the starting point.
Advanced the cursor to the curve end point.
DrawRoundedRectangle
Draws a rectangle with rounded corners, all corners having the same radius.
DrawRoundedRectangle
Draws a rectangle with rounded corners, with explicit radius for each corner.
DrawArc
Draws an arc.
Note if the start of the arc doesn't correspond to the last drawn cursor position, and line will be drawn between the last drawn point (if any) and the arc start.
- center
- Center of the circle that the arc is a part of.
- radius
- Radius of the circle that the arc is a part of.
- startAngle
- Angle at which to start drawing the arc.
- endAngle
- Angle at which to start drawing the arc.
- direction
- Direction of the arc. Doesn't affect coordinate system of or , but the direction in which the arc is filled. e.g. start angle 0, end angle 90 and direction 'counter-clickwise' will result in a 270 degree arc.
SetFillPaint
Sets the paint to use when calling DrawFill().
SetStrokePaint
Sets the paint to use when calling DrawStroke().
SetMiterLimit
Sets the limit that controls when is sharp stroke corner beveled.
SetLineCapType
Sets the style that controls how is the line end rendered.
SetLineJoinType
Sets the style that controls how are line bends rendered.
SetBlendMode
Sets the blend mode that determines how a shape blends with existing shapes in the path.
SetAntialiasShapes
Enables or disables antialiasing for the shape.
SetScissorRectangle
Sets a rectangle to clip shape rendering to.
GetCommands
Returns all the currently recorded commands.
GetCommandStates
Returns all the states associated with the recorded commands.
CreateRenderable
Creates a renderable object that can be used for rasterizing the vector path into pixels.