Date: 2005-02-15T07:27:48
   Wiki: XML Graphics - FOP Wiki
   Page: CollapsingBorderModel

   Thoughts for painting/clipping the border lines.

Change Log:

@@ -5,25 +5,36 @@
 Painting the borders for the separate border model is relatively simple. For 
the collapsing border model this can become complicated. The following is an 
attempt to analyze how the borders should be painted in this model. The 
sequence of images should also help identify what information besides the 
traits defined in the XSL-FO spec are necessary to properly paint the 
individual borders.
- 1. A part of a table (grid lines)
+'''1. A part of a table (grid lines)'''
- 2. Resolution of the individual borders according to the rules in the FO spec
+'''2. Resolution of the individual borders according to the rules in the FO 
- 3. Inner and outer join points (where the individual borders meet)
+'''3. 33. Inner and outer join points (where the individual borders meet)'''
- 4. Resulting borders
+Each join point together with the intersecting points of the basic table grid 
lines (see 1) for form the edges of a polygon which is used to clip the border 
line. In PDF the border line can simply be painted as a line. This line is 
clipped by a polygon with 6 points (4 join points plus 2 grid line intersection 
+'''TODO''' Find out what strategy to use for painting the border.
+ * Strategy 1: Each cell paints its own 4 partial (half) border lines (each 
clipped at the grid lines) in which case it only needs to know it own 4 join 
points and can use a trapezoid (polygon with 4 points) for clipping. This is 
relatively simple to implement but it might result in the borders not looking 
good because the same border line is painted twice with 2 clipping polygons 
complementing each other.
+ * Strategy 2: Cells are assigned a specific subset of border lines to paint. 
Example: All cells of the first row paint "before" borders, all cells of the 
first column paint paint the "start" borders, all cells paint "end" and "after" 
borders. Problem with this approach is the additional info necessary to create 
the right clip polygon and handling empty cells.
+'''4. Resulting borders'''
- 5. Final result
+'''5. Final result'''
+'''TODO''' Think about spanned cells.
 === Reference ===

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to