|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.render.AbstractShapeRenderer prefuse.render.ShapeRenderer
public class ShapeRenderer
Renderer for drawing simple shapes. This class provides a number of built-in shapes, selected by an integer value retrieved from a VisualItem.
Field Summary |
---|
Fields inherited from class prefuse.render.AbstractShapeRenderer |
---|
m_manageBounds, m_transform, RENDER_TYPE_DRAW, RENDER_TYPE_DRAW_AND_FILL, RENDER_TYPE_FILL, RENDER_TYPE_NONE |
Fields inherited from interface prefuse.render.Renderer |
---|
DEFAULT_GRAPHICS |
Constructor Summary | |
---|---|
ShapeRenderer()
Creates a new ShapeRenderer with default base size of 10 pixels. |
|
ShapeRenderer(int size)
Creates a new ShapeRenderer with given base size. |
Method Summary | |
---|---|
java.awt.Shape |
cross(float x,
float y,
float height)
Returns a cross shape of the given dimenisions. |
java.awt.Shape |
diamond(float x,
float y,
float height)
Returns a diamond shape of the given dimenisions. |
java.awt.Shape |
ellipse(double x,
double y,
double width,
double height)
Returns an ellipse of the given dimenisions. |
int |
getBaseSize()
Returns the base size, in pixels, for shapes drawn by this renderer. |
protected java.awt.Shape |
getRawShape(VisualItem item)
Return a non-transformed shape for the visual representation of the item. |
java.awt.Shape |
hexagon(float x,
float y,
float height)
Returns a hexagon shape of the given dimenisions. |
java.awt.Shape |
rectangle(double x,
double y,
double width,
double height)
Returns a rectangle of the given dimenisions. |
void |
setBaseSize(int size)
Sets the base size, in pixels, for shapes drawn by this renderer. |
java.awt.Shape |
star(float x,
float y,
float height)
Returns a star shape of the given dimenisions. |
java.awt.Shape |
triangle_down(float x,
float y,
float height)
Returns a down-pointing triangle of the given dimenisions. |
java.awt.Shape |
triangle_left(float x,
float y,
float height)
Returns a left-pointing triangle of the given dimenisions. |
java.awt.Shape |
triangle_right(float x,
float y,
float height)
Returns a right-pointing triangle of the given dimenisions. |
java.awt.Shape |
triangle_up(float x,
float y,
float height)
Returns a up-pointing triangle of the given dimenisions. |
Methods inherited from class prefuse.render.AbstractShapeRenderer |
---|
drawShape, getRenderType, getShape, getStroke, getTransform, locatePoint, render, setBounds, setManageBounds, setRenderType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeRenderer()
public ShapeRenderer(int size)
size
- the base size in pixelsMethod Detail |
---|
public void setBaseSize(int size)
size
- the base size in pixelspublic int getBaseSize()
protected java.awt.Shape getRawShape(VisualItem item)
AbstractShapeRenderer
getRawShape
in class AbstractShapeRenderer
item
- the VisualItem being drawn
AbstractShapeRenderer.getRawShape(prefuse.visual.VisualItem)
public java.awt.Shape rectangle(double x, double y, double width, double height)
public java.awt.Shape ellipse(double x, double y, double width, double height)
public java.awt.Shape triangle_up(float x, float y, float height)
public java.awt.Shape triangle_down(float x, float y, float height)
public java.awt.Shape triangle_left(float x, float y, float height)
public java.awt.Shape triangle_right(float x, float y, float height)
public java.awt.Shape cross(float x, float y, float height)
public java.awt.Shape star(float x, float y, float height)
public java.awt.Shape hexagon(float x, float y, float height)
public java.awt.Shape diamond(float x, float y, float height)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |