Class DisplayListCollector
java.lang.Object
com.openhtmltopdf.render.displaylist.DisplayListCollector
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages) protected void
addTransformItem
(Box master, List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages) protected void
collect
(RenderingContext c, Layer layer, DisplayListContainer dlPages, Set<DisplayListCollector.CollectFlags> flags) The main method to create a list of paint instruction for each page.static Map
<TableCellBox, List<CollapsedBorderSide>> collectCollapsedTableBorders
(RenderingContext c, 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.collectInlineBlock
(RenderingContext c, BlockBox bb, EnumSet<DisplayListCollector.CollectFlags> noneOf, int shadowPageNo) private void
collectLayerBackgroundAndBorder
(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd) private void
collectLayers
(RenderingContext c, List<Layer> layers, DisplayListContainer dlPages, Set<DisplayListCollector.CollectFlags> flags) private void
collectReplacedElementLayer
(RenderingContext c, Layer layer, DisplayListContainer dlPages, int pgStart, int pgEnd) 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 Details
-
_pages
-
-
Constructor Details
-
DisplayListCollector
-
-
Method Details
-
collectLayers
private void collectLayers(RenderingContext c, List<Layer> layers, DisplayListContainer dlPages, 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, List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages) -
addTransformItem
protected void addTransformItem(Box master, List<PagedBoxCollector.PageInfo> pages, DisplayListContainer dlPages) -
collectRoot
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, 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 Map<TableCellBox,List<CollapsedBorderSide>> collectCollapsedTableBorders(RenderingContext c, List<TableCellBox> tcells) -
collectInlineBlock
public DisplayListContainer.DisplayListPageContainer collectInlineBlock(RenderingContext c, BlockBox bb, EnumSet<DisplayListCollector.CollectFlags> noneOf, int shadowPageNo) -
createBoundedBoxCollector
-
findStartPage
-
findEndPage
-