|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.crionics.jpdf.graphic.AbstractImage
public abstract class AbstractImage
Abstract Class containing the methods shared by the different Image Object Type.
| Field Summary | |
|---|---|
static int |
FLIP_NONE
No Flip. |
static int |
FLIP_X
Used when the image is to be flipped around the X Axis (Horizontal). |
static int |
FLIP_XY
Used when the image is to be flipped around the X and Y Axis. |
static int |
FLIP_Y
Used when the image is to be flipped around the Y Axis (Vertical). |
static int |
SCALE_MODEL_AVERAGE
Used when the image is being scaled with a Area Averaging Scaling Algorithm. |
static int |
SCALE_MODEL_FAST
Used when the image is being scaled with a Fast Scaling Algorithm. |
static int |
SCALE_MODEL_SMOOTH
Used when the image is being scaled with a Smooth Scaling Algorithm. |
static int |
TYPE_GENERIC
Identifies the Image Object as one based on a image recognized by the Java AWT API. |
static int |
TYPE_JPEG
Identifies the Image Object as one based on a JPEG image. |
| Constructor Summary | |
|---|---|
AbstractImage()
|
|
| Method Summary | |
|---|---|
AbstractImage |
convertTo(int imageType)
Returns a new Image Object based this instance, and of the type requested. |
void |
ensureHasAlphaChannel()
|
void |
flip(int axis)
Flips the image using the specified Axis. |
void |
flush()
Flushes all resources being used to cache optimization information. |
int |
getHeight()
Returns the height in pixels of the image. |
java.awt.Image |
getImage()
Returns the image without any transformations |
java.awt.image.BufferedImage |
getImageTransformed()
Returns a copy of the image. |
java.awt.image.BufferedImage |
getImageTransformed(int type)
Returns a copy of the image in the specified type. |
abstract int |
getType()
|
int |
getWidth()
Returns the width in pixels of the image. |
void |
scale(int width,
int height,
int ScalingModel)
Scales the image to the specified new dimension, and using the requested Scaling algorithm (Images.SCALE_MODEL_...). |
abstract void |
writeToStream(java.io.OutputStream outStream)
Writes the content of the image in the specified OutputStream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FLIP_NONE
flip(int).
public static final int FLIP_X
flip(int).
public static final int FLIP_XY
flip(int).
public static final int FLIP_Y
flip(int).
public static final int SCALE_MODEL_AVERAGE
scale(int,int,int).
public static final int SCALE_MODEL_FAST
scale(int,int,int).
public static final int SCALE_MODEL_SMOOTH
scale(int,int,int).
public static final int TYPE_GENERIC
getType()
public static final int TYPE_JPEG
getType()
| Constructor Detail |
|---|
public AbstractImage()
| Method Detail |
|---|
public AbstractImage convertTo(int imageType)
throws PdfException
imageType - The type of the Image Object (Images.TYPE_...).
PdfException - If the image type is not recognized.public void ensureHasAlphaChannel()
public void flip(int axis)
throws PdfException
axis - The axis used for the flipping
(AbstractImage.FLIP_X,AbstractImage.FLIP_Y,AbstractImage.FLIP_XY
or AbstractImage.FLIP_NONE ).
PdfException - if the axis value is not recognized.public void flush()
public int getHeight()
public java.awt.Image getImage()
public java.awt.image.BufferedImage getImageTransformed()
public java.awt.image.BufferedImage getImageTransformed(int type)
type - The type of the Image (One of the BufferedImage.TYPE_xx entry)
public abstract int getType()
public int getWidth()
public void scale(int width,
int height,
int ScalingModel)
width - The new Width in Pixels.height - The new Height in Pixels.ScalingModel - The Scaling Algorithm to use (Images.SCALE_MODEL_...).
public abstract void writeToStream(java.io.OutputStream outStream)
throws java.io.IOException
outStream - The OuputStream where to write the image
java.io.IOException - If an error occurs while accessing the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||