public class ShapePortrayal2D extends AbstractShapePortrayal2D
Modifier and Type | Field and Description |
---|---|
java.awt.Shape |
shape |
java.awt.Stroke |
stroke |
static double[] |
X_POINTS_BOWTIE |
static double[] |
X_POINTS_DIAMOND |
static double[] |
X_POINTS_HEXAGON |
static double[] |
X_POINTS_HEXAGON_ROTATED |
static double[] |
X_POINTS_HOURGLASS |
static double[] |
X_POINTS_OCTAGON |
static double[] |
X_POINTS_SQUARE |
static double[] |
X_POINTS_TRIANGLE_DOWN |
static double[] |
X_POINTS_TRIANGLE_LEFT |
static double[] |
X_POINTS_TRIANGLE_RIGHT |
static double[] |
X_POINTS_TRIANGLE_UP |
static double[] |
Y_POINTS_BOWTIE |
static double[] |
Y_POINTS_DIAMOND |
static double[] |
Y_POINTS_HEXAGON |
static double[] |
Y_POINTS_HEXAGON_ROTATED |
static double[] |
Y_POINTS_HOURGLASS |
static double[] |
Y_POINTS_OCTAGON |
static double[] |
Y_POINTS_SQUARE |
static double[] |
Y_POINTS_TRIANGLE_DOWN |
static double[] |
Y_POINTS_TRIANGLE_LEFT |
static double[] |
Y_POINTS_TRIANGLE_RIGHT |
static double[] |
Y_POINTS_TRIANGLE_UP |
filled, paint, scale
TYPE_HIT_OBJECT, TYPE_SELECTED_OBJECT
Constructor and Description |
---|
ShapePortrayal2D(double[] xpoints,
double[] ypoints) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
boolean filled) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
double scale) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
double scale,
boolean filled) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
java.awt.Paint paint) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
java.awt.Paint paint,
boolean filled) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
java.awt.Paint paint,
double scale) |
ShapePortrayal2D(double[] xpoints,
double[] ypoints,
java.awt.Paint paint,
double scale,
boolean filled) |
ShapePortrayal2D(java.awt.Shape shape) |
ShapePortrayal2D(java.awt.Shape shape,
boolean filled) |
ShapePortrayal2D(java.awt.Shape shape,
double scale) |
ShapePortrayal2D(java.awt.Shape shape,
double scale,
boolean filled) |
ShapePortrayal2D(java.awt.Shape shape,
java.awt.Paint paint) |
ShapePortrayal2D(java.awt.Shape shape,
java.awt.Paint paint,
boolean filled) |
ShapePortrayal2D(java.awt.Shape shape,
java.awt.Paint paint,
double scale) |
ShapePortrayal2D(java.awt.Shape shape,
java.awt.Paint paint,
double scale,
boolean filled) |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.lang.Object object,
java.awt.Graphics2D graphics,
DrawInfo2D info)
Draw a the given object with an origin at (info.draw.x, info.draw.y),
and with the coordinate system scaled by so that 1 unit is in the x and
y directions are equal to info.draw.width and info.draw.height respectively
in pixels.
|
boolean |
hitObject(java.lang.Object object,
DrawInfo2D range)
Return true if the given object, when drawn, intersects with a provided rectangle, for
hit testing purposes.
|
void |
setStroke(java.awt.Stroke s) |
getInspector, getName, getStatus, handleMouseEvent, setSelected
public java.awt.Shape shape
public java.awt.Stroke stroke
public static final double[] X_POINTS_TRIANGLE_DOWN
public static final double[] Y_POINTS_TRIANGLE_DOWN
public static final double[] X_POINTS_TRIANGLE_UP
public static final double[] Y_POINTS_TRIANGLE_UP
public static final double[] X_POINTS_TRIANGLE_RIGHT
public static final double[] Y_POINTS_TRIANGLE_RIGHT
public static final double[] X_POINTS_TRIANGLE_LEFT
public static final double[] Y_POINTS_TRIANGLE_LEFT
public static final double[] X_POINTS_DIAMOND
public static final double[] Y_POINTS_DIAMOND
public static final double[] X_POINTS_SQUARE
public static final double[] Y_POINTS_SQUARE
public static final double[] X_POINTS_BOWTIE
public static final double[] Y_POINTS_BOWTIE
public static final double[] X_POINTS_HOURGLASS
public static final double[] Y_POINTS_HOURGLASS
public static final double[] X_POINTS_OCTAGON
public static final double[] Y_POINTS_OCTAGON
public static final double[] X_POINTS_HEXAGON
public static final double[] Y_POINTS_HEXAGON
public static final double[] X_POINTS_HEXAGON_ROTATED
public static final double[] Y_POINTS_HEXAGON_ROTATED
public ShapePortrayal2D(double[] xpoints, double[] ypoints)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, java.awt.Paint paint)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, double scale)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, java.awt.Paint paint, double scale)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, boolean filled)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, java.awt.Paint paint, boolean filled)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, double scale, boolean filled)
public ShapePortrayal2D(double[] xpoints, double[] ypoints, java.awt.Paint paint, double scale, boolean filled)
public ShapePortrayal2D(java.awt.Shape shape)
public ShapePortrayal2D(java.awt.Shape shape, java.awt.Paint paint)
public ShapePortrayal2D(java.awt.Shape shape, double scale)
public ShapePortrayal2D(java.awt.Shape shape, java.awt.Paint paint, double scale)
public ShapePortrayal2D(java.awt.Shape shape, boolean filled)
public ShapePortrayal2D(java.awt.Shape shape, java.awt.Paint paint, boolean filled)
public ShapePortrayal2D(java.awt.Shape shape, double scale, boolean filled)
public ShapePortrayal2D(java.awt.Shape shape, java.awt.Paint paint, double scale, boolean filled)
public void setStroke(java.awt.Stroke s)
public void draw(java.lang.Object object, java.awt.Graphics2D graphics, DrawInfo2D info)
Portrayal2D
draw
in interface Portrayal2D
draw
in class SimplePortrayal2D
public boolean hitObject(java.lang.Object object, DrawInfo2D range)
SimplePortrayal2D
hitObject
in class SimplePortrayal2D