[4595] in java-interest
Re: missing functionality : drawImage != BitBlt/StretchBlt
daemon@ATHENA.MIT.EDU (Jim Graham)
Mon Jan 8 18:08:12 1996
Date: Mon, 8 Jan 1996 13:35:31 -0800
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, jonl@sealevelsoftware.com
Hi Jonathan,
> 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.
What's wrong with Component.repaint(x,y,w,h) to force an update to a
rectangular region of your Component/Applet?
> 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:
Use clipping to restrict the drawImage to only the rectangle you want.
In fact, if you use the repaint method to repaint only a given rectangle
of your applet, then when your update method is called back, it will
already have the clip of the Graphics object set to the region of
interest so all you have to do is the full drawImage and only the
needed rectangle will be rendered...
...jim
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com