GraphicsContext

scalafx.scene.canvas.GraphicsContext
See theGraphicsContext companion object
class GraphicsContext(val delegate: GraphicsContext) extends SFXDelegate[GraphicsContext]

Attributes

Companion
object
Graph
Supertypes
trait SFXDelegate[GraphicsContext]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Appends an SVG Path string to the current path.

Appends an SVG Path string to the current path.

Attributes

Applies the given effect to the entire canvas.

Applies the given effect to the entire canvas.

Attributes

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.

Attributes

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.

Attributes

def beginPath(): Unit

Starts a Path

Starts a Path

Attributes

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.

Attributes

def canvas: Canvas

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

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

Attributes

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.

Attributes

def clip(): Unit

Clips using the current path

Clips using the current path

Attributes

def closePath(): Unit

Closes the path.

Closes the path.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

def fill: Paint

the current fill attribute.

the current fill attribute.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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

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

Attributes

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.

Attributes

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.

Attributes

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

the current Font.

the current Font.

Attributes

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.

Attributes

Returns a copy of the current transform.

Returns a copy of the current transform.

Attributes

def getTransform(xform: Affine): Affine

Returns a copy of the current transform.

Returns a copy of the current transform.

Attributes

the current global alpha.

the current global alpha.

Attributes

def globalAlpha_=(alpha: Double): Unit

the global blend mode.

the global blend mode.

Attributes

the current stroke line cap.

the current stroke line cap.

Attributes

the current stroke line join.

the current stroke line join.

Attributes

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.

Attributes

the current line width.

the current line width.

Attributes

def lineWidth_=(lw: Double): Unit

the current miter limit.

the current miter limit.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

def rotate(degrees: Double): Unit

Rotates the current transform in degrees.

Rotates the current transform in degrees.

Attributes

def save(): Unit

Saves the following attributes onto a stack.

Saves the following attributes onto a stack.

Attributes

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

Scales the current transform by x, y.

Scales the current transform by x, y.

Attributes

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.

Attributes

def setTransform(xform: Affine): Unit

Sets the current transform.

Sets the current transform.

Attributes

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

Sets the current transform.

Sets the current transform.

Attributes

def stroke: Paint

the current stroke.

the current stroke.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

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.

Attributes

def stroke_=(s: Paint): Unit

the current TextAlignment.

the current TextAlignment.

Attributes

the current Text Baseline.

the current Text Baseline.

Attributes

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

Concatenates the input with the current transform.

Concatenates the input with the current transform.

Attributes

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.

Attributes

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

Translates the current transform by x, y.

Translates the current transform by x, y.

Attributes

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 parameters

ref

Object to be compared.

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def hashCode: Int

Attributes

Returns

The delegate hashcode

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate
override def toString: String

Attributes

Returns

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

Definition Classes
SFXDelegate -> Any
Inherited from:
SFXDelegate

Concrete fields

override val delegate: GraphicsContext

JavaFX object to be wrapped.

JavaFX object to be wrapped.

Attributes