[646] in java-interest
Re: novice DIBitmap question
daemon@ATHENA.MIT.EDU (Jim Graham)
Mon Jul 10 21:10:07 1995
Date: Mon, 10 Jul 1995 17:52:50 -0700
From: flar@bendenweyr.Eng.Sun.COM (Jim Graham)
To: java-interest@java.Eng.Sun.COM, masek@GEOLOGY.GEO.CORNELL.EDU
> This is a fairly simple problem, but I can't seem to get it to
> work...Having created a valid DIBitmap object, how do I get it to display
> on the screen?
Unfortunately if you want to create an Image from a DIBitmap object
you must violate the Alpha portability rules and refer to your
"item.parent", as in:
im = item.parent.createImage(myBitMap);
Then in your paint routine, do:
void paint(Graphics g) {
...
g.drawImage(im, x, y);
...
}
This will improve in Beta, but there may be some break in compatibility
in these interfaces (referring to your Applet's DisplayItem is a definate
no-no, but the only way to create Images from DIBitmaps calculated on
the fly by your Applet in Alpha unfortunately).
...jim
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com