![]() |
|
bitmap transparency |
Antone333
Member #15,545
March 2014
|
I know its possible to make a color completely invisible. I use this already in my game. But I was wondering is there a way to draw a bitmap that is still visible but see through? |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Yes. Use 32 bit color and alpha channels on your images. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
#00JMP00
Member #14,740
November 2012
|
If you want to draw translucent bitmaps onto others, you can use draw_trans. This will exactly do what you want. Other ways may fail :-)) |
Dizzy Egg
Member #10,824
March 2009
![]() |
Yeah, what Edgar said. You can create an image in your 'graphics software' with an alpha channel; then, if you save it as something like .png you can load it in A5 and it will use the alpha channel, 32 bits (24 for the colours RGB and 8 bits for the alpha transparency....probably).
---------------------------------------------------- |
Antone333
Member #15,545
March 2014
|
could you point me to draw trans in the manual? i can't find it. |
Chris Katko
Member #1,881
January 2002
![]() |
Allegro 4 or 5? -----sig: |
Antone333
Member #15,545
March 2014
|
Allegro 5 |
Aikei_c
Member #14,871
January 2013
![]() |
If you want to draw a bitmap half-transparent only sometimes, instead of editing it to include alpha channel, you could draw it tinted like that: al_draw_tinted_bitmap(yourBitmap,al_map_rgba_f(0.5,0.5,0.5,0.5),x,y,0);
|
|