public class BasicRenderParameters extends Object
Modifier and Type | Field and Description |
---|---|
protected Graphics2D |
graphics |
protected Page |
page |
protected int |
pageIndex |
protected RenderControls |
renderControls |
protected Rectangle |
renderedPageBounds |
protected AffineTransform |
transform |
Constructor and Description |
---|
BasicRenderParameters(Page page,
int pageIndex,
Rectangle bounds,
Graphics2D graphics,
RenderControls renderControls)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Graphics2D |
getGraphics()
Get the Graphics2D into which the rendering is supposed to render (if it wants to).
|
Page |
getPage()
The
Page that is being rendered. |
int |
getPageIndex()
The index of the page being rendered.
|
RenderControls |
getRenderControls()
The
RenderControls used to render the page. |
Rectangle |
getRenderedPageBounds()
Return the rendered page's bounds.
|
Dimension |
getRenderSize()
The size at which the page is being rendered.
|
AffineTransform |
getTransform()
Return the transform from document to rendered space.
|
protected final Page page
protected final int pageIndex
protected final Rectangle renderedPageBounds
protected final RenderControls renderControls
protected final Graphics2D graphics
protected AffineTransform transform
public BasicRenderParameters(Page page, int pageIndex, Rectangle bounds, Graphics2D graphics, RenderControls renderControls)
page
- the page that is being renderedpageIndex
- a zero based page index of the rendered pagebounds
- the size at which the page is being rendered.graphics
- a Graphics2D object into which the rendering can be donerenderControls
- rendering controls used to render the pagepublic int getPageIndex()
public Dimension getRenderSize()
public Rectangle getRenderedPageBounds()
public RenderControls getRenderControls()
RenderControls
used to render the page.public Graphics2D getGraphics()
public AffineTransform getTransform()
renderParameters.getRenderControls()
.getBaseRenderSettings().getAffineTransform(
renderParameters.getPage().getSize()
)
However, the transform is created only once and cached.Copyright © 2024 levigo holding gmbh. All rights reserved.