Packageflash.text.engine
Classpublic final class TextBaseline
InheritanceTextBaseline Inheritance Object

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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 property of the TextBlock class. Consider this situation:

Text baseline alignment

The line consists of four TextElement objects, containing 'a', 'b', 'cccccccc', and 'X' respectively. The element containing 'X' determines the line baselines 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.baselineZero


Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined by
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Public Constants
 ConstantDefined 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
  USE_DOMINANT_BASELINE : String = "useDominantBaseline"
[static] Specifies that the alignmentBaseline is the same as the dominantBaseline.
TextBaseline
Constant detail
ASCENTconstant
public static const ASCENT:String = "ascent"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Specifies an ascent baseline. For a text element, the font and point size of the text determine this value. For a graphic element, the text engine uses the geometric top of the element.

See also

DESCENTconstant 
public static const DESCENT:String = "descent"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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

See also

IDEOGRAPHIC_BOTTOMconstant 
public static const IDEOGRAPHIC_BOTTOM:String = "ideographicBottom"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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

See also

IDEOGRAPHIC_CENTERconstant 
public static const IDEOGRAPHIC_CENTER:String = "ideographicCenter"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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

See also

IDEOGRAPHIC_TOPconstant 
public static const IDEOGRAPHIC_TOP:String = "ideographicTop"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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

See also

ROMANconstant 
public static const ROMAN:String = "roman"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

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

See also

USE_DOMINANT_BASELINEconstant 
public static const USE_DOMINANT_BASELINE:String = "useDominantBaseline"

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Specifies that the alignmentBaseline is the same as the dominantBaseline. Use this value only to set ElementFormat.alignmentBaseline.

See also