[Allegro] Manual do biblioteki alfont?
Ostatnio zmodyfikowano 2009-08-24 20:09
eBbi Temat założony przez niniejszego użytkownika |
[Allegro] Manual do biblioteki alfont? » 2009-08-23 14:43:07 Siema all Poszukuje manualna do biblioteki alfont(spis funkcji wraz z ich objaśnieniem). Szukałem na google pod różnymi frazami ale bez skutku. Potrzebuje chociaż jedną funkcję do wyświetlania napisu w innej czcionce i wielkości. Inne metody mnie nie interesują. Pozdrawiam eBbi |
|
DejaVu |
» 2009-08-24 20:09:38 http://www.csd509j.net/chs/departments/computer_science /cplus/Lessons/allegro_fonts.htm#include <allegro.h> #include <alfont.h> #include <string> #include <iostream> #include <conio.h>
using namespace std;
int main() { allegro_init(); install_mouse(); install_keyboard(); set_color_depth( 32 ); alfont_init(); set_gfx_mode( GFX_AUTODETECT, 800, 600, 0, 0 ); BITMAP * background = load_bitmap( "detail/Sunset.bmp", 0 ); BITMAP * buffer = create_bitmap( 800, 600 ); ALFONT_FONT * copperplate_font = alfont_load_font( "detail/COPRGTB.TTF" ); alfont_set_font_size( copperplate_font, 36 ); string text = "This is a test of fonts....."; const int blue = makecol( 50, 30, 180 ); alfont_textprintf_ex( buffer, copperplate_font, 5, 5, blue, - 1, text.c_str() ); blit( buffer, screen, 0, 0, 0, 0, 800, 600 ); while( !key[ KEY_ESC ] ) { }; alfont_exit(); return 0; } END_OF_MAIN();
|
|
« 1 » |