Package be.quodlibet.boxable.image
Class Image
java.lang.Object
be.quodlibet.boxable.image.Image
-
Constructor Summary
ConstructorsConstructorDescriptionImage(BufferedImage image) Constructor for default imagesImage(BufferedImage image, float dpi) Image(BufferedImage image, float dpiX, float dpiY) -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(org.apache.pdfbox.pdmodel.PDDocument doc, PageContentStreamOptimized stream, float x, float y) Drawing simpleImageinPDPageContentStream.floatfloatgetImageHeightInPoints(float dpiY) floatgetImageWidthInPoints(float dpiX) floatgetWidth()scale(float width) Deprecated.scale(float boundWidth, float boundHeight) Method which scaleImagewith designated width und heightscaleByHeight(float height) Method which scaleImagewith designated heightscaleByWidth(float width) Method which scaleImagewith designated widthvoidsetQuality(float quality)
-
Constructor Details
-
Image
Constructor for default images
- Parameters:
image-BufferedImage
-
Image
-
Image
-
-
Method Details
-
draw
public void draw(org.apache.pdfbox.pdmodel.PDDocument doc, PageContentStreamOptimized stream, float x, float y) throws IOException Drawing simple
ImageinPDPageContentStream.- Parameters:
doc-PDDocumentwhere drawing will be appliedstream-PDPageContentStreamwhere drawing will be appliedx- X coordinate for image drawingy- Y coordinate for image drawing- Throws:
IOException- if loading image fails
-
scale
Deprecated.Method which scale
Imagewith designated width -
scaleByWidth
Method which scale
Imagewith designated width -
scaleByHeight
Method which scale
Imagewith designated height -
getImageWidthInPoints
public float getImageWidthInPoints(float dpiX) -
getImageHeightInPoints
public float getImageHeightInPoints(float dpiY) -
scale
Method which scale
Imagewith designated width und height -
getHeight
public float getHeight() -
getWidth
public float getWidth() -
setQuality
- Throws:
IllegalArgumentException
-
scaleByWidth(float)