A drawable path.

The shape can be configured with either a static path or a path provider (such as ReactiveRoute) for automatic path updates.

Constructors

  • Creates a new shape.

    Parameters

    • pathOrProvider: null | Path | PathProvider = null

      The path of the shape, or a path provider. Pass null to create a shape with no path that you can update later.

    Returns Shape

Accessors

  • get path(): null | Path
  • The path that is drawn.

    Returns null | Path

  • set path(newValue): void
  • Parameters

    • newValue: null | Path

    Returns void

  • get pathProvider(): null | PathProvider
  • The current path provider that the shape is subscribed to, or null if one isn't set.

    Returns null | PathProvider

    Setting the path provider will immediately update the current path. If the path provider is set to null, the shape's path will also be cleared. Use clearPathProvider to clear the path provider without clearing the current path.

  • set pathProvider(newValue): void
  • Parameters

    Returns void

  • get strokeColor(): string
  • The colour that is used to stroke the path.

    Returns string

  • set strokeColor(newValue): void
  • Parameters

    • newValue: string

    Returns void

  • get strokeWidth(): number
  • The width of the stroke outline in CSS pixels.

    Returns number

  • set strokeWidth(newValue): void
  • Parameters

    • newValue: number

    Returns void

Methods

  • Clears the path provider without clearing the current path.

    Returns void