Are you, by any chance, using antialiased rendering?  If so then you
should be aware that we implement an immediate mode AA rendering (not
FullScene AA) that is not repeatable in the same sense as regular rendering.

With regular non-AA rendering, if you render the same thing twice you
should see no difference.

With XOR rendering, rendering something twice should return the
destination to the state it was in before the first rendering.

(non-FullScene) AA rendering, on the other hand, can only be done once
otherwise it accumulates dirt by virtue of the fact that the equations
are one way.  For the pixels fully inside the shape, the foreground
color is stored, so those can be re-rendered without any problems.  But,
for the pixels on the edge, the foreground color is blended into the
background color and it is now some color in between the two.  If you
render the same thing again, then those edge pixels are re-blended and
so the color becomes "more like the foreground color" - the net result
is that the edges will now look blockier than they should.  Finally, if
you try to erase the object by rendering it again in the background
color then you don't quite get back to the original color because A
blend B blend A does not equal A.  If the blend factor is .5 then A
blend B is
       (A+B)/2
Then after the subsequent (A blend B) blend A step you have
       ((A+B)/2 + A)/2
or      ((A+B+2A)/2)/2
or      (3A+B)/4
so there is still about 1/4 of the B color mixed in.

If you want to do animation, then you have to choose between being able
to "unrender" objects and using AA.  If you use our immediate mode AA,
then you would have to re-render the screen from scratch for every frame.

A third option may also work if you want to try it - roll your own
super-sampled FullScene AA.  Render everything non-antialiased N times
as large in both X and Y into an offscreen buffer.  Then when you want
to show the results of a frame onto the screen, scale it down to the
correct size using the BILINEAR interpolation hint...

                       ...jim

Thanasis (Hotmail) wrote:
Hi to everyone,



I use an off screen image (double buffering) to achieve animation.

At each iteration I want to erase a part of the image (some fillOvals in
white color) and then draw the image on the screen. The problem is that
after erasing there are still some grey marks remaining. How can I solve
it?



Thanks in advance

Thanasis

===========================================================================
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".

===========================================================================
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