From: Egon W. <eg...@us...> - 2005-11-27 22:02:39
|
cc: Sven_M Miguel, I'm trying to get Jmol running with open source virtual machines [1], and=20 while the application does not work yet, the renderer itself does, using th= e=20 Swing3D class... Using the Awt3D, however, does not work. I've been talking to Sven_M on irc= =20 (#classpath), and he thinks it has to do with the transparency the Gtk=20 backend uses. That is, Component.createImage() returns a=20 gnu.java.awt.peer.gtk.GtkImage, which uses RGBA instead of RGB, and thus=20 things get drawn transparent. Added a line in Awt3D.java makes at least a black background again: public void startProduction(ImageConsumer ic) { if (this.ic !=3D ic) { this.ic =3D ic; ic.setDimensions(windowWidth, windowHeight); ic.setHints(ImageConsumer.TOPDOWNLEFTRIGHT | ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEPASS); } for(int i=3D0;i<pBuffer.length;i++) pBuffer[i] |=3D 0xFF000000; // RGBA= thingy ic.setPixels(0, 0, windowWidth, windowHeight, colorModelRGB, pBuffer, 0, windowWidth); ic.imageComplete(ImageConsumer.SINGLEFRAMEDONE); } But in the Integration.java the water is gone... Sven_M also noted that we should use: Awt3D(Component component) { this.component =3D component; // old code: colorModelRGB =3D ColorModel.getRGBdefault(); colorModelRGB =3D Toolkit.getDefaultToolkit().getColorModel(); } But that did not improve it too. It seems that the problem is the transparency. Miguel, do you have an idea = why=20 the water does not get drawn? Below is the full IRC log. Egon 1.http://chem-bla-ics.blogspot.com/2005/11/open-source-swing-jmol-renderer-= runs.html [2005-11-27 21:29:38] <egonw_> mjw: I got the Jmol renderer working with ja= mvm [2005-11-27 21:29:42] <theBohemia1> gcj-crew: ping [2005-11-27 21:29:48] *** theBohemia1 is now known as theBohemian. [2005-11-27 21:29:55] <egonw_> mjw: better -> it just works... (did not hav= e=20 to do much) [2005-11-27 21:30:00] <mjw> egonw_, Woot! [2005-11-27 21:30:01] <egonw_> it's just very slow [2005-11-27 21:30:04] <theBohemian> mjw: hi [2005-11-27 21:30:05] <mjw> screenshot! screenshot! [2005-11-27 21:30:13] <egonw_> mjw: mind... it's not the Jmol application... [2005-11-27 21:30:16] <egonw_> just the renderer [2005-11-27 21:30:22] <theBohemian> mjw: is there an ant task that does bc= =20 compilation nicely? [2005-11-27 21:30:37] <egonw_> mjw: will post a screenshot... [2005-11-27 21:30:53] <mjw> egonw_, jamvm is not the faster engine around. = Try=20 kaffe, cacao or natively compile it with gcj for a nice speed boost. [2005-11-27 21:30:54] <egonw_> flickr.something... that's a place where one= =20 can upload images, right? [2005-11-27 21:30:58] <theBohemian> mjw: something more sophisticated than= =20 calling exec [2005-11-27 21:31:24] <mjw> theBohemian, I never use ant to be honest. [2005-11-27 21:31:24] <egonw_> kaffe gives error: [2005-11-27 21:31:30] <egonw_> java.lang.ClassCastException: can't cast=20 `java/awt/image/BufferedImage' to `gnu/java/awt/peer/gtk/GtkImage' [2005-11-27 21:31:32] <theBohemian> mjw: :( [2005-11-27 21:31:35] <mjw> theBohemian, But I believe green made something= =2E=20 Let me look it up. [2005-11-27 21:31:38] <egonw_> there a -D option for that right? [2005-11-27 21:32:03] <mjw> egonw_, Maybe=20 =2DDgnu.java.awt.peer.gtk.Graphics=3DGraphics2D [2005-11-27 21:32:07] <theBohemian> mjw: thanks [2005-11-27 21:32:11] <mjw> If you have compiled with cairo support. [2005-11-27 21:32:26] <Sven_M> Yeah. [2005-11-27 21:32:31] <theBohemian> egonw_: try a newer cp-snapshot for kaf= fe [2005-11-27 21:32:33] <egonw_> mjw: no, that does not help... [2005-11-27 21:32:45] <theBohemian> egonw_: mjw fixed this classcast thing = a=20 few days ago [2005-11-27 21:32:46] <mjw> Also you might need kaffe CVS since it got just= =20 upgraded today with the latest GNU Classpath. [2005-11-27 21:32:54] <egonw_> ack [2005-11-27 21:33:07] <Sven_M> mjw: Where was the cast? [2005-11-27 21:33:15] <mjw> http://spindazzle.org/gcjlib/ [2005-11-27 21:33:20] <mjw> Sven_M, cast? [2005-11-27 21:33:27] <Sven_M> mjw: You fixed a GtkImage cast? [2005-11-27 21:33:34] <mjw> Maybe [2005-11-27 21:33:37] <mjw> I don't remember. [2005-11-27 21:33:40] <Sven_M> That shouldn't happen. [2005-11-27 21:33:42] <Sven_M> theBohemian: ? [2005-11-27 21:33:43] <mjw> See the patches list if I did :) [2005-11-27 21:33:54] <guilhem> egonw_: yes try the latest kaffe CVS. [2005-11-27 21:34:02] <Sven_M> Last time I worked on GtkImage there were no= =20 unchecked casts to GtkImage in the Classpath code. [2005-11-27 21:34:10] <egonw_> guilhem: is there a kubuntu breezy deb for=20 that? [2005-11-27 21:34:16] <mjw> theBohemian, http://spindazzle.org/gcjlib/ is w= hat=20 you are looking for I believe. [2005-11-27 21:34:31] <guilhem> egonw_: no. I don't think so. [2005-11-27 21:34:59] <mjw> egonw_, Do you have a line number for that=20 ClassCastException? [2005-11-27 21:35:02] <egonw_> guilhem: then I'll wait... (very busy with=20 finishing PhD... so no time for diving into compiling stuff) [2005-11-27 21:35:07] <egonw_> mjw: yes [2005-11-27 21:35:17] <egonw_> java.lang.ClassCastException: can't cast=20 `java/awt/image/BufferedImage' to `gnu/java/awt/peer/gtk/GtkImage' [2005-11-27 21:35:17] <egonw_> at=20 gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:158) [2005-11-27 21:35:46] <egonw_> at=20 gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:186) [2005-11-27 21:35:46] <egonw_> at org.jmol.viewer.Viewer.render1=20 (Viewer.java:1597) [2005-11-27 21:35:54] <egonw_> from then on it's Jmol code [2005-11-27 21:36:35] <mjw> egonw_/Sven_M, then it looks like that is old=20 code. [2005-11-27 21:36:39] <Sven_M> Those line numbers don't match. That must be= a=20 very old version. [2005-11-27 21:36:53] <mjw> The current drawImage code correctly checks bef= ore=20 casting. [2005-11-27 21:36:59] <Sven_M> Before I rewrote GtkImage entirely. Unless=20 someone introduced one, there are no unchecked casts. [2005-11-27 21:37:05] * egonw_ is not using CVS stuff [2005-11-27 21:37:18] <egonw_> cp 0.18 I htink=20 [2005-11-27 21:37:18] <egonw_> mom [2005-11-27 21:37:26] <egonw_> 0.18-5ubuntu1 [2005-11-27 21:37:34] <mjw> At least use 0.19 :) [2005-11-27 21:37:47] <mjw> 0.18 is so 2 months ago! [2005-11-27 21:38:47] <mjw> And while you are at it, try cacao with that. [2005-11-27 21:38:54] <egonw_> mjw: no kubuntu deb :( [2005-11-27 21:38:55] <mjw> Should work out of the box with 0.19! [2005-11-27 21:39:14] <mjw> tsss tsss tsss. enduser! :) [2005-11-27 21:39:19] <Sven_M> mjw: GtkImage was rewritten by then though, = I=20 think. [2005-11-27 21:39:35] <egonw_> mjw: :) [2005-11-27 21:39:42] <mjw> Sven_M, Sure. But we don't know which kaffe=20 version he is using. [2005-11-27 21:39:55] <egonw_> 1.1.5-5ubuntu2 [2005-11-27 21:39:55] <lindi-> egonw_: even debian has classpath 0.19 :) [2005-11-27 21:39:57] <mjw> Sven_M, kaffe still comes with its own copy of= =20 classpath... [2005-11-27 21:40:02] <egonw_> sarge or sid? [2005-11-27 21:40:08] <lindi-> egonw_: sid [2005-11-27 21:40:18] <egonw_> mjw: I'm fairly OK with installing java stuf= f=20 from sid [2005-11-27 21:40:21] <mjw> It was released like 2 weeks ago! [2005-11-27 21:40:25] <dalibor> 1.1.5? tststs. bad ubuntu! ;) [2005-11-27 21:40:38] <egonw_> ok, hang on... [2005-11-27 21:40:39] <dalibor> 1.1.6 is already uh ... two months old, I=20 think. [2005-11-27 21:40:40] <tashiro> egonw_: 0.19 was to late for breezy. dont k= now=20 for kubuntu [2005-11-27 21:40:41] <Sven_M> mjw: Ok, but anyway this stuff was fixed bac= k=20 in june already. [2005-11-27 21:40:45] * egonw_ is updating Packages.gz for sid [2005-11-27 21:40:45] <Sven_M> Early june at that. [2005-11-27 21:41:24] <Sven_M> egonw_: Beware that the BufferedImage drawin= g=20 code with the non-cairo peers is slow as heck. :) [2005-11-27 21:41:34] <egonw_> Sven_M: yes, I noted that :) [2005-11-27 21:41:36] <mjw> Sven_M, Kaffe 1.1.5 is from April! [2005-11-27 21:41:40] <Sven_M> Slow with the cairo peers too.. just not=20 super-slow :) [2005-11-27 21:41:54] <egonw_> Sven_M: assuming jamvm was not using that...= =20 actually... [2005-11-27 21:41:58] <Sven_M> mjw: Yeah, yeah.. I suppose we should be hap= py=20 enough dalibor did a release at all ;) [2005-11-27 21:42:07] <mjw> hehe [2005-11-27 21:42:42] <Sven_M> egonw_: The whole GtkImage thing is just=20 provisional. [2005-11-27 21:42:50] <dalibor> dude, a release evry 6 months is about 10=20 times faster than autoconf ;) [2005-11-27 21:43:01] <egonw_> did I see correcly that work is ongoing on Q= t=20 peers? [2005-11-27 21:43:15] * dalibor guesses autoconf 2.59 came out in 2001, or = so [2005-11-27 21:43:22] <Sven_M> egonw_: Kind of. [2005-11-27 21:43:32] <egonw_> as in Java/Qt bindings...=20 [2005-11-27 21:43:36] <Sven_M> egonw_: I wrote 'em. :) Haven't done much in= =20 the last few months though. [2005-11-27 21:43:38] <egonw_> or Qt peers for Swing stuff [2005-11-27 21:43:40] <egonw_> ? [2005-11-27 21:43:52] <guilhem> egonw_: Qt peers for awt. [2005-11-27 21:43:53] <Sven_M> egonw_: Right, Qt peers for AWT (Swing) [2005-11-27 21:44:18] <Sven_M> I wouldn't hype the Swing though, since it d= oes=20 its own drawing and basically just uses AWT as a framebuffer. [2005-11-27 21:44:59] <Sven_M> Which leads to the ironic result that if you= 've=20 got a nice Qt theme, AWT looks better than Swing. When it's usually=20 vice-versa. [2005-11-27 21:45:13] * egonw_ is installing classpath 0.19 from debian sid [2005-11-27 21:45:46] <egonw_> btw, I'm really happy with the Jmol renderer= =20 running... [2005-11-27 21:45:53] <mjw> egonw_, And if you are into installing random=20 weird shit then tashiro has some packages: [2005-11-27 21:45:55] <mjw>=20 http://vern.chem.tu-berlin.de/~stephan/software/upload/ [2005-11-27 21:46:03] <egonw_> someone told me (or at least I thought so) t= hat=20 BufferedImage was not working... [2005-11-27 21:46:37] <dalibor> guilhem: oh, cool! nice proposal there on=20 deflating the target layer! [2005-11-27 21:46:52] * mjw should look up the marketing term for "random=20 weird shit"... [2005-11-27 21:47:11] <Sven_M> egonw_: BufferedImage is working in the sens= e=20 that you can draw them, slowly. [2005-11-27 21:47:23] <Sven_M> egonw_: It's not working in the sense that y= ou=20 can draw *to* them. [2005-11-27 21:47:33] <egonw_> mmm... [2005-11-27 21:47:47] * egonw_ needs to study the Jmol code again... [2005-11-27 21:48:02] <egonw_> I thought Jmol was drawing bits in the=20 BufferedImage... [2005-11-27 21:48:03] <Sven_M> So if you're using them for back-buffering,= =20 well.. it ain't going to work, yet. [2005-11-27 21:48:27] <Sven_M> egonw_: Drawing bits works, I guess. But=20 getting a Graphics object for it doesn't. [2005-11-27 21:48:55] <egonw_> I have vague feeling that I'm starting to=20 understand... [2005-11-27 21:49:44] <egonw_> that's fine... [2005-11-27 21:49:50] <egonw_> Jmol is not using Java2D [2005-11-27 21:51:24] <Sven_M> egonw_: 1.1-version AWT only? [2005-11-27 21:51:34] <egonw_> yes [2005-11-27 21:51:41] * mjw still demands a screenshot! [2005-11-27 21:51:46] <egonw_> only way to get it working in many browsers.= =2E. [2005-11-27 21:51:47] <Sven_M> Where'd the BufferedImage come from? [2005-11-27 21:51:51] <egonw_> mjw: yes, yes...=20 [2005-11-27 21:51:53] <egonw_> hang on... [2005-11-27 21:51:55] <egonw_> working on it [2005-11-27 21:52:18] <Sven_M> mjw: http://www.qc.physto.se/~sven/bevel.png [2005-11-27 21:53:43] <mjw> Sven_M, Heay. Is that what I think it is? [2005-11-27 21:54:52] <Sven_M> mjw: Backward 'l's! [2005-11-27 21:54:58] <mjw> :) [2005-11-27 21:55:32] <mjw> had hoped two it was 2 BasicStrokes munged=20 together. [2005-11-27 21:56:59] <theBohemian> Sven_M: you're right. I was wrong [2005-11-27 21:57:18] <theBohemian> Sven_M: mjw fixed the ClasscastExceptio= n=20 in the GdkPixBufDecoder [2005-11-27 21:57:54] <mjw> O right! I remember that one. That was for the= =20 imageio streams. [2005-11-27 21:58:17] <Sven_M> theBohemian: Good :) I distinctly remember=20 cleaning up all GtkImage casts back then, so I'd hate to have had a=20 regression there. [2005-11-27 21:59:45] <guilhem> bye all ! [2005-11-27 21:59:49] <-- guilhem has left this server. ("Download Gaim:=20 http://gaim.sourceforge.net/") [2005-11-27 22:03:23] <theBohemian> mjw: I know the XMLEncoder code is a ba= d=20 shape [2005-11-27 22:03:51] <theBohemian> mjw: but 'they' asked for it so dearly [2005-11-27 22:04:14] <mjw> theBohemian, hehe. You cannot keep blaming "the= m"=20 for everything :) [2005-11-27 22:04:23] <egonw_> mjw: your screenshot ->=20 http://chem-bla-ics.blogspot.com/2005/11/open-source-swing-jmol-renderer-ru= ns.html [2005-11-27 22:04:25] <mjw> theBohemian, There were certainly some good par= ts=20 in it. [2005-11-27 22:05:14] <theBohemian> mjw: I found no time to continue the=20 implementation because of my job. Its like in this stallman text, I sell my= =20 priority list ;) [2005-11-27 22:05:19] <Sven_M> Cool. Water. [2005-11-27 22:05:26] <theBohemian> mjw: ok, just kidding. [2005-11-27 22:06:03] <theBohemian> mjw: anyway I asked about finishing the= =20 encoder as part of my job and got an ok about this. [2005-11-27 22:06:49] <mjw> Very nice screenshot. [2005-11-27 22:07:08] <mjw> I see on the mailinglist we have another user=20 complaining about slowness. [2005-11-27 22:07:10] <mjw> hmmmm [2005-11-27 22:07:20] <mjw> theBohemian, Wow! That is so nice! [2005-11-27 22:07:40] <mjw> theBohemian, And please do feel free to commit= =20 those parts you are happy about. [2005-11-27 22:08:05] <mjw> theBohemian, And even the bad parts if you can = add=20 some documentation on how you would like to see it improved/redesigned. [2005-11-27 22:08:32] <egonw_> mjw: I would have love to demo a protein...= =20 [2005-11-27 22:08:37] <egonw_> actually... [2005-11-27 22:08:45] <egonw_> that might not be that much slower... [2005-11-27 22:08:54] <egonw_> it's rendering the BufferedImage that is slo= w,=20 correct? [2005-11-27 22:09:28] <Sven_M> egonw_: Shouldn't be any BufferedImage invol= ved=20 though unless you're using Graphics2D. [2005-11-27 22:09:40] <egonw_> Sven_M: hang on... [2005-11-27 22:10:01] <mjw> I would say, compile to native and use oprofile= on=20 it! :) [2005-11-27 22:10:04] <Sven_M> Otherwise it should use GtkImage and then it= =20 draws to an X pixmap. Which means blitting it is about as fast as it can ge= t. [2005-11-27 22:10:29] <Sven_M> Or rather, GtkImage =3D X Pixmap [2005-11-27 22:10:39] <theBohemian> mjw: yep. I separate the doc fixes and= =20 such tommorow and send them in. [2005-11-27 22:10:52] * theBohemian not feeling well today and need some=20 sleep. [2005-11-27 22:10:57] <theBohemian> cya [2005-11-27 22:11:03] <egonw_> Sven_M: could you have a look at these bits = of=20 code: [2005-11-27 22:11:04] <-- theBohemian has left this channel. () [2005-11-27 22:11:28] <egonw_> ... [2005-11-27 22:11:39] <egonw_>=20 http://cvs.sourceforge.net/viewcvs.py/jmol/Jmol/src/org/jmol/g3d [2005-11-27 22:11:51] <egonw_> -> Swing3D.java and AWT3D.java [2005-11-27 22:12:44] <egonw_> If I understand you correctly, I need to ens= ure=20 that Jmol uses the AWT3D and not they Swing3D... [2005-11-27 22:12:46] <egonw_> correct? [2005-11-27 22:13:23] <egonw_> Jmol picks one of the two depending on the=20 platform... [2005-11-27 22:14:40] <egonw_> which is done in the Platform3D.java in the= =20 same dir... [2005-11-27 22:15:07] * egonw_ is attempting to force AWT, and see what=20 happens... [2005-11-27 22:15:34] * egonw_ is recompiling... [2005-11-27 22:15:53] --> grey_gandalf has joined this channel.=20 (n=3Dm...@ad...) [2005-11-27 22:15:59] <grey_gandalf> mjw: hey [2005-11-27 22:16:01] <grey_gandalf> hey all=A7 [2005-11-27 22:17:23] <grey_gandalf> mjw: when I start my applications one = of=20 the panel is drawn wrongly [2005-11-27 22:17:28] <grey_gandalf> but no exceptions [2005-11-27 22:17:59] <grey_gandalf> (wrongly: 1. wrong size, 2. it has no= =20 hide arrows) [2005-11-27 22:19:46] <mjw> grey_gandalf, Hi Riccardo [2005-11-27 22:20:08] <egonw_> Sven_M: forcing the AWT version breaks it :( [2005-11-27 22:20:09] <Sven_M> egonw_: The Swing3D thing uses BufferedImage= I=20 see, so yeah, that won't work as well. [2005-11-27 22:20:30] <egonw_> Sven_M: but you've seen the screenshot ?!?! [2005-11-27 22:20:31] <grey_gandalf> hey sven ! [2005-11-27 22:20:39] <Sven_M> 'lo grey_gandalf [2005-11-27 22:20:42] <grey_gandalf> mjw when I click to open an inspector= =20 panel I get [2005-11-27 22:20:43] <grey_gandalf>=20 http://rafb.net/paste/results/Rbv6y257.html [2005-11-27 22:21:16] <grey_gandalf> if I try to resizze the pane, the drag= =20 line gets drawn in black, I start dragging but when I relese.. nothing=20 happens, the black line remains [2005-11-27 22:21:16] <mjw> grey_gandalf, This is with kaffe CVS right? [2005-11-27 22:21:34] <grey_gandalf> mjw: yes, fresh fresh... thus I tihnk= =20 quite up-tpo-date CP [2005-11-27 22:21:44] <grey_gandalf> guilhem synced this afternoon [2005-11-27 22:22:03] <grey_gandalf> mjw: if you want to try the applicatio= n=20 on gcj or something like that... [2005-11-27 22:22:22] <egonw_> Sven_M: the swing one works, the AWT does=20 not...=20 [2005-11-27 22:22:41] <Sven_M> egonw_: Wacky. [2005-11-27 22:23:00] <Sven_M> egonw_: Ok, are you using Graphics2D/Cairo o= r=20 not? [2005-11-27 22:23:08] <egonw_> jamvm 1.3.3 [2005-11-27 22:23:12] <Sven_M> egonw_: And what isn't working about the AWT= =20 version? [2005-11-27 22:23:26] <egonw_> I get a grey content instead of the black += =20 water [2005-11-27 22:23:29] <mjw> grey_gandalf, Looking at the source of=20 ScrollPaneLayout and Container. Let me think. [2005-11-27 22:23:31] <Sven_M> egonw_: Well, ok, but which classpath and di= d=20 you build it with Graphics2D support? [2005-11-27 22:23:42] <egonw_> debian sid packages=20 [2005-11-27 22:23:46] <egonw_> classpath 0.19 [2005-11-27 22:23:48] <egonw_> -2 [2005-11-27 22:24:46] <Sven_M> egonw_: Ok, hmm.. uh, could you tell me what= =20 Component.createImage(int, int) returns? [2005-11-27 22:25:02] <egonw_> class type? [2005-11-27 22:26:13] <egonw_> hang on [2005-11-27 22:28:19] <egonw_> Sven_M: gnu.java.awt.peer.gtk.GtkImage [2005-11-27 22:29:53] <Sven_M> egonw_: Ok. That's good. Hmm. You know what = it=20 *could* be? Could be that you're assuming that the native pixel format is=20 32-bit RGB, when it tends to default to 32-bit RGBA with GtkImage (IIRC),=20 meaning you've got a zero alpha channel --> the thing is being drawn=20 transparently! [2005-11-27 22:30:01] <mjw> grey_gandalf, Interesting. Still looking what t= his=20 should actually do. [2005-11-27 22:30:07] <grey_gandalf> :) [2005-11-27 22:30:09] <mjw> grey_gandalf, Well done. You found a bug! :) [2005-11-27 22:30:19] <egonw_> Sven_M: OK, how to test that? [2005-11-27 22:30:37] <grey_gandalf> mjw: that is why people fear me :) [2005-11-27 22:30:39] <egonw_> Sven_M: or fix that... [2005-11-27 22:32:11] <Sven_M> egonw_: Good question. Hmm... Easy. Dump the= =20 first few ints in pBuffer there. [2005-11-27 22:32:47] <Sven_M> egonw_: Should be 0xFF000000 (or 0x000000FF)= =20 for black and not 0. [2005-11-27 22:33:01] <egonw_> ok, where do I do that? [2005-11-27 22:33:10] * egonw_ is looking... mom [2005-11-27 22:33:25] <Sven_M> egonw_: Well, at some spot when you know the= =20 image is drawn.. :) [2005-11-27 22:33:36] <grey_gandalf> mjw: were you able to find a fix too? = :) [2005-11-27 22:34:05] <mjw> grey_gandalf, I am not sure. [2005-11-27 22:34:13] <egonw_> ok, I see something promosing:=20 ic.setPixels( bla bla, pBuffer, bla bla) [2005-11-27 22:34:29] <mjw> grey_gandalf, So you add this thing to the=20 ScrollPaneLayout. [2005-11-27 22:34:33] <Sven_M> egonw_: Yeah, maybe in that startProduction= =20 method. [2005-11-27 22:34:51] <mjw> grey_gandalf, I assume you expect it to show up= in=20 the main viewport. [2005-11-27 22:34:54] <Sven_M> it should be called every time the image is= =20 recreated/redrawn [2005-11-27 22:35:32] <egonw_> 4 bytes enough? [2005-11-27 22:36:07] <grey_gandalf> mjw: let me check the line [2005-11-27 22:36:15] <grey_gandalf> I add many scoll things :) [2005-11-27 22:36:30] <egonw_> Sven_M: all first four is zero... [2005-11-27 22:36:31] <Sven_M> egonw_: If the top-left corner is black, the= n=20 yes :) [2005-11-27 22:36:35] <egonw_> that's what you expected right? [2005-11-27 22:36:51] <Sven_M> egonw_: Well, it'd fit with theory above. [2005-11-27 22:36:52] <egonw_> that's ... that means transparent, correct? [2005-11-27 22:37:01] <Sven_M> egonw_: Right. [2005-11-27 22:37:08] <egonw_> OK, will relay this to the rendering engine= =20 developer... [2005-11-27 22:37:08] <Sven_M> I think. [2005-11-27 22:37:25] <egonw_> OK, and using AWT would be faster, correct t= oo? [2005-11-27 22:37:26] <Sven_M> Yup, we default to RGBA. [2005-11-27 22:37:38] <-- rabbit_ has left this server. (Connection timed o= ut) [2005-11-27 22:37:46] <grey_gandalf> mjw: intrestingly, it is some code tha= t=20 currently doesn't work very well [2005-11-27 22:37:54] <Sven_M> I'm pretty sure the JDK doesn't though. [2005-11-27 22:38:09] <Sven_M> Or is it the other way around.. [2005-11-27 22:39:03] <Sven_M> egonw_: Hmm.. try a workaround. [2005-11-27 22:40:25] <egonw_> suggestions? [2005-11-27 22:40:35] <Sven_M> egonw_: Add to the startProduction() method= =20 something a la for(int i=3D0;i<pBuffer.length;i++)pBuffer[i] |=3D 0xFF00000= 0; [2005-11-27 22:40:48] <Sven_M> So you set the alpha channel to opaque. [2005-11-27 22:41:00] <egonw_> Sven_M: ack, hang on [2005-11-27 22:44:04] <egonw_> Sven_M: OK, I now have a black background [2005-11-27 22:44:57] <egonw_> but the water is gone [2005-11-27 22:45:43] <Sven_M> Huh. [2005-11-27 22:46:05] <Sven_M> egonw_: Well that's pretty weird! :) [2005-11-27 22:47:38] <egonw_> but not something Miguel will not understand= =2E.. [2005-11-27 22:47:46] <egonw_> do you want to be cc-ed? [2005-11-27 22:48:16] <Sven_M> Hmm.. this might be your problem, actually:= =20 colorModelRGB =3D ColorModel.getRGBdefault(); [2005-11-27 22:48:22] <Sven_M> Or maybe it's our problem. [2005-11-27 22:48:29] <Sven_M> But I think it's yours. [2005-11-27 22:48:33] <egonw_> :) [2005-11-27 22:48:47] <Sven_M> ColorModel.getRGBdefault() is 32-bit RGB. [2005-11-27 22:48:55] <egonw_> OK, I'll email Miguel... he's far more=20 knowlegdable in these matters than I am... [2005-11-27 22:49:04] <egonw_> Sven_M: makes sense... [2005-11-27 22:49:10] <egonw_> is there a RGBA default too? [2005-11-27 22:49:11] <Sven_M> But it's NOT necessarily the default colorMo= del=20 used by Component.createImage() [2005-11-27 22:49:43] <egonw_> do you have a suggestion? [2005-11-27 22:49:43] <Sven_M> Which is returned by Toolkit.getColorModel(). [2005-11-27 22:49:53] <egonw_> OK [2005-11-27 22:49:56] <egonw_> mom, will try [2005-11-27 22:50:14] <Sven_M> egonw_: Yeah, so try changing that to=20 Toolkit.getDefaultToolkit().getColorModel(). [2005-11-27 22:50:23] <Sven_M> I'm assuming you *use* this later :) [2005-11-27 22:50:29] <egonw_> :) [2005-11-27 22:51:08] <Sven_M> Could be that you're drawing a transparent=20 water onto a nontransparent black background or something. [2005-11-27 22:51:36] <egonw_> yeah... [2005-11-27 22:51:43] <egonw_> recompiling... [2005-11-27 22:52:20] <egonw_> does not do anything... [2005-11-27 22:52:39] <egonw_> it is used though... [2005-11-27 22:52:44] <egonw_> in the setPixels call... [2005-11-27 22:56:12] <Sven_M> egonw_: Oh right. [2005-11-27 22:57:21] <-- man-di2 has left this server. ("Verlassend") [2005-11-27 22:57:25] <Sven_M> That shouldn't matter though, I mean if we'r= e=20 setting the alpha channel to 255. [2005-11-27 22:57:36] <egonw_> indeed... [2005-11-27 22:57:51] <egonw_> I'm pretty sure Miguel will understand what = is=20 going on... [2005-11-27 22:58:05] <egonw_> Sven_M: if you message me your email address= ,=20 I'll cc you [2005-11-27 22:58:13] <Sven_M> egonw_: sv...@ph... [2005-11-27 22:59:27] <Sven_M> egonw_: BTW, does Jmol handle Molden frequen= cy=20 files? [2005-11-27 22:59:43] <egonw_> send a file and then we can add it [2005-11-27 23:00:04] <egonw_> (assuming that they store the frequencies as= =20 vectors) =2D-=20 eg...@us... Blog: http://chem-bla-ics.blogspot.com/ GPG: 1024D/D6336BA6 |