org.jrabbit.base.graphics.skins.primitive
Class PrimitiveSkin

java.lang.Object
  extended by org.jrabbit.base.graphics.skins.primitive.PrimitiveSkin
All Implemented Interfaces:
Renderable, Skin, Dimensioned, Vertexed
Direct Known Subclasses:
CircleSkin, PolygonSkin, RegPolygonSkin, SquareSkin, TriangleSkin

public abstract class PrimitiveSkin
extends java.lang.Object
implements Skin, Vertexed

PrimitiveSkin is the base class for any Skin intended to draw a geometric shape. By default, a PrimitiveSkin has a width and height of 1 pixel; it should be scaled up if it needs to be larger (as is likely the case). A PrimitiveSkin is also expected to be a Vertexed object; this allows objects to directly interpret the geometry data behind the PrimitiveSkin.

Author:
Chris Molini

Constructor Summary
PrimitiveSkin()
           
 
Method Summary
 float height()
          By default, a PrimitiveSkin has a width and height of 1; it should be scaled to have larger dimensions.
 float width()
          By default, a PrimitiveSkin has a width and height of 1; it should be scaled to have larger dimensions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jrabbit.base.core.types.Renderable
render
 
Methods inherited from interface org.jrabbit.base.math.geom.Vertexed
vertices
 

Constructor Detail

PrimitiveSkin

public PrimitiveSkin()
Method Detail

width

public float width()
By default, a PrimitiveSkin has a width and height of 1; it should be scaled to have larger dimensions.

Specified by:
width in interface Dimensioned
Returns:
The base width of the PrimitiveSkin.

height

public float height()
By default, a PrimitiveSkin has a width and height of 1; it should be scaled to have larger dimensions.

Specified by:
height in interface Dimensioned
Returns:
The base height of the PrimitiveSkin.