|
tint a bitmap |
jamal
Member #3,326
March 2003
|
hi all, i'd like to tint a bitmap with a color, so i tried draw_lit_sprite. the function seems to do what i want, but it doesn't seem to skip the transparent color. it there a way to make draw_lit_sprite skip the transparent color ? |
gnolam
Member #2,030
March 2002
|
It does mask out transparent pixels. Show us your code, and attach a sprite that displays incorrectly. -- |
jamal
Member #3,326
March 2003
|
i attached a screenshot of the problem : set_add_blender(getr(color),getg(color),getb(color),128); draw_lit_sprite(bmp, asteroid, (int)b->getX(), (int)b->getY(), 128); btw i work in 16bpp mode. |
X-G
Member #856
December 2000
|
What does the sprite itself look like? Attach that, too. -- |
jamal
Member #3,326
March 2003
|
i was attaching the sprite when i noticed that the background color is ... black |
ImLeftFooted
Member #3,935
October 2003
|
Bitmap *b; Tint t; t.a = 0.5f; b->blitToScreen(x, y, t);
|
gnolam
Member #2,030
March 2002
|
Can we please get Dustin a custom title of "Allegro.cc Official Troll"? -- |
ImLeftFooted
Member #3,935
October 2003
|
I was actually trying to get a plug for the Thing library, which would solve many of the OP's problems. What I didn't bother explaining is that if you're trying to tint crap, you really shouldn't be using Allegro anymore. |
|