| Style |
Defined By |
|
GradientColorStops : Array
|
LinearGradientFill
|
Array of color stops to apply to the gradient.
Format like [[position, "color"], [position, "color"], ...]
Position is a number between 0 and 1 representing where on the gradient line
to place the color stop.
|
|
|
GradientCoverage : String
|
LinearGradientFill
|
Determines the size of the gradient line based on the GradientDegrees.
This style has no effect on gradients at 90 degree intervals.
Available values are "inner" and "outer".
Inner gradient will draw a line across the center of the element at the specified degrees.
Outer gradient extends the line beyond the element's bounds so that the gradient is
perpendicular to the outer most corners of the element.
|
|
|
GradientDegrees : Number
|
LinearGradientFill
|
Angle 0-360 which the gradient should be drawn across the element.
|
|
| Style |
Defined By |
|
GradientColorStops : Array
|
LinearGradientFill
|
Array of color stops to apply to the gradient.
Format like [[position, "color"], [position, "color"], ...]
Position is a number between 0 and 1 representing where on the gradient line
to place the color stop.
|
|
|
GradientCoverage : String
|
LinearGradientFill
|
Determines the size of the gradient line based on the GradientDegrees.
This style has no effect on gradients at 90 degree intervals.
Available values are "inner" and "outer".
Inner gradient will draw a line across the center of the element at the specified degrees.
Outer gradient extends the line beyond the element's bounds so that the gradient is
perpendicular to the outer most corners of the element.
|
|
|
GradientDegrees : Number
|
LinearGradientFill
|
Angle 0-360 which the gradient should be drawn across the element.
|
|
| Function |
Defined By |
|
LinearGradientFill()
|
[Constructor] LinearGradientFill
|
Creates new LinearGradientFill instance.
|
|
|
addEventListener(type, callback)
|
EventDispatcher
|
Registers an event lister function to be called when an event occurs.
| |
type : String
String representing the event type.
|
| |
callback : Function
Function to be called when the event occurs.
|
|
|
|
clearStyle(styleName)
|
StyleDefinition
|
Clears style data from this object. This is the same
passing undefined to setStyle().
| |
styleName : String
String representing the style to clear.
|
|
|
|
dispatchEvent(event)
|
EventDispatcher
|
Dispatches an event to be processed by registered event listeners. The Event's target is the
EventDispatcher which called dispatchEvent. The Event will be cloned prior to passing to callback functions
to ensure the callback cannot modify the Event data or properties. You can check if the event was canceled
by calling the Event's getIsCanceled after dispatching it. Re-dispatching the same event will re-set its canceled state to false.
| |
event : DispatcherEvent
The DispatcherEvent class or subclass to be dispatched.
|
|
|
|
drawFill(ctx, metrics)
|
FillBase
|
Abstract stub used to fill an elements background.
Override this, setup the Canvas2DContext's fill style via ctx.fillStyle and call ctx.fill().
The background shape path will have already been drawn by the elements ShapeBase class.
| |
ctx : Canvas2DContext
The Canvas2DContext to draw the fill on.
|
| |
metrics : DrawMetrics
DrawMetrics object to use as the bounding box for the fill.
|
|
|
|
getStyle(styleName)
|
StyleDefinition
|
Gets the stored style value for this object.
| |
styleName : String
String representing the style to return.
|
| |
returns : Any
Returns the associated style value if found, otherwise undefined.
|
|
|
|
getStyleData(styleName)
|
StyleableBase
|
Gets the style data for the supplied style name, this includes
additional info than getStyle() such as the style priority. You should
not modify the returned StyleData.
| |
styleName : String
String representing style to return the associated StyleData.
|
| |
returns : StyleData
Returns the associated StyleData
|
|
|
|
hasEventListener(type, callback)
|
EventDispatcher
|
Checks if an event listener has been registered with this EventDispatcher
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be called when the event occurs. This may be null to check if the EventDispatcher has any events registered for the provided type.
|
| |
returns : boolean
Returns true if the EventDispatcher has the provided callback registered for the provided type, or any callback for the provided type if the callback parameter is null. Otherwise, returns false.
|
|
|
|
removeEventListener(type, callback)
|
EventDispatcher
|
Removes a callback from the EventDispatcher
| |
type : String
String representing the event type.
|
| |
callback : Function
Function callback to be removed.
|
| |
returns : boolean
Returns true if the callback was successfully removed, otherwise false such as if the function callback was not previously registered.
|
|
|
|
setStyle(styleName, value)
|
StyleDefinition
|
Sets the stored style value for this object.
| |
styleName : String
String representing the style to set.
|
| |
value : Any
The value to store. This may be null or undefined. Note that a null style is different from an absent (undefined) style. A null style will terminate a style chain lookup and return null value. An undefined style will cause the system to look further up the style chain for a value. Passing undefined is the same as calling clearStyle().
|
|
|
| Function |
Defined By |
|
_applySubStylesToElement(styleName, elementToApply)
|
StyleableBase
|
Convienence function for setting sub styles of sub components.
Applies appropriate sub styling from this Styleable to the
supplied elements definition and default definition style lists.
| |
styleName : String
String representing the sub style to apply.
|
| |
elementToApply : CanvasElement
The sub component element to apply sub styles.
|
|
|
|
_getClassStyle(styleName)
|
StyleableBase
|
Gets the default style value for the supplied style name specified on this
classes StyleDefault map. Subclasses override base class values.
| |
styleName : String
String representing the default style to return.
|
| |
returns : Any
Returns the associated default style value or undefined if none specified.
|
|
|
|
_getClassStyleList(styleName)
|
StyleableBase
|
Gets the default style values for the supplied style name specified on this
classes and base classes StyleDefault maps. This is used for sub styles as all
stub styles in the inheritance chain are applied to sub components.
| |
styleName : String
String representing the default style list to return.
|
| |
returns : Array
Returns an array of all default styles on this class, and base classes for the supplied styleName.
|
|
|
|
_getInstanceStyle(styleName)
|
StyleableBase
|
Gets the assigned style value for the supplied style name specified.
| |
styleName : String
String representing the style to return.
|
| |
returns : Any
Returns the associated style value or undefined if none specified.
|
|
|