Class BlockViewport

All Implemented Interfaces:
Serializable, Cloneable, Viewport

public class BlockViewport extends Block implements Viewport
A BlockViewport. This is used for block level Viewport/reference pairs. The block-container creates this area.
See Also:
  • Constructor Details

    • BlockViewport

      public BlockViewport()
      Create a new block viewport area.
    • BlockViewport

      public BlockViewport(boolean allowBPDUpdate)
      Create a new block viewport area.
      Parameters:
      allowBPDUpdate - true allows the BPD to be updated when children are added
  • Method Details

    • setCTM

      public void setCTM(CTM ctm)
      Set the transform of this viewport. If the viewport is rotated or has an absolute positioning this transform will do the work.
      Parameters:
      ctm - the transformation
    • getCTM

      public CTM getCTM()
      Get the transform of this block viewport.
      Returns:
      the transformation of this viewport or null if normally stacked without rotation
    • setClip

      public void setClip(boolean cl)
      Set the clipping for this viewport.
      Parameters:
      cl - the clipping for the viewport
    • hasClip

      public boolean hasClip()
      Returns true if this area will clip overflowing content.
      Specified by:
      hasClip in interface Viewport
      Returns:
      true if the overflow trait has the value "hidden", "scroll" or "error-if-overflow"
    • getClipRectangle

      public Rectangle getClipRectangle()
      Returns the clipping rectangle of this viewport area.
      Specified by:
      getClipRectangle in interface Viewport
      Returns:
      the clipping rectangle expressed in the viewport's coordinate system, or null if clipping is disabled
    • getEffectiveIPD

      public int getEffectiveIPD()
      Overrides:
      getEffectiveIPD in class Block