| 
 |   | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.graphic.RtfImage
public class RtfImage
The RtfImage contains one image. Supported image types are jpeg, png, wmf, bmp.
| Field Summary | |
|---|---|
| private  int | alignmentThe alignment of this picture | 
| static byte[] | byte2charLUTlookup table used for converting bytes to hex chars. | 
| private  float | heightThe height of this picture | 
| private  byte[][] | imageDataBinary image data. | 
| private  int | imageTypeThe type of image this is. | 
| private static byte[] | PICTUREConstant for a picture | 
| private static byte[] | PICTURE_BINARY_DATA"\bin" constant | 
| private static byte[] | PICTURE_GROUPConstant for the shape/picture group | 
| private static byte[] | PICTURE_HEIGHTConstant for the picture height | 
| private static byte[] | PICTURE_JPEGConstant for a jpeg image | 
| private static byte[] | PICTURE_PNGConstant for a png image | 
| private static byte[] | PICTURE_SCALE_XConstant for horizontal picture scaling | 
| private static byte[] | PICTURE_SCALE_YConstant for vertical picture scaling | 
| private static byte[] | PICTURE_SCALED_HEIGHTConstant for the picture height scale | 
| private static byte[] | PICTURE_SCALED_WIDTHConstant for the picture width scale | 
| private static byte[] | PICTURE_WIDTHConstant for the picture width | 
| private static byte[] | PICTURE_WMFConstant for a wmf image | 
| private static int | PIXEL_TWIPS_FACTORConstant for converting pixels to twips | 
| private  float | plainHeightThe intended display height of this picture | 
| private  float | plainWidthThe intended display width of this picture | 
| private  boolean | topLevelElementWhether this RtfImage is a top level element and should be an extra paragraph. | 
| private  float | widthThe width of this picture | 
| Fields inherited from class com.lowagie.text.rtf.RtfElement | 
|---|
| document, inHeader, inTable | 
| Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement | 
|---|
| CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR | 
| Constructor Summary | |
|---|---|
| RtfImage(RtfDocument doc,
         Image image)Constructs a RtfImage for an Image. | |
| Method Summary | |
|---|---|
| private  byte[][] | getImageData(Image image)Extracts the image data from the Image. | 
| private  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 | 
| private  void | writeImageDataHexEncoded(OutputStream bab)Writes the image data to the given buffer as hex encoded text. | 
| Methods inherited from class com.lowagie.text.rtf.RtfElement | 
|---|
| intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private static final byte[] PICTURE_GROUP
private static final byte[] PICTURE
private static final byte[] PICTURE_JPEG
private static final byte[] PICTURE_PNG
private static final byte[] PICTURE_WMF
private static final byte[] PICTURE_WIDTH
private static final byte[] PICTURE_HEIGHT
private static final byte[] PICTURE_SCALED_WIDTH
private static final byte[] PICTURE_SCALED_HEIGHT
private static final byte[] PICTURE_SCALE_X
private static final byte[] PICTURE_SCALE_Y
private static final byte[] PICTURE_BINARY_DATA
private static final int PIXEL_TWIPS_FACTOR
private final int imageType
private final byte[][] imageData
private int alignment
private float width
private float height
private float plainWidth
private float plainHeight
private boolean topLevelElement
public static final byte[] byte2charLUT
| Constructor Detail | 
|---|
public RtfImage(RtfDocument doc,
                Image image)
         throws DocumentException
doc - The RtfDocument this RtfImage belongs toimage - The Image that this RtfImage wraps
DocumentException - If an error occurred accessing the image content| Method Detail | 
|---|
private byte[][] getImageData(Image image)
                       throws DocumentException
image - The image for which to extract the content
DocumentException - If an error occurs accessing the image content
private void writeImageDataHexEncoded(OutputStream bab)
                               throws IOException
bab - 
IOExceptionprivate int imageDataSize()
public void writeContent(OutputStream result)
                  throws IOException
writeContent in interface RtfBasicElementwriteContent in class RtfElementresult - The OutputStream to write the content to
IOExceptionpublic void setAlignment(int alignment)
alignment - The alignment to use.public void setTopLevelElement(boolean topLevelElement)
topLevelElement - Whether to behave like a top level element.| 
 | Hosted by Hostbasket | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||