Class Image

java.lang.Object
be.quodlibet.boxable.image.Image

public class Image extends Object
  • Constructor Details

  • Method Details

    • draw

      public void draw(org.apache.pdfbox.pdmodel.PDDocument doc, PageContentStreamOptimized stream, float x, float y) throws IOException

      Drawing simple Image in PDPageContentStream.

      Parameters:
      doc - PDDocument where drawing will be applied
      stream - PDPageContentStream where drawing will be applied
      x - X coordinate for image drawing
      y - Y coordinate for image drawing
      Throws:
      IOException - if loading image fails
    • scale

      public Image scale(float width)
      Deprecated.

      Method which scale Image with designated width

      Parameters:
      width - Maximal height where Image needs to be scaled
      Returns:
      Scaled Image
    • scaleByWidth

      public Image scaleByWidth(float width)

      Method which scale Image with designated width

      Parameters:
      width - Maximal width where Image needs to be scaled
      Returns:
      Scaled Image
    • scaleByHeight

      public Image scaleByHeight(float height)

      Method which scale Image with designated height

      Parameters:
      height - Maximal height where Image needs to be scaled
      Returns:
      Scaled Image
    • getImageWidthInPoints

      public float getImageWidthInPoints(float dpiX)
    • getImageHeightInPoints

      public float getImageHeightInPoints(float dpiY)
    • scale

      public Image scale(float boundWidth, float boundHeight)

      Method which scale Image with designated width und height

      Parameters:
      boundWidth - Maximal width where Image needs to be scaled
      boundHeight - Maximal height where Image needs to be scaled
      Returns:
      scaled Image
    • getHeight

      public float getHeight()
    • getWidth

      public float getWidth()
    • setQuality

      public void setQuality(float quality) throws IllegalArgumentException
      Throws:
      IllegalArgumentException