com.lowagie.text.rtf.graphic
public class RtfImage extends RtfElement
Version: $Id: RtfImage.java 3433 2008-05-24 19:32:11Z xlv $
Field Summary | |
---|---|
int | alignment
The alignment of this picture |
static byte[] | byte2charLUT
lookup table used for converting bytes to hex chars.
|
float | height
The height of this picture |
byte[][] | imageData
Binary image data. |
int | imageType
The type of image this is. |
float | plainHeight
The intended display height of this picture |
float | plainWidth
The intended display width of this picture |
static byte[] | PICTURE
Constant for a picture |
static byte[] | PICTURE_BINARY_DATA
"\bin" constant |
static byte[] | PICTURE_GROUP
Constant for the shape/picture group |
static byte[] | PICTURE_HEIGHT
Constant for the picture height |
static byte[] | PICTURE_JPEG
Constant for a jpeg image |
static byte[] | PICTURE_PNG
Constant for a png image |
static byte[] | PICTURE_SCALED_HEIGHT
Constant for the picture height scale |
static byte[] | PICTURE_SCALED_WIDTH
Constant for the picture width scale |
static byte[] | PICTURE_SCALE_X
Constant for horizontal picture scaling |
static byte[] | PICTURE_SCALE_Y
Constant for vertical picture scaling |
static byte[] | PICTURE_WIDTH
Constant for the picture width |
static byte[] | PICTURE_WMF
Constant for a wmf image |
static int | PIXEL_TWIPS_FACTOR
Constant for converting pixels to twips |
boolean | topLevelElement
Whether this RtfImage is a top level element and should
be an extra paragraph. |
float | width
The width of this picture |
Constructor Summary | |
---|---|
RtfImage(RtfDocument doc, Image image)
Constructs a RtfImage for an Image.
|
Method Summary | |
---|---|
byte[][] | getImageData(Image image)
Extracts the image data from the Image.
|
int | imageDataSize()
Returns the image raw data size in bytes.
|
void | setAlignment(int alignment)
Sets the alignment of this RtfImage. |
void | setTopLevelElement(boolean topLevelElement)
Set whether this RtfImage should behave like a top level element
and enclose itself in a paragraph.
|
void | writeContent(OutputStream result)
Writes the RtfImage content |
void | writeImageDataHexEncoded(OutputStream bab)
Writes the image data to the given buffer as hex encoded text.
|
Parameters: doc The RtfDocument this RtfImage belongs to image The Image that this RtfImage wraps
Throws: DocumentException If an error occurred accessing the image content
Parameters: image The image for which to extract the content
Returns: The raw image data, not formated
Throws: DocumentException If an error occurs accessing the image content
Returns: the size in bytes
Parameters: alignment The alignment to use.
Parameters: topLevelElement Whether to behave like a top level element.
Parameters: bab
Throws: IOException