Packagecom.adobe.mediacore
Classpublic final class TextFormat
InheritanceTextFormat Inheritance Object

The TextFormat class is used to encapsulate different attributes describing a text style (for example the closed captions style).



Public Properties
 PropertyDefined By
  backgroundColor : String
[read-only] The color behind the text.
TextFormat
  backgroundOpacity : int
[read-only] The background opacity.
TextFormat
  edgeColor : String
[read-only] The color used to draw the text edges.
TextFormat
  fillColor : String
[read-only] The fill color.
TextFormat
  fillOpacity : int
[read-only] The fill opacity.
TextFormat
  font : String
[read-only] The text font.
TextFormat
  fontColor : String
[read-only] The font color.
TextFormat
  fontEdge : String
[read-only] The font edge.
TextFormat
  fontOpacity : int
[read-only] The text opacity.
TextFormat
  size : String
[read-only] The text size.
TextFormat
Public Methods
 MethodDefined By
  
TextFormat(font:String = default, size:String = default, fontEdge:String = default, fontColor:String = default, backgroundColor:String = default, fillColor:String = default, edgeColor:String = default, fontOpacity:int, backgroundOpacity:int, fillOpacity:int)
Constructor.
TextFormat
  
isEqual(other:TextFormat):Boolean
Checks if the text format parameters are equal with the specified ones.
TextFormat
  
toString():String
Returns a String representation of the current closed captions style parameters.
TextFormat
Public Constants
 ConstantDefined By
  DEFAULT_OPACITY : int = -1
[static] The default opacity
TextFormat
Property Detail
backgroundColorproperty
backgroundColor:String  [read-only]

The color behind the text.


Implementation
    public function get backgroundColor():String
backgroundOpacityproperty 
backgroundOpacity:int  [read-only]

The background opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.


Implementation
    public function get backgroundOpacity():int
edgeColorproperty 
edgeColor:String  [read-only]

The color used to draw the text edges.


Implementation
    public function get edgeColor():String
fillColorproperty 
fillColor:String  [read-only]

The fill color.


Implementation
    public function get fillColor():String
fillOpacityproperty 
fillOpacity:int  [read-only]

The fill opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.


Implementation
    public function get fillOpacity():int
fontproperty 
font:String  [read-only]

The text font.


Implementation
    public function get font():String
fontColorproperty 
fontColor:String  [read-only]

The font color.


Implementation
    public function get fontColor():String
fontEdgeproperty 
fontEdge:String  [read-only]

The font edge.


Implementation
    public function get fontEdge():String
fontOpacityproperty 
fontOpacity:int  [read-only]

The text opacity. This value can be from 0 to 100 or DEFAULT_OPACITY. Expressed as a percentage, with 100 being fully opaque and 0 being fully transparent.


Implementation
    public function get fontOpacity():int
sizeproperty 
size:String  [read-only]

The text size.


Implementation
    public function get size():String
Constructor Detail
TextFormat()Constructor
public function TextFormat(font:String = default, size:String = default, fontEdge:String = default, fontColor:String = default, backgroundColor:String = default, fillColor:String = default, edgeColor:String = default, fontOpacity:int, backgroundOpacity:int, fillOpacity:int)

Constructor.

Parameters
font:String (default = default) — The desired font (must be a value enumerated in com.adobe.mediacore.textformat.Font)
 
size:String (default = default) — The desired text size (must be a value enumerated in com.adobe.mediacore.textformat.Size)
 
fontEdge:String (default = default) — The desired font edge (must be a value enumerated in com.adobe.mediacore.textformat.FontEdge)
 
fontColor:String (default = default) — The desired font color (must be a value enumerated in com.adobe.mediacore.textformat.Color)
 
backgroundColor:String (default = default) — The desired background color (must be a value enumerated in com.adobe.mediacore.textformat.Color)
 
fillColor:String (default = default) — The desired fill color (must be a value enumerated in com.adobe.mediacore.textformat.Color)
 
edgeColor:String (default = default) — The desired color to draw the text edges (must be a value enumerated in com.adobe.mediacore.textformat.Color)
 
fontOpacity:int (default = NaN) — The desired font opacity (must have a value from 0 to 100 or DEFAULT_OPACITY)
 
backgroundOpacity:int (default = NaN) — The desired background opacity (must have a value from 0 to 100 or DEFAULT_OPACITY)
 
fillOpacity:int (default = NaN) — The desired fill opacity (must have a value from 0 to 100 or DEFAULT_OPACITY)

See also

Method Detail
isEqual()method
public function isEqual(other:TextFormat):Boolean

Checks if the text format parameters are equal with the specified ones.

Parameters

other:TextFormat — the other text parameters to compare to.

Returns
Boolean — true if they are equal, false otherwise.
toString()method 
public function toString():String

Returns a String representation of the current closed captions style parameters.

Returns
String
Constant Detail
DEFAULT_OPACITYConstant
public static const DEFAULT_OPACITY:int = -1

The default opacity