public class FixedEllipseShape extends VertexFixedSizeShape
| Modifier and Type | Field and Description |
|---|---|
static FixedEllipseShape |
DEFAULT |
| Constructor and Description |
|---|
FixedEllipseShape()
Creates an ellipse shape with x and y radii of 0.06 and 0.045
|
FixedEllipseShape(double radiusX,
double radiusY)
Creates an ellipse shape with the to given radii
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics gfx,
int x,
int y,
ProjectionPlane plane,
boolean filled,
DimensionD scale)
Draws the shape depending on the given values
|
double |
getHeight()
Returns the normalized height of the shape
|
double |
getWidth()
Returns the normalized width of the shape
|
Vector2D |
normalizedDockingCoordinates(Vector2D direction,
DimensionD scale)
Returns the position of where to dock an edge pointing to the given direction
|
boolean |
pick(double relX,
double relY,
DimensionD scale)
Tells whether or not, the given coordinates lay within the shape
|
addDockingVector, pickpublic static final FixedEllipseShape DEFAULT
public FixedEllipseShape(double radiusX,
double radiusY)
radiusX - the x-dimensionradiusY - the y-dimensionpublic FixedEllipseShape()
public void draw(java.awt.Graphics gfx,
int x,
int y,
ProjectionPlane plane,
boolean filled,
DimensionD scale)
VertexShapedraw in class VertexShapegfx - the target graphics object to draw intox - the pixel x-coordinate of the center of the vertexy - the pixel y-coordinate of the center of the vertexplane - the projection datafilled - if true, the shape will be filledscale - the x and y scale factorspublic boolean pick(double relX,
double relY,
DimensionD scale)
VertexShapepick in class VertexShaperelX - the normalized x-coordinate relative to the center of the vertexrelY - the normalized y-coordinate relative to the center of the vertexscale - the x and y scale factors for the shapepublic Vector2D normalizedDockingCoordinates(Vector2D direction, DimensionD scale)
VertexShapenormalizedDockingCoordinates in class VertexShapedirection - the direction from where to dockscale - an x and y scale factorpublic double getWidth()
VertexFixedSizeShapegetWidth in class VertexFixedSizeShapepublic double getHeight()
VertexFixedSizeShapegetHeight in class VertexFixedSizeShape