> Miguel, do you remember how you implemented the transparent
> background? I remember you decided that that was what was
> slowing down the rendering on your machine, but still, I'd
> like to experiment.
>
> Bob

Bob,

My recollection is that the problem with transparent background was more
than a performance problem. Here is what I have been able to dredge up.

I think that I started down the path to implement transparent background
and was stopped abruptly when I realized that it could not be implemented
with the graphics APIs that I had available to me in the Java AWT class
libraries.

Here's the scoop ... The Java AWT and/or the OS window manager
(Windows/MacOS/Linux) assume that an overlaying window is fully opaque and
fully paints the window. In addition, there is no way for an overlaying
window to access the contents of an underlying window ... because it
belongs to another application and the contents are ephemeral.

So, when I used the alpha channel to make the Jmol background bits
transparent here is what I saw. When I rotated the molecule it would blur
on the screen, leaving a trail in all of the pixels where it had been
painted.

If I forced a repaint of the underlying window (by hitting Alt-Tab twice,
for example) then it would look fine ... until I rotated the molecule.

Now, I suspect that much of this limitation was with the Java AWT class
library. While I am not familiar with the OS window managers, I assume
that they have some type of 'sprite' mechanism that allows them to support
something like this. And the newer newer windowing class libraries very
well may expose this functionality.

So, you asked a separate question about Swing ... and that was probably
motivated by this same issue ...

I suggest that you find out whether or not Swing supports the ability to
create non-rectangular windows/sprites with transparent pixels. If it
does, then you should be able to adapt Jmol to use that mechanism in order
to achieve the effect you want.

If Swing (or Java2D) doesn't support the functionality then I don't think
it can be done.


Miguel





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to