Class DisplayListCollector
- java.lang.Object
-
- com.openhtmltopdf.render.displaylist.DisplayListCollector
-
public class DisplayListCollector extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DisplayListCollector.CollectFlags
-
Constructor Summary
Constructors Constructor Description DisplayListCollector(java.util.List<PageBox> pages)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addItem(DisplayListOperation item, int pgStart, int pgEnd, DisplayListContainer dlPages)
Adds a paint operation to a selection of pages, from pgStart to pgEnd inclusive.protected void
addItem(DisplayListOperation item, java.util.List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages)
protected void
addTransformItem(Box master, java.util.List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages)
protected void
collect(RenderingContext c, Layer layer, DisplayListContainer dlPages, java.util.Set<DisplayListCollector.CollectFlags> flags)
The main method to create a list of paint instruction for each page.static java.util.Map<TableCellBox,java.util.List<CollapsedBorderSide>>
collectCollapsedTableBorders(RenderingContext c, java.util.List<TableCellBox> tcells)
private void
collectFloatAsLayer(RenderingContext c, Layer layer, BlockBox floater, DisplayListContainer.DisplayListPageContainer pageInstructions, int pageNumber, int shadowPageNumber)
This method can be reached by two code paths:collectRoot -: collect -: processPage -: collectFloatAsLayer -: processPage collectRoot -: collect -: processShadowPages -: foreach(shadowPage) -: processPage -: collectFloatAsLayer -: processPage
Therefore, it is important to be careful when expecting a base page or shadow page.DisplayListContainer.DisplayListPageContainer
collectInlineBlock(RenderingContext c, BlockBox bb, java.util.EnumSet<DisplayListCollector.CollectFlags> noneOf, int shadowPageNo)
private void
collectLayerBackgroundAndBorder(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd)
private void
collectLayers(RenderingContext c, java.util.List<Layer> layers, DisplayListContainer dlPages, java.util.Set<DisplayListCollector.CollectFlags> flags)
private void
collectReplacedElementLayer(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd)
DisplayListContainer
collectRoot(RenderingContext c, Layer rootLayer)
Use this method to collect all boxes recursively into a list of paint instructions for each page.protected PagedBoxCollector
createBoundedBoxCollector(int pgStart, int pgEnd)
protected int
findEndPage(RenderingContext c, Layer layer)
protected int
findStartPage(RenderingContext c, Layer layer)
protected void
processPage(RenderingContext c, Layer layer, PagedBoxCollector.PageResult pg, DisplayListContainer.DisplayListPageContainer dlPageList, boolean includeFloats, int pageNumber, int shadowPageNumber)
Convert a list of boxes to a list of paint instructions for a page.private void
processShadowPages(RenderingContext c, Layer layer, int pageNumber, PagedBoxCollector.PageResult pg, DisplayListContainer.DisplayListPageContainer dlPageList, boolean includeFloats)
If we have cut-off boxes we have to process them as separate pages.
-
-
-
Field Detail
-
_pages
private final java.util.List<PageBox> _pages
-
-
Constructor Detail
-
DisplayListCollector
public DisplayListCollector(java.util.List<PageBox> pages)
-
-
Method Detail
-
collectLayers
private void collectLayers(RenderingContext c, java.util.List<Layer> layers, DisplayListContainer dlPages, java.util.Set<DisplayListCollector.CollectFlags> flags)
-
addItem
protected void addItem(DisplayListOperation item, int pgStart, int pgEnd, DisplayListContainer dlPages)
Adds a paint operation to a selection of pages, from pgStart to pgEnd inclusive.
-
addItem
protected void addItem(DisplayListOperation item, java.util.List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages)
-
addTransformItem
protected void addTransformItem(Box master, java.util.List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages)
-
collectRoot
public DisplayListContainer collectRoot(RenderingContext c, Layer rootLayer)
Use this method to collect all boxes recursively into a list of paint instructions for each page.
-
collect
protected void collect(RenderingContext c, Layer layer, DisplayListContainer dlPages, java.util.Set<DisplayListCollector.CollectFlags> flags)
The main method to create a list of paint instruction for each page.
-
processPage
protected void processPage(RenderingContext c, Layer layer, PagedBoxCollector.PageResult pg, DisplayListContainer.DisplayListPageContainer dlPageList, boolean includeFloats, int pageNumber, int shadowPageNumber)
Convert a list of boxes to a list of paint instructions for a page.
-
processShadowPages
private void processShadowPages(RenderingContext c, Layer layer, int pageNumber, PagedBoxCollector.PageResult pg, DisplayListContainer.DisplayListPageContainer dlPageList, boolean includeFloats)
If we have cut-off boxes we have to process them as separate pages.
-
collectFloatAsLayer
private void collectFloatAsLayer(RenderingContext c, Layer layer, BlockBox floater, DisplayListContainer.DisplayListPageContainer pageInstructions, int pageNumber, int shadowPageNumber)
This method can be reached by two code paths:collectRoot -: collect -: processPage -: collectFloatAsLayer -: processPage collectRoot -: collect -: processShadowPages -: foreach(shadowPage) -: processPage -: collectFloatAsLayer -: processPage
Therefore, it is important to be careful when expecting a base page or shadow page.
-
collectLayerBackgroundAndBorder
private void collectLayerBackgroundAndBorder(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd)
-
collectReplacedElementLayer
private void collectReplacedElementLayer(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd)
-
collectCollapsedTableBorders
public static java.util.Map<TableCellBox,java.util.List<CollapsedBorderSide>> collectCollapsedTableBorders(RenderingContext c, java.util.List<TableCellBox> tcells)
-
collectInlineBlock
public DisplayListContainer.DisplayListPageContainer collectInlineBlock(RenderingContext c, BlockBox bb, java.util.EnumSet<DisplayListCollector.CollectFlags> noneOf, int shadowPageNo)
-
createBoundedBoxCollector
protected PagedBoxCollector createBoundedBoxCollector(int pgStart, int pgEnd)
-
findStartPage
protected int findStartPage(RenderingContext c, Layer layer)
-
findEndPage
protected int findEndPage(RenderingContext c, Layer layer)
-
-