Class AbstractRendererAbstract

Abstract base class for renderers.

Hierarchy (View Summary)

Constructors

Properties

objectLevel: number = 0

Methods

  • Notes the end of an object.

    Parameters

    • Optional_loaderData: LoadSaveDataTable

      a map from strings to JSON-ifyable objects and contains properties attached to the object by whatever loader loaded the image. This is used to preserve attributes not supported by js-draw when loading/saving an image. Renderers may ignore this.

    • Optional_objectTags: string[]

      a list of labels (e.g. classNames) to be attached to the object. Renderers may ignore this.

    Returns void

  • This should be called whenever a new object is being drawn.

    Parameters

    • _boundingBox: Rect2

      The bounding box of the object to be drawn.

    • Optional_clip: boolean

      Whether content outside _boundingBox should be drawn. Renderers that override this method are not required to support _clip.

    Returns void

OpenSource licenses