PDA

View Full Version : bug AGFUnit / SetTransColor



strangerranger
03-03-2004, 10:11 PM
Hi,

I had some problems changing the transparent color of a tagfimage, so I looked into the source and found a bug:



// read source pixel
pdrawFormatConv(SrcPtr, @Color, FFormat, D3DFMT_A8R8G8B8);
// test for transparency
if (Color and $00FFFFF = Value) then
Color:= Color and $00FFFFFF
else Color:= Color or $FF000000;

// write the altered pixel
pdrawFormatConv(@Color, SrcPtr, D3DFMT_A8R8G8B8, FFormat);


There is an "F" missing in front of =value.
Changing this line to



if (Color and $00FFFFFF = Value) then


solved the problem.
Is this bug already known to the developers?
If so, it might be helpful to publish such things on a development-page or something similar. This spares the users some frustration.

cheers,
strangerranger

ud
01-05-2004, 08:22 AM
V3.0 pre 3 still contains this.