[14:7] extends: FxObj
Wraps the JavaFX GraphicsContext and provides 2D drawing operations for a Canvas. Obtain an instance by calling getGraphicsContext() on a Canvas object. The GraphicsContext maintains a state stack that can be saved and restored. State includes fill paint, stroke paint, line width, font, transforms, and clip.
setFill (object PaintObj)
Sets the fill paint. Accepts a Color, LinearGradient, or RadialGradient object.
PaintObj is a paint object (Color, LinearGradient, or RadialGradient).this object for chainingsetStroke (object PaintObj)
Sets the stroke paint. Accepts a Color, LinearGradient, or RadialGradient object.
PaintObj is a paint object (Color, LinearGradient, or RadialGradient).this object for chainingsetLineWidth (double Width)
Sets the stroke line width.
Width is a double with the line width.this object for chainingsetLineCap (string Cap)
Sets the line cap style.
Cap is a string: BUTT, ROUND, or SQUARE.this object for chainingsetLineJoin (string Join)
Sets the line join style.
Join is a string: MITER, BEVEL, or ROUND.this object for chainingsetMiterLimit (double Limit)
Sets the miter limit for MITER line joins.
Limit is a double with the miter limit.this object for chainingsetGlobalAlpha (double Alpha)
Sets the global opacity for all drawing operations.
Alpha is a double from 0.0 (transparent) to 1.0 (opaque).this object for chainingsetGlobalBlendMode (string Mode)
Sets the global blend mode for compositing.
Mode is a string with the blend mode (e.g. SRC_OVER, MULTIPLY, SCREEN, ADD, OVERLAY, DARKEN, LIGHTEN, COLOR_DODGE, COLOR_BURN, HARD_LIGHT, SOFT_LIGHT, DIFFERENCE, EXCLUSION, RED, GREEN, BLUE).this object for chainingfillRect (double X, double Y, double W, double H)
Fills a rectangle.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.this object for chainingstrokeRect (double X, double Y, double W, double H)
Strokes a rectangle outline.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.this object for chainingfillOval (double X, double Y, double W, double H)
Fills an oval.
X is a double with the X position of the bounding box.Y is a double with the Y position of the bounding box.W is a double with the width.H is a double with the height.this object for chainingstrokeOval (double X, double Y, double W, double H)
Strokes an oval outline.
X is a double with the X position of the bounding box.Y is a double with the Y position of the bounding box.W is a double with the width.H is a double with the height.this object for chainingfillArc (double X, double Y, double W, double H, double Start, double Extent, string Type)
Fills an arc.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.Start is a double with the start angle in degrees.Extent is a double with the angular extent in degrees.Type is a string with the arc type: OPEN, CHORD, or ROUND.this object for chainingstrokeArc (double X, double Y, double W, double H, double Start, double Extent, string Type)
Strokes an arc outline.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.Start is a double with the start angle in degrees.Extent is a double with the angular extent in degrees.Type is a string with the arc type: OPEN, CHORD, or ROUND.this object for chainingfillRoundRect (double X, double Y, double W, double H, double ArcW, double ArcH)
Fills a rounded rectangle.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.ArcW is a double with the arc width for corners.ArcH is a double with the arc height for corners.this object for chainingstrokeRoundRect (double X, double Y, double W, double H, double ArcW, double ArcH)
Strokes a rounded rectangle outline.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.ArcW is a double with the arc width for corners.ArcH is a double with the arc height for corners.this object for chainingstrokeLine (double X1, double Y1, double X2, double Y2)
Draws a line between two points.
X1 is a double with the start X.Y1 is a double with the start Y.X2 is a double with the end X.Y2 is a double with the end Y.this object for chainingbeginPath ()
Begins a new path.
this object for chainingmoveTo (double X, double Y)
Moves the path cursor to the specified position without drawing.
X is a double with the X position.Y is a double with the Y position.this object for chaininglineTo (double X, double Y)
Adds a line segment from the current position to the specified position.
X is a double with the end X.Y is a double with the end Y.this object for chainingquadraticCurveTo (double CX, double CY, double X, double Y)
Adds a quadratic Bezier curve to the path.
CX is a double with the control point X.CY is a double with the control point Y.X is a double with the end point X.Y is a double with the end point Y.this object for chainingbezierCurveTo (double CX1, double CY1, double CX2, double CY2, double X, double Y)
Adds a cubic Bezier curve to the path.
CX1 is a double with the first control point X.CY1 is a double with the first control point Y.CX2 is a double with the second control point X.CY2 is a double with the second control point Y.X is a double with the end point X.Y is a double with the end point Y.this object for chainingarcTo (double X1, double Y1, double X2, double Y2, double Radius)
Adds an arc to the path defined by two tangent lines and a radius.
X1 is a double with the first tangent point X.Y1 is a double with the first tangent point Y.X2 is a double with the second tangent point X.Y2 is a double with the second tangent point Y.Radius is a double with the arc radius.this object for chainingclosePath ()
Closes the current path by drawing a line back to the starting point.
this object for chainingstroke ()
Strokes the current path with the current stroke paint and line settings.
this object for chainingfill ()
Fills the current path with the current fill paint.
this object for chainingsetLineDashes (list Dashes = null)
Sets the dash pattern for stroked lines. Pass null or an empty list to clear the dash pattern and use solid lines.
Dashes is a list of doubles defining the dash pattern (e.g. [10.0, 5.0]), or null for solid.this object for chainingsetLineDashOffset (double Offset)
Sets the offset into the dash pattern.
Offset is a double with the dash offset.this object for chainingfillText (string Text, double X, double Y)
Fills text at the specified position using the current fill paint and font.
Text is a string with the text to draw.X is a double with the X position.Y is a double with the Y position.this object for chainingstrokeText (string Text, double X, double Y)
Strokes text outline at the specified position using the current stroke paint and font.
Text is a string with the text to draw.X is a double with the X position.Y is a double with the Y position.this object for chainingsetFont (object FontObj)
Sets the font for text drawing.
FontObj is a FxObj with a JavaFX Font (from Font.get() or Font.load()).this object for chainingsetTextAlign (string Align)
Sets the horizontal text alignment.
Align is a string: LEFT, CENTER, RIGHT, or JUSTIFY.this object for chainingsetTextBaseline (string Baseline)
Sets the vertical text baseline.
Baseline is a string: TOP, CENTER, BASELINE, or BOTTOM.this object for chainingdrawImage (object Img, double X, double Y)
Draws an image at the specified position.
Img is an Image object to draw.X is a double with the X position.Y is a double with the Y position.this object for chainingdrawImageScaled (object Img, double X, double Y, double W, double H)
Draws an image scaled to the specified size.
Img is an Image object to draw.X is a double with the X position.Y is a double with the Y position.W is a double with the target width.H is a double with the target height.this object for chainingclearRect (double X, double Y, double W, double H)
Clears a rectangular area, making it transparent.
X is a double with the X position.Y is a double with the Y position.W is a double with the width.H is a double with the height.this object for chainingsave ()
Pushes the current state onto the state stack. The state includes fill, stroke, line width, line cap, line join, miter limit, font, text align, text baseline, transforms, clip, and global alpha.
this object for chainingrestore ()
Pops the state from the state stack, restoring all saved state properties.
this object for chainingclip ()
Intersects the current clip with the current path. Drawing operations after this call will only affect pixels inside the clipped area.
this object for chainingtranslate (double X, double Y)
Translates the origin by the specified amounts.
X is a double with the horizontal translation.Y is a double with the vertical translation.this object for chainingrotate (double Angle)
Rotates the canvas around the current origin.
Angle is a double with the rotation angle in degrees.this object for chainingscale (double X, double Y)
Scales the canvas axes.
X is a double with the horizontal scale factor.Y is a double with the vertical scale factor.this object for chaininggetPixelWriter ()
Returns the PixelWriter for this canvas as an AussomJavaObject. Use AJI invoke() to call methods on it (e.g. setColor).
An AussomJavaObject wrapping the PixelWriter.