FOM Reference > Formatting > Datatypes > fTextRule interface
  
fTextRule interface
Objects of this class represent rules that can be used to decorate various kinds of objects. fTextRules are not represented by permanent data stored within the document but are inherently temporary structures that are created, modified and destroyed during formatting.
RuleMode enumeration
These constants define the mode to use when determining the effective layer for drawing the rule..
The RuleMode enumeration has the following constants of type int.
MODE_AFTERTEXT = 0
The rule should be drawn after the text.
MODE_BEFORETEXT = 1
The rule should be drawn before the text.
RuleDrawMode enumeration
These constants define the draw mode to use when determining the boundaries affecting the rule.
The RuleDrawMode enumeration has the following constants of type int.
DRAW_ATEND = 0
The rule should be drawn using the leading/text height values present at the end of the rule.
DRAW_MAXEXTENT = 1
The rule should be drawn using the maximum extent of the characters on the line.
DRAW_LEADING = 2
The rule should be drawn using the initial leading value for the entire line.
DRAW_ONCHANGE_LEADING = 3
The rule should be drawn between each change to the leading, using the leading value present before it is changed.
DRAW_TEXTHEIGHT = 4
The rule should be drawn using the initial text hieght value for the entire line.
DRAW_ONCHANGE_TEXTHEIGHT = 5
The rule should be drawn between each change to the text height, using the height value present before it is changed.
color attribute
This specifies the colour to use when drawing the rule.
color
Access
read-write
Returns
fColor
depth attribute
This only effects the fStyle.backgroundRule.
This determines the additional depth added to the bottom of an fStyle.backgroundRule when it is drawn.
Relative values are based on the calculated thickness of the background based on the drawMode.
depth
Access
read-write
Returns
fLength
drawMode attribute
Determines the extent of the boundary in which to draw the rule. See fTextRule.RuleDrawMode.
The value used here will effect the height value used by the fTextRule.offset and fTextRule.thickness.
drawMode
Access
read-write
Returns
int
endPattern attribute
This is the pattern to use at the end of each rule segment (caused by line breaks, etc.)
This has no effect upon the fStyle.backgroundRule.
endPattern
Access
read-write
Returns
fRuleLinePattern
height attribute
This only effects the fStyle.backgroundRule.
This determines the additional height added to the top of an fStyle.backgroundRule when it is drawn.
Relative values are based on the calculated thickness of the background based on the drawMode.
height
Access
read-write
Returns
fLength
ignoreDirection attribute
Determines if the rule should be drawn at changes in text direction.
If false (the default), the rule will be drawn for each fragment of text in the appropriate direction.
If true the rule will ignore direction changes, and draw between the start and end points.
ignoreDirection
Access
read-write
Returns
boolean
lineBackground attribute
This specifies the colour to use behind the rule when drawing a non solid line.
This has no effect upon the fStyle.backgroundRule.
lineBackground
Access
read-write
Returns
fColor
lineStyle attribute
This determines the style of the line to drawn.
This has no effect upon the fStyle.backgroundRule.
lineStyle
Access
read-write
Returns
fRuleLine
mode attribute
Determines when the rule should be drawn. See fTextRule.RuleMode
mode
Access
read-write
Returns
int
offset attribute
This is the offset at which line rules will be drawn from the baseline. Negative values are above the baseline.
This has no effect upon the fStyle.backgroundRule.
offset
Access
read-write
Returns
fLength
repeatPattern attribute
Determines if the start and end patterns shoulld be repeated on each fragment of the line.
If true (the default), the start and end patterns are drawn on each fragment of the line.
If false the start and end patterns are only drawn at the true start and end of the line.
This has no effect upon the fStyle.backgroundRule.
repeatPattern
Access
read-write
Returns
boolean
show attribute
Determines if the rule should be visible or hidden. If true the rule will be drawn.
show
Access
read-write
Returns
boolean
startPattern attribute
This is the pattern to use at the start of each rule segment (caused by line breaks, etc.)
This has no effect upon the fStyle.backgroundRule.
startPattern
Access
read-write
Returns
fRuleLinePattern
thickness attribute
This determines the thickness of the rule that is drawn.
This has no effect upon the fStyle.backgroundRule.
thickness
Access
read-write
Returns
fLength
wordsOnly attribute
Determines if the rule should be drawn over words only or over words and spaces.
This has no effect upon the fStyle.backgroundRule.
wordsOnly
Access
read-write
Returns
boolean
fTextRule method
Creates a new, empty fTextRule instance.
fTextRule
Parameters
None
Returns
fTextRule. A new object of class fTextRule.
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fTextRule. The object corresponding to the serialized representation.
writeReplace method
Create a serializable representation of this object.
writeReplace
Parameters
None
Returns
Object. A serializable representation of this object.