| Modifier and Type | Field and Description |
|---|---|
protected processing.core.PApplet |
parent
The PApplet object for drawing thinks.
|
| Constructor and Description |
|---|
Ellipse(processing.core.PApplet parent,
float x,
float y,
float width,
float height)
Builds a new ellipse with the given parameters.
|
Ellipse(processing.core.PApplet parent,
processing.core.PVector[] coordinates)
Builds a shape with the given coordinates.
|
Ellipse(processing.core.PApplet parent,
processing.core.PVector p,
processing.core.PVector dimension)
Builds a new ellipse with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeMinMax()
Forces to calculate the bounds of this shape and store them.
|
Ellipse |
copy()
Builds and returns a true copy of this shape.
|
Ellipse |
draw()
Draws the shape-
|
processing.core.PVector |
get(int i)
Returns the coordinate with index i.
|
float |
getArea()
Returns the area.
|
Rect |
getBoundingBox()
Returns the bounding box of this shape (will mark the bounds of the
shape).
|
processing.core.PVector |
getCenter()
Returns the center coordinate of this shape.
|
processing.core.PVector[] |
getCoordinates()
Returns all coordinates that defines this shape.
|
float |
getHeight()
Returns the height of the ellipse.
|
java.lang.Float |
getRotation()
Returns the angle of shape.
|
processing.core.PVector |
getStart()
Returns the start coordinate for this shape.
|
float |
getWidth()
Returns the width of the ellipse.
|
java.lang.Float |
getX()
Returns the x-position of the start coordinate for this shape.
|
java.lang.Float |
getY()
Returns the y-position of the start coordinate for this shape.
|
Ellipse |
rotate(float angle)
Turns the shape through the given angle.
|
Ellipse |
rotate(processing.core.PVector rotationCenter,
float angle)
Turns the shape through the given angle.
|
Ellipse |
scale(float scale)
Scale the shape by the given scaling factor.
|
Ellipse |
scale(processing.core.PVector scaleCenter,
float scale)
Scale the shape by the given scaling factor.
|
Ellipse |
scale(processing.core.PVector scaleCenter,
float scaleX,
float scaleY)
Scale the shape by the given scaling factors.
|
Ellipse |
setDimension(float width,
float height)
Sets the width and height of the ellipse.
|
Ellipse |
setDimension(processing.core.PVector center,
float width,
float height)
Sets the width and height of the ellipse.
|
Ellipse |
setHeight(float height)
Sets the height of the ellipse.
|
Ellipse |
setHeight(processing.core.PVector center,
float height)
Sets the height of the ellipse.
|
Ellipse |
setLocation(float x,
float y)
Translates the shape to the given location.
|
Ellipse |
setRotation(float angle)
Rotates the shape to the given angle (past rotations will be overridden).
|
Ellipse |
setRotation(processing.core.PVector rotationCenter,
float angle)
Rotates the shape to the given angle (past rotations will be overridden).
|
Ellipse |
setWidth(float width)
Sets the width of the ellipse.
|
Ellipse |
setWidth(processing.core.PVector center,
float width)
Sets the width of the ellipse.
|
Ellipse |
setX(float x)
Translates the shape to the given x-location.
|
Ellipse |
setY(float y)
Translates the shape to the given y-location.
|
int |
size()
Returns the number of coordinates for this shape.
|
Ellipse |
translate(float x,
float y)
Translates the coordinates by the given parameters x, y ( "moves
the shape by x, y").
|
public Ellipse(processing.core.PApplet parent,
processing.core.PVector[] coordinates)
parent - The PApplet object.coordinates - The coordinates for ellipse (corners).public Ellipse(processing.core.PApplet parent,
float x,
float y,
float width,
float height)
parent - The PApplet object.x - The center-x-location of the ellipse.y - The center-y-location of the ellipse.width - The width the rectangle.height - The height the rectangle.public Ellipse(processing.core.PApplet parent,
processing.core.PVector p,
processing.core.PVector dimension)
parent - The PApplet object.p - The center-location of the ellipse.dimension - The width and height of the ellipse.public int size()
RShape
for (int i = 0; i < myShape.size(); i++) {
PVector p = myShape.get(i);
}
public processing.core.PVector get(int i)
RShape
for (int i = 0; i < myShape.size(); i++) {
PVector p = myShape.get(i);
}
public processing.core.PVector getStart()
RShapepublic Rect getBoundingBox()
RShapegetBoundingBox in interface RShapepublic processing.core.PVector getCenter()
RShapepublic java.lang.Float getX()
RShapepublic java.lang.Float getY()
RShapepublic float getWidth()
public float getHeight()
public float getArea()
public processing.core.PVector[] getCoordinates()
RShapegetCoordinates in interface RShapepublic java.lang.Float getRotation()
RShapegetRotation in interface RShapepublic Ellipse copy()
RShapepublic Ellipse setRotation(float angle)
RShapesetRotation in interface RShapeangle - The target rotation angle.public Ellipse setRotation(processing.core.PVector rotationCenter, float angle)
RShapesetRotation in interface RShaperotationCenter - The rotation center.angle - The target rotation angle.public Ellipse setDimension(float width, float height)
width - The new width of the ellipse (> 0).height - The new height of the ellipse (> 0).public Ellipse setDimension(processing.core.PVector center, float width, float height)
center - The control point for the scaling.width - The new width of the ellipse (> 0).height - The new height of the ellipse (> 0).public Ellipse setWidth(float width)
width - The new width of the rectangle (> 0).public Ellipse setWidth(processing.core.PVector center, float width)
center - The control point for the scaling.width - The new width of the ellipse (> 0).public Ellipse setHeight(float height)
height - The new height of the ellipse (> 0).public Ellipse setHeight(processing.core.PVector center, float height)
center - The control point for the scaling.height - The new height of the ellipse (> 0).public Ellipse setX(float x)
RShapepublic Ellipse setY(float y)
RShapepublic Ellipse setLocation(float x, float y)
RShapesetLocation in interface RShapex - The new x-position of this shape.y - The new y-position of this shape.public Ellipse translate(float x, float y)
RShapepublic Ellipse rotate(float angle)
RShapepublic Ellipse rotate(processing.core.PVector rotationCenter, float angle)
RShapepublic Ellipse scale(float scale)
RShapepublic Ellipse scale(processing.core.PVector scaleCenter, float scale)
RShapepublic Ellipse scale(processing.core.PVector scaleCenter, float scaleX, float scaleY)
scaleCenter - The scaling center.scaleX - The horizontal scaling.scaleY - The vertical scaling.public void computeMinMax()