|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swt.graph.VisualGraphImageUtil
THIS IS A WORK IN PROGRESS ....
Class for rendering a VisualGraphView to an Image in an SWT Context.
| Method Summary | |
static org.eclipse.swt.graphics.Image |
exportToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int w,
int h,
Renderer gfxRenderer,
Boundary ins,
int bgColor)
Creates and returns an of the passed
with the specified size.
|
static Size |
getPreferredSize(VisualGraphView visualgraphview)
Returns the preferred size for an unscaled export of the current VisualGraphView. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
Boundary insets)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Boundary insets)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Boundary insets,
boolean preserveRatio)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio,
boolean forceSize,
boolean centerImage,
Transform2D transform)
Create an image of the panel's contents with the given size. |
static org.eclipse.swt.graphics.Image |
renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio,
boolean forceSize,
boolean centerImage,
Transform2D transform,
int bgColor)
Create an image of the panel's contents with the given size. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final Size getPreferredSize(VisualGraphView visualgraphview)
VisualGraphView.
visualgraphview - The VisualGraphView to retrieve the preferred
size for
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
Boundary insets)
swtDevice - an SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderinsets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Boundary insets)
swtDevice - an SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.insets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets)
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.gfxRenderer - The renderer used to render the image datainsets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio)
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.gfxRenderer - The renderer used to render the image datainsets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.preserveRatio - if this parameter is set to true then the
ratio of the width and the height of the graph is preserved
in the resulting image.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Boundary insets,
boolean preserveRatio)
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.insets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.preserveRatio - if this parameter is set to true then the
ratio of the width and the height of the graph is preserved
in the resulting image.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio,
boolean forceSize,
boolean centerImage,
Transform2D transform)
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.gfxRenderer - The renderer used to render the image datainsets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.preserveRatio - if this parameter is set to true then the
ratio of the width and the height of the graph is preserved
in the resulting image.forceSize - If this parameter is set the result image will always have
the given width and height, even if the preserve ratio leads
to empty space in the imagecenterImage - If the option forceSize is turned on, there might be an empty
space on the right or bottom side of the graph. With this
option the graph will be centered.transform - You can pass a Transform2D which will contain the
transformation to convert shape bounds from logical units to the bounds
in the rendered image afterwards.
public static final org.eclipse.swt.graphics.Image renderToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int width,
int height,
Renderer gfxRenderer,
Boundary insets,
boolean preserveRatio,
boolean forceSize,
boolean centerImage,
Transform2D transform,
int bgColor)
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderwidth - width of the image to create.height - height of the image to create.gfxRenderer - The renderer used to render the image datainsets - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.preserveRatio - if this parameter is set to true then the
ratio of the width and the height of the graph is preserved
in the resulting image.forceSize - If this parameter is set the result image will always have
the given width and height, even if the preserve ratio leads
to empty space in the imagecenterImage - If the option forceSize is turned on, there might be an empty
space on the right or bottom side of the graph. With this
option the graph will be centered.transform - You can pass a Transform2D which will contain the
transformation to convert shape bounds from logical units to the bounds
in the rendered image afterwards.bgColor - the background color to use for the transparent regions of
the view paint format
public static final org.eclipse.swt.graphics.Image exportToImage(org.eclipse.swt.graphics.Device swtDevice,
VisualGraphView visualgraphview,
int w,
int h,
Renderer gfxRenderer,
Boundary ins,
int bgColor)
Creates and returns an of the passed Image
with the specified size.
VisualGraphView
swtDevice - a SWT Device
necessary for the image creationvisualgraphview - The VisualGraph to renderw - width of the image to create.h - height of the image to create.gfxRenderer - The renderer used to render the image datains - The insets are used to create an empty border around the
rendered image that can be used for drawing additional
information. The insets are added to the given width and
height and will enlarge the image. This parameter can be
null.
Image of the passed visualgraphview
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||