public abstract class NodeRendererBase
extends java.lang.Object
ShapeRenderer and OfficeMathRenderer.| Constructor and Description |
|---|
NodeRendererBase() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Rectangle |
getBoundsInPixels(float scale,
float dpi)
Calculates the bounds of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.Rectangle |
getBoundsInPixels(float scale,
float horizontalDpi,
float verticalDpi)
Calculates the bounds of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.geom.Rectangle2D.Float |
getBoundsInPoints()
Gets the actual bounds of the shape in points.
|
java.awt.Rectangle |
getOpaqueBoundsInPixels(float scale,
float dpi)
Calculates the opaque bounds of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.Rectangle |
getOpaqueBoundsInPixels(float scale,
float horizontalDpi,
float verticalDpi)
Calculates the opaque bounds of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.geom.Rectangle2D.Float |
getOpaqueBoundsInPoints()
Gets the opaque bounds of the shape in points.
|
java.awt.Dimension |
getSizeInPixels(float scale,
float dpi)
Calculates the size of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.Dimension |
getSizeInPixels(float scale,
float horizontalDpi,
float verticalDpi)
Calculates the size of the shape in pixels for a specified zoom factor and resolution.
|
java.awt.geom.Point2D.Float |
getSizeInPoints()
Gets the actual size of the shape in points.
|
java.awt.geom.Point2D.Float |
renderToScale(java.awt.Graphics2D graphics,
float x,
float y,
float scale)
Renders the shape into a
Graphics2D object to a specified scale. |
float |
renderToSize(java.awt.Graphics2D graphics,
float x,
float y,
float width,
float height)
Renders the shape into a
Graphics2D object to a specified size. |
void |
save(java.io.OutputStream stream,
ImageSaveOptions saveOptions) |
void |
save(java.lang.String fileName,
ImageSaveOptions saveOptions)
|
public java.awt.geom.Point2D.Float getSizeInPoints()
This property returns the size of the actual (as rendered on the page) bounding box of the shape. The size takes into account shape rotation (if any).
public java.awt.geom.Rectangle2D.Float getBoundsInPoints()
This property returns the actual (as rendered on the page) bounding box of the shape. The bounds takes into account shape rotation (if any).
public java.awt.geom.Rectangle2D.Float getOpaqueBoundsInPoints()
throws java.lang.Exception
This property returns the opaque (i.e. transparent parts of the shape are ignored) bounding box of the shape. The bounds takes the shape rotation into account.
java.lang.Exceptionpublic java.awt.Dimension getSizeInPixels(float scale,
float dpi)
This method converts getSizeInPoints() into size in pixels and it is useful when you want to create a bitmap for rendering the shape neatly onto the bitmap.
scale - The zoom factor (1.0 is 100%).dpi - The resolution (horizontal and vertical) to convert from points to pixels (dots per inch).public java.awt.Dimension getSizeInPixels(float scale,
float horizontalDpi,
float verticalDpi)
This method converts getSizeInPoints() into size in pixels and it is useful when you want to create a bitmap for rendering the shape neatly onto the bitmap.
scale - The zoom factor (1.0 is 100%).horizontalDpi - The horizontal resolution to convert from points to pixels (dots per inch).verticalDpi - The vertical resolution to convert from points to pixels (dots per inch).public java.awt.Rectangle getBoundsInPixels(float scale,
float dpi)
This method converts getBoundsInPoints() into rectangle in pixels.
scale - The zoom factor (1.0 is 100%).dpi - The resolution (horizontal and vertical) to convert from points to pixels (dots per inch).public java.awt.Rectangle getBoundsInPixels(float scale,
float horizontalDpi,
float verticalDpi)
This method converts getBoundsInPoints() into rectangle in pixels.
scale - The zoom factor (1.0 is 100%).horizontalDpi - The horizontal resolution to convert from points to pixels (dots per inch).verticalDpi - The vertical resolution to convert from points to pixels (dots per inch).public java.awt.Rectangle getOpaqueBoundsInPixels(float scale,
float dpi)
throws java.lang.Exception
This method converts getOpaqueBoundsInPoints() into rectangle in pixels and it is useful when you want to create a bitmap for rendering the shape with only opaque part of the shape.
scale - The zoom factor (1.0 is 100%).dpi - The resolution to convert from points to pixels (dots per inch).java.lang.Exceptionpublic java.awt.Rectangle getOpaqueBoundsInPixels(float scale,
float horizontalDpi,
float verticalDpi)
throws java.lang.Exception
This method converts getOpaqueBoundsInPoints() into rectangle in pixels and it is useful when you want to create a bitmap for rendering the shape with only opaque part of the shape.
scale - The zoom factor (1.0 is 100%).horizontalDpi - The horizontal resolution to convert from points to pixels (dots per inch).verticalDpi - The vertical resolution to convert from points to pixels (dots per inch).java.lang.Exceptionpublic java.awt.geom.Point2D.Float renderToScale(java.awt.Graphics2D graphics,
float x,
float y,
float scale)
throws java.lang.Exception
Graphics2D object to a specified scale.graphics - The object where to render to.x - The X coordinate (in world units) of the top left corner of the rendered shape.y - The Y coordinate (in world units) of the top left corner of the rendered shape.scale - The scale for rendering the shape (1.0 is 100%).java.lang.Exceptionpublic float renderToSize(java.awt.Graphics2D graphics,
float x,
float y,
float width,
float height)
throws java.lang.Exception
Graphics2D object to a specified size.graphics - The object where to render to.x - The X coordinate (in world units) of the top left corner of the rendered shape.y - The Y coordinate (in world units) of the top left corner of the rendered shape.width - The maximum width (in world units) that can be occupied by the rendered shape.height - The maximum height (in world units) that can be occupied by the rendered shape.java.lang.Exceptionpublic void save(java.lang.String fileName,
ImageSaveOptions saveOptions)
throws java.lang.Exception
fileName - The name for the image file. If a file with the specified name already exists, the existing file is overwritten.saveOptions - Specifies the options that control how the shape is rendered and saved. Can be null.java.lang.Exceptionpublic void save(java.io.OutputStream stream,
ImageSaveOptions saveOptions)
throws java.lang.Exception
java.lang.Exception