|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unifreiburg.twodeedoo.view.ImagePart
public class ImagePart
A rectangular part of a BufferedImage
. Can draw itself
on a Graphics
.
Constructor Summary | |
---|---|
ImagePart(java.awt.image.BufferedImage image)
Take the whole image. |
|
ImagePart(java.awt.image.BufferedImage image,
int ulCornerX,
int ulCornerY,
int width,
int height)
Create from image and some coordinates inside it. |
Method Summary | |
---|---|
void |
paint(java.awt.Graphics g,
int x,
int y)
Paint. |
java.lang.String |
toString()
nice string representation |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ImagePart(java.awt.image.BufferedImage image, int ulCornerX, int ulCornerY, int width, int height)
image
- a BufferedImage
as obtained from e.g. ImageIO.read(java.io.File)
ulCornerX
- pixel coordinates of upper left corner of intersting part in imageulCornerY
- width
- width in pixel of interesting partheight
- height in pixel of interesting part.public ImagePart(java.awt.image.BufferedImage image)
image
- some image all of which will be painted.Method Detail |
---|
public void paint(java.awt.Graphics g, int x, int y)
paint
in interface IBrush
g
- the Graphics
x
- x coordinate (screen units)y
- y coordinate (screen units)public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |