|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.geom.Shape
org.newdawn.slick.geom.Rectangle
org.newdawn.slick.geom.RoundedRectangle
public class RoundedRectangle
Class to create rounded rectangles with.
| Field Summary | |
|---|---|
static int |
ALL
Indicates the all cornders should be rounded |
static int |
BOTTOM_LEFT
Indicates the bottom left corner should be rounded |
static int |
BOTTOM_RIGHT
Indicates the bottom right corner should be rounded |
static int |
TOP_LEFT
Indicates the top left corner should be rounded |
static int |
TOP_RIGHT
Indicates the top right corner should be rounded |
| Fields inherited from class org.newdawn.slick.geom.Rectangle |
|---|
height, width |
| Fields inherited from class org.newdawn.slick.geom.Shape |
|---|
boundingCircleRadius, center, maxX, maxY, minX, minY, points, pointsDirty, trianglesDirty, tris, x, y |
| Constructor Summary | |
|---|---|
RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius)
Construct a rectangle with rounded corners. |
|
RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius,
int segmentCount)
Construct a rectangle with rounded corners. |
|
RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius,
int segmentCount,
int cornerFlags)
Construct a rectangle with rounded corners. |
|
| Method Summary | |
|---|---|
protected void |
createPoints()
Subclasses implement this to create the points of the shape. |
float |
getCornerRadius()
Get the radius for each corner. |
float |
getHeight()
Get the height of this rectangle. |
float |
getWidth()
Get the width of this rectangle. |
void |
setCornerRadius(float cornerRadius)
Set the radius for each corner. |
void |
setHeight(float height)
Set the height of this rectangle. |
void |
setWidth(float width)
Set the width of this rectangle. |
Shape |
transform(Transform transform)
Apply a transformation and return a new shape. |
| Methods inherited from class org.newdawn.slick.geom.Rectangle |
|---|
contains, contains, grow, intersects, scaleGrow, setBounds, setBounds, setSize, toString |
| Methods inherited from class org.newdawn.slick.geom.Shape |
|---|
calculateRadius, calculateTriangles, checkPoints, closed, contains, findCenter, getBoundingCircleRadius, getCenter, getCenterX, getCenterY, getLocation, getMaxX, getMaxY, getMinX, getMinY, getNormal, getPoint, getPointCount, getPoints, getTriangles, getX, getY, hasVertex, includes, increaseTriangulation, indexOf, preCache, prune, setCenterX, setCenterY, setLocation, setLocation, setX, setY, subtract, union |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TOP_LEFT
public static final int TOP_RIGHT
public static final int BOTTOM_RIGHT
public static final int BOTTOM_LEFT
public static final int ALL
| Constructor Detail |
|---|
public RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius)
x - The x position of the rectangle.y - The y position of the rectangle.width - The width of the rectangle.height - The hieght of the rectangle.cornerRadius - The radius to use for the arc in each corner.
public RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius,
int segmentCount)
x - The x position of the rectangle.y - The y position of the rectangle.width - The width of the rectangle.height - The hieght of the rectangle.cornerRadius - The radius to use for the arc in each corner.segmentCount - The number of segments to use to draw each corner arc.
public RoundedRectangle(float x,
float y,
float width,
float height,
float cornerRadius,
int segmentCount,
int cornerFlags)
x - The x position of the rectangle.y - The y position of the rectangle.width - The width of the rectangle.height - The hieght of the rectangle.cornerRadius - The radius to use for the arc in each corner.segmentCount - The number of segments to use to draw each corner arc.cornerFlags - Indicates which corners should be rounded| Method Detail |
|---|
public float getCornerRadius()
public void setCornerRadius(float cornerRadius)
cornerRadius - The radius for each corner to set.public float getHeight()
getHeight in class Rectanglepublic void setHeight(float height)
setHeight in class Rectangleheight - The height to set.public float getWidth()
getWidth in class Rectanglepublic void setWidth(float width)
setWidth in class Rectanglewidth - The width to set.protected void createPoints()
Shape
createPoints in class Rectanglepublic Shape transform(Transform transform)
transform in class Rectangletransform - The transform to be applied
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||