Canvas

A simple 2D vector engine inspired by HTML5 canvas. Supports rendering arbitrary polygons and cubic Bezier paths, filled and outlined. Not real-time.

Constructors

this
this(SuperImage img)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

beginPath
void beginPath()
Undocumented in source. Be warned that the author may not have intended to support it.
blitTmpBuffer
void blitTmpBuffer(Color4f color)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear(Color4f c)
Undocumented in source. Be warned that the author may not have intended to support it.
drawBezierCurve
void drawBezierCurve(Vector2f a, Vector2f b, Vector2f c, Vector2f d)
Undocumented in source. Be warned that the author may not have intended to support it.
drawContour
void drawContour()
Undocumented in source. Be warned that the author may not have intended to support it.
drawLine
void drawLine(Vector2f p1, Vector2f p2)
Undocumented in source. Be warned that the author may not have intended to support it.
drawLineTangent
void drawLineTangent(Vector2f p1, Vector2f p2, Vector2f t1, Vector2f t2)
Undocumented in source. Be warned that the author may not have intended to support it.
endPath
void endPath()
Undocumented in source. Be warned that the author may not have intended to support it.
fillColor
void fillColor(Color4f c)
Undocumented in source. Be warned that the author may not have intended to support it.
fillColor
Color4f fillColor()
Undocumented in source. Be warned that the author may not have intended to support it.
fillShape
void fillShape()
Undocumented in source. Be warned that the author may not have intended to support it.
image
SuperImage image()
Undocumented in source. Be warned that the author may not have intended to support it.
lineColor
void lineColor(Color4f c)
Undocumented in source. Be warned that the author may not have intended to support it.
lineColor
Color4f lineColor()
Undocumented in source. Be warned that the author may not have intended to support it.
lineWidth
void lineWidth(float w)
Undocumented in source. Be warned that the author may not have intended to support it.
lineWidth
float lineWidth()
Undocumented in source. Be warned that the author may not have intended to support it.
pathAddBezierCubic
void pathAddBezierCubic(Vector2f p1, Vector2f p2, Vector2f p3, Vector2f p4)
Undocumented in source. Be warned that the author may not have intended to support it.
pathAddLine
void pathAddLine(Vector2f p1, Vector2f p2)
Undocumented in source. Be warned that the author may not have intended to support it.
pathBezierTo
void pathBezierTo(Vector2f cp1, Vector2f cp2, Vector2f endPoint)
Undocumented in source. Be warned that the author may not have intended to support it.
pathFill
void pathFill()
Undocumented in source. Be warned that the author may not have intended to support it.
pathLineTo
void pathLineTo(float x, float y)
Undocumented in source. Be warned that the author may not have intended to support it.
pathMoveTo
void pathMoveTo(float x, float y)
Undocumented in source. Be warned that the author may not have intended to support it.
pathStroke
void pathStroke()
Undocumented in source. Be warned that the author may not have intended to support it.
resetTransform
void resetTransform()
Undocumented in source. Be warned that the author may not have intended to support it.
rotate
void rotate(float a)
Undocumented in source. Be warned that the author may not have intended to support it.
scale
void scale(float x, float y)
Undocumented in source. Be warned that the author may not have intended to support it.
transform
void transform(Matrix3x3f m)
Undocumented in source. Be warned that the author may not have intended to support it.
translate
void translate(float x, float y)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_image
SuperImage _image;
Undocumented in source.
contour
Array!ContourSegment contour;
Undocumented in source.
penPosition
Vector2f penPosition;
Undocumented in source.
state
CanvasState state;
Undocumented in source.
subpixelResolution
uint subpixelResolution;
Undocumented in source.
tesselationStep
float tesselationStep;
Undocumented in source.
tmpBuffer
SuperImage tmpBuffer;
Undocumented in source.

Meta