Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Arc

[48:7] extends: Shape

Wraps JavaFX Arc, a partial ellipse (arc) defined by a center point, two radii, a start angle, and an angular length. The arc type controls how the endpoints are connected: OPEN leaves them unconnected, CHORD connects them with a straight line, and ROUND connects each endpoint to the center point.

CSS Properties -- Shape

Property Values Default Description
-fx-fill <paint> black Fill paint for the interior of the shape.
-fx-smooth true | false true When true, anti-aliasing is applied to the shape edges.
-fx-stroke <paint> null Paint for the shape outline stroke. No stroke is drawn when null.
-fx-stroke-type inside | outside | centered centered Position of the stroke relative to the shape boundary.
-fx-stroke-dash-array <size> [<size>]* (none) Pattern of dashes and gaps for a dashed stroke.
-fx-stroke-dash-offset <number> 0 Offset into the dash pattern at which to begin rendering.
-fx-stroke-line-cap square | butt | round square Style of the end caps on open path strokes.
-fx-stroke-line-join miter | bevel | round miter Style used at corners where two stroke segments meet.
-fx-stroke-miter-limit <number> 10 Limit on the ratio of miter length to stroke width; beyond this the join becomes a bevel.
-fx-stroke-width <size> 1 Width of the shape stroke in pixels.

CSS Properties -- Node

Property Values Default Description
-fx-blend-mode add | blue | color-burn | color-dodge | darken | difference | exclusion | green | hard-light | lighten | multiply | overlay | red | screen | soft-light | src-atop | src-in | src-out | src-over null Blend mode used when compositing this node with nodes beneath it.
-fx-cursor null | crosshair | default | hand | move | e-resize | h-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | v-resize | text | wait | <url> null (inherits) Mouse cursor shape shown when the pointer is over this node. Inherits from parent by default.
-fx-effect <effect> null A visual effect (e.g. DropShadow, InnerShadow) applied to the rendered node.
-fx-focus-traversable true | false false Whether this node participates in focus traversal.
-fx-view-order <number> 0 Adjusts rendering and hit-test order within the parent without changing the scene graph order.
-fx-opacity <number> [0.0 - 1.0] 1 Opacity of the node. 0 is fully transparent, 1 is fully opaque.
-fx-rotate <number> 0 Rotation angle in degrees applied around the node's center point.
-fx-scale-x <number> 1 Scale factor along the X axis about the node's center.
-fx-scale-y <number> 1 Scale factor along the Y axis about the node's center.
-fx-scale-z <number> 1 Scale factor along the Z axis about the node's center.
-fx-translate-x <number> 0 Translation offset along the X axis in pixels.
-fx-translate-y <number> 0 Translation offset along the Y axis in pixels.
-fx-translate-z <number> 0 Translation offset along the Z axis in pixels.
visibility visible | hidden | collapse | inherit visible Controls whether the node is rendered and participates in layout.
-fx-managed true | false true When false, the parent layout does not manage this node's position or size.

Methods

  • Arc (double CenterX = 0.0, double CenterY = 0.0, double RadiusX = 0.0, double RadiusY = 0.0, double StartAngle = 0.0, double Length = 0.0)

    Creates a new Arc with the given center, radii, start angle, and angular length.

    • @p CenterX is a double with the X coordinate of the arc's center.
    • @p CenterY is a double with the Y coordinate of the arc's center.
    • @p RadiusX is a double with the horizontal radius of the arc.
    • @p RadiusY is a double with the vertical radius of the arc.
    • @p StartAngle is a double with the start angle of the arc in degrees.
    • @p Length is a double with the angular extent of the arc in degrees.
  • setType (string Type)

    Sets the closure type of the arc.

    • @p Type is a string specifying how the arc endpoints are connected: "OPEN", "CHORD", or "ROUND".
    • @r this object
  • setFill (object PaintObj)

    Sets the fill paint for the arc interior.

    • @p PaintObj is a paint object (Color, LinearGradient, etc.) used to fill the arc.
    • @r this object
  • setStroke (object PaintObj)

    Sets the stroke paint for the arc outline.

    • @p PaintObj is a paint object used to draw the arc outline.
    • @r this object
  • setStrokeWidth (double W)

    Sets the width of the arc outline stroke.

    • @p W is a double with the stroke width in pixels.
    • @r this object
  • setCenterX (double V)

    Sets the X coordinate of the arc's center.

    • @p V is a double with the new center X.
    • @r this object
  • getCenterX ()

    Returns the X coordinate of the arc's center.

    • @r A double with the center X.
  • centerXProperty ()

    Returns the property holding the center X coordinate.

    • @r A DoubleProperty AJO.
  • setCenterY (double V)

    Sets the Y coordinate of the arc's center.

    • @p V is a double with the new center Y.
    • @r this object
  • getCenterY ()

    Returns the Y coordinate of the arc's center.

    • @r A double with the center Y.
  • centerYProperty ()

    Returns the property holding the center Y coordinate.

    • @r A DoubleProperty AJO.
  • setRadiusX (double V)

    Sets the horizontal radius of the arc.

    • @p V is a double with the new horizontal radius.
    • @r this object
  • getRadiusX ()

    Returns the horizontal radius of the arc.

    • @r A double with the horizontal radius.
  • radiusXProperty ()

    Returns the property holding the horizontal radius.

    • @r A DoubleProperty AJO.
  • setRadiusY (double V)

    Sets the vertical radius of the arc.

    • @p V is a double with the new vertical radius.
    • @r this object
  • getRadiusY ()

    Returns the vertical radius of the arc.

    • @r A double with the vertical radius.
  • radiusYProperty ()

    Returns the property holding the vertical radius.

    • @r A DoubleProperty AJO.
  • setStartAngle (double V)

    Sets the start angle of the arc in degrees.

    • @p V is a double with the new start angle in degrees.
    • @r this object
  • getStartAngle ()

    Returns the start angle of the arc in degrees.

    • @r A double with the start angle.
  • startAngleProperty ()

    Returns the property holding the start angle.

    • @r A DoubleProperty AJO.
  • setLength (double V)

    Sets the angular extent (length) of the arc in degrees.

    • @p V is a double with the new angular length in degrees.
    • @r this object
  • getLength ()

    Returns the angular extent (length) of the arc in degrees.

    • @r A double with the angular length.
  • lengthProperty ()

    Returns the property holding the angular length.

    • @r A DoubleProperty AJO.
  • getType ()

    Returns the closure type of the arc.

    • @r An AJO holding the javafx.scene.shape.ArcType enum value.
  • typeProperty ()

    Returns the property holding the arc closure type.

    • @r An ObjectProperty AJO holding the ArcType.