org.apache.fop.area.inline

## Class InlineViewport

- java.lang.Object
- - org.apache.fop.area.AreaTreeObject
  - - org.apache.fop.area.Area
    - - org.apache.fop.area.inline.InlineArea
      - - org.apache.fop.area.inline.InlineViewport

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Viewport

      public class InlineViewport
      extends InlineArea
      implements Viewport

  Inline viewport area. This is an inline-level viewport area for inline container, external graphic and instream foreign object. This viewport holds the area and positions it.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.fop.area.inline.InlineArea

      `InlineArea.InlineAdjustingInfo`

  - ### Field Summary

    - ### Fields inherited from class org.apache.fop.area.inline.InlineArea

      `adjustingInfo, blockProgressionOffset`

    - ### Fields inherited from class org.apache.fop.area.Area

      `bidiLevel, bpd, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, effectiveIPD, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traits`

    - ### Fields inherited from class org.apache.fop.area.AreaTreeObject

      `extensionAttachments, foreignAttributes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InlineViewport(Area child)` Create a new viewport area with the content area.
    `InlineViewport(Area child, int bidiLevel)` Create a new viewport area with the content area.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.Rectangle` | `getClipRectangle()` Returns the clipping rectangle of this viewport area.
    `Area` | `getContent()` Get the content area for this viewport.
    `java.awt.geom.Rectangle2D` | `getContentPosition()` Get the position and size of the content of this viewport.
    `int` | `getEffectiveIPD()`
    `boolean` | `hasClip()` Returns true if this area will clip overflowing content.
    `void` | `setClip(boolean c)` Set the clip of this viewport.
    `void` | `setContent(Area content)` Sets the content area.
    `void` | `setContentPosition(java.awt.geom.Rectangle2D cp)` Set the position and size of the content of this viewport.

    - ### Methods inherited from class org.apache.fop.area.inline.InlineArea

      `addChildArea, applyVariationFactor, collectInlineRuns, getAdjustingInfo, getBlockProgressionOffset, getParentArea, handleIPDVariation, hasLineThrough, hasOverline, hasUnderline, increaseIPD, isAncestor, isAncestorOrSelf, isBlinking, notifyIPDVariation, setAdjustingInfo, setAdjustingInfo, setAdjustment, setBlockProgressionOffset, setParentArea`

    - ### Methods inherited from class org.apache.fop.area.Area

      `activateEffectiveIPD, addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getChangeBarList, getEffectiveAllocIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setIPD, setTraits, setWritingModeTraits, toString`

    - ### Methods inherited from class org.apache.fop.area.AreaTreeObject

      `addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### InlineViewport

          public InlineViewport(Area child)

      Create a new viewport area with the content area.
      Parameters:
        `child` - the child content area of this viewport

    - #### InlineViewport

          public InlineViewport(Area child,
                        int bidiLevel)

      Create a new viewport area with the content area.
      Parameters:
        `child` - the child content area of this viewport
        `bidiLevel` - the bidirectional embedding level (or -1 if not defined)

  - ### Method Detail

    - #### setClip

          public void setClip(boolean c)

      Set the clip of this viewport.
      Parameters:
        `c` - true if this viewport should clip

    - #### 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

    - #### setContentPosition

          public void setContentPosition(java.awt.geom.Rectangle2D cp)

      Set the position and size of the content of this viewport.
      Parameters:
        `cp` - the position and size to place the content

    - #### getContentPosition

          public java.awt.geom.Rectangle2D getContentPosition()

      Get the position and size of the content of this viewport.
      Returns:
        the position and size to place the content

    - #### setContent

          public void setContent(Area content)

      Sets the content area.
      Parameters:
        `content` - the content area

    - #### getContent

          public Area getContent()

      Get the content area for this viewport.
      Returns:
        the content area

    - #### getEffectiveIPD

          public int getEffectiveIPD()

      Overrides:
        `getEffectiveIPD` in class `Area`

Copyright 1999-2019 The Apache Software Foundation. All Rights Reserved.