cmsc420.drawing
Interface Drawable2D
public interface Drawable2D
The Drawable2D interface specifies that its implementors can
portray themselves in 2D form via an instance of CanvasPlus.
Implementors should add the appropriate geometry into the CanvasPlus
and exit; they should not call its CanvasPlus.draw()
method.
Warning: implementors must not invoke
CanvasPlus.add(Drawable2D)
by passing this as a parameter.
The implementation of CanvasPlus.add(Drawable2D)
itself calls the
draw() method as specified in this interface, thereby creating
circular method invocation.
- Version:
- 1.0
- Author:
- Evan Machusak (emach@cs.umd.edu)
Method Summary |
void |
draw(CanvasPlus cp)
Draws this object into the 2D scene specified by the given
CanvasPlus. |
draw
void draw(CanvasPlus cp)
- Draws this object into the 2D scene specified by the given
CanvasPlus.
- Parameters:
cp
- the CanvasPlus to draw this object into- Since:
- 1.0