Hello,
There is no unit test for blitting a SRCALPHA source with non-zero alpha
to a SRCALPHA destination with non-zero alpha. In this way, with an
optimization for blitting to a destination having 0 alpha, the behavior
described below goes uncaught. There is nothing in the SVN messages
indicating a deliberate reversal of the original bug fix. And if the
change was intensional why use a discarded equation rather than the one
that was replaced. To me it appears the wrong equation was cut from the
#if-#then-#else conditional in alphablit.c and pasted into surface.h. As
for blit behavior I plan to add a wiki page listing the guarantees for
an alpha-to-alpha blit. I think blend(c, 0, 255) == c, for blend(src,
dest, alpha), should be one of them.
Lenard
René Dudfield wrote:
hi,
I'm not sure if it is actually wrong behavior... I'm just guessing at
this point.
On Tue, Aug 12, 2008 at 12:35 PM, claudio canepa <[EMAIL PROTECTED]> wrote:
On 8/11/08, René Dudfield <[EMAIL PROTECTED]> wrote:
hi,
have you added a test case?
I'm pretty sure this changes the behavior of previous pygame, so we
decided to keep the behavior.
On Tue, Aug 12, 2008 at 8:34 AM, Lenard Lindstrom <[EMAIL PROTECTED]> wrote:
Lenard Lindstrom wrote:
claudio canepa wrote:
2. When blitting (with no blend flags) an opaque pixel ( alpha channel
at
255 ) over any other pixel, seems natural that the resulting color be
the
src color. (opaque is opaque, right ?). In most cases pygame is off by
one,
by example:
. dst is filled with (x,0,0,128)
. src is filled with (0,z,0,255)
. dst.blit(src,(0,0)) will be filled with ( 0, z-1, 0, 255) (
minusblit.py demoes this )
Thanks for bringing it to our attention. This was a known bug in Pygame
1.7 and was fixed previous to Pygame 1.8. Apparently the bug was
reintroduced in an attempt to optimize the code. I will repair it.
Bug fixed in SVN revision 1608.
--
Lenard Lindstrom
<[EMAIL PROTECTED]>
Can developers add a brief note to documentation when a bug is intentionally
kept ?
It is a waste of time to perpetually build 'bug demos' (users) , add -
remove code (developers).
Besides, undocumented wrong behavior is awfull when writing tests !