|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.view.image.ImageExportConfiguration
ImageExportConfiguration holds the settings used to export
an image from a VisualGraphView.
This class is used with the ImageExportViewConfigurator
and ImageExporter.
| Field Summary | |
static int |
ALIGNMENT_BOTTOM
Constant for bottom alignment |
static int |
ALIGNMENT_CENTER
Constant for center alignment |
static int |
ALIGNMENT_LEFT
Constant for left alignment |
static int |
ALIGNMENT_RIGHT
Constant for right alignment |
static int |
ALIGNMENT_TOP
Constant for top alignment |
static int |
MODE_ACTUAL_SIZE
Mode for: The view will be rendered 1:1, width and height values are ignored |
static int |
MODE_BEST_FIT
Mode for: The image is resized to fit into the given boundary while the aspect ratio is preserved. |
static int |
MODE_BEST_FIT_CROPPED
Mode for: The image is resized to fit into the given boundary while the aspect ratio is preserved. |
static int |
MODE_CROP_FIT
Mode for: The image is resized so the smallest extension (width or height) fits into the given boundary. |
static int |
MODE_NO_FIT
Mode for: No resizing is done. |
static int |
MODE_STRETCHED
Mode for: The image is stretched to the given width and height ignoring the aspect ration, so the result might look distorted. |
| Constructor Summary | |
ImageExportConfiguration()
|
|
| Method Summary | |
Color |
getBackgroundColor()
Returns the background color that is used for regions in the image outside of the view. |
int |
getHeight()
Returns the height of the image. |
int |
getHorizontalAlignment()
Returns the horizontal alignment that is used if the width of the view is different than the width of the image. |
Boundary |
getInsets()
Returns the insets that should be used to create a margin between the boundaries of the view and the image boundaries. |
int |
getMode()
Returns the image export mode |
Renderer |
getRenderer()
Returns the renderer that will be used for rendering the image |
Transform2D |
getTransform()
Returns the Transform2D instance that can be used to
transform graph coordinates to image coordinates.
|
int |
getVerticalAlignment()
Returns the vertical alignment that is used if the height of the view is different than the height of the image. |
int |
getWidth()
Returns the width of the image. |
boolean |
isAntialias()
Returns true, if the antialias is turned on. |
boolean |
isPreserveRatio()
Returns true, if the aspect ratio of the view is preserved for rendering. |
void |
setAntialias(boolean antialias)
Turns on/off the antialias for rendering. |
void |
setBackgroundColor(Color color)
Sets the background color that is used for regions in the image outside of the view. |
void |
setHeight(int height)
Sets the height of the image. |
void |
setHorizontalAlignment(int alignment)
Sets the horizontal alignment that is used if the width of the view is different than the width of the image. |
void |
setInsets(Boundary insets)
Sets the insets that should be used to create a margin between the boundaries of the view and the image boundaries. |
void |
setInsets(int left,
int top,
int right,
int bottom)
Sets the insets that should be used to create a margin between the boundaries of the view and the image boundaries. |
void |
setMode(int mode)
Sets the image export mode |
void |
setRenderer(Renderer renderer)
Sets the renderer that will be used for rendering the image |
void |
setVerticalAlignment(int alignment)
Sets the vertical alignment that is used if the height of the view is different than the height of the image. |
void |
setWidth(int width)
Sets the width of the image. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MODE_ACTUAL_SIZE
public static final int MODE_BEST_FIT
setHorizontalAlignment(int) and
setVerticalAlignment(int). You can set a background color for
the space outside of the rendered graph width
#setBackgroundColor(int).
public static final int MODE_BEST_FIT_CROPPED
public static final int MODE_CROP_FIT
public static final int MODE_STRETCHED
public static final int MODE_NO_FIT
#setBackgroundColor(int).
public static final int ALIGNMENT_CENTER
public static final int ALIGNMENT_LEFT
public static final int ALIGNMENT_TOP
public static final int ALIGNMENT_RIGHT
public static final int ALIGNMENT_BOTTOM
| Constructor Detail |
public ImageExportConfiguration()
| Method Detail |
public int getMode()
public void setMode(int mode)
mode - the image export modepublic Renderer getRenderer()
public void setRenderer(Renderer renderer)
renderer - the renderer that will be used for rendering the imagepublic int getWidth()
public void setWidth(int width)
width - the width of the imagepublic int getHeight()
public void setHeight(int height)
height - the height of the imagepublic Boundary getInsets()
public void setInsets(Boundary insets)
insets - the insets
public void setInsets(int left,
int top,
int right,
int bottom)
left - the margin for the left sidetop - the margin for the top sideright - the margin for the right sidebottom - the margin for the bottom sidepublic boolean isPreserveRatio()
public boolean isAntialias()
public void setAntialias(boolean antialias)
antialias - true to enable antialiaspublic int getHorizontalAlignment()
public void setHorizontalAlignment(int alignment)
alignment - the horizontal alignmentpublic int getVerticalAlignment()
public void setVerticalAlignment(int alignment)
alignment - the vertical alignmentpublic Color getBackgroundColor()
public void setBackgroundColor(Color color)
color - the background colorpublic Transform2D getTransform()
Transform2D instance that can be used to
transform graph coordinates to image coordinates.
This value is available after the image has been rendered.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||