|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Field Summary | |
static int |
HINT_DONT_RESIZE
This is a "hint" flag for getPageRect. |
static int |
HINT_DONT_RESIZE_HEIGHT
This is a "hint" flag for getPageRect(). |
static int |
HINT_DONT_RESIZE_WIDTH
This is a "hint" flag for getPageRect(). |
static int |
HINT_GRAYSCALE_IMAGE
This is a "hint" flag for getPageRect, and indicates that only gray scale drawing will be done on the PageRect. |
static int |
HINT_MONO_IMAGE
This is a "hint" flag for getPageRect, and indicates that only black and white drawing will be done on the PageRect. |
| Method Summary | |
void |
cancelPageRect(PageRect r)
This frees the resources of the PageRect without sending it to the output device. |
double |
getOutputXDPI()
This returns the actual output DPI of the device on the X-axis or zero if the DPI is unkown. |
double |
getOutputYDPI()
This returns the actual output DPI of the device on the Y-axis or zero if the DPI is unkown. |
PageRect |
getPageRect(double x,
double y,
double width,
double height,
double xDpi,
double yDpi,
int hints)
Call this whithin the print() method of the Printable object to get a PageRect for a section of the current page. |
void |
movePageRect(PageRect pr,
double newX,
double newY)
Move the PageRect to a new location relative to the top left corner of the page. |
void |
putPageRect(PageRect r)
This sends the data on the PageRect to the output device (usually a printer). |
| Field Detail |
public static final int HINT_DONT_RESIZE_WIDTH
public static final int HINT_DONT_RESIZE_HEIGHT
public static final int HINT_DONT_RESIZE
public static final int HINT_MONO_IMAGE
public static final int HINT_GRAYSCALE_IMAGE
| Method Detail |
public PageRect getPageRect(double x,
double y,
double width,
double height,
double xDpi,
double yDpi,
int hints)
Note that this method may throw an IllegalArgumentException if the rect requested is too big. In which case you should request a smaller size rect or a lower DPI.
x - The x location in Points (1/72 of an inch) of the PageRect, relative to the top left of the page.y - The y location in Points (1/72 of an inch) of the PageRect, relative to the top left of the page.width - The width in Points (1/72 of an inch) of the PageRect.height - The height in Points (1/72 of an inch) of the PageRect.xDpi - The requested horizontal DPI of the PageRect. This will affect the number of pixels that are in the image horizontally.yDpi - The requested horizontal DPI of the PageRect. This will affect the number of pixels that are in the image horizontally.hints - Hints indicating the kind of drawing that will be done and how you want the method to behave. This should be any of the HINT_XXX values OR'ed together.
public void movePageRect(PageRect pr,
double newX,
double newY)
pr - the PageRect to move.newX - the new x location in Points (1/72 of an inch) of the PageRect.newY - the new y location in Points (1/72 of an inch) of the PageRect.public void putPageRect(PageRect r)
public void cancelPageRect(PageRect r)
public double getOutputXDPI()
public double getOutputYDPI()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||