Package | com.degrafa.geometry |
Class | public class Geometry |
Inheritance | Geometry ![]() |
Implements | com.degrafa.core.IDegrafaObject, com.degrafa.IGeometryComposition, com.degrafa.states.IDegrafaStateClient, mx.styles.ISimpleStyleClient |
Subclasses | Wedge |
Default MXML Propertygeometry
Property | Defined By | ||
---|---|---|---|
alpha : Number
The alpha setting that applies to this object. | Geometry | ||
autoClearGraphicsTarget : Boolean
When using a graphicsTarget and if this property is set to true
the draw phase will clear the graphics context before drawing. | Geometry | ||
bottom : Number
When set, the bottom of the layout will be located
offset from the bottom of it's parent. | Geometry | ||
bounds : Rectangle [read-only]
The tight bounds of this element as represented by a Rectangle. | Geometry | ||
clippingRectangle : Rectangle
A clipping rectangle to use when rendering this geometry. | Geometry | ||
commandStack : CommandStack
Provides access to the command stack. | Geometry | ||
currentState : String
The current view state. | Geometry | ||
data : Object
Allows a short hand property setting that is
specific to and parsed by each geometry object. | Geometry | ||
decoratorCollection : DecoratorCollection [read-only]
Access to the Decorator collection object for this Geometry object. | Geometry | ||
decorators : Array
A array of IDecorator objects to be applied on this Geometry. | Geometry | ||
fill : IGraphicsFill
Defines the fill object that will be used for
rendering this geometry object. | Geometry | ||
filters : Array
An array of BitmapFilter objects applied to this Geometry. | Geometry | ||
geometricLength : Number [read-only]
Returns geometric length of this object. | Geometry | ||
geometry : Array
A array of IGeometryComposition objects. | Geometry | ||
geometryCollection : GeometryCollection [read-only]
Access to the Degrafa geometry collection object for this geometry object. | Geometry | ||
graphicsTarget : Array
One or more display object's that this Geometry is to be drawn to. | Geometry | ||
graphicsTargetCollection : DisplayObjectCollection [read-only]
Access to the Degrafa target collection object for this geometry object. | Geometry | ||
hasDecorators : Boolean
Returns true if this Geometry has decorators. | Geometry | ||
hasFilters : Boolean
Returns true if this Geometry has filters. | Geometry | ||
hasLayout : Boolean
Returns true if this Geometry has layout. | Geometry | ||
hasStates : Boolean
Returns true if this Geometry has states. | Geometry | ||
hasTriggers : Boolean
Returns true if this Geometry has triggers. | Geometry | ||
height : Number
Defines the height of the layout boundary. | Geometry | ||
horizontalCenter : Number
When set, if left or right is not set, the layout
will be centered horizontally offset by the numeric
value of this property. | Geometry | ||
IGraphicParent : IGraphic | Geometry | ||
inheritFill : Boolean
If set to true and no fill is defined and there is a parent object
then this object will walk up through the parents to retrive a fill
object. | Geometry | ||
inheritStroke : Boolean
If set to true and no stroke is defined and there is a parent object
then this object will walk up through the parents to retrive a stroke
object. | Geometry | ||
invalidated : Boolean
Specifies whether this object is to be re calculated
on the next cycle. | Geometry | ||
isInvalidated : Boolean [read-only]
Returns true if this Geometry object is invalidated
| Geometry | ||
isRootGeometry : Boolean [read-only]
Returns true if this Geometry object is a root Geometry Object. | Geometry | ||
layoutConstraint : LayoutConstraint
The layout constraint that is used for positioning/sizing this geometry object. | Geometry | ||
_layoutMatrix : Matrix
Access to the layout matrix if this Geometry has layout. | Geometry | ||
layoutRectangle : Rectangle [read-only]
Returns the constraint based layout rectangle for this object
or bounds if no layout constraint is specified. | Geometry | ||
left : Number
When set, the left of the layout will be located
offset by the value of this property multiplied
by the containing width. | Geometry | ||
maintainAspectRatio : Boolean
When true, the size of the layout will always
maintain an aspect ratio relative to the ratio
of the current width and height properties, even
if those properties are not in control of the
height and width of the layout. | Geometry | ||
mask : IGeometryComposition
A separate geometry object to use as a mask when rendering this geometry. | Geometry | ||
maskMode : String
The mode used when this object is being masked by the geometry assigned to the mask property. | Geometry | ||
maskSpace : String
The coordinate space within which the referenced mask geometry is rendered before being applied as a mask (respecting maskMode)
to this object. | Geometry | ||
maxHeight : Number
The maximum height that can be applied
to the layout. | Geometry | ||
maxWidth : Number
The maximum width that can be applied
to the layout. | Geometry | ||
maxX : Number
The maximum x location that can be applied
to the layout. | Geometry | ||
maxY : Number
The maximum y location that can be applied
to the layout. | Geometry | ||
minHeight : Number
The minimum height that can be applied
to the layout. | Geometry | ||
minWidth : Number
The minimum width that can be applied
to the layout. | Geometry | ||
minX : Number
The minimum x location that can be applied
to the layout. | Geometry | ||
minY : Number
The minimum y location that can be applied
to the layout. | Geometry | ||
percentHeight : Number
When set, the height of the layout will be
set as the value of this property multiplied
by the containing height. | Geometry | ||
percentWidth : Number
When set, the width of the layout will be
set as the value of this property multiplied
by the containing width. | Geometry | ||
right : Number
When set, the right of the layout will be located
offset by the value of this property multiplied
by the containing width. | Geometry | ||
scaleOnLayout : Boolean
When using layout this flag will determine if you want
Scale to be applied to fit layout rules
| Geometry | ||
state : String
The state at which to draw this object. | Geometry | ||
stateEvent : String
The state event at which to draw this object. | Geometry | ||
states : Array
An array of states defined for this Geometry. | Geometry | ||
stroke : IGraphicsStroke
Defines the stroke object that will be used for
rendering this geometry object. | Geometry | ||
styleName : Object
The css style name associated with this Geometry. | Geometry | ||
targetCoordinateSpace : DisplayObject
The display object that defines the coordinate system to use. | Geometry | ||
top : Number
When set, the top of the layout will be located
offset from the top of it's parent. | Geometry | ||
transform : ITransform
Defines the transform object that will be used for
rendering this geometry object. | Geometry | ||
transformBounds : Rectangle [read-only]
Returns a transformed version of this objects bounds as
represented by a Rectangle. | Geometry | ||
transformContext : Matrix
A reference to the transformation matrix context within which local transforms will be applied. | Geometry | ||
triggers : Array
An array of ITrigger objects that this Geometry object will use. | Geometry | ||
verticalCenter : Number
When set, if top or bottom is not set, the layout
will be centered vertically offset by the numeric
value of this property. | Geometry | ||
visible : Boolean
Controls the visibility of this geometry object. | Geometry | ||
width : Number
Defines the width of the layout. | Geometry | ||
x : Number
Defines the x location (top left) of the layout. | Geometry | ||
y : Number
Defines the y location (top left) of the layout. | Geometry |
Property | Defined By | ||
---|---|---|---|
_fill : IGraphicsFill | Geometry | ||
_stroke : IGraphicsStroke | Geometry |
Method | Defined By | ||
---|---|---|---|
angleAt(t:Number):Number
Returns the angle of a point t(0-1) on the path. | Geometry | ||
calculateLayout(childBounds:Rectangle = null):void
Performs the layout calculations if required. | Geometry | ||
clearGraphicsTargets():void
Clears all graphics targets specified in the graphicsTarget array. | Geometry | ||
draw(graphics:Graphics, rc:Rectangle):void
Begins the draw phase for geometry objects. | Geometry | ||
drawToTargets():void
Requests a draw for each graphics target specified in the graphicsTarget array. | Geometry | ||
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects. | Geometry | ||
initFill(graphics:Graphics, rc:Rectangle):void
Initialise the fill for this geometry object. | Geometry | ||
initStroke(graphics:Graphics, rc:Rectangle):void
Initialise the stroke for this geometry object. | Geometry | ||
pointAt(t:Number):Point
Returns the point at t(0-1) on this object. | Geometry | ||
preDraw():void
Performs any pre calculation that is required to successfully render
this element. | Geometry | ||
styleChanged(styleProp:String):void
Called when the value of a style property is changed. | Geometry |
Method | Defined By | ||
---|---|---|---|
propertyChangeHandler(event:PropertyChangeEvent):void
Principle event handler for any property changes to a
geometry object or it's child objects. | Geometry |
_fill | property |
protected var _fill:IGraphicsFill
_layoutMatrix | property |
public var _layoutMatrix:Matrix
Access to the layout matrix if this Geometry has layout.
_stroke | property |
protected var _stroke:IGraphicsStroke
alpha | property |
alpha:Number
[read-write] The alpha setting that applies to this object. Actual alpha used when rendering reflects this objects parent chain alpha settings. If this object descends from other geometries with alpha settings less than, the combined effect of the parent alphas is used in conjunction with the setting on this object.
public function get alpha():Number
public function set alpha(value:Number):void
autoClearGraphicsTarget | property |
autoClearGraphicsTarget:Boolean
[read-write] When using a graphicsTarget and if this property is set to true the draw phase will clear the graphics context before drawing.
public function get autoClearGraphicsTarget():Boolean
public function set autoClearGraphicsTarget(value:Boolean):void
bottom | property |
bottom:Number
[read-write] When set, the bottom of the layout will be located offset from the bottom of it's parent.
public function get bottom():Number
public function set bottom(value:Number):void
bounds | property |
bounds:Rectangle
[read-only] The tight bounds of this element as represented by a Rectangle. The value does not include children.
public function get bounds():Rectangle
clippingRectangle | property |
clippingRectangle:Rectangle
[read-write] A clipping rectangle to use when rendering this geometry.
public function get clippingRectangle():Rectangle
public function set clippingRectangle(value:Rectangle):void
commandStack | property |
commandStack:CommandStack
[read-write] Provides access to the command stack.
public function get commandStack():CommandStack
public function set commandStack(value:CommandStack):void
currentState | property |
currentState:String
[read-write] The current view state.
This property can be used as the source for data binding.
public function get currentState():String
public function set currentState(value:String):void
data | property |
data:Object
[read-write] Allows a short hand property setting that is specific to and parsed by each geometry object. Look at the various geometry objects to learn what this setting requires.
public function get data():Object
public function set data(value:Object):void
decoratorCollection | property |
decoratorCollection:DecoratorCollection
[read-only] Access to the Decorator collection object for this Geometry object.
public function get decoratorCollection():DecoratorCollection
decorators | property |
decorators:Array
[read-write] A array of IDecorator objects to be applied on this Geometry.
public function get decorators():Array
public function set decorators(value:Array):void
fill | property |
fill:IGraphicsFill
[read-write] Defines the fill object that will be used for rendering this geometry object.
public function get fill():IGraphicsFill
public function set fill(value:IGraphicsFill):void
filters | property |
filters:Array
[read-write] An array of BitmapFilter objects applied to this Geometry.
public function get filters():Array
public function set filters(value:Array):void
geometricLength | property |
geometricLength:Number
[read-only] Returns geometric length of this object. The value does not include children.
public function get geometricLength():Number
geometry | property |
geometry:Array
[read-write] A array of IGeometryComposition objects.
public function get geometry():Array
public function set geometry(value:Array):void
geometryCollection | property |
geometryCollection:GeometryCollection
[read-only] Access to the Degrafa geometry collection object for this geometry object.
public function get geometryCollection():GeometryCollection
graphicsTarget | property |
graphicsTarget:Array
[read-write] One or more display object's that this Geometry is to be drawn to. During the drawing phase this is tested first. If items have been defined the drawing of the geometry is done on each item(s) graphics context.
public function get graphicsTarget():Array
public function set graphicsTarget(value:Array):void
graphicsTargetCollection | property |
graphicsTargetCollection:DisplayObjectCollection
[read-only] Access to the Degrafa target collection object for this geometry object.
public function get graphicsTargetCollection():DisplayObjectCollection
hasDecorators | property |
public var hasDecorators:Boolean
Returns true if this Geometry has decorators.
hasFilters | property |
public var hasFilters:Boolean
Returns true if this Geometry has filters.
hasLayout | property |
public var hasLayout:Boolean
Returns true if this Geometry has layout.
hasStates | property |
public var hasStates:Boolean
Returns true if this Geometry has states.
hasTriggers | property |
public var hasTriggers:Boolean
Returns true if this Geometry has triggers.
height | property |
height:Number
[read-write] Defines the height of the layout boundary. Once top (or percentTop) or bottom (or percentBottom) is set, the width value no longer applies. If percentWidth exists when width is set, percentWidth will be overridden and be given a value of NaN. This property also accepts a percent value for example 75%.
public function get height():Number
public function set height(value:Number):void
horizontalCenter | property |
horizontalCenter:Number
[read-write] When set, if left or right is not set, the layout will be centered horizontally offset by the numeric value of this property.
public function get horizontalCenter():Number
public function set horizontalCenter(value:Number):void
IGraphicParent | property |
IGraphicParent:IGraphic
[read-write] public function get IGraphicParent():IGraphic
public function set IGraphicParent(value:IGraphic):void
inheritFill | property |
inheritFill:Boolean
[read-write] If set to true and no fill is defined and there is a parent object then this object will walk up through the parents to retrive a fill object.
public function get inheritFill():Boolean
public function set inheritFill(value:Boolean):void
inheritStroke | property |
inheritStroke:Boolean
[read-write] If set to true and no stroke is defined and there is a parent object then this object will walk up through the parents to retrive a stroke object.
public function get inheritStroke():Boolean
public function set inheritStroke(value:Boolean):void
invalidated | property |
invalidated:Boolean
[read-write] Specifies whether this object is to be re calculated on the next cycle. Only property updates which affect the computation of this object set this property
public function get invalidated():Boolean
public function set invalidated(value:Boolean):void
isInvalidated | property |
isInvalidated:Boolean
[read-only] Returns true if this Geometry object is invalidated
public function get isInvalidated():Boolean
isRootGeometry | property |
isRootGeometry:Boolean
[read-only] Returns true if this Geometry object is a root Geometry Object.
public function get isRootGeometry():Boolean
layoutConstraint | property |
layoutConstraint:LayoutConstraint
[read-write] The layout constraint that is used for positioning/sizing this geometry object.
public function get layoutConstraint():LayoutConstraint
public function set layoutConstraint(value:LayoutConstraint):void
layoutRectangle | property |
layoutRectangle:Rectangle
[read-only] Returns the constraint based layout rectangle for this object or bounds if no layout constraint is specified.
public function get layoutRectangle():Rectangle
left | property |
left:Number
[read-write] When set, the left of the layout will be located offset by the value of this property multiplied by the containing width.
public function get left():Number
public function set left(value:Number):void
maintainAspectRatio | property |
maintainAspectRatio:Boolean
[read-write] When true, the size of the layout will always maintain an aspect ratio relative to the ratio of the current width and height properties, even if those properties are not in control of the height and width of the layout.
public function get maintainAspectRatio():Boolean
public function set maintainAspectRatio(value:Boolean):void
mask | property |
mask:IGeometryComposition
[read-write] A separate geometry object to use as a mask when rendering this geometry.
public function get mask():IGeometryComposition
public function set mask(value:IGeometryComposition):void
maskMode | property |
maskMode:String
[read-write] The mode used when this object is being masked by the geometry assigned to the mask property. The value can either be "clip" or "mask". Clip mode is shape based clipping, alpha mode is alpha based masking. "svgClip" is a mode that mimics svg's clip-path setting with a non-zero clip-rule and userSpaceOnUse clipping units
public function get maskMode():String
public function set maskMode(value:String):void
maskSpace | property |
maskSpace:String
[read-write] The coordinate space within which the referenced mask geometry is rendered before being applied as a mask (respecting maskMode) to this object.
public function get maskSpace():String
public function set maskSpace(value:String):void
maxHeight | property |
maxHeight:Number
[read-write] The maximum height that can be applied to the layout.
public function get maxHeight():Number
public function set maxHeight(value:Number):void
maxWidth | property |
maxWidth:Number
[read-write] The maximum width that can be applied to the layout.
public function get maxWidth():Number
public function set maxWidth(value:Number):void
maxX | property |
maxX:Number
[read-write] The maximum x location that can be applied to the layout.
public function get maxX():Number
public function set maxX(value:Number):void
maxY | property |
maxY:Number
[read-write] The maximum y location that can be applied to the layout.
public function get maxY():Number
public function set maxY(value:Number):void
minHeight | property |
minHeight:Number
[read-write] The minimum height that can be applied to the layout.
public function get minHeight():Number
public function set minHeight(value:Number):void
minWidth | property |
minWidth:Number
[read-write] The minimum width that can be applied to the layout.
public function get minWidth():Number
public function set minWidth(value:Number):void
minX | property |
minX:Number
[read-write] The minimum x location that can be applied to the layout.
public function get minX():Number
public function set minX(value:Number):void
minY | property |
minY:Number
[read-write] The minimum y location that can be applied to the layout.
public function get minY():Number
public function set minY(value:Number):void
percentHeight | property |
percentHeight:Number
[read-write] When set, the height of the layout will be set as the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100% a value of 75 represents 75%.
public function get percentHeight():Number
public function set percentHeight(value:Number):void
percentWidth | property |
percentWidth:Number
[read-write] When set, the width of the layout will be set as the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100% a value of 75 represents 75%.
public function get percentWidth():Number
public function set percentWidth(value:Number):void
right | property |
right:Number
[read-write] When set, the right of the layout will be located offset by the value of this property multiplied by the containing width.
public function get right():Number
public function set right(value:Number):void
scaleOnLayout | property |
scaleOnLayout:Boolean
[read-write] When using layout this flag will determine if you want Scale to be applied to fit layout rules
public function get scaleOnLayout():Boolean
public function set scaleOnLayout(value:Boolean):void
state | property |
state:String
[read-write] The state at which to draw this object. This property is specific to Skinning.
public function get state():String
public function set state(value:String):void
stateEvent | property |
stateEvent:String
[read-write] The state event at which to draw this object. This property is specific to Skinning.
public function get stateEvent():String
public function set stateEvent(value:String):void
states | property |
states:Array
[read-write] An array of states defined for this Geometry.
public function get states():Array
public function set states(value:Array):void
stroke | property |
stroke:IGraphicsStroke
[read-write] Defines the stroke object that will be used for rendering this geometry object.
public function get stroke():IGraphicsStroke
public function set stroke(value:IGraphicsStroke):void
styleName | property |
styleName:Object
[read-write] The css style name associated with this Geometry. Not yet fully implemented as of Beta 3.
public function get styleName():Object
public function set styleName(value:Object):void
targetCoordinateSpace | property |
targetCoordinateSpace:DisplayObject
[read-write] The display object that defines the coordinate system to use. Dev Note:: Not yet implemented as of Beta 3.
public function get targetCoordinateSpace():DisplayObject
public function set targetCoordinateSpace(value:DisplayObject):void
top | property |
top:Number
[read-write] When set, the top of the layout will be located offset from the top of it's parent.
public function get top():Number
public function set top(value:Number):void
transform | property |
transform:ITransform
[read-write] Defines the transform object that will be used for rendering this geometry object.
public function get transform():ITransform
public function set transform(value:ITransform):void
transformBounds | property |
transformBounds:Rectangle
[read-only] Returns a transformed version of this objects bounds as represented by a Rectangle. If no transform is specified bounds is returned. The value does not include children.
public function get transformBounds():Rectangle
transformContext | property |
transformContext:Matrix
[read-write] A reference to the transformation matrix context within which local transforms will be applied. Similar in concept to the concatenatedMatrix on a flash DisplayObjects transform property.
public function get transformContext():Matrix
public function set transformContext(value:Matrix):void
triggers | property |
triggers:Array
[read-write] An array of ITrigger objects that this Geometry object will use.
public function get triggers():Array
public function set triggers(value:Array):void
verticalCenter | property |
verticalCenter:Number
[read-write] When set, if top or bottom is not set, the layout will be centered vertically offset by the numeric value of this property.
public function get verticalCenter():Number
public function set verticalCenter(value:Number):void
visible | property |
visible:Boolean
[read-write] Controls the visibility of this geometry object. If true, the geometry is visible. When set to false this geometry object will be pre computed nor drawn.
public function get visible():Boolean
public function set visible(value:Boolean):void
width | property |
width:Number
[read-write] Defines the width of the layout. Once left (or percentLeft) or right (or percentRight) is set, the width value no longer applies. If percentWidth exists when width is set, percentWidth will be overridden and be given a value of NaN. This property also accepts a percent value for example 75%.
public function get width():Number
public function set width(value:Number):void
x | property |
x:Number
[read-write] Defines the x location (top left) of the layout.
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
[read-write] Defines the y location (top left) of the layout.
public function get y():Number
public function set y(value:Number):void
angleAt | () | method |
public function angleAt(t:Number):Number
Returns the angle of a point t(0-1) on the path.
Parameters
t:Number |
Number |
calculateLayout | () | method |
public function calculateLayout(childBounds:Rectangle = null):void
Performs the layout calculations if required. All geometry override this for specifics.
Parameters
childBounds:Rectangle (default = null ) — the bounds to be layed out. If not specified a rectangle
of (0,0,1,1) is used.
|
clearGraphicsTargets | () | method |
public function clearGraphicsTargets():void
Clears all graphics targets specified in the graphicsTarget array.
draw | () | method |
public function draw(graphics:Graphics, rc:Rectangle):void
Begins the draw phase for geometry objects. All geometry objects override this to do their specific rendering.
Parameters
graphics:Graphics — The current context to draw to.
| |
rc:Rectangle — A Rectangle object used for fill bounds.
|
drawToTargets | () | method |
public function drawToTargets():void
Requests a draw for each graphics target specified in the graphicsTarget array.
endDraw | () | method |
public function endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
Parameters
graphics:Graphics — The current Graphics context being drawn to.
|
initFill | () | method |
public function initFill(graphics:Graphics, rc:Rectangle):void
Initialise the fill for this geometry object. Typically only called by draw
Parameters
graphics:Graphics — The current context to draw to.
| |
rc:Rectangle — A Rectangle object used for fill bounds.
|
initStroke | () | method |
public function initStroke(graphics:Graphics, rc:Rectangle):void
Initialise the stroke for this geometry object. Typically only called by draw
Parameters
graphics:Graphics — The current context to draw to.
| |
rc:Rectangle — A Rectangle object used for fill bounds.
|
pointAt | () | method |
public function pointAt(t:Number):Point
Returns the point at t(0-1) on this object.
Parameters
t:Number |
Point |
preDraw | () | method |
public function preDraw():void
Performs any pre calculation that is required to successfully render this element. Including bounds calculations and lower level drawing command storage. Each geometry object overrides this and is responsible for it's own pre calculation cycle.
propertyChangeHandler | () | method |
protected function propertyChangeHandler(event:PropertyChangeEvent):void
Principle event handler for any property changes to a geometry object or it's child objects.
Parameters
event:PropertyChangeEvent |
styleChanged | () | method |
public function styleChanged(styleProp:String):void
Called when the value of a style property is changed.
Parameters
styleProp:String |