GraphicsContext

class GraphicsContext(val delegate: GraphicsContext) extends SFXDelegate[GraphicsContext]
trait SFXDelegate[GraphicsContext]
class Object
trait Matchable
class Any

Value members

Concrete methods

def appendSVGPath(s: String): Unit

Appends an SVG Path string to the current path.

Appends an SVG Path string to the current path.

def applyEffect(e: Effect): Unit

Applies the given effect to the entire canvas.

Applies the given effect to the entire canvas.

def arc(centerX: Double, centerY: Double, radiusX: Double, radiusY: Double, startAngle: Double, length: Double): Unit

Adds path elements to the current path to make an arc that uses Euclidean degrees.

Adds path elements to the current path to make an arc that uses Euclidean degrees.

def arcTo(x1: Double, y1: Double, x2: Double, y2: Double, radius: Double): Unit

Adds segments to the current path to make an arc.

Adds segments to the current path to make an arc.

def beginPath(): Unit

Starts a Path

Starts a Path

def bezierCurveTo(xc1: Double, yc1: Double, xc2: Double, yc2: Double, x1: Double, y1: Double): Unit

Adds segments to the current path to make a cubic bezier curve.

Adds segments to the current path to make a cubic bezier curve.

Gets the Canvas that the GraphicsContext is issuing draw commands to.

Gets the Canvas that the GraphicsContext is issuing draw commands to.

def clearRect(x: Double, y: Double, w: Double, h: Double): Unit

Clears a portion of the canvas with a transparent color value.

Clears a portion of the canvas with a transparent color value.

def clip(): Unit

Clips using the current path

Clips using the current path

def closePath(): Unit

Closes the path.

Closes the path.

def drawImage(img: Image, x: Double, y: Double): Unit

Draws an image at the given x, y position using the width and height of the given image.

Draws an image at the given x, y position using the width and height of the given image.

def drawImage(img: Image, x: Double, y: Double, w: Double, h: Double): Unit

Draws an image into the given destination rectangle of the canvas.

Draws an image into the given destination rectangle of the canvas.

def drawImage(img: Image, sx: Double, sy: Double, sw: Double, sh: Double, dx: Double, dy: Double, dw: Double, dh: Double): Unit

Draws the current source rectangle of the given image to the given destination rectangle of the Canvas.

Draws the current source rectangle of the given image to the given destination rectangle of the Canvas.

def fill: Paint

the current fill attribute.

the current fill attribute.

def fillArc(x: Double, y: Double, w: Double, h: Double, startAngle: Double, arcExtent: Double, closure: ArcType): Unit

Fills an arc using the current fill paint.

Fills an arc using the current fill paint.

def fillOval(x: Double, y: Double, w: Double, h: Double): Unit

Fills an oval using the current fill paint.

Fills an oval using the current fill paint.

def fillPath(): Unit

Fills the path with the current fill paint. This method is correspondent to fill() method in JavaFx class.

Fills the path with the current fill paint. This method is correspondent to fill() method in JavaFx class.

def fillPolygon(xPoints: Array[Double], yPoints: Array[Double], nPoints: Int): Unit

Fills a polygon with the given points using the currently set fill paint.

Fills a polygon with the given points using the currently set fill paint.

def fillPolygon(points: Seq[(Double, Double)]): Unit

Fills a polygon with the given points using the currently set fill paint.

Fills a polygon with the given points using the currently set fill paint.

def fillRect(x: Double, y: Double, w: Double, h: Double): Unit

Fills a rectangle using the current fill paint.

Fills a rectangle using the current fill paint.

def fillRoundRect(x: Double, y: Double, w: Double, h: Double, arcWidth: Double, arcHeight: Double): Unit

Fills a rounded rectangle using the current fill paint.

Fills a rounded rectangle using the current fill paint.

the filling rule constant for determining the interior of the path.

the filling rule constant for determining the interior of the path.

def fillRule_=(fillRule: FillRule): Unit
def fillText(text: String, x: Double, y: Double): Unit

Fills the given string of text at position x, y (0,0 at top left) with the current fill paint attribute.

Fills the given string of text at position x, y (0,0 at top left) with the current fill paint attribute.

def fillText(text: String, x: Double, y: Double, maxWidth: Double): Unit

Fills text and includes a maximum width of the string.

Fills text and includes a maximum width of the string.

def fill_=(p: Paint): Unit
def font: Font

the current Font.

the current Font.

def font_=(f: Font): Unit

Gets a copy of the effect to be applied after the next draw call.

Gets a copy of the effect to be applied after the next draw call.

Returns a copy of the current transform.

Returns a copy of the current transform.

def getTransform(xform: Affine): Affine

Returns a copy of the current transform.

Returns a copy of the current transform.

def globalAlpha: Double

the current global alpha.

the current global alpha.

def globalAlpha_=(alpha: Double): Unit

the global blend mode.

the global blend mode.

the current stroke line cap.

the current stroke line cap.

def lineCap_=(cap: StrokeLineCap): Unit

the current stroke line join.

the current stroke line join.

def lineJoin_=(join: StrokeLineJoin): Unit
def lineTo(x1: Double, y1: Double): Unit

Adds segments to the current path to make a line at the given x,y coordinate.

Adds segments to the current path to make a line at the given x,y coordinate.

def lineWidth: Double

the current line width.

the current line width.

def lineWidth_=(lw: Double): Unit
def miterLimit: Double

the current miter limit.

the current miter limit.

def miterLimit_=(ml: Double): Unit
def moveTo(x0: Double, y0: Double): Unit

Issues a move command for the current path to the given x,y coordinate.

Issues a move command for the current path to the given x,y coordinate.

Returns a PixelWriter object that can be used to modify the pixels of the Canvas associated with this GraphicsContext.

Returns a PixelWriter object that can be used to modify the pixels of the Canvas associated with this GraphicsContext.

def pointInPath(x: Double, y: Double): Boolean

Returns true if the the given x,y point is inside the path.

Returns true if the the given x,y point is inside the path.

def quadraticCurveTo(xc: Double, yc: Double, x1: Double, y1: Double): Unit

Adds segments to the current path to make a quadratic curve.

Adds segments to the current path to make a quadratic curve.

def rect(x: Double, y: Double, w: Double, h: Double): Unit

Adds path elements to the current path to make a rectangle.

Adds path elements to the current path to make a rectangle.

def restore(): Unit

Pops the state off of the stack, setting the following attributes to their value at the time when that state was pushed onto the stack.

Pops the state off of the stack, setting the following attributes to their value at the time when that state was pushed onto the stack.

def rotate(degrees: Double): Unit

Rotates the current transform in degrees.

Rotates the current transform in degrees.

def save(): Unit

Saves the following attributes onto a stack.

Saves the following attributes onto a stack.

def scale(x: Double, y: Double): Unit

Scales the current transform by x, y.

Scales the current transform by x, y.

def setEffect(e: Effect): Unit

Sets the effect to be applied after the next draw call, or null to disable effects.

Sets the effect to be applied after the next draw call, or null to disable effects.

def setTransform(xform: Affine): Unit

Sets the current transform.

Sets the current transform.

def setTransform(mxx: Double, myx: Double, mxy: Double, myy: Double, mxt: Double, myt: Double): Unit

Sets the current transform.

Sets the current transform.

the current stroke.

the current stroke.

def strokeArc(x: Double, y: Double, w: Double, h: Double, startAngle: Double, arcExtent: Double, closure: ArcType): Unit

Strokes an Arc using the current stroke paint.

Strokes an Arc using the current stroke paint.

def strokeLine(x1: Double, y1: Double, x2: Double, y2: Double): Unit

Strokes a line using the current stroke paint.

Strokes a line using the current stroke paint.

def strokeOval(x: Double, y: Double, w: Double, h: Double): Unit

Strokes an oval using the current stroke paint.

Strokes an oval using the current stroke paint.

def strokePath(): Unit

Strokes the path with the current stroke paint. This method is correspondent to stroke() method in JavaFx class.

Strokes the path with the current stroke paint. This method is correspondent to stroke() method in JavaFx class.

def strokePolygon(xPoints: Array[Double], yPoints: Array[Double], nPoints: Int): Unit

Strokes a polygon with the given points using the currently set stroke paint.

Strokes a polygon with the given points using the currently set stroke paint.

def strokePolygon(points: Seq[(Double, Double)]): Unit

Strokes a polygon with the given points using the currently set stroke paint.

Strokes a polygon with the given points using the currently set stroke paint.

def strokePolyline(xPoints: Array[Double], yPoints: Array[Double], nPoints: Int): Unit

Draws a polyline with the given points using the currently set stroke paint attribute.

Draws a polyline with the given points using the currently set stroke paint attribute.

def strokePolyline(points: Seq[(Double, Double)]): Unit

Draws a polyline with the given points using the currently set stroke paint attribute.

Draws a polyline with the given points using the currently set stroke paint attribute.

def strokeRect(x: Double, y: Double, w: Double, h: Double): Unit

Strokes a rectangle using the current stroke paint.

Strokes a rectangle using the current stroke paint.

def strokeRoundRect(x: Double, y: Double, w: Double, h: Double, arcWidth: Double, arcHeight: Double): Unit

Strokes a rounded rectangle using the current stroke paint.

Strokes a rounded rectangle using the current stroke paint.

def strokeText(text: String, x: Double, y: Double): Unit

draws the given string of text at position x, y (0,0 at top left) with the current stroke paint attribute.

draws the given string of text at position x, y (0,0 at top left) with the current stroke paint attribute.

def strokeText(text: String, x: Double, y: Double, maxWidth: Double): Unit

Draws text with stroke paint and includes a maximum width of the string.

Draws text with stroke paint and includes a maximum width of the string.

def stroke_=(s: Paint): Unit

the current TextAlignment.

the current TextAlignment.

def textAlign_=(align: TextAlignment): Unit

the current Text Baseline.

the current Text Baseline.

def textBaseline_=(baseline: VPos): Unit
def transform(xform: Affine): Unit

Concatenates the input with the current transform.

Concatenates the input with the current transform.

def transform(mxx: Double, myx: Double, mxy: Double, myy: Double, mxt: Double, myt: Double): Unit

Concatenates the input with the current transform.

Concatenates the input with the current transform.

def translate(x: Double, y: Double): Unit

Translates the current transform by x, y.

Translates the current transform by x, y.

Inherited methods

override def equals(ref: Any): Boolean

Verifies if a object is equals to this delegate.

Verifies if a object is equals to this delegate.

Value Params
ref

Object to be compared.

Returns

if the other object is equals to this delegate or not.

Definition Classes
Inherited from
SFXDelegate
override def hashCode: Int
Returns

The delegate hashcode

Definition Classes
Inherited from
SFXDelegate
override def toString: String
Returns

Returns the original delegate's toString() adding a [SFX] prefix.

Definition Classes
Inherited from
SFXDelegate

Concrete fields

override val delegate: GraphicsContext