|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.print.PrintSurfaceObject
| Field Summary | |
protected boolean |
allocatePageRectScaling
If this is set true, then you intend to call the getScaledImage() method on PageRect objects that you create during the putPageRect() method. |
protected PageFormat |
format
|
| Fields inherited from interface ewe.fx.print.PrintSurface |
HINT_DONT_RESIZE, HINT_DONT_RESIZE_HEIGHT, HINT_DONT_RESIZE_WIDTH, HINT_GRAYSCALE_IMAGE, HINT_MONO_IMAGE |
| Constructor Summary | |
protected |
PrintSurfaceObject(PageFormat format)
|
| Method Summary | |
void |
cancelPageRect(PageRect r)
This frees the resources of the PageRect without sending it to the output device. |
protected abstract Image |
getImageBuffer(int width,
int height)
|
Dimension |
getOutputSize(double width,
double height,
Dimension dest)
Return the size in pixels on the output device, given a width and height on this PrintSurface. |
double |
getOutputXDPI()
By default this will return the xDPI value of the PageFormat supplied to the PrintSurfaceObject. |
double |
getOutputYDPI()
By default this will return the yDPI value of the PageFormat supplied to the PrintSurfaceObject. |
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. |
static int |
getWidthHeight(double value,
double dpi)
|
void |
movePageRect(PageRect pr,
double newX,
double newY)
Move the PageRect to a new location relative to the top left corner of the page. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Methods inherited from interface ewe.fx.print.PrintSurface |
putPageRect |
| Field Detail |
protected PageFormat format
protected boolean allocatePageRectScaling
| Constructor Detail |
protected PrintSurfaceObject(PageFormat format)
| Method Detail |
public void cancelPageRect(PageRect r)
PrintSurface
cancelPageRect in interface PrintSurfacepublic double getOutputXDPI()
getOutputXDPI in interface PrintSurfacepublic double getOutputYDPI()
getOutputYDPI in interface PrintSurface
public static int getWidthHeight(double value,
double dpi)
public Dimension getOutputSize(double width,
double height,
Dimension dest)
public void movePageRect(PageRect pr,
double newX,
double newY)
movePageRect in interface PrintSurfacepr - 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 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.
getPageRect in interface PrintSurfacex - 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.hints - Hints indicating the kind of drawing that will be done. This should be any of the HINT_XXX values OR'ed together.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.
protected abstract Image getImageBuffer(int width,
int height)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||