Jerry Evans wrote:

> One thing about your original program that didn't allow it to show the
> effects of various compositing modes was that it always composited to the
> screen, which in all Java 2D implementations that I'm aware of (and in
> many of the pixel formats supported by OpenGL implementations) has no
> storage bits allocated for alpha.

        I had figured that, as Swing components are double-buffered, that the
default image buffers used would have alpha channels. This really is a
problem both in the example program and the program I am developing at
work. Thanks for pointing that out.

> I hope all of this makes sense.  Let me know if you have any questions.

        First of all, I can't thank you enough for devoting you time to
developing and enhancing these example programs. You explanations where
right on target to show what was wrong with my usage of alpha blending,
and the differences between Java 2D and OpenGL.
        I have forwarded your mail to my colleague responsible for the OpenGL
program, and I intend to fix my Java program as soon as possible. From
what I could gather of your very informative explanation, I have to draw
my output first to a buffered image created explicity with an alpha
channel and using premultiplied alpha. Then the contents of this image
should be drawn on the screen using the (default) SrcOver rule.
        The OpenGL guy will have to work a bit harder, but I guess we are on
track now. Thanks a lot.

--
---------------------------------------------------------------
  Alexandre Sieira Vilar - http://www.tecgraf.puc-rio.br/~asv
 Computer Engineering Student at PUC-Rio - GNU and Linux rock!
     3rd kyu Aikikkai Aikidoka (as of November 28, 1998)
---------------------------------------------------------------
"It  is  neccessary  to develop a strategy that utilizes all
the physical conditions  and  elements  that are directly at
hand.  The best strategy relies upon  an  unlimited  set  of
responses."

                                   Morihei Ueshiba

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to