Class BlockViewport

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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:
    Serialized Form
    • Field Detail

      • clip

        private boolean clip
      • viewportCTM

        private CTM viewportCTM
    • Constructor Detail

      • 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 Detail

      • 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 java.awt.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