[4576] in java-interest

home help back first fref pref prev next nref lref last post

missing functionality : drawImage != BitBlt/StretchBlt

daemon@ATHENA.MIT.EDU (Jonathan Locke)
Sun Jan 7 17:22:07 1996

Date: Sun, 7 Jan 1996 10:33:21 -0800 (PST)
From: Jonathan Locke <jonl@sealevelsoftware.com>
To: java <java-interest@java.sun.com>


ok, so i recently discovered i couldn't expose/InvalidateRect a rectangle
in my applet... so i decided to do all the damaged rectangle management 
myself.  i get all done with it and i'm ready to blt the updates of each
exposed area to the screen when i discover... you can't do it with AWT! 
there don't seem to be enough parameters to draw image.  with drawImage, your 
destination is implicitly the Graphics you are using and you can specify the
x, y, width and height of your destination rectangle, *but* you can't specify
the subrectangle of the image you want to Blt. you have to Blt the whole 
image or nothing at all.  we need two new functions:

public abstract boolean Graphics.drawImage  // Same as BitBlt
(
 Image img, int xDest, int yDest, int widthDest, int heightDest,
 int xSource, int ySource, ImageObserver observer
);

public abstract boolean Graphics.drawImage  // Same as StretchBlt
(
 Image img, int xDest, int yDest, int widthDest, int heightDest,
 int xSource, int ySource, widthSource, widthDest, ImageObserver observer
);

and actually, it *might* be better if Image img was a Graphics instead.
i haven't thought too much about that part though.

	J

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post