Gfx::TextureAccessorA32 accessor(texture, true) Ĭonst unsigned int invAlpha = 255 - pixel.a But for alpha-channel-textures, the best I got was: One color is marked transparent and everything is fine. SetPixel(hXorMaskDC, x, y, RGB(pixel.r, pixel.g, pixel.b)) SetPixel(hAndMaskDC, x, y, RGB(0, 0, 0)) SetPixel(hXorMaskDC, x, y, RGB(0, 0, 0)) Gfx::TextureAccessorX32 accessor(texture, true) Ĭonst gfx::Color3 transparent(254, 254, 254) įor(unsigned int x = 0 x < (unsigned int)vSize.x x++)įor(unsigned int y = 0 y < (unsigned int)vSize.y y++) ![]() How do I calculate the correct and + xor-masks for transparent images? I'm using the method from, which works fine for simple cursors without an alpha-channel: I'm trying to load a mouse cursor for windows from an image-file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |