public class Image extends Object
| Constructor and Description |
|---|
Image(BufferedImage image)
Constructor for default images
|
Image(BufferedImage image,
float dpi) |
Image(BufferedImage image,
float dpiX,
float dpiY) |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(org.apache.pdfbox.pdmodel.PDDocument doc,
PageContentStreamOptimized stream,
float x,
float y)
Drawing simple
Image in PDPageContentStream. |
float |
getHeight() |
float |
getImageHeightInPoints(float dpiY) |
float |
getImageWidthInPoints(float dpiX) |
float |
getWidth() |
Image |
scale(float width)
Deprecated.
|
Image |
scale(float boundWidth,
float boundHeight)
Method which scale
Image with designated width und height |
Image |
scaleByHeight(float height)
Method which scale
Image with designated height |
Image |
scaleByWidth(float width)
Method which scale
Image with designated width |
public Image(BufferedImage image)
Constructor for default images
image - BufferedImagepublic Image(BufferedImage image, float dpi)
public Image(BufferedImage image, float dpiX, float dpiY)
public void draw(org.apache.pdfbox.pdmodel.PDDocument doc,
PageContentStreamOptimized stream,
float x,
float y)
throws IOException
Drawing simple Image in PDPageContentStream.
doc - PDDocument where drawing will be appliedstream - PDPageContentStream where drawing will be appliedx - X coordinate for image drawingy - Y coordinate for image drawingIOException - if loading image failspublic Image scale(float width)
scaleByWidth(float)
Method which scale Image with designated width
public Image scaleByHeight(float height)
Method which scale Image with designated height
public float getImageWidthInPoints(float dpiX)
public float getImageHeightInPoints(float dpiY)
public Image scale(float boundWidth, float boundHeight)
Method which scale Image with designated width und height
public float getHeight()
public float getWidth()
Copyright © 2020. All rights reserved.