public class ImageCaptureExample
extends java.lang.Object
Constructor | Description |
---|---|
ImageCaptureExample() |
Modifier and Type | Method | Description |
---|---|---|
static org.eclipse.swt.graphics.ImageData |
captureImageData(org.eclipse.swt.printing.Printer printer,
PrintPiece page,
org.eclipse.swt.graphics.Point imageSize) |
Captures the page to an image and returns it.
|
static Print |
createPrint() |
Returns a sample print
|
static void |
main(java.lang.String[] args) |
Demonstrate capturing the pages of a print to in-memory images.
|
public static Print createPrint()
public static org.eclipse.swt.graphics.ImageData captureImageData(org.eclipse.swt.printing.Printer printer, PrintPiece page, org.eclipse.swt.graphics.Point imageSize)
printer
- the printer device.page
- the page to capture.imageSize
- the size of the returned imagepublic static void main(java.lang.String[] args)
args
- command-line arguments (ignored)