[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.getCanvas ()
Returns the Canvas this GraphicsContext draws to.
An AJO wrapping javafx.scene.canvas.Canvas.transform (double Mxx, double Myx, double Mxy, double Myy, double Mxt, double Myt)
Concatenates an affine transform onto the current transform.
Mxx is a double, the X scaling.Myx is a double, the Y skew.Mxy is a double, the X skew.Myy is a double, the Y scaling.Mxt is a double, the X translation.Myt is a double, the Y translation.this object for chainingtransformAffine (object AffineObj)
Concatenates a javafx.scene.transform.Affine onto the current transform.
AffineObj is an Affine wrapper.this object for chainingsetTransform (double Mxx, double Myx, double Mxy, double Myy, double Mxt, double Myt)
Replaces the current transform with an affine transform.
Mxx is a double, the X scaling.Myx is a double, the Y skew.Mxy is a double, the X skew.Myy is a double, the Y scaling.Mxt is a double, the X translation.Myt is a double, the Y translation.this object for chainingsetTransformAffine (object AffineObj)
Replaces the current transform with a javafx.scene.transform.Affine.
AffineObj is an Affine wrapper.this object for chaininggetTransform ()
Returns the current transform as a new javafx.scene.transform.Affine AJO.
An AJO wrapping javafx.scene.transform.Affine.getGlobalAlpha ()
Returns the global alpha value.
A double from 0.0 to 1.0.getGlobalBlendMode ()
Returns the current global blend mode.
An AJO wrapping javafx.scene.effect.BlendMode.getFill ()
Returns the current fill paint.
An AJO wrapping javafx.scene.paint.Paint.getStroke ()
Returns the current stroke paint.
An AJO wrapping javafx.scene.paint.Paint.getLineWidth ()
Returns the current stroke line width.
A double with the line width.getLineCap ()
Returns the current line cap style.
An AJO wrapping javafx.scene.shape.StrokeLineCap.getLineJoin ()
Returns the current line join style.
An AJO wrapping javafx.scene.shape.StrokeLineJoin.getMiterLimit ()
Returns the current miter limit.
A double with the miter limit.getLineDashes ()
Returns the current line dash pattern as an AJO wrapping a double[].
An AJO wrapping a Java double[], or null when no dash pattern is set.getLineDashOffset ()
Returns the current line dash offset.
A double with the dash offset.getFont ()
Returns the current font.
An AJO wrapping javafx.scene.text.Font.setFontSmoothingType (string Smoothing)
Sets the font smoothing type used when drawing text.
Smoothing is a string: GRAY or LCD.this object for chaininggetFontSmoothingType ()
Returns the current font smoothing type.
An AJO wrapping javafx.scene.text.FontSmoothingType.getTextAlign ()
Returns the current horizontal text alignment.
An AJO wrapping javafx.scene.text.TextAlignment.getTextBaseline ()
Returns the current vertical text baseline.
An AJO wrapping javafx.geometry.VPos.setFillRule (string Rule)
Sets the fill rule used when filling complex paths.
Rule is a string: NON_ZERO or EVEN_ODD.this object for chaininggetFillRule ()
Returns the current fill rule.
An AJO wrapping javafx.scene.shape.FillRule.setImageSmoothing (bool Smoothing)
Sets whether image smoothing is applied when drawing scaled images.
Smoothing is a bool; true enables smoothing.this object for chainingisImageSmoothing ()
Returns whether image smoothing is enabled.
A bool indicating whether image smoothing is on.arc (double CenterX, double CenterY, double RadiusX, double RadiusY, double StartAngle, double ArcExtent)
Adds an arc segment to the current path.
CenterX is a double with the center X.CenterY is a double with the center Y.RadiusX is a double with the X radius.RadiusY is a double with the Y radius.StartAngle is a double with the start angle in degrees.ArcExtent is a double with the angular extent in degrees.this object for chainingrect (double X, double Y, double W, double H)
Adds a rectangle subpath to the current path.
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 chainingappendSVGPath (string SvgPath)
Appends an SVG-style path string to the current path.
SvgPath is a string with an SVG path data expression.this object for chainingisPointInPath (double X, double Y)
Returns true if the given point is inside the current path.
X is a double with the test X.Y is a double with the test Y.A bool true when the point is inside the path.fillPolygon (list Xs, list Ys, int NumPoints)
Fills a polygon defined by parallel X and Y coordinate lists.
Xs is a list of doubles with the X coordinates.Ys is a list of doubles with the Y coordinates.NumPoints is an int with the number of points to use.this object for chainingstrokePolygon (list Xs, list Ys, int NumPoints)
Strokes a polygon outline defined by parallel X and Y coordinate lists.
Xs is a list of doubles with the X coordinates.Ys is a list of doubles with the Y coordinates.NumPoints is an int with the number of points to use.this object for chainingstrokePolyline (list Xs, list Ys, int NumPoints)
Strokes a polyline (open polygon) defined by parallel X and Y coordinate lists.
Xs is a list of doubles with the X coordinates.Ys is a list of doubles with the Y coordinates.NumPoints is an int with the number of points to use.this object for chainingsetEffect (object EffectObj)
Sets the effect applied to subsequent drawing operations.
EffectObj is an Effect wrapper, or null to clear.this object for chaininggetEffect (object EffectObj)
Returns a copy of the current effect. JavaFX requires a destination effect AJO; pass an Effect wrapper to receive the result, or null to allocate a fresh one.
EffectObj is an Effect wrapper used as the receiver, or null.An AJO wrapping javafx.scene.effect.Effect, or null.applyEffect (object EffectObj)
Applies an effect to the current pixel contents of the canvas.
EffectObj is an Effect wrapper to apply.this object for chaining