Static variables
Static methods
staticinlinedrawAlignedCharacters(this:Graphics, text:Array<Int>, start:Int, length:Int, x:Float, y:Float, alignment:Alignment):Void
staticinlinedrawAlignedString(this:Graphics, text:String, x:Float, y:Float, alignment:Alignment):Void
staticinlinedrawArc(this:Graphics, cx:Float, cy:Float, radius:Float, sAngle:Float, eAngle:Float, strength:Float = 1, ccw:Bool = false, segments:Int = 0):Void
Draws a arc.
Parameters:
ccw | (optional) Specifies whether the drawing should be counterclockwise. |
---|---|
segments | (optional) The amount of lines that should be used to render the arc. |
staticinlinedrawCircle(this:Graphics, cx:Float, cy:Float, radius:Float, strength:Float = 1, segments:Int = 0):Void
Draws a circle.
Parameters:
segments | (optional) The amount of lines that should be used to render the circle. |
---|
staticinlinedrawCubicBezier(this:Graphics, x:Array<Float>, y:Array<Float>, segments:Int = 20, strength:Float = 1.0):Void
Draws a cubic bezier using 4 pairs of points. If the x and y arrays have a length bigger then 4, the additional points will be ignored. With a length smaller of 4 a error will occur, there is no check for this. You can construct the curves visually in Inkscape with a path using default nodes. Provide x and y in the following order: startPoint, controlPoint1, controlPoint2, endPoint Reference: http://devmag.org.za/2011/04/05/bzier-curves-a-tutorial/
staticinlinedrawCubicBezierPath(this:Graphics, x:Array<Float>, y:Array<Float>, segments:Int = 20, strength:Float = 1.0):Void
Draws multiple cubic beziers joined by the end point. The minimum size is 4 pairs of points (a single curve).
staticinlinedrawPolygon(this:Graphics, x:Float, y:Float, vertices:Array<Vec2>, strength:Float = 1):Void
Draws a convex polygon.
staticinlinedrawQuadraticBezier(this:Graphics, x:Array<Float>, y:Array<Float>, segments:Int = 20, strength:Float = 1.0):Void
Draws a quadratic bezier using 3 pairs of points. Provide x and y in the following order: startPoint, controlPoint, endPoint
staticinlinedrawQuadraticBezierPath(this:Graphics, x:Array<Float>, y:Array<Float>, segments:Int = 20, strength:Float = 1.0):Void
Draws multiple quadratic beziers joined by the end point. The minimum size is 3 pairs of points (a single curve).
staticinlinedrawScaledImage(this:Graphics, img:Image, dx:Float, dy:Float, dw:Float, dh:Float):Void
dx, dy, dw, dh
arguments is the rectangle to draw into the destination context
staticinlinedrawScaledSubImage(this:Graphics, img:Image, sx:Float, sy:Float, sw:Float, sh:Float, dx:Float, dy:Float, dw:Float, dh:Float):Void
sx, sy, sw, sh
arguments is the sub-rectangle of the source img
image
dx, dy, dw, dh
arguments is the rectangle to draw into the destination context
staticinlinedrawSubImage(this:Graphics, img:Image, x:Float, y:Float, sx:Float, sy:Float, sw:Float, sh:Float):Void
sx, sy, sw, sh
arguments is the sub-rectangle of the source img
image
staticinlinefillArc(this:Graphics, cx:Float, cy:Float, radius:Float, sAngle:Float, eAngle:Float, ccw:Bool = false, segments:Int = 0):Void
Draws a filled arc.
Parameters:
ccw | (optional) Specifies whether the drawing should be counterclockwise. |
---|---|
segments | (optional) The amount of lines that should be used to render the arc. |
staticinlinefillCircle(this:Graphics, cx:Float, cy:Float, radius:Float, segments:Int = 0):Void
Draws a filled circle.
Parameters:
segments | (optional) The amount of lines that should be used to render the circle. |
---|
staticinlinefillPolygon(this:Graphics, x:Float, y:Float, vertices:Array<Vec2>):Void
Draws a filled convex polygon.