public class RTFFormatterWrapper extends RTFFormatter implements IFormatterWrapper
HMM_PER_INCH, LINKED_PICTURE, MAX_HEIGHT_IN_PIXELS, MAX_WIDTH_IN_PIXELS, TWIPS_PER_INCH, WMF_PLACEABLE_HEADER_SIZE
dpi, properties, styledDocument
DOT_PER_INCH
Constructor and Description |
---|
RTFFormatterWrapper(java.util.Properties properties,
boolean trueTransform)
Create a RTF formatter with with specific properties.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBounds(ITool.RetainedString imageContent)
Return the image bounds from RTF image content.
|
java.awt.Rectangle |
getPaperBounds(int dpi)
Return the size of paper bounds.
|
Image |
rotateImage(Image image,
int degrees)
Rotates an image by a specific angle.
|
Image |
rotateImage(Image image,
int degrees,
boolean bestQualityOrVecter)
Rotates an image by a specific angle.
|
Image |
scale(Image image,
double sx,
double sy)
Return the RTF content of transformed image.
|
createBookmark, createImage, createImage, createImageBody, createImageFooter, createImageHeader, createImageProperty, createLink, format, getImageFormat, getPageSize, isLargeImage
getImageFlag, getObjectFormater, getProperties, registerObjectFormatter, setProperties, setStyledDocument, writeImage, writeImage
public RTFFormatterWrapper(java.util.Properties properties, boolean trueTransform)
properties
- template propertiestrueTransform
- use true transformationpublic Image rotateImage(Image image, int degrees, boolean bestQualityOrVecter)
IFormatterWrapper
rotateImage
in interface IFormatterWrapper
image
- the image to be rotateddegrees
- the angle of rotation can be positive or negativebestQualityOrVecter
- to check best quality or vector imagepublic Image rotateImage(Image image, int degrees)
rotateImage
in interface IFormatterWrapper
image
- the image to be rotateddegrees
- the angle of rotation can be positive or negativepublic Image scale(Image image, double sx, double sy)
scale
in interface IFormatterWrapper
image
- report imagesx
- the amount by which X coordinates in subsequent rendering operations are multiplied relative to
previous rendering operations.sy
- the amount by which Y coordinates in subsequent rendering operations are multiplied relative to
previous rendering operations.public java.awt.Rectangle getBounds(ITool.RetainedString imageContent)
getBounds
in interface IFormatterWrapper
imageContent
- content of imagepublic java.awt.Rectangle getPaperBounds(int dpi)
getPaperBounds
in interface IFormatterWrapper
dpi
- DPI valueCopyright © 2010 - No Magic Asia