12.6.14 Rule Flow Object Class
A rule is used to specify a straight line.  Rules may be inlined or displayed.  A rule flow object class has the following characteristics:

•  orientation: is one of the symbols horizontal, vertical, escapement, or line-progression which specifies the orientation of the rule and also determines whether the rule is inlined or displayed.  This characteristic is not inherited. It has no default value and so it shall be specified.

If the orientation is horizontal or vertical, then the rule is displayed.  In this case, if the orientation of the rule is perpendicular to the placement direction, then the size of the area in the placement direction shall be 0; otherwise, the size of the area in the placement direction shall be equal to the length of the rule.

NOTE 90

The size of the area is distinct from the thickness of the rule.

If the orientation is escapement, then the rule shall be inlined. In this case, the rule shall be centered in the line-progression direction about the position point, and the escapement shall be equal to the length of the rule.  The rule may be offset in the line-progression direction using the position-point-shift: characteristic.  If the orientation is line-progression, the rule shall be inlined.  In this case, the rule shall start at the position point and extend in the line-progression direction the length of the rule.  The escapement shall be 0.

NOTE 91

Thus, a rule whose orientation is line-progression does not affect the positioning of subsequent flow objects.

•  length: is a length specifying the length of the rule.  This characteristic is not inherited.  If this characteristic is not specified, the length of the rule shall be determined by the context in which it is used.

•  color: is an object of type color that specifies the color in which the flow object's marks should be made. The initial value is the default color in the Device Gray color space.

•  layer: is an integer specifying the layer of the marks of the areas resulting from the flow object.  An area shall be imaged after any area whose layer has a lower value. The initial value is 0.

•  line-cap: is one of the symbols butt, round, or square specifying the cap style for the line. The initial value is butt.

•  line-dash: is a list of one or more lengths that specifies the dash pattern of the line.  The first length specifies the number component of the CurrentDashPattern graphics state variable in ISO/IEC 10180.  The remaining lengths specify the vector component of the CurrentDashPattern graphics state variable. The initial value is a list containing the length 0pt.

•  line-thickness: is a length that specifies the thickness of the line or lines. The initial value is 1pt.

•  line-repeat: is a strictly positive integer that specifies the number of parallel lines to be drawn.  For example, a value of 2 indicates a double line. The initial value is 1.

•  line-sep: is a length that gives the distance between the centers of parallel lines. The initial value is 1pt.

•  position-point-shift: is a length-spec specifying a shift of the position point in the line-progression direction. The initial value is 0pt. This applies only if the flow object is inlined.

NOTE 92

Shifting the position point by a positive amount in the line-progression direction has the effect of shifting the areas produced by flow object in the opposite direction to the line-progression direction.

•  inhibit-line-breaks?: is a boolean specifying whether line breaks shall be inhibited before and after each area produced by this flow object. This applies only to line breaks introduced by the formatter to make lines fit in the available space. The initial value is #f.

•  break-before-priority: is an integer that affects whether a break is allowed before this flow object.  The break priority of a potential breakpoint is the maximum of the break-after-priority of the flow object immediately preceding the potential breakpoint and the break-before-priorities of the flow object immediately following the potential breakpoint, and any characters immediately following that character for which the drop-after-line-break?: characteristic is true.  A break shall be allowed at a potential breakpoint only if the break priority is even.  This characteristic is not inherited. The default value is 0. This applies only if the flow object is inlined.

•  break-after-priority: is an integer that affects whether a break is allowed after this flow object as described in the specification of the break-before-priority: characteristic. This characteristic is not inherited. The default value is 0. This applies only if the flow object is inlined.

•  position-preference: is either #f or one of the symbols top or bottom.  This applies if the flow object is directed into a port on a column-set-sequence flow object that is flowed into both the top-float and bottom-float zones of a column-subset and indicates whether the areas from this flow object may be flowed into only one of the zones. This characteristic is not inherited. The default value is #f.

•  display-alignment: is one of the symbols start, center, end, inside, or outside specifying the alignment of the areas resulting from the flow object in the direction of the writing-mode. The initial value is start. This determines how the flow object expands its areas so their size is equal to the display size in the direction perpendicular to the area container's filling-direction.  First space is added to the area so that its size is equal to the display size less the sum of the start and end indents:

•  if the alignment is start, the space is all added at the end in the direction of the writing-mode;

•  if the alignment is end, the space is all added at the start in the direction of the writing-mode;

•  if the alignment is center, the space is added equally at the start and the end in the direction of the writing-mode;

•  if the alignment is inside, then the flow object shall have an ancestor of class page-sequence, the direction of the writing-mode shall be perpendicular to the binding-edge: of the page-sequence, and the space shall be added on the edge that is outside with respect to the spread;

•  if the alignment is outside, then the flow object shall have an ancestor of class page-sequence, the direction determined by the writing-mode shall be perpendicular to the binding-edge: of the page-sequence, and the space shall be added on the edge that is inside with respect to the spread.

Then an amount of space equal to the start-indent is added at the start in the direction of the writing-mode, and an amount of space equal to the end-indent is added at the end in the direction of the writing-mode. This applies only if the flow object is displayed.

•  start-indent: is a length-spec specifying the indent for the edge of the area at the start in the direction of the writing-mode. The initial value is 0pt. This applies only if the flow object is displayed.

•  end-indent: is a length-spec specifying the indent for the edge of the area at the end in the direction of the writing-mode. The initial value is 0pt. This applies only if the flow object is displayed.

•  writing-mode: is one of the symbols left-to-right, right-to-left, or top-to-bottom.  The direction determined by the writing-mode shall be perpendicular to the placement direction.  The initial value is left-to-right. This applies only if the flow object is displayed.

•  span: is a strictly positive integer specifying the number of columns that the areas resulting from this flow object shall span. This characteristic shall apply if the flow object is directed into a port on a column-set-sequence flow object that is flowed into the top-float, bottom-float, or body-text zone of a spannable column-subset.  The initial value is 1. This applies only if the flow object is displayed.

•  span-weak?: is a boolean specifying whether the areas resulting from this flow object span weakly rather than strongly.  See section 12.6.5.1, Column-set-model.  This characteristic applies if the flow object is directed into a port on a column-set-sequence flow object that is flowed into the top-float, bottom-float, or body-text zone of a spannable column-subset and has a span: characteristic with a value greater than 1.  The initial value is #f. This applies only if the flow object is displayed.

•  space-before: is an object of type display-space specifying space to be inserted before, in the placement direction, the areas produced by the flow object. This characteristic is not inherited. The default is for no space before to be inserted. This applies only if the flow object is displayed.

•  space-after: is an object of type display-space specifying space to be inserted after, in the placement direction, the areas produced by the flow object. This characteristic is not inherited. The default is for no space after to be inserted. This applies only if the flow object is displayed.

•  keep-with-previous?: is a boolean specifying whether the flow object shall be kept in the same area as the previous flow object. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  keep-with-next?: is a boolean specifying whether the flow object shall be kept in the same area as the next flow object.  This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  break-before: is #f or one of the symbols page, page-region, column, or column-set specifying that the flow object shall start an area of that type. This characteristic is not inherited. The default is #f. This applies only if the flow object is displayed.

•  break-after: is #f or one of the symbols page, page-region, column, or column-set specifying that the flow object shall end an area of that type. This characteristic is not inherited. The default is #f. This applies only if the flow object is displayed.

•  keep: is one of the following:

•  #t meaning that the areas produced by this flow object shall be kept together within the smallest possible area.

•  the symbol page indicating that the areas produced by the flow object shall lie within the same page; in this case, the flow object shall have an ancestor flow object of class page-sequence.

•  the symbol column-set indicating that the areas produced by the flow object shall lie within the same column set; in this case, the flow object shall have an ancestor of class column-set-sequence.

•  the symbol column indicating that the areas produced by the flow object shall lie within the same column set, and that the first column that each area spans in the column set shall be the same.

•  #f indicating that this characteristic is to be ignored.

This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  may-violate-keep-before?: is a boolean which, if true, specifies that constraints imposed by the keep: characteristics of ancestor flow objects on the relative positioning of this flow object and its previous flow object may not be respected. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.

•  may-violate-keep-after?: is a boolean which, if true, specifies that constraints imposed by keep: characteristics of ancestor flow objects on the relative positioning of this flow object and its next flow object may not be respected. This characteristic is not inherited. The default value is #f. This applies only if the flow object is displayed.