Packagecom.degrafa.geometry
Classpublic class Geometry
InheritanceGeometry Inheritance DegrafaObject
ImplementsIDegrafaObject, IGeometryComposition
SubclassesAdvancedRectangle, Circle, CubicBezier, Ellipse, EllipticalArc, GeometryComposition, HorizontalLine, Line, Move, Path, Polygon, Polyline, QuadraticBezier, RegularRectangle, Repeater, RoundedRectangle, RoundedRectangleComplex, VerticalLine

A geometry object is a type of Degrafa object that enables rendering to a graphics context. Degrafa provides a number of ready-to-use geometry objects. All geometry objects inherit from the Geometry class. All geometry objects have a default data property that can be used for short hand property setting.

Default MXML Propertygeometry



Public Properties
 PropertyDefined by
  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
  bounds : Rectangle
[read-only]
Geometry
  data : 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
  fill : IGraphicsFill
Defines the fill object that will be used for rendering this geometry 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
 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
  invalidated : 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
  state : String
The state at which to draw this object
Geometry
  stateEvent : String
The state event at which to draw this object
Geometry
  stroke : IGraphicsStroke
Defines the stroke object that will be used for rendering this geometry object.
Geometry
 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
 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
 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.
Geometry
  
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
Geometry
 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.
Geometry
 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
autoClearGraphicsTargetproperty
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.

This property can be used as the source for data binding.

Implementation
    public function get autoClearGraphicsTarget():Boolean
    public function set autoClearGraphicsTarget(value:Boolean):void
boundsproperty 
bounds:Rectangle  [read-only]

This property can be used as the source for data binding.

Implementation
    public function get bounds():Rectangle
dataproperty 
data:String  [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.

This property can be used as the source for data binding.

Implementation
    public function get data():String
    public function set data(value:String):void
fillproperty 
fill:IGraphicsFill  [read-write]

Defines the fill object that will be used for rendering this geometry object.

This property can be used as the source for data binding.

Implementation
    public function get fill():IGraphicsFill
    public function set fill(value:IGraphicsFill):void
geometryproperty 
geometry:Array  [read-write]

A array of IGeometryComposition objects.

This property can be used as the source for data binding.

Implementation
    public function get geometry():Array
    public function set geometry(value:Array):void
geometryCollectionproperty 
geometryCollection:GeometryCollection  [read-only]

Access to the Degrafa geometry collection object for this geometry object.

This property can be used as the source for data binding.

Implementation
    public function get geometryCollection():GeometryCollection
graphicsTargetproperty 
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.

This property can be used as the source for data binding.

Implementation
    public function get graphicsTarget():Array
    public function set graphicsTarget(value:Array):void
graphicsTargetCollectionproperty 
graphicsTargetCollection:DisplayObjectCollection  [read-only]

Access to the Degrafa target collection object for this geometry object.

This property can be used as the source for data binding.

Implementation
    public function get graphicsTargetCollection():DisplayObjectCollection
invalidatedproperty 
public var invalidated:Boolean

Specifies whether this object is to be re calculated on the next cycle.

stateproperty 
state:String  [read-write]

The state at which to draw this object

This property can be used as the source for data binding.

Implementation
    public function get state():String
    public function set state(value:String):void
stateEventproperty 
stateEvent:String  [read-write]

The state event at which to draw this object

This property can be used as the source for data binding.

Implementation
    public function get stateEvent():String
    public function set stateEvent(value:String):void
strokeproperty 
stroke:IGraphicsStroke  [read-write]

Defines the stroke object that will be used for rendering this geometry object.

This property can be used as the source for data binding.

Implementation
    public function get stroke():IGraphicsStroke
    public function set stroke(value:IGraphicsStroke):void
Method detail
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.
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.
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.