| Package | com.senocular.display.transform |
| Class | public class ControlUVScale |
| Inheritance | ControlUVScale ControlUV ControlInteractive Control flash.display.Sprite |
| Property | Defined By | ||
|---|---|---|---|
![]() | cursor : Cursor
The cursor to be used when interacting with this control. | ControlInteractive | |
![]() | fillAlpha : Number
The alpha of the color used for filled shapes in dynamically drawn
control graphics. | Control | |
![]() | fillColor : uint
The color to be used for filled shapes in dynamically drawn
control graphics. | Control | |
![]() | lineAlpha : Number
The alpha of the color used for outlines in dynamically drawn
control graphics. | Control | |
![]() | lineColor : uint
The color to be used for outlines in dynamically drawn control
graphics. | Control | |
![]() | lineThickness : Number
The thickness used for outlines in dynamically drawn control
graphics. | Control | |
| mode : String
Scale mode for scaling. | ControlUVScale | ||
![]() | offset : Point
A pixel-based offset (not percentage) for additional
positioning for the control on top of UV positioning. | ControlUV | |
![]() | tool : TransformTool
A reference to the TransformTool instance the control was placed,
defined in the ADDED_TO_STAGE event. | Control | |
![]() | u : Number
The U value in the UV positioning used by the
Control object. | ControlUV | |
![]() | v : Number
The V value in the UV positioning used by the
Control object. | ControlUV | |
| Method | Defined By | ||
|---|---|---|---|
ControlUVScale(u:Number = 1, v:Number = 1, mode:String, cursor:Cursor = null)
Constructor for creating new ControlUVScale instances. | ControlUVScale | ||
draw():void [override]
Draws the visuals of the control. | ControlUVScale | ||
![]() | getLocalUVPosition(u:Number, v:Number, target:DisplayObject):Point
Returns the UV position within the local coordinate space of a
target DisplayObject instance. | ControlUV | |
![]() | getUVPosition(u:Number, v:Number, offset:Point = null):Point
Returns the position of the control within the coordinate space of
the Transform Tool for the current target object given values for
UV and offsets. | ControlUV | |
![]() | redraw(event:Event):void [override]
Handler for the TransformTool.REDRAW event. | ControlUV | |
| Method | Defined By | ||
|---|---|---|---|
activeMouseMove(event:MouseEvent):void [override]
Handler for the MouseEvent.MOUSE_MOVE event from the activeTarget
object. | ControlUVScale | ||
![]() | activeMouseUp(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_UP event (capture and no capture)
from the activeTarget object. | ControlInteractive | |
![]() | added(event:Event):void
Handler for the Event.ADDED event (capture). | Control | |
![]() | addedToStage(event:Event):void
Handler for the Event.ADDED_TO_STAGE event. | Control | |
![]() | calculateAndUpdate(commit:Boolean = true, enforceNegativeScaling:Boolean = true):void
Calls calculateTransform and update from the parent TransformTool
instance. | ControlInteractive | |
![]() | cleanupActiveMouse():void
Clears variables and listeners for tracking the mouse location. | ControlInteractive | |
![]() | cleanupCursor():void
Cleanup steps when defining a new cursor value. | ControlInteractive | |
![]() | cleanupTool():void
Cleanup steps when defining a new tool value. | Control | |
mouseDown(event:MouseEvent):void [override]
Handler for the MouseEvent.ROLL_OUT event for the control object. | ControlUVScale | ||
![]() | mouseUp(event:MouseEvent):void
Handler for the MouseEvent.MOUSE_UP event for the control object. | ControlInteractive | |
![]() | move():void
Moves the transform using the current mouse position (applied to
postTransform). | ControlInteractive | |
![]() | moveRegistration():void
Moves the registration point using the current mouse position. | ControlInteractive | |
![]() | removedFromStage(event:Event):void [override]
Handler for the Event.REMOVED_FROM_STAGE event. | ControlInteractive | |
![]() | restrict(event:Event):void
Handler for the TransformTool.RESTRICT event. | ControlInteractive | |
![]() | rollOut(event:MouseEvent):void
Handler for the MouseEvent.ROLL_OUT event for the control object. | ControlInteractive | |
![]() | rollOver(event:MouseEvent):void
Handler for the MouseEvent.ROLL_OVER event for the control object. | ControlInteractive | |
![]() | rotate():void
Rotates a transform using the current mouse position (applied to
postTransform). | ControlInteractive | |
![]() | scale():void
Scales the transform along both the x and y axes using the
current mouse position (applied to preTransform). | ControlInteractive | |
![]() | scaleXAxis():void
Scales the transform along the axis using the current mouse
position (applied to preTransform). | ControlInteractive | |
![]() | scaleYAxis():void
Scales the transform along the y axis using the current mouse
position (applied to preTransform). | ControlInteractive | |
![]() | setPosition():void
Sets the position of the control to the current location returned
by getUVPosition. | ControlUV | |
![]() | setupActiveMouse():void
Intializes variables and listeners for tracking the mouse location. | ControlInteractive | |
![]() | setupCursor():void
Setup steps when defining a new cursor value. | ControlInteractive | |
![]() | setupTool():void [override]
Setup steps when defining a new tool value. | ControlInteractive | |
![]() | skewXAxis():void
Skews the transform along the x axis using the current mouse
position (applied to preTransform). | ControlInteractive | |
![]() | skewYAxis():void
Skews the transform along the y axis using the current mouse
position (applied to preTransform). | ControlInteractive | |
![]() | targetChanged(event:Event):void [override]
Handler for the TransformTool.TARGET_CHANGED event. | ControlInteractive | |
![]() | uniformScale():void
Scales the transform along both the x and y axes using the
current mouse position in a uniform fashion (applied to
preTransform). | ControlInteractive | |
![]() | updateActiveMouse():void
Updates active references for mouse positions. | ControlInteractive | |
![]() | updateBaseMouse():void
Updates base references for mouse positions. | ControlInteractive | |
![]() | updateBaseReferences():void
Updates the values of the base references. | ControlInteractive | |
![]() | updateMousePositions(event:MouseEvent = null):void
Updates mouse position references from the provided mouse
event. | ControlInteractive | |
| Constant | Defined By | ||
|---|---|---|---|
| BOTH : String = both [static]
Scale mode for scaling both the x and y axes at
the same time. | ControlUVScale | ||
![]() | MIN_SCALE_BASE : Number = .1
The minimum distance to allow scaling. | ControlInteractive | |
| UNIFORM : String = uniform [static] | ControlUVScale | ||
| X_AXIS : String = xAxis [static]
Scale mode for scaling x axis only. | ControlUVScale | ||
| Y_AXIS : String = yAxis [static]
Scale mode for scaling y axis only. | ControlUVScale | ||
| mode | property |
mode:StringScale mode for scaling. This can be either X_AXIS, Y_AXIS, BOTH, or UNIFORM.
public function get mode():String public function set mode(value:String):void| ControlUVScale | () | Constructor |
public function ControlUVScale(u:Number = 1, v:Number = 1, mode:String, cursor:Cursor = null)Constructor for creating new ControlUVScale instances.
Parametersu:Number (default = 1) — The U value for positioning the control in the x axis.
| |
v:Number (default = 1) — The V value for positioning the control in the y axis.
| |
mode:String (default = NaN) — The transform mode to use for scaling. This can be
either X_AXIS, Y_AXIS, BOTH, or UNIFORM.
| |
cursor:Cursor (default = null) — The cursor to be used while interacting with the
control instance.
|
| activeMouseMove | () | method |
override protected function activeMouseMove(event:MouseEvent):voidHandler for the MouseEvent.MOUSE_MOVE event from the activeTarget object. This is used to update the active mouse positions.
Parameters
event:MouseEvent |
| draw | () | method |
override public function draw():voidDraws the visuals of the control. This is called when first added to the stage as a child of a TransformTool instance and when a child is added to the control's own display list. It can be called at any time to redraw the graphics of the control.
| mouseDown | () | method |
override protected function mouseDown(event:MouseEvent):voidHandler for the MouseEvent.ROLL_OUT event for the control object. This is used to determine if the cursor needs to be changed.
Parameters
event:MouseEvent |
| BOTH | Constant |
public static const BOTH:String = bothScale mode for scaling both the x and y axes at the same time.
| UNIFORM | Constant |
public static const UNIFORM:String = uniform| X_AXIS | Constant |
public static const X_AXIS:String = xAxisScale mode for scaling x axis only.
| Y_AXIS | Constant |
public static const Y_AXIS:String = yAxisScale mode for scaling y axis only.