FOM Reference > Formatting > Datatypes > fRule interface
  
fRule interface
Objects of this class contain all settings that define how rules are drawn.
RuleSides enumeration
Constants to specify the sides a rule needs to be drawn. The values of these constants should be added to combine their effect.
The RuleSides enumeration has the following constants of type DOMString.
SIDE_TOP = "t"
Draw a rule along the top of the contents.
SIDE_EXTREME_TOP = "[t]"
Draw a rule along the very top of the contents.
SIDE_LEFT = "l"
Draw a rule along the left of the contents.
SIDE_EXTREME_LEFT = "[l]"
Draw a rule along the leftmost edge of the contents.
SIDE_BOTTOM = "b"
Draw a rule along the bottom of the contents.
SIDE_EXTREME_BOTTOM = "[b]"
Draw a rule along the very bottom of the contents.
SIDE_RIGHT = "r"
Draw a rule along the right of the contents.
SIDE_EXTREME_RIGHT = "[r]"
Draw a rule along the rightmost edge of the contents.
SIDE_BOX = "tlrb"
Draw rules around the contents.
SIDE_CELL = "tl[rb]"
Draw rules around the contents of each cell.
SIDE_NE = "2"
Draw rules around the contents.
SIDE_NW = "1"
Draw rules around the contents.
SIDE_SE = "4"
Draw rules around the contents.
SIDE_SW = "3"
Draw rules around the contents.
SIDE_NEO = "6"
Draw rules around the contents.
SIDE_NWO = "5"
Draw rules around the contents.
SIDE_SEO = "8"
Draw rules around the contents.
SIDE_SWO = "7"
Draw rules around the contents.
SIDE_PLUS = "/"
Draw rules around the contents.
SIDE_HASH = "#"
Draw rules around the contents.
SIDE_BEVELLED = "V"
Draw rules around the contents.
SIDE_UP = "u"
Draw rules around the contents.
SIDE_DOWN = "d"
Draw rules around the contents.
SIDE_POINTED = "p"
Draw rules around the contents.
SIDE_CAPPED = "c"
Draw rules around the contents.
SIDE_EXACT = "e"
Draw rules around the contents.
SIDE_DIAGONAL = "i"
Draw intelligent diagonal rules.
CornerStyles enumeration
Constants to specify how rules are joined at the corners.
The CornerStyles enumeration has the following constants of type int.
CORNER_ROUND = 0
XXX
CORNER_MITRE = 1
XXX
CORNER_BEVEL = 2
XXX
cornerStyle attribute
A CornerStyle constant defining how corners in the line are drawn.
cornerStyle
Access
read-write
Returns
int
endPattern attribute
The pattern drawn at the end of the line.
endPattern
Access
read-write
Returns
fRuleLinePattern
fillColor attribute
The color used for filling in the rule.
fillColor
Access
read-write
Returns
fColor
lineBackground attribute
Background color used for the line.
lineBackground
Access
read-write
Returns
fColor
lineColor attribute
Colour of this rule, can be any colour name valid in 3B2.
lineColor
Access
read-write
Returns
fColor
lineStyle attribute
The style in which the line is drawn.
lineStyle
Access
read-write
Returns
fRuleLine
opacity attribute
Specifies the percentage opacity to draw this rule with on supported output drivers.
opacity
Access
read-write
Returns
float
radius attribute
This property will specify the size of the corner rules for the cell depending on the flags used. Negative values will produce a convex rule effect, e.g. '-4pt' would result in (conv round) or (conc round), and positive values will produce a concave effect on the corners of your table.
radius
Access
read-write
Returns
fLength
sides attribute
This specifies the placement conditions for this rule, it includes the same options to that you will find in frames rules. Radius rules options can also be included in this parameter if required.
t
Top.
b
Bottom.
l
Left.
r
Right.
1
Top left corner.
2
Top right corner.
3
Bottom left corner.
4
Bottom right corner.
5
Top left corner.
6
Top right corner.
7
Bottom left corner.
8
Bottom right corner.
The flags parameter also includes any conditional testing you wish to apply to cell rules. The syntax for conditional location testing is detailed below:
/
This flag gives you the ability to merge rules together and create a 3D effect.
#
Instead of using the whole width of the cell for this particular rule, it will use the hash rule width. This allows you to specify rules that do not span into gutters using either the width of the longest item in the cell, the width of the last line in the cell or width of the rules from the previous row. See <?tbcrhash> for more details.
u
Diagonal rule from bottom left to top right.
d
Diagonal rule from top left to bottom right.
p
Point the ends of the diagonal rule so they fit neatly into the corners of any outer rules.
c
Rounded cap on the ends of the diagonal rules.
e
Instead of fitting the diagonal rule inside the bounding box, let them overlap so the middle of the rule ends will be exactly over the corners of the bounding box.
sides
Access
read-write
Returns
String
startPattern attribute
The pattern drawn at the start of the line.
startPattern
Access
read-write
Returns
fRuleLinePattern
thickness attribute
The width of the rule and valid measurement unit, e.g. '5pt' or '5mm'.
thickness
Access
read-write
Returns
fLength
fRule method
Create a new empty fRule object.
fRule
Parameters
None
Returns
fRule. A new object of class fRule.
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fRule. The object corresponding to the serialized representation.