Package nl.colorize.multimedialib.stage
Class Primitive
java.lang.Object
nl.colorize.multimedialib.stage.Primitive
Draws a graphical primitive to the screen. The on-screen position of the
primitive is determined by both the coordinates in the original shape and
by the primitive's position.
Primitive
s have a stroke property, but its value is only used if
the instance describes an outline shape. The stroke property has no effect
for filled shapes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Returns theDisplayListLocation
attached to this graphic, which is used by the renderer to determine how this graphic should be drawn.getShape()
Returns the smallest possible rectangle that can contain this graphic, based on its current position and size.float
void
void
void
setStroke
(float stroke) toString()
void
update
(float deltaTime) Updates this object for the current frame.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.colorize.multimedialib.stage.Graphic2D
getGlobalTransform, getTransform, hitTest, setPosition
-
Constructor Details
-
Primitive
-
Primitive
-
-
Method Details
-
update
public void update(float deltaTime) Description copied from interface:Updatable
Updates this object for the current frame.deltaTime
indicates the elapsed time since the last frame update, in seconds. -
getStageBounds
Description copied from interface:Graphic2D
Returns the smallest possible rectangle that can contain this graphic, based on its current position and size. The returned coordinates are relative to the stage, not relative to the graphic's parent.- Specified by:
getStageBounds
in interfaceGraphic2D
-
toString
-
getLocation
Description copied from interface:Graphic2D
Returns theDisplayListLocation
attached to this graphic, which is used by the renderer to determine how this graphic should be drawn.- Specified by:
getLocation
in interfaceGraphic2D
-
getShape
-
getColor
-
getStroke
public float getStroke() -
setShape
-
setColor
-
setStroke
public void setStroke(float stroke)
-