flexlib :: library Documentation | All Packages | All Classes | Index | Frames No Frames |
StringBoundaries

Package | flexlib.controls.textClasses
Class | public class StringBoundaries
Inheritance | StringBoundaries Object

Public Properties

| Property | Defined By
--- | --- | ---
|  | isVisible : Boolean [read-only] Indicates whether or not the character range has visible characters. | StringBoundaries
|  | rectangles : Array [read-only] Returns the bounding rectangles of the current character range. | StringBoundaries

Public Methods

| Method | Defined By
--- | --- | ---
|  | StringBoundaries(textField:TextField, startIndex:int, endIndex:int, xOffset:Number = 0, yOffset:Number = 0) Finds the bounding rectangle of a character range within a TextField object. | StringBoundaries

Public Constants

| Constant | Defined By
--- | --- | ---
|  | X_CORRECTION : Number = 1 TextField.getCharBoundaries seems to be consistently innaccurate by this amount in the x-axis. | StringBoundaries
|  | Y_CORRECTION : Number = 2 TextField.getCharBoundaries seems to be consistently innaccurate by this amount in the y-axis. | StringBoundaries

Property Detail

isVisible | property

`isVisible:Boolean` [read-only]

Indicates whether or not the character range has visible characters.

Implementation
`public function get isVisible():Boolean`

rectangles | property |

`rectangles:Array` [read-only]

Returns the bounding rectangles of the current character range.

Implementation
`public function get rectangles():Array`
Constructor Detail

StringBoundaries | () | Constructor

`public function StringBoundaries(textField:TextField, startIndex:int, endIndex:int, xOffset:Number = 0, yOffset:Number = 0)`

Finds the bounding rectangle of a character range within a TextField object. If the character range spans multiple lines, bounding rectangles are calculated for each line.

Parameters

| `textField:TextField` — The TextField the string is in.
| `startIndex:int` — The start index of the character range.
| `endIndex:int` — The end index of the character range.
| `xOffset:Number` (default = `0`)`` — The horizontal offset to apply to the boundary rectangle.
| `yOffset:Number` (default = `0`)`` — The vertical offset to apply to the bounding rectangle.

Constant Detail

X_CORRECTION | Constant

`public const X_CORRECTION:Number = 1`

TextField.getCharBoundaries seems to be consistently innaccurate by this amount in the x-axis.

Y_CORRECTION | Constant |

`public const Y_CORRECTION:Number = 2`

TextField.getCharBoundaries seems to be consistently innaccurate by this amount in the y-axis.

Mercredi Juillet 6 2011, 09:45 PM +02:00