Packagecom.degrafa
Classpublic class GeometryComposition
InheritanceGeometryComposition Inheritance Geometry Inheritance DegrafaObject
ImplementsIGeometry

GeometryComposition allows composing only objects that extend Geometry. This is not Sprite based like GeometryGroup and as such can be used in situations where a sprite is not allowed, for example skins. If you just want to draw to a arbitrary graphics context like Canvas, this object is recommended for the opening tag of your composition.

Default MXML Propertygeometry



Public Properties
 PropertyDefined by
 InheritedautoClearGraphicsTarget : Boolean
When using a graphicsTarget and if this property is set to true the draw phase will clear the graphics context before drawing.
Geometry
  bounds : Rectangle
[read-only] The tight bounds of this element as represented by a Rectangle object.
GeometryComposition
 Inheriteddata : String
Allows a short hand property setting that is specific to and parsed by each geometry object.
Geometry
 Inheriteddocument : Object
The MXML document that created this object.
DegrafaObject
 InheritedenableEvents : Boolean
Enable events for this object.
DegrafaObject
 Inheritedfill : IGraphicsFill
Defines the fill object that will be used for rendering this geometry object.
Geometry
  fillCollection : FillCollection
[read-only] Access to the Degrafa fill collection object for this graphic object.
GeometryComposition
  fills : Array
A array of IGraphicsFill objects.
GeometryComposition
 Inheritedgeometry : Array
A array of IGeometryComposition objects.
Geometry
 InheritedgeometryCollection : GeometryCollection
Access to the Degrafa geometry collection object for this geometry object.
Geometry
 InheritedgraphicsTarget : Array
One or more display object's that this Geometry is to be drawn to.
Geometry
 InheritedgraphicsTargetCollection : DisplayObjectCollection
Access to the Degrafa target collection object for this geometry object.
Geometry
 InheritedhasEventManager : Boolean
Tests to see if a EventDispatcher instance has been created for this object.
DegrafaObject
 Inheritedid : String
The identifier used by document to refer to this object.
DegrafaObject
 Inheritedinvalidated : Boolean
Specifies whether this object is to be re calculated on the next cycle.
Geometry
 Inheritedname : String
The name that refers to this object.
DegrafaObject
 Inheritedstate : String
The state at which to draw this object
Geometry
 InheritedstateEvent : String
The state event at which to draw this object
Geometry
 Inheritedstroke : IGraphicsStroke
Defines the stroke object that will be used for rendering this geometry object.
Geometry
  strokeCollection : StrokeCollection
[read-only] Access to the Degrafa stroke collection object for this graphic object.
GeometryComposition
  strokes : Array
A array of IStroke objects.
GeometryComposition
 InheritedsuppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
DegrafaObject
Protected Properties
 PropertyDefined by
 InheritedeventDispatcher : EventDispatcher
EventDispatcher instance for this object.
DegrafaObject
Public Methods
 MethodDefined by
  
GeometryComposition
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
DegrafaObject
  
calcBounds():void
Calculates the bounds for this element.
GeometryComposition
  
GeometryComposition
 Inherited
dispatchEvent(evt:Event):Boolean
Dispatches an event into the event flow.
DegrafaObject
 Inherited
dispatchPropertyChange(bubbles:Boolean = false, property:Object = null, oldValue:Object = null, newValue:Object = null, source:Object = null):Boolean
Dispatches an property change event into the event flow.
DegrafaObject
  
draw(graphics:Graphics, rc:Rectangle):void
Begins the draw phase for geometry objects.
GeometryComposition
  
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
GeometryComposition
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
DegrafaObject
 Inherited
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
DegrafaObject
 Inherited
initialized(document:Object, id:String):void
Called after the implementing object has been created and all component properties specified on the MXML tag have been initialized.
DegrafaObject
  
preDraw():void
Performs any pre calculation that is required to successfully render this element.
GeometryComposition
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
DegrafaObject
 Inherited
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
DegrafaObject
Events
 EventSummaryDefined by
 Inherited  DegrafaObject
 Inherited  DegrafaObject
Property detail
boundsproperty
bounds:Rectangle  [read-only]

The tight bounds of this element as represented by a Rectangle object.

Implementation
    public function get bounds():Rectangle
fillCollectionproperty 
fillCollection:FillCollection  [read-only]

Access to the Degrafa fill collection object for this graphic object.

Implementation
    public function get fillCollection():FillCollection
fillsproperty 
fills:Array  [read-write]

A array of IGraphicsFill objects.

Implementation
    public function get fills():Array
    public function set fills(value:Array):void
strokeCollectionproperty 
strokeCollection:StrokeCollection  [read-only]

Access to the Degrafa stroke collection object for this graphic object.

Implementation
    public function get strokeCollection():StrokeCollection
strokesproperty 
strokes:Array  [read-write]

A array of IStroke objects.

Implementation
    public function get strokes():Array
    public function set strokes(value:Array):void
Constructor detail
GeometryComposition()constructor
public function GeometryComposition()
Method detail
calcBounds()method
public function calcBounds():void

Calculates the bounds for this element.

clearGraphicsTargets()method 
public function clearGraphicsTargets():void
draw()method 
public override 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.
endDraw()method 
public override function endDraw(graphics:Graphics):void

Ends the draw phase for geometry objects.

Parameters
graphics:Graphics — The current Graphics context being drawn to.
preDraw()method 
public override 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.