GODPAPER | All Packages | All Classes | Index | Frames No Frames |
ScrollRectManager

Package | feathers.display
Class | public class ScrollRectManager
Inheritance | ScrollRectManager Object

Utilities for working with display objects that have a `scrollRect`.

See also

IDisplayObjectWithScrollRect

Public Methods

| Method | Defined By
--- | --- | ---
|  | adjustTouchLocation(location:Point, target:DisplayObject):void [static] Adjusts the result of the getLocation() method on the Touch class to account for scrollRect on the target's parent or any other containing display object. | ScrollRectManager
|  | getBounds(object:DisplayObject, targetSpace:DisplayObject, result:Rectangle = null):Rectangle [static] Enhances getBounds() with correction for scrollRect offsets. | ScrollRectManager
|  | toStageCoordinates(location:Point, target:DisplayObject):void [static] Corrects a transformed point in the target coordinate system that has been affected by scrollRect to stage coordinates. | ScrollRectManager

Method Detail

adjustTouchLocation | () | method

`public static function adjustTouchLocation(location:Point, target:DisplayObject):void`

Adjusts the result of the `getLocation()` method on the `Touch` class to account for `scrollRect` on the target's parent or any other containing display object.

Parameters

| `location:Point`
| `target:DisplayObject`

See also

starling.events.Touch.getLocation()

getBounds | () | method |

`public static function getBounds(object:DisplayObject, targetSpace:DisplayObject, result:Rectangle = null):Rectangle`

Enhances `getBounds()` with correction for `scrollRect` offsets.

Parameters

| `object:DisplayObject`
| `targetSpace:DisplayObject`
| `result:Rectangle` (default = `null`)``

Returns

| `Rectangle`

toStageCoordinates | () | method |

`public static function toStageCoordinates(location:Point, target:DisplayObject):void`

Corrects a transformed point in the target coordinate system that has been affected by `scrollRect` to stage coordinates.

Parameters

| `location:Point`
| `target:DisplayObject`

Thu Jan 16 2014, 01:11 PM +08:00