jhplot.shapes
Class Ellipse
- java.lang.Object
-
- jhplot.shapes.HShape
-
- jhplot.shapes.Ellipse
-
- All Implemented Interfaces:
- java.io.Serializable
public class Ellipse extends HShape
Draw an ellipse in the USER coordinate system usingHPlot
canvas.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Ellipse(double X1, double Y1, double r1, double r2)
Create an ellipse using the default stroke and the colorEllipse(double X1, double Y1, double r1, double r2, java.awt.Stroke strock, java.awt.Color color)
Create an ellipse with given semimajor and semiminor axes, centered on (x, y).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
doc()
Show online documentation.double
getRadiusX()
Get the radius in X.double
getRadiusY()
Get the radius in Y.java.lang.String
toString()
Show it as a string-
Methods inherited from class jhplot.shapes.HShape
contains, getColor, getFill, getPosition, getPositionCoordinate, getRotation, getScaledPosition, getSettings, getStroke, getTransparency, getWhoAm, setColor, setDashed, setDotted, setFill, setPosCoord, setPositionCoordinate, setRotation, setStroke, setTransparency, setWhoAm, updateSettings
-
-
-
-
Constructor Detail
-
Ellipse
public Ellipse(double X1, double Y1, double r1, double r2, java.awt.Stroke strock, java.awt.Color color)
Create an ellipse with given semimajor and semiminor axes, centered on (x, y). Major axis: The longest diameter of an ellipse. Minor axis: The shortest diameter of an ellipse. Semimajor is major/2.- Parameters:
X1
- X center positionY1
- Y center positionr1
- radius in X, or semimajor axis of the ellipse (major divided by 2).r2
- radius in Y, or the semiminor axis of the ellipse (minor divided by 2).strock
- Strokecolor
- Color
-
Ellipse
public Ellipse(double X1, double Y1, double r1, double r2)
Create an ellipse using the default stroke and the color- Parameters:
X1
- X centerY1
- Y centerr1
- radius in X, or semimajor axis of the ellipse (major divided by 2).r2
- radius in Y, or the semiminor axis of the ellipse (minor divided by 2).
-
-
Method Detail
-
getRadiusX
public double getRadiusX()
Get the radius in X. This is semimajor size (major/2).- Returns:
- radius in X or semimajor size.
-
getRadiusY
public double getRadiusY()
Get the radius in Y. This is semiminor size (major/2).- Returns:
- radius in Y or semiminor.
-
toString
public java.lang.String toString()
Show it as a string- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of this object
-
doc
public void doc()
Show online documentation.
-
-
DMelt 3.0 © DataMelt by jWork.ORG