Package com.openhtmltopdf.layout
Class BoxCollector
- java.lang.Object
-
- com.openhtmltopdf.layout.BoxCollector
-
public class BoxCollector extends java.lang.Object
A class to collect boxes which intersect a given clip region. If available, aggregate bounds information will be used. Block and inline content are added to separate lists as they are painted in separate render phases. This class flattens the nested structure of boxes in a depth first fashion. Range lists are created foroverflow:hidden
boxes to specify the first block where a clip comes into affect and the end block where the clip is undone. For example, if a hidden box is first in a layer and contains 10 child boxes the range list will contain an entry for 0, 11, specifying the start and end of the clip.
-
-
Constructor Summary
Constructors Constructor Description BoxCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collect(CssContext c, java.awt.Shape clip, Layer layer, Box container, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
void
collect(CssContext c, java.awt.Shape clip, Layer layer, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
private void
collectInlineLayer(CssContext c, java.awt.Shape clip, Layer layer, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
private boolean
intersectsAggregateBounds(java.awt.Shape clip, Box box)
boolean
intersectsAny(CssContext c, java.awt.Shape clip, Box master)
private boolean
intersectsAny(CssContext c, java.awt.Shape clip, Box master, Box container)
private void
saveRangeData(CssContext c, Box container, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists, boolean isBlock, int blockStart, int inlineStart, int blockRangeStart, int inlineRangeStart)
-
-
-
Method Detail
-
collect
public void collect(CssContext c, java.awt.Shape clip, Layer layer, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
-
intersectsAny
public boolean intersectsAny(CssContext c, java.awt.Shape clip, Box master)
-
collectInlineLayer
private void collectInlineLayer(CssContext c, java.awt.Shape clip, Layer layer, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
-
intersectsAggregateBounds
private boolean intersectsAggregateBounds(java.awt.Shape clip, Box box)
-
collect
public void collect(CssContext c, java.awt.Shape clip, Layer layer, Box container, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists)
-
saveRangeData
private void saveRangeData(CssContext c, Box container, java.util.List<Box> blockContent, java.util.List<Box> inlineContent, BoxRangeLists rangeLists, boolean isBlock, int blockStart, int inlineStart, int blockRangeStart, int inlineRangeStart)
-
intersectsAny
private boolean intersectsAny(CssContext c, java.awt.Shape clip, Box master, Box container)
-
-