|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavalib.worldimages.AImage
javalib.worldimages.OverlayImage
public class OverlayImage
The overlay of two images.
Field Summary |
---|
Fields inherited from interface javalib.worldimages.WorldImage |
---|
LOOKS_SAME |
Method Summary | |
---|---|
void |
draw(Graphics2D g)
Draw this image in the provided Graphics2D context. |
boolean |
equals(Object other)
Is this the same as another WorldImage, as expression trees? Define this at every level that has instance variables. |
WorldImage |
getBack()
Getter for the background part of an Overlay. |
int |
getBottom()
Produce the bottom of the bounding box. |
WorldImage |
getFront()
Getter for the foreground part of an Overlay. |
int |
getHeight()
Retrieve the height of the image, in pixels. |
int |
getLeft()
Getter for the left edge of the bounding box. |
int |
getRight()
Produce the bottom of the bounding box. |
int |
getTop()
Getter for the top of the bounding box. |
int |
getWidth()
Retrieve the width of the image, in pixels. |
int |
hashCode()
Get a hash code for the WorldImage. |
(package private) static OverlayImage |
make(WorldImage back,
WorldImage front)
Pseudo-constructor |
String |
toIndentedString(String indent)
Produce a String that represents this image, indented by the given indent . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void draw(Graphics2D g)
WorldImage
Graphics2D
context.
g
- the provided Graphics2D
contextpublic boolean equals(Object other)
WorldImage
equals
in interface WorldImage
equals
in class AImage
other
- the object to compare with this
public WorldImage getBack()
public int getBottom()
WorldImage
public WorldImage getFront()
public int getHeight()
AImage
getHeight
in interface WorldImage
getHeight
in class AImage
public int getLeft()
AImage
getLeft
in interface WorldImage
getLeft
in class AImage
public int getRight()
WorldImage
public int getTop()
AImage
getTop
in interface WorldImage
getTop
in class AImage
public int getWidth()
AImage
getWidth
in interface WorldImage
getWidth
in class AImage
public int hashCode()
WorldImage
hashCode
in interface WorldImage
hashCode
in class Object
static OverlayImage make(WorldImage back, WorldImage front)
back
- front
- public String toIndentedString(String indent)
WorldImage
String
that represents this image, indented by the given indent
.
Define this in all concrete subclasses.
Convention: The result of toIndentedString() will neither begin nor end with a newline; the specified indent will immediately follow each internal newline.
indent
- the given prefix representing the desired indentation
String
representation of this image
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |