Class BasicRenderParameters
java.lang.Object
com.levigo.jadice.web.client.tool.BasicRenderParameters
- Direct Known Subclasses:
RenderParameters
A base class used to provide several parameters for rendering purposes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics
protected final Page
protected final int
protected final RenderControls
protected final Rectangle
-
Constructor Summary
ConstructorsConstructorDescriptionBasicRenderParameters
(Page page, int pageIndex, Rectangle bounds, com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics, RenderControls renderControls) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.canvas.dom.client.Context2d
Gets the Context2d of the HTML5-Canvas element to render things.com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics
Get the Graphics2D into which the rendering is supposed to render (if it wants to).getPage()
ThePage
that is being rendered.int
The index of the page being rendered.TheRenderControls
used to render the page.Return the rendered page's bounds without the page offset.The size at which the page is being rendered.
-
Field Details
-
page
-
pageIndex
protected final int pageIndex -
renderedPageBounds
-
renderControls
-
graphics
protected final com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics
-
-
Constructor Details
-
Method Details
-
getPage
ThePage
that is being rendered.- Returns:
- the page
-
getPageIndex
public int getPageIndex()The index of the page being rendered.- Returns:
- the pageIndex
-
getRenderSize
The size at which the page is being rendered.- Returns:
- the renderSize
-
getRenderedPageBounds
Return the rendered page's bounds without the page offset. Please note that the accompanying graphics context is already translated to the bounds' origin. To get the bounds of the page with its offset callAbstractPageView.getLaidOutPageBounds(Page)
for the page.If it is the current pageAbstractPageView.getCurrentLaidOutPageBounds()
can also be called.- Returns:
- the bounds
-
getRenderControls
TheRenderControls
used to render the page.- Returns:
- the RenderControls
-
getGraphics
public com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics getGraphics()Get the Graphics2D into which the rendering is supposed to render (if it wants to). The graphics context will be transformed, so that its origin rests at the upper-left corner of the page.- Returns:
- the graphics
-
getContext2D
public com.google.gwt.canvas.dom.client.Context2d getContext2D()Gets the Context2d of the HTML5-Canvas element to render things.- Returns:
- the context2d Object
-