<swatchview>
A simple space-filling colored view.

JavaScript: lz.swatchview
extends <view> » <node> » lz.Eventable »

A simple view that is filled with a single color. Either 'fgcolor' and 'bgcolor' may be used to set the color of the view. By default it fills the space of the parent with white.

Unlike with other views, setColorTransform will affect the bgcolor of the view.

swatchview is a simple view that is filled with a single color. Either 'fgcolor' and 'bgcolor' may be used to set the color of the view. By default it fills the space of the parent with white

Attributes

Name Type (tag) Type (js) Default Category
color expression any 0xffffff readonly
  this is the color that was set (by setting 'bgcolor' or 'fgcolor' ), bgcolor may be different if setColorTransform has been called

Methods

setColorTransform()
swatchview.setColorTransform(o : Object);
affects the bgcolor, unlike in regular views where only the resource and subviews are affected by the color transform
Parameter Name Type Description
o Object color transform object (see view.setColorTransform for details)

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy