GraphicsDevice
Contents
[
Hide
]Inheritance: java.lang.Object, com.aspose.pdf.devices.Device, com.aspose.pdf.devices.PageDevice, com.aspose.pdf.devices.ImageDevice
public final class GraphicsDevice extends ImageDevice
Represents image device that helps to render pdf document pages into graphics.
Constructors
Constructor | Description |
---|---|
GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting) | Initializes a new instance of the GraphicsDevice class with provided image dimensions and resolution. |
Methods
Method | Description |
---|---|
process(Page page, System.IO.Stream output) | Perfoms some operation on the given page, e.g. |
process(Page page, System.Drawing.Graphics gr) | renders page on the graphics |
processInternal(Page page, System.IO.Stream output) | internal method |
GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting)
public GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting)
Initializes a new instance of the GraphicsDevice class with provided image dimensions and resolution.
Parameters:
Parameter | Type | Description |
---|---|---|
origin | Point | Top Left image coordinate |
paperWidth | int | Width that the image is auto-sized to |
paperHeight | int | Height that the image is auto-sized to |
marginBounds | com.aspose.ms.System.Drawing.Rectangle | Rectangle object |
scaleFactor | float | Scale factor of the output image. |
resolution | Resolution | Resolution for the result image file, see Resolution class. |
rotateDegrees | int | degrees |
autoSize | boolean | boolean value |
verticalAlignment | VerticalAlignment | VerticalAlignment element |
horizontalAlignment | HorizontalAlignment | horizontalAlignment element |
isXpsPrinting | boolean | boolean value |
process(Page page, System.IO.Stream output)
public void process(Page page, System.IO.Stream output)
Perfoms some operation on the given page, e.g. converts page into graphic image.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | The page to process. |
output | com.aspose.ms.System.IO.Stream | This stream contains the results of processing. |
process(Page page, System.Drawing.Graphics gr)
public void process(Page page, System.Drawing.Graphics gr)
renders page on the graphics
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Page object |
gr | com.aspose.ms.System.Drawing.Graphics | internal object |
processInternal(Page page, System.IO.Stream output)
public void processInternal(Page page, System.IO.Stream output)
internal method
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Page object |
output | com.aspose.ms.System.IO.Stream | internal object |