Class CircleDrawer

This is an abstract class that Shapes have to extend that to insert or draw their own

Example

editor.board.shapes.circle.insert({
x: 100,
y: 100,
radius: 10,
fill: 'red'
})

Example

editor.board.shapes.circle.draw()

Example

editor.board.shapes.circle.stopDrawing()

Hierarchy (view full)

Constructors

Properties

config: Partial<CircleConfig>

Reperesents the configuration of the shape that is drawing that

node: Circle

Demonstrates the circle node that is being created

startPoint: Point

Reperesents the start point of the drawing shape

Accessors

  • get isDrawing(): boolean
  • Checks wheather the current shape is drawing or not

    Returns boolean

Methods

  • Enables the drawing mode

    Parameters

    • config: Partial<CircleConfig> = {}

      The initial [[ShapeModel]] config

    Returns void

  • Returns current position of the shape

    Returns {
        x: number;
        y: number;
    }

    the current position of the shape as a [[Point]]

    • x: number
    • y: number
  • Creates a new shape and insert that into the [[Board]]

    Parameters

    • config: CircleConfig

      The [[ShapeModel]] configuration

    Returns CircleModel

    The created [[ShapeModel]]