Dynamic Icons Scripting Reference - v1.3.0
    Preparing search index...

    Class EllipsePath

    Creates a full or partial ellipse/circle/arc path of given diameter, start and end angle values, draw direction, and optional rotation around center. Essentially a proxy for Path2D.ellipse() method. The IValuedElement::setValue() interface sets the arc's ending angle.

    Hierarchy (View Summary)

    Implements

    • ILayerElement
    • IPathProducer
    • IValuedElement
    Index

    Accessors

    • get isEmpty(): boolean

      Returns true if the diameter on either axis is empty (width or height are zero)

      Returns boolean

    • get align(): string

      Alignment value as two string values, first for vertical and second for horizontal. Eg. "top left" or "center middle". Setting the property can be done with either a single direction or both (separated by space or comma) in either order.

      Returns string

    • set align(value: string | Alignment): void

      Parameters

      Returns void

    Constructors

    • Parameters

      • Optionalinit: EllipsePathInit

      Returns EllipsePath

    Methods

    • Sets the ending angle of the arc using evaluated string value.

      Parameters

      • value: string

      Returns void

    • Returns the ellipse as a Path2D object, scaled to fit into rect bounds (if size units are relative), and combined with any paths in the pathStack according to value of the operation property.

      Parameters

      Returns Path2D

    • Clears the generated & cached Path2D object (if any). Some Path subclasses my not use the cache. Typically the cache management is handled automatically when relevant properties are modified.

      Returns void

    • Sets element width and height property values with optional unit type specifier to use for both dimensions. If unit is undefined then the current unit types for each dimension remain unchanged.

      Parameters

      • size: SizeType
      • Optionalunit: string
      • OptionalunitY: string

      Returns void

    • Returns actual pixel width of this element, either scaled to viewWidth if width unit is % or actual width value if it is in pixels already. If this element's width value is zero then return viewWidth.

      Parameters

      • viewWidth: number

      Returns number

    • Returns actual pixel height of this element, either scaled to viewHeight if height unit is % or actual height value if it is in pixels already. If this element's height value is zero then return viewHeight.

      Parameters

      • viewHeight: number

      Returns number

    Properties

    startAngle: number = 0

    Starting angle in radians (0 points east)

    endAngle: number = 0

    Ending angle in radians (0 points east)

    rotation: number = 0

    Rotation angle in radians (0 points east)

    direction: ArcDrawDirection = ArcDrawDirection.CW

    Drawing direction, clockwise (0), counter-clockwise (1), or automatic (2) based on value being positive (CW) or negative (CCW).

    operation: PathBoolOperation = PathBoolOperation.None

    Boolean operation to perform with previous path, if any. May be used by subclasses in their IPathProducer#getPath method to automatically combine with other paths.

    layerRole: LayerRole = LayerRole.PathProducer
    width: UnitValue = ...

    A zero width/height (default) indicates to draw into the full available image area (eg. passed to render() in rect argument). Negative values are not allowed.

    height: UnitValue = ...
    alignment: Alignment = Alignment.CENTER

    How to align within drawing area if/when width/height doesn't fill it completely.

    offset: Vect2d = ...

    Extra position offset to apply after alignment. Expressed as a percentage of overall drawing area size.