API Documentation for: 1.0.0
Show:

DisplayProps Class

Defined in: DisplayProps:39
Module: EaselJS

Used for calculating and encapsulating display related properties.

Constructor

DisplayProps

(
  • [visible=true]
  • [alpha=1]
  • [shadow=null]
  • [compositeOperation=null]
  • [matrix]
)

Defined in DisplayProps:39

Parameters:

  • [visible=true] Number optional

    Visible value.

  • [alpha=1] Number optional

    Alpha value.

  • [shadow=null] Number optional

    A Shadow instance or null.

  • [compositeOperation=null] Number optional

    A compositeOperation value or null.

  • [matrix] Number optional

    A transformation matrix. Defaults to a new identity matrix.

Methods

append

(
  • visible
  • alpha
  • shadow
  • compositeOperation
  • [matrix]
)
DisplayProps chainable

Defined in append:110

Appends the specified display properties. This is generally used to apply a child's properties its parent's.

Parameters:

  • visible Boolean

    desired visible value

  • alpha Number

    desired alpha value

  • shadow Shadow

    desired shadow value

  • compositeOperation String

    desired composite operation value

  • [matrix] Matrix2D optional

    a Matrix2D instance

Returns:

DisplayProps:

This instance. Useful for chaining method calls.

clone

() DisplayProps

Defined in clone:173

Returns a clone of the DisplayProps instance. Clones the associated matrix.

Returns:

DisplayProps:

a clone of the DisplayProps instance.

identity

() DisplayProps chainable

Defined in identity:159

Resets this instance and its matrix to default values.

Returns:

DisplayProps:

This instance. Useful for chaining method calls.

prepend

(
  • visible
  • alpha
  • shadow
  • compositeOperation
  • [matrix]
)
DisplayProps chainable

Defined in prepend:130

Prepends the specified display properties. This is generally used to apply a parent's properties to a child's. For example, to get the combined display properties that would be applied to a child, you could use:

var o = myDisplayObject;
var props = new createjs.DisplayProps();
do {
    // prepend each parent's props in turn:
    props.prepend(o.visible, o.alpha, o.shadow, o.compositeOperation, o.getMatrix());
} while (o = o.parent);

Parameters:

  • visible Boolean

    desired visible value

  • alpha Number

    desired alpha value

  • shadow Shadow

    desired shadow value

  • compositeOperation String

    desired composite operation value

  • [matrix] Matrix2D optional

    a Matrix2D instance

Returns:

DisplayProps:

This instance. Useful for chaining method calls.

setValues

(
  • [visible=true]
  • [alpha=1]
  • [shadow=null]
  • [compositeOperation=null]
  • [matrix]
)
DisplayProps chainable

Defined in setValues:89

Reinitializes the instance with the specified values.

Parameters:

  • [visible=true] Number optional

    Visible value.

  • [alpha=1] Number optional

    Alpha value.

  • [shadow=null] Number optional

    A Shadow instance or null.

  • [compositeOperation=null] Number optional

    A compositeOperation value or null.

  • [matrix] Number optional

    A transformation matrix. Defaults to an identity matrix.

Returns:

DisplayProps:

This instance. Useful for chaining method calls.

Properties

alpha

Number

Defined in alpha:54

Property representing the alpha that will be applied to a display object.

compositeOperation

String

Property representing the compositeOperation that will be applied to a display object. You can find a list of valid composite operations at: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing

matrix

Matrix2D

Defined in matrix:80

The transformation matrix that will be applied to a display object.

shadow

Shadow

Defined in shadow:60

Property representing the shadow that will be applied to a display object.

visible

Boolean

Defined in visible:74

Property representing the value for visible that will be applied to a display object.