Options
All
  • Public
  • Public/Protected
  • All
Menu

A special subclass of PIXI.Container used to represent a Drawing in the PrimaryCanvasGroup.

Hierarchy

  • any
    • DrawingShape

Index

Constructors

  • Returns DrawingShape

Methods

  • refresh(): void
  • inheritdoc

    Returns void

  • setPosition(): void
  • inheritdoc

    Returns void

  • _getCanvasDocumentData(data: any): any
  • inheritdoc

    Parameters

    • data: any

    Returns any

  • _drawRectangle(): void
  • Draw rectangular shapes.

    Returns void

  • _drawEllipse(): void
  • Draw ellipsoid shapes.

    Returns void

  • _drawPolygon(): any
  • Draw polygonal shapes.

    Returns any

  • _drawFreehand(): any
  • Draw freehand shapes with bezier spline smoothing.

    Returns any

  • #getBezierControlPoints(factor: number, previous: number[], point: number[], next: number[]): { cp1: Point; nextCP: Point }
  • Attribution: The equations for how to calculate the bezier control points are derived from Rob Spencer's article: http://scaledinnovation.com/analytics/splines/aboutSplines.html

    Parameters

    • factor: number

      The smoothing factor

    • previous: number[]

      The prior point

    • point: number[]

      The current point

    • next: number[]

      The next point

    Returns { cp1: Point; nextCP: Point }

    The bezier control points

    • cp1: Point
    • nextCP: Point

Properties

alpha: number
visible: any
zIndex: any
angle: any
PRIMARY_SORT_ORDER: number = 500

Sorting values to deal with ties.

Accessors

  • get defaultData(): any
  • property

    {object} shape The shape

    property

    {number} x The x-coordinate of the PCO location

    property

    {number} y The y-coordinate of the PCO location

    property

    {number} z The z-index of the PCO

    property

    {number} bezierFactor The bezier factor

    property

    {number} fillType The fill type

    property

    {number} fillColor The fill color

    property

    {number} fillAlpha The fill alpha

    property

    {number} strokeWidth The stroke width

    property

    {number} strokeColor The stroke color

    property

    {number} strokeAlpha The stroke alpha

    property

    {string} text The text

    property

    {string} fontFamily The text font family

    property

    {number} fontSize The font size

    property

    {number} textColor The text color

    property

    {number} textAlpha The text alpha

    property

    {number} rotation The rotation of this PCO

    property

    {boolean} hidden The PCO is hidden?

    property

    {number} elevation The elevation of the PCO

    property

    {number} sort The sort key that resolves ties among the same elevation

    property

    {boolean} roof The PCO is considered as a roof?

    property

    {boolean} overhead The PCO is considered as overhead?

    property

    {object} occlusion The occlusion object for this PCO

    property

    {object} texture The data texture values

    Returns any