Packagecom.degrafa.transform
Classpublic class TransformBase
InheritanceTransformBase Inheritance DegrafaObject
ImplementsITransform
SubclassesMatrixTransform, RotateTransform, ScaleTransform, SkewTransform, Transform, TransformGroup, TranslateTransform

TransformBase is a base transform class that other transforms extend off of.



Public Properties
 PropertyDefined by
  angle : Number
[read-only]
TransformBase
  centerX : Number
The center point of the transform along the x-axis.
TransformBase
  centerY : Number
The center point of the transform along the y-axis.
TransformBase
  data : String
TransformBase
 Inheriteddocument : Object
The MXML document that created this object.
DegrafaObject
 InheritedenableEvents : Boolean
Enable events for this object.
DegrafaObject
 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's matrix is to be re calculated on the next request.
TransformBase
  isIdentity : Boolean
[read-only] Boolean value indicating whether this transform will have no effect on the coordinate space of a target
TransformBase
 InheritedisInitialized : Boolean
DegrafaObject
 Inheritedname : String
The name that refers to this object.
DegrafaObject
 InheritedobjectBindings : Array
DegrafaObject
 Inheritedparent : IDegrafaObject
The current degrafa object parent.
DegrafaObject
  registrationPoint : String
A value defining one of 9 possible registration points.
TransformBase
  scaleX : Number
[read-only]
TransformBase
  scaleY : Number
[read-only]
TransformBase
  skewX : Number
[read-only]
TransformBase
  skewY : Number
[read-only]
TransformBase
 InheritedsuppressEventProcessing : Boolean
Temporarily suppress event processing for this object.
DegrafaObject
  transformMatrix : Matrix
The internal matrix calculated from the exposed transform properties.
TransformBase
  x : Number
[read-only]
TransformBase
  y : Number
[read-only]
TransformBase
Protected Properties
 PropertyDefined by
  _angle : Number = 0
TransformBase
  _centerX : Number = NaN
TransformBase
  _centerY : Number = NaN
TransformBase
 InheritedeventDispatcher : EventDispatcher
EventDispatcher instance for this object.
DegrafaObject
  _registrationPoint : String
TransformBase
  _scaleX : Number = 1
TransformBase
  _scaleY : Number = 1
TransformBase
  _skewX : Number = 0
TransformBase
  _skewY : Number = 0
TransformBase
  _transformMatrix : Matrix
TransformBase
  _tx : Number = 0
TransformBase
  _ty : Number = 0
TransformBase
Public Methods
 MethodDefined by
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):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
  
Retrieves the registration offset for the Geometry target.
TransformBase
  
getRegPointForRectangle(rectangle:Rectangle):Point
Detetermines the transformation registration point based on this transform's settings for an arbitrary Rectangle.
TransformBase
  
[static] Helper method to get the bounds after a transform has been applied
TransformBase
  
Utility function used internally for accessing the bounds of a transformed object
TransformBase
  
Retrieves the adjusted matrix for the registration offset based on the Geometry target bounds, if this transform is based on a registrationPoint, otherwise based on the centerX and centerY settings
TransformBase
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
DegrafaObject
  
A check to determine if the center of transfomation has been explicitly set.
TransformBase
 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
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
DegrafaObject
  
transformBounds(rect:Rectangle, trans:Matrix):Rectangle
[static] Helper method to apply a matrix to a bounds Rectangle and return a transformed bounds Rectangle
TransformBase
 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
Protected Methods
 MethodDefined by
  
getRegistrationPoint(value:IGeometryComposition, rectangle:Rectangle = null):Point
Calculates the translation offset based on the set registration point.
TransformBase
Events
 EventSummaryDefined by
 Inherited  DegrafaObject
 Inherited  DegrafaObject
Property detail
_angleproperty
protected var _angle:Number = 0
angleproperty 
angle:Number  [read-only]Implementation
    public function get angle():Number
_centerXproperty 
protected var _centerX:Number = NaN
centerXproperty 
centerX:Number  [read-write]

The center point of the transform along the x-axis. This property is ignored if the registrationPoint property has been set.

Implementation
    public function get centerX():Number
    public function set centerX(value:Number):void
_centerYproperty 
protected var _centerY:Number = NaN
centerYproperty 
centerY:Number  [read-write]

The center point of the transform along the y-axis. This property is ignored if the registrationPoint property has been set.

Implementation
    public function get centerY():Number
    public function set centerY(value:Number):void
dataproperty 
data:String  [read-write]Implementation
    public function get data():String
    public function set data(value:String):void
invalidatedproperty 
public var invalidated:Boolean

Specifies whether this object's matrix is to be re calculated on the next request.

isIdentityproperty 
isIdentity:Boolean  [read-only]

Boolean value indicating whether this transform will have no effect on the coordinate space of a target

Implementation
    public function get isIdentity():Boolean
_registrationPointproperty 
protected var _registrationPoint:String
registrationPointproperty 
registrationPoint:String  [read-write]

A value defining one of 9 possible registration points. Takes priority over centerX,centerY.

Implementation
    public function get registrationPoint():String
    public function set registrationPoint(value:String):void
_scaleXproperty 
protected var _scaleX:Number = 1
scaleXproperty 
scaleX:Number  [read-only]Implementation
    public function get scaleX():Number
_scaleYproperty 
protected var _scaleY:Number = 1
scaleYproperty 
scaleY:Number  [read-only]Implementation
    public function get scaleY():Number
_skewXproperty 
protected var _skewX:Number = 0
skewXproperty 
skewX:Number  [read-only]Implementation
    public function get skewX():Number
_skewYproperty 
protected var _skewY:Number = 0
skewYproperty 
skewY:Number  [read-only]Implementation
    public function get skewY():Number
_transformMatrixproperty 
protected var _transformMatrix:Matrix
transformMatrixproperty 
transformMatrix:Matrix  [read-write]

The internal matrix calculated from the exposed transform properties.

Implementation
    public function get transformMatrix():Matrix
    public function set transformMatrix(value:Matrix):void
_txproperty 
protected var _tx:Number = 0
_typroperty 
protected var _ty:Number = 0
xproperty 
x:Number  [read-only]Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]Implementation
    public function get y():Number
Method detail
getRegistrationPoint()method
protected function getRegistrationPoint(value:IGeometryComposition, rectangle:Rectangle = null):Point

Calculates the translation offset based on the set registration point.

Parameters
value:IGeometryComposition
 
rectangle:Rectangle (default = null)

Returns
Point
getRegPoint()method 
public function getRegPoint(value:IGeometryComposition):Point

Retrieves the registration offset for the Geometry target. If the registrationPoint property is set, this will return the registrationPoint calculated from the geometry target bounds, otherwise it will return the centerX and centerY settings for this Transform.

Parameters
value:IGeometryComposition

Returns
Point
getRegPointForRectangle()method 
public function getRegPointForRectangle(rectangle:Rectangle):Point

Detetermines the transformation registration point based on this transform's settings for an arbitrary Rectangle. Exposed primarily for use in Fills. This method returns a point where 0,0 as centerX,centerY (default for a Transform) is the center of the rectangle, because Fill transforms default to the center of the Fill target's bounds for their registration Point.

Parameters
rectangle:Rectangle

Returns
Point — a Point representing the registration point settings for this transform, expressed in the context of the rectangle argument
getRenderedBounds()method 
public static function getRenderedBounds(target:IGeometryComposition):Rectangle

Helper method to get the bounds after a transform has been applied

Parameters
target:IGeometryComposition

Returns
Rectangle — a rendered bounds rectangle
getTransformedBoundsFor()method 
public function getTransformedBoundsFor(value:IGeometryComposition):Rectangle

Utility function used internally for accessing the bounds of a transformed object

Parameters
value:IGeometryComposition — - the Geometry object for which the transformed bounds are required

Returns
Rectangle — a Rectangle representing the transformed bounds of the Geometry
getTransformFor()method 
public function getTransformFor(value:IGeometryComposition):Matrix

Retrieves the adjusted matrix for the registration offset based on the Geometry target bounds, if this transform is based on a registrationPoint, otherwise based on the centerX and centerY settings

Parameters
value:IGeometryComposition — - the Geometry context for the transform

Returns
Matrix — a flash Matrix representing the transform for the Geometry argument
hasExplicitSetting()method 
public function hasExplicitSetting():Boolean

A check to determine if the center of transfomation has been explicitly set. Required for TransformGroup

Returns
Boolean — boolean true if this Transform object has an explicit setting for it's registration point
transformBounds()method 
public static function transformBounds(rect:Rectangle, trans:Matrix):Rectangle

Helper method to apply a matrix to a bounds Rectangle and return a transformed bounds Rectangle

Parameters
rect:Rectangle — the bounds rectangle to be transformed
 
trans:Matrix — the transformation Matrix to be applied

Returns
Rectangle — the transformed bounds rectangle