public class GraphicsRenderer extends DisposableObject
The class handles drawing com.aspose.imaging.Image directly upon the java.awt.Graphic2D. Using this class it is possible to avoid multiple allocations and coping the pixels between com.aspose.Imaging buffers into java.awt.BufferImage in case of VectorImage.
| Constructor and Description |
|---|
GraphicsRenderer(Image image)
Creates a new render.
|
GraphicsRenderer(Image image,
Color backgroundColor,
int smoothingMode,
int textRendering)
Creates a new render.
|
GraphicsRenderer(Image image,
ImageOptionsBase exportOptions)
Creates a new render.
|
| Modifier and Type | Method and Description |
|---|---|
void |
render(Graphics2D graphics)
Performs the rendering on the given
graphics with scale factor 1.0. |
void |
render(Graphics2D graphics,
float scaleFactor)
Performs the rendering on the given
graphics. |
close, dispose, getDisposedpublic GraphicsRenderer(Image image)
Creates a new render.
By default render will be proceed using the SmoothingMode.HighQuality,
TextRenderingHint.ClearTypeGridFit, and with a white background color.
image - The image which will be rendered on the java.awt.Graphics2Dpublic GraphicsRenderer(Image image, ImageOptionsBase exportOptions)
Creates a new render.
image - The image which will be rendered on the java.awt.Graphics2DexportOptions - The export options for adjusting the exporting image.public GraphicsRenderer(Image image, Color backgroundColor, int smoothingMode, int textRendering)
Creates a new render.
image - The image which will be rendered on the java.awt.Graphics2DbackgroundColor - The background color.smoothingMode - The smoothing mode.textRendering - The text rendering mode.SmoothingMode,
TextRenderingHintpublic void render(Graphics2D graphics)
Performs the rendering on the given graphics with scale factor 1.0.
graphics - The graphics for drawing.public void render(Graphics2D graphics, float scaleFactor)
Performs the rendering on the given graphics.
graphics - The graphics for drawing.scaleFactor - The scale factor.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.