|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.gameEngine.graphics.Texture
vooga.gameEngine.graphics.ShapeTexture
public class ShapeTexture
Class ShapeTexture
represents a shape that can be rendered on
screen. Any shape supported by Java can be used. The dimension and position
of the shape will be extracted.
Constructor Summary | |
---|---|
ShapeTexture(java.awt.Shape s,
java.awt.Color fillColor)
Creates a new ShapeTexture from given shape with a specified
fill color. |
Method Summary | |
---|---|
void |
createShape(java.awt.Shape s)
Sets the representation of this Texture to the specified
shape. |
protected java.awt.Shape |
makeShape()
Method for a Texture subclass to supply a Shape
representing their bounding box. |
void |
setFillColor(java.awt.Color fillColor)
Sets the color that will be used to fill the shape. |
void |
setShape(java.awt.Shape s)
|
Methods inherited from class vooga.gameEngine.graphics.Texture |
---|
getArea, getIndex, getPosition, getRotation, getShape, getSize, paintComponent, setImage, setIndex, setPosition, setRotation, setSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeTexture(java.awt.Shape s, java.awt.Color fillColor)
ShapeTexture
from given shape with a specified
fill color.
s
- is the Shape
to be renderedfillColor
- is the color that will be used to fill the shapeMethod Detail |
---|
public void createShape(java.awt.Shape s)
Texture
to the specified
shape. The dimensions and position of this Texture
will be
extracted from the shape.
s
- is the Shape
to be renderedpublic void setShape(java.awt.Shape s)
public void setFillColor(java.awt.Color fillColor)
fillColor
- is the color that will be used to fill the shapeprotected java.awt.Shape makeShape()
Texture
Texture
subclass to supply a Shape
representing their bounding box. For efficiency, an object should cache
their Shape
if possible.
makeShape
in class Texture
Shape
representing the boundaries of the object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |