ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
TextBaseline

Package | flash.text.engine
Class | public final class TextBaseline
Inheritance | TextBaseline Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

The TextBaseline class is an enumeration of constant values to use in setting the `dominantBaseline` and `alignmentBaseline` properties of the ElementFormat class. You can also use it in the `baselineZero` argument of `TextBlock.createTextLine()`. Consider this situation:

The line consists of four `TextElement` objects, containing 'a', 'b', 'cccccccc', and 'X' respectivly. The line baselines are determined by the element containing 'X' because it is the largest element in the line. The roman baseline of the 'X' element is aligned with the roman baseline of the line. The ideographic top of the 'a' element is aligned with the ideographic top of the line. The ideographic bottom of the 'b' element is aligned with the ideographic bottom of the line. The ideographic center of the 'cccccccc' element is aligned with the ideographic center of the line.

See also

ElementFormat.dominantBaseline
ElementFormat.alignmentBaseline
TextBlock.createTextLine

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | ASCENT : String = "ascent" [static] Specifies an ascent baseline. | TextBaseline
|  | DESCENT : String = "descent" [static] Specifies a descent baseline. | TextBaseline
|  | IDEOGRAPHIC_BOTTOM : String = "ideographicBottom" [static] Specifies an ideographic bottom baseline. | TextBaseline
|  | IDEOGRAPHIC_CENTER : String = "ideographicCenter" [static] Specifies an ideographic center baseline. | TextBaseline
|  | IDEOGRAPHIC_TOP : String = "ideographicTop" [static] Specifies an ideographic top baseline. | TextBaseline
|  | ROMAN : String = "roman" [static] Specifies a roman baseline. | TextBaseline
|  | SUBSCRIPT : String = "subscript" [static] Specifies a sub script baseline. | TextBaseline
|  | SUPERSCRIPT : String = "superscript" [static] Specifies a super script baseline. | TextBaseline
|  | USE_DOMINANT_BASELINE : String = "useDominantBaseline" [static] Specifies that the alignmentBaseline should be the same as the dominantBaseline. | TextBaseline

Constant Detail

ASCENT | Constant

`public static const ASCENT:String = "ascent"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies an ascent baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric bottom of the element.

DESCENT | Constant |

`public static const DESCENT:String = "descent"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies a descent baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text element uses the geometric bottom of the element.

IDEOGRAPHIC_BOTTOM | Constant |

`public static const IDEOGRAPHIC_BOTTOM:String = "ideographicBottom"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies an ideographic bottom baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric bottom of the element.

IDEOGRAPHIC_CENTER | Constant |

`public static const IDEOGRAPHIC_CENTER:String = "ideographicCenter"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies an ideographic center baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric center of the element.

IDEOGRAPHIC_TOP | Constant |

`public static const IDEOGRAPHIC_TOP:String = "ideographicTop"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies an ideographic top baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric top of the element.

ROMAN | Constant |

`public static const ROMAN:String = "roman"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies a roman baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric bottom of the element.

SUBSCRIPT | Constant |

`public static const SUBSCRIPT:String = "subscript"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies a sub script baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric bottom of the element.

SUPERSCRIPT | Constant |

`public static const SUPERSCRIPT:String = "superscript"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies a super script baseline. For a text element, this value is determined by the font and the point size of the text. For a graphic element, the text engine uses the geometric bottom of the element.

USE_DOMINANT_BASELINE | Constant |

`public static const USE_DOMINANT_BASELINE:String = "useDominantBaseline"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Specifies that the alignmentBaseline should be the same as the dominantBaseline. Use this value only to set `ElementFormat.alignmentBaseline`.

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00