Class ObjectFitApplyingResult

java.lang.Object
com.itextpdf.layout.renderer.objectfit.ObjectFitApplyingResult

public class ObjectFitApplyingResult extends Object
The class represents results of calculating of rendered image size after applying of the ObjectFit property.
  • Constructor Details

    • ObjectFitApplyingResult

      public ObjectFitApplyingResult()
      Creates a new instance of the class with default values.
    • ObjectFitApplyingResult

      public ObjectFitApplyingResult (double renderedImageWidth, double renderedImageHeight, boolean imageCuttingRequired)
      Creates a new instance of the class.
      Parameters:
      renderedImageWidth - is a width of the image to render
      renderedImageHeight - is a height of the image to render
      imageCuttingRequired - is a flag showing if rendered image should be clipped as its size is greater than size of the image container
  • Method Details

    • getRenderedImageWidth

      public double getRenderedImageWidth()
      Getter for width of rendered image.
      Returns:
      width of rendered image
    • setRenderedImageWidth

      public void setRenderedImageWidth (double renderedImageWidth)
      Setter for width of rendered image.
      Parameters:
      renderedImageWidth - is a new width of rendered image
    • getRenderedImageHeight

      public double getRenderedImageHeight()
      Getter for height of rendered image.
      Returns:
      height of rendered image
    • setRenderedImageHeight

      public void setRenderedImageHeight (double renderedImageHeight)
      Setter for height of rendered image.
      Parameters:
      renderedImageHeight - is a new height of rendered image
    • isImageCuttingRequired

      public boolean isImageCuttingRequired()
      Getter for a boolean value showing if at least one dimension of rendered image is greater than expected image size. If true then image will be shown partially
      Returns:
      true if the image need to be cutting during rendering and false otherwise
    • setImageCuttingRequired

      public void setImageCuttingRequired (boolean imageCuttingRequired)
      Setter for a boolean value showing if at least one dimension of rendered image is greater than expected image size. If true then image will be shown partially
      Parameters:
      imageCuttingRequired - is a new value of the cutting-required flag