public interface Shape extends java.lang.Cloneable, TextSerializable
| Modifier and Type | Method and Description |
|---|---|
Shape |
clone()
Returns a clone of this shape
|
double |
distanceTo(double x,
double y)
Gets the distance of this shape to the given point.
|
void |
draw(java.awt.Graphics g,
double xscale,
double yscale)
Draws the shape to the given graphics and scale.
|
void |
draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
Deprecated.
- see
|
Rectangle |
getMBR()
Returns minimum bounding rectangle for this shape.
|
boolean |
isIntersected(Shape s)
Returns true if this shape is intersected with the given shape
|
fromText, toTextRectangle getMBR()
double distanceTo(double x,
double y)
x - y - boolean isIntersected(Shape s)
s - Shape clone()
java.lang.CloneNotSupportedException@Deprecated
void draw(java.awt.Graphics g,
Rectangle fileMBR,
int imageWidth,
int imageHeight,
double scale)
g - - the graphics or canvas to draw tofileMBR - - the MBR of the file in which the shape is containedimageWidth - - width of the image to drawimageHeight - - height of the image to drawscale - - the scale used to convert shape coordinates to image coordinatesvoid draw(java.awt.Graphics g,
double xscale,
double yscale)
g - - the graphics to draw the shape to.xscale - - scale of the image x-axis in terms of pixels per points.yscale - - scale of the image y-axis in terms of pixels per points.