Base interface for line styles.

For implementations with more detailed documentation, see:

Hierarchy

  • LineStyle

Implemented by

Properties

lineType: "empty" | "solid"
type: "linestyle"

Methods

  • Get fill style of the LineStyle.

    Returns

    FillStyle object

    Returns FillStyle

  • Get thickness of the LineStyle

    Returns

    Thickness as pixels

    Returns number

  • Construct a new LineStyle object based on this one, but with modified fill style.

    Example (SolidFill):

    // specify new fillstyle
    solidLineStyle.setFillStyle( new SolidFill({
    color: ColorHex('#F00')
    }) )
    // change fillstyle properties
    solidLineStyle.setFillStyle(
    solidfill => solidfill.setA( 80 )
    )

    Returns

    New LineStyle object

    Parameters

    Returns LineStyle

  • Construct a new LineStyle object based on this one, but with modified thickness.

    -1 can be used to signify smallest available thickness. With most features, this will result in slightly better GPU performance, but less detailed line.

    Parameters

    • thickness: number

      Thickness as pixels.

    Returns LineStyle