|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfunworld.WorldImage
public abstract class WorldImage
The parent class for all images drawn by the
when drawing on its
World.Canvas
| Field Summary | |
|---|---|
java.awt.Color |
color
|
geometry.Posn |
pinhole
|
| Constructor Summary | |
|---|---|
WorldImage(geometry.Posn pinhole,
java.awt.Color color)
Every image has a pinhole ( Posn) and a color
(Color). |
|
WorldImage(geometry.Posn pinhole,
colors.IColor color)
A convenience constructor to supply the color in the form of . |
|
| Method Summary | |
|---|---|
abstract int |
getHeight()
Produce the height of this image |
abstract int |
getWidth()
Produce the width of this image |
abstract WorldImage |
movePinhole(int dx,
int dy)
Produce the image with the pinhole moved by the given (dx, dy) |
abstract WorldImage |
moveTo(geometry.Posn p)
Produce the image with the pinhole moved to the given location |
WorldImage |
overlayImages(WorldImage... args)
A convenience method that allows us to combine several images into one on top of this image without the need to explicitly construct |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public geometry.Posn pinhole
public java.awt.Color color
| Constructor Detail |
|---|
public WorldImage(geometry.Posn pinhole,
java.awt.Color color)
Posn) and a color
(Color). The color for the
images derived from image files, or constructed by a combination
of several images is set to Color.white and ignored
in drawing the images.
pinhole - the pinhole location for this imagecolor - the color for this image
public WorldImage(geometry.Posn pinhole,
colors.IColor color)
IColor.
pinhole - the pinhole location for this imagecolor - the color for this image| Method Detail |
|---|
public abstract WorldImage movePinhole(int dx,
int dy)
dx - the horizontal offsetdy - the vertical offsetpublic abstract WorldImage moveTo(geometry.Posn p)
p - the given locationpublic WorldImage overlayImages(WorldImage... args)
A convenience method that allows us to combine several images into
one on top of this image without the need to explicitly construct
OverlayImages
The pinhole is placed in the middle of all overlayed images.
args - an arbitrarily long list of
WorldImage to add to this image
public abstract int getWidth()
public abstract int getHeight()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||