Package | com.gestureworks.cml.elements |
Class | public class Magnifier |
Inheritance | Magnifier ![]() ![]() |
Note that if the stage does not have a background image or display object of some sort, the MagnifierElement will simply retain visual data from the last object it was held over until brought to another display object.
The MagnifierElement has an optional fish-eye effect that can be altered using distortionRadius. The magnifier has two optional graphics, or can be left on its own with "default", "notch", or "none".
Rotation gestures on the magnifier will zoom it in.
var magnifier:Magnifier = new Magnifier(); magnifier.x = 550; magnifier.y = 150; magnifier.radius = 100; magnifier.magnification = 2; magnifier.distortionRadius = 40; magnifier.graphic = "default"; addChild(magnifier); magnifier.init();
Property | Defined By | ||
---|---|---|---|
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
backgroundBitmapData : BitmapData | Magnifier | ||
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
distortionRadius : Number
Set the amount of distortion or "fish-eye" effect the lens goes through before focusing cleanly. | Magnifier | ||
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
graphic : String
Sets the graphic type: default, notch, or none. | Magnifier | ||
![]() | group : String | TouchContainer | |
![]() | height : Number [override]
sets the height of the container
| TouchContainer | |
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
magnification : Number
The value of magnification of the lens, this can be increased or decreasted by performing a rotation
gesture on the lens, and its starting value can be set in CML. | Magnifier | ||
maxObjectScale : Number [read-only] | Magnifier | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
![]() | position : *
Sets the position
| TouchContainer | |
radius : Number
Radius of the total area of the lens, including distortion effects if any. | Magnifier | ||
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
![]() | sound : String | TouchContainer | |
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer | |
zoomMax : Number
The maximum zoom out value. | Magnifier | ||
zoomMin : Number
The minimum zoom in value. | Magnifier | ||
zoomRotateFactor : Number
Sets how fast rotating zooms in. | Magnifier |
Method | Defined By | ||
---|---|---|---|
Constructor
| Magnifier | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
dispose():void [override]
Destructor
| Magnifier | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override] | Magnifier | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
updateFilter():void | Magnifier | ||
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
backgroundBitmapData | property |
public var backgroundBitmapData:BitmapData
distortionRadius | property |
distortionRadius:Number
Set the amount of distortion or "fish-eye" effect the lens goes through before focusing cleanly. This amount is subtracted from the radius to create the focal area, so if the radius is 100, and the distortionRadius is 30, then the "focused" area will have a radius of 70. If the distortion and radius are equal, there will be no in-focus area. The maximum is whatever the radius is, the minimum is 0. Setting a graphic will hide the distortion unless it is made fairly large.
The default value is 30
.
public function get distortionRadius():Number
public function set distortionRadius(value:Number):void
graphic | property |
graphic:String
Sets the graphic type: default, notch, or none.
public function get graphic():String
public function set graphic(value:String):void
magnification | property |
magnification:Number
The value of magnification of the lens, this can be increased or decreasted by performing a rotation gesture on the lens, and its starting value can be set in CML. The max magnification is 50, the minimum is 1.
The default value is 5;
.
public function get magnification():Number
public function set magnification(value:Number):void
maxObjectScale | property |
maxObjectScale:Number
[read-only] public function get maxObjectScale():Number
radius | property |
radius:Number
Radius of the total area of the lens, including distortion effects if any.
The default value is 100
.
public function get radius():Number
public function set radius(value:Number):void
zoomMax | property |
zoomMax:Number
The maximum zoom out value.
The default value is 1.0
.
public function get zoomMax():Number
public function set zoomMax(value:Number):void
zoomMin | property |
zoomMin:Number
The minimum zoom in value.
The default value is 1.0
.
public function get zoomMin():Number
public function set zoomMin(value:Number):void
zoomRotateFactor | property |
zoomRotateFactor:Number
Sets how fast rotating zooms in.
The default value is 0.01
.
public function get zoomRotateFactor():Number
public function set zoomRotateFactor(value:Number):void
Magnifier | () | Constructor |
public function Magnifier()
Constructor
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
updateFilter | () | method |
public function updateFilter():void