> the are not changing their y position.
just tried your code, no images, just drawing a 10x10 rectangle (no reversing),
and there was no problem with the y position changing, but to be honest with you,
this is basic debugging - to
test the calculations are working, you should/must be
able to work this basic stuff out for yourself.
your problem is probably here
else g.drawImage (fishImg,x, 0, 0, y, 0, 0, x, y,null);
this is the method signature
public abstract boolean drawImage(Image img,int dx1,int dy1,int dx2,int dy2,int sx1,int sy1,int sx2,int sy2,ImageObserver observer)
and the explanation, from the docs:
img - the specified image to be drawn. This method does nothing if img is null.
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
observer - object to be notified as more of the image is scaled and converted.
the ..1's are the top left corner, the ..2's are the bottom right corner,
so you should be able to work out the correct code for drawImage(..)