public interface Drawable
| Modifier and Type | Method and Description |
|---|---|
void |
ellipse(float x,
float y,
float w,
float h)
Should draw an ellipse using the given location and dimensions.
|
void |
line(float x1,
float y1,
float x2,
float y2)
Should draw a 2D line between the given coordinate pairs.
|
void |
point(float x,
float y)
Should draw a 2D point at the given coordinates.
|
void |
polyLine(float[] xCoords,
float[] yCoords)
Should draw a complex line that links the given coordinates.
|
void |
rect(float x,
float y,
float w,
float h)
Should draw a rectangle using the given location and dimensions.
|
void |
shape(float[] xCoords,
float[] yCoords)
Should draw a closed polygon shape based on the given arrays of vertices.
|
void |
triangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Should draw a triangle through the three pairs of coordinates.
|
void point(float x,
float y)
x - x coordinate of the point.y - y coordinate of the point.void line(float x1,
float y1,
float x2,
float y2)
x1 - x coordinate of the start of the line.y1 - y coordinate of the start of the line.x2 - x coordinate of the end of the line.y2 - y coordinate of the end of the line.void rect(float x,
float y,
float w,
float h)
x - x coordinate of the rectangle positiony - y coordinate of the rectangle position.w - Width of the rectangle (but see modifications possible with rectMode())h - Height of the rectangle (but see modifications possible with rectMode())void ellipse(float x,
float y,
float w,
float h)
x - x coordinate of the ellipse's positiony - y coordinate of the ellipse's position.w - Width of the ellipse (but see modifications possible with ellipseMode())h - Height of the ellipse (but see modifications possible with ellipseMode())void triangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
x1 - x coordinate of the first triangle vertex.y1 - y coordinate of the first triangle vertex.x2 - x coordinate of the second triangle vertex.y2 - y coordinate of the second triangle vertex.x3 - x coordinate of the third triangle vertex.y3 - y coordinate of the third triangle vertex.void polyLine(float[] xCoords,
float[] yCoords)
xCoords - x coordinates of the line.yCoords - y coordinates of the line.void shape(float[] xCoords,
float[] yCoords)
xCoords - x coordinates of the shape.yCoords - y coordinates of the shape.