Packagecom.degrafa
Classpublic class Graphic
InheritanceGraphic Inheritance flash.display.Sprite
Implementsmx.core.IMXMLObject
SubclassesGeometryGroup, GraphicImage

Graphic is the base class for Degrafa objects that allow complete composition GeometryGroup for example.

See also

flash.display.Sprite


Public Properties
 PropertyDefined by
  document : Object
[read-only] The MXML document that created this object.
Graphic
  enableEvents : Boolean
Enable events for this object.
Graphic
  fill : IGraphicsFill
Defines the fill object that will be used for rendering this graphic object.
Graphic
  fillCollection : FillCollection
[read-only] Access to the Degrafa fill collection object for this graphic object.
Graphic
  fills : Array
A array of IGraphicsFill objects.
Graphic
  hasEventManager : Boolean
[read-only] Tests to see if a EventDispatcher instance has been created for this object.
Graphic
  height : Number
Number that specifies the height, in pixels, in the target's coordinates.
Graphic
  id : String
The identifier used by document to refer to this object.
Graphic
  measuredHeight : Number
[read-only] The default height, in pixels.
Graphic
  measuredWidth : Number
[read-only] The default width, in pixels.
Graphic
  percentHeight : Number
Number that specifies the height as a percentage of the target.
Graphic
  percentWidth : Number
Number that specifies the width as a percentage of the target.
Graphic
  stroke : IGraphicsStroke
Defines the stroke object that will be used for rendering this graphic object.
Graphic
  strokeCollection : StrokeCollection
[read-only] Access to the Degrafa stroke collection object for this graphic object.
Graphic
  strokes : Array
A array of IStroke objects.
Graphic
  suppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
Graphic
  target : DisplayObjectContainer
A target DisplayObjectContainer that this graphic object should be added or drawn to.
Graphic
  width : Number
Number that specifies the width, in pixels, in the target's coordinates.
Graphic
  x : Number
Number that specifies the horizontal position, in pixels, within the target.
Graphic
  y : Number
Number that specifies the vertical position, in pixels, within the target.
Graphic
Public Methods
 MethodDefined by
  
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
Graphic
  
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.
Graphic
  
draw(graphics:Graphics, rc:Rectangle):void
Begins the draw phase for geometry objects.
Graphic
  
endDraw(graphics:Graphics):void
Ends the draw phase for geometry objects.
Graphic
  
initChange(property:String, oldValue:Object, newValue:Object, source:Object):void
Helper function for dispatching property changes
Graphic
  
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.
Graphic
Events
 EventSummaryDefined by
    Graphic
    Graphic
Property detail
documentproperty
document:Object  [read-only]

The MXML document that created this object.

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

Implementation
    public function get document():Object
enableEventsproperty 
enableEvents:Boolean  [read-write]

Enable events for this object.

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

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

Defines the fill object that will be used for rendering this graphic 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
fillCollectionproperty 
fillCollection:FillCollection  [read-only]

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

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

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

A array of IGraphicsFill objects.

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

Implementation
    public function get fills():Array
    public function set fills(value:Array):void
hasEventManagerproperty 
hasEventManager:Boolean  [read-only]

Tests to see if a EventDispatcher instance has been created for this object.

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

Implementation
    public function get hasEventManager():Boolean
heightproperty 
height:Number  [read-write]

Number that specifies the height, in pixels, in the target's coordinates.

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

Implementation
    public function get height():Number
    public function set height(value:Number):void
idproperty 
id:String  [read-write]

The identifier used by document to refer to this object.

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

Implementation
    public function get id():String
    public function set id(value:String):void
measuredHeightproperty 
measuredHeight:Number  [read-only]

The default height, in pixels.

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

Implementation
    public function get measuredHeight():Number
measuredWidthproperty 
measuredWidth:Number  [read-only]

The default width, in pixels.

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

Implementation
    public function get measuredWidth():Number
percentHeightproperty 
percentHeight:Number  [read-write]

Number that specifies the height as a percentage of the target.

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

Implementation
    public function get percentHeight():Number
    public function set percentHeight(value:Number):void
percentWidthproperty 
percentWidth:Number  [read-write]

Number that specifies the width as a percentage of the target.

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

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

Defines the stroke object that will be used for rendering this graphic 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
strokeCollectionproperty 
strokeCollection:StrokeCollection  [read-only]

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

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

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

A array of IStroke objects.

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

Implementation
    public function get strokes():Array
    public function set strokes(value:Array):void
suppressEventProcessingproperty 
suppressEventProcessing:Boolean  [read-write]

Temporarily suppress event processing for this object.

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

Implementation
    public function get suppressEventProcessing():Boolean
    public function set suppressEventProcessing(value:Boolean):void
targetproperty 
target:DisplayObjectContainer  [read-write]

A target DisplayObjectContainer that this graphic object should be added or drawn to.

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

Implementation
    public function get target():DisplayObjectContainer
    public function set target(value:DisplayObjectContainer):void
widthproperty 
width:Number  [read-write]

Number that specifies the width, in pixels, in the target's coordinates.

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

Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number  [read-write]

Number that specifies the horizontal position, in pixels, within the target.

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

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

Number that specifies the vertical position, in pixels, within the target.

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

Implementation
    public function get y():Number
    public function set y(value:Number):void
Method detail
dispatchEvent()method
public override function dispatchEvent(event:Event):Boolean

Dispatches an event into the event flow.

Parameters
event:Event

Returns
Boolean

See also

EventDispatcher
dispatchPropertyChange()method 
public function 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.

Parameters
bubbles:Boolean (default = false)
 
property:Object (default = null)
 
oldValue:Object (default = null)
 
newValue:Object (default = null)
 
source:Object (default = null)

Returns
Boolean
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.
initChange()method 
public function initChange(property:String, oldValue:Object, newValue:Object, source:Object):void

Helper function for dispatching property changes

Parameters
property:String
 
oldValue:Object
 
newValue:Object
 
source:Object
initialized()method 
public function 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.

Parameters
document:Object — The MXML document that created this object.
 
id:String — The identifier used by document to refer to this object.
Event detail
initializeevent 
Event object type: mx.events.FlexEvent

propertyChangeevent  
Event object type: mx.events.PropertyChangeEvent