|
Apply text to bitmap |
Travis Peterson
Member #16,756
October 2017
|
Howdy |
beoran
Member #12,636
March 2011
|
You can use al_set_target_bitmap to set your bitmap as the target of Allegro5's rendering functions, included al_draw(_multiline)_text. Note that this should not be done for live drawing. Such modifications to bitmaps are best done at load or setup time. |
Travis Peterson
Member #16,756
October 2017
|
The idea would be to do something similar near time of drawing.. reason for wanting this would be for the purpose of animating a textbox closing feature where the text and textbox get clipped x and y coordinates as the drawing range in al_draw_bitmap is reduced (the paramaters after sourcex and sourcey) |
Edgar Reynaldo
Major Reynaldo
May 2007
|
al_set_clipping_rectangle will do what you want. Other ways to animate include transformations over time. Had some fun with this in my TINS entry(not submitted). 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 |
beoran
Member #12,636
March 2011
|
for live drawing setting the clpping rectangle is a better, more performant approach. You should normally prefer drawing directly to the display if at all possible. |
|