public interface RShape
| Modifier and Type | Method and Description |
|---|---|
RShape |
copy()
Builds and returns a true copy of this shape.
|
RShape |
draw()
Draws the shape-
|
processing.core.PVector |
get(int i)
Returns the coordinate with index i.
|
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.
|
java.lang.Float |
getRotation()
Returns the angle of shape.
|
processing.core.PVector |
getStart()
Returns the start coordinate for this shape.
|
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.
|
RShape |
rotate(float a)
Turns the shape through the given angle.
|
RShape |
rotate(processing.core.PVector c,
float a)
Turns the shape through the given angle.
|
RShape |
scale(float s)
Scale the shape by the given scaling factor.
|
RShape |
scale(processing.core.PVector p,
float s)
Scale the shape by the given scaling factor.
|
RShape |
setLocation(float x,
float y)
Translates the shape to the given location.
|
RShape |
setRotation(float a)
Rotates the shape to the given angle (past rotations will be overridden).
|
RShape |
setRotation(processing.core.PVector c,
float a)
Rotates the shape to the given angle (past rotations will be overridden).
|
RShape |
setX(float x)
Translates the shape to the given x-location.
|
RShape |
setY(float y)
Translates the shape to the given y-location.
|
int |
size()
Returns the number of coordinates for this shape.
|
RShape |
translate(float x,
float y)
Translates the coordinates by the given parameters x, y ( "moves
the shape by x, y").
|
int size()
for (int i = 0; i < myShape.size(); i++) {
PVector p = myShape.get(i);
}
processing.core.PVector get(int i)
for (int i = 0; i < myShape.size(); i++) {
PVector p = myShape.get(i);
}
i - The index of a coordinates of this shape.processing.core.PVector getStart()
Rect getBoundingBox()
processing.core.PVector getCenter()
java.lang.Float getX()
java.lang.Float getY()
processing.core.PVector[] getCoordinates()
java.lang.Float getRotation()
RShape setRotation(float a)
a - The target rotation angle.RShape setRotation(processing.core.PVector c, float a)
c - The rotation center.a - The target rotation angle.RShape setX(float x)
x - The new x-position of this shape.RShape setY(float y)
y - The new y-position of this shape.RShape setLocation(float x, float y)
x - The new x-position of this shape.y - The new y-position of this shape.RShape copy()
RShape translate(float x, float y)
x - The horizontal translation.y - The vertical translation.RShape rotate(float a)
a - The rotation angle.RShape rotate(processing.core.PVector c, float a)
c - The rotation center.a - The rotation angle.RShape scale(float s)
s - The scaling factor (> 0).RShape scale(processing.core.PVector p, float s)
p - The scaling center.s - The scaling factor (> 0).RShape draw()