public class AutosizeEllipseShape extends VertexAutosizeShape
| Modifier and Type | Field and Description |
|---|---|
static VertexShape |
DEFAULT |
| Constructor and Description |
|---|
AutosizeEllipseShape(float border,
float stretchY)
Creates an instance with the given border and Y-stretch
|
| 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
|
void |
getAutosizeScale(double innerWidth,
double innerHeight,
DimensionD outScale)
Calculates the scale of the shape depending on an inner bounding box
|
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
|
isAutoSize, setAutoSizeaddDockingVector, pickpublic static final VertexShape DEFAULT
public AutosizeEllipseShape(float border,
float stretchY)
border - the (non-visualized) border which is to be enveloped additionally to the contentstretchY - A scaling factor along the Y-axispublic void getAutosizeScale(double innerWidth,
double innerHeight,
DimensionD outScale)
VertexAutosizeShapegetAutosizeScale in class VertexAutosizeShapeinnerWidth - the normalized width of the inner bounding boxinnerHeight - the normalized height of the inner bounding boxoutScale - the target to write the scale intopublic 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 factor