[OpenJDK 2D-Dev] 6603887: Where are transparent areas filled with bgColor?
Clemens Eisserer
linuxhippy at gmail.com
Wed Sep 26 19:24:13 UTC 2007
Hello again,
I dig a bit deeper and found out that the problem is in
X11SurfaceData::X11SD_GetPixmapWithBg.
There is an optimization to only modify pixels if the specified
background-color differes from the image-transparent color:
if (xsdo->bgPixel != pixel + 1)
I found out that the problem only appears if I specify Color.WHITE in
drawImage every other color works, I wrote some debug-output:
xsdo-bgpixel is now: 0
pixel value is:-1
So it seems Java believes that the transparent-color of the image is
white while its balck in reality. If I comment out if (xsdo->bgPixel
!= pixel + 1) it works as intended as it does when specifying any
color !=white.
Where is xsdo->bgPixel calculated and how does this strange "pixel"
value come from ((255, 255, 255) = -1)?
Sorry for asking so much, but the code is quite confusing for a newbie...
Thank you in advance, lg Clemens
More information about the 2d-dev
mailing list