Class BasicRenderParameters

Direct Known Subclasses:

public class BasicRenderParameters extends Object
A base class used to provide several parameters for rendering purposes.
  • Field Details

    • page

      protected final Page page
    • pageIndex

      protected final int pageIndex
    • renderedPageBounds

      protected final Rectangle renderedPageBounds
    • renderControls

      protected final RenderControls renderControls
    • graphics

      protected final graphics
  • Constructor Details

    • BasicRenderParameters

      public BasicRenderParameters(Page page, int pageIndex, Rectangle bounds, graphics, RenderControls renderControls)
      page - the page that is being rendered
      pageIndex - a zero based page index of the rendered page
      bounds - the size of the page which is being rendered.
      graphics - a Graphics2D object into which the rendering can be done
      renderControls - rendering controls used to render the page
  • Method Details

    • getPage

      public Page getPage()
      The Page that is being rendered.
      the page
    • getPageIndex

      public int getPageIndex()
      The index of the page being rendered.
      the pageIndex
    • getRenderSize

      public Dimension getRenderSize()
      The size at which the page is being rendered.
      the renderSize
    • getRenderedPageBounds

      public Rectangle 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 call AbstractPageView.getLaidOutPageBounds(Page) for the page.If it is the current page AbstractPageView.getCurrentLaidOutPageBounds() can also be called.
      the bounds
    • getRenderControls

      public RenderControls getRenderControls()
      The RenderControls used to render the page.
      the RenderControls
    • getGraphics

      public 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.
      the graphics
    • getContext2D

      public getContext2D()
      Gets the Context2d of the HTML5-Canvas element to render things.
      the context2d Object