Last change
on this file since 28 was
2,
checked in by Sam Hocevar, 18 years ago
|
- imported original 0.7.0 tarball
|
File size:
913 bytes
|
Rev | Line | |
---|
[2] | 1 | #ifndef __FONTS_HPP_ |
---|
| 2 | #define __FONTS_HPP_ |
---|
| 3 | #include "image.hpp" |
---|
| 4 | #include "timage.hpp" |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | class texture_font |
---|
| 9 | { |
---|
| 10 | int tl,th; |
---|
| 11 | image *let,*fntpat; |
---|
| 12 | public: |
---|
| 13 | texture_font(image *letters, image *font_pattern=NULL); |
---|
| 14 | void put_char(image *screen, int x, int y, char ch); |
---|
| 15 | void put_string(image *screen, int x, int y, char *st); |
---|
| 16 | int height() { return th; } |
---|
| 17 | int length() { return tl; } |
---|
| 18 | int width() { return tl; } |
---|
| 19 | image *font_image() { return let; } |
---|
| 20 | image *font_patter() { return fntpat; } |
---|
| 21 | ~texture_font() { if (let) delete let; if (fntpat) delete fntpat; } |
---|
| 22 | } ; |
---|
| 23 | |
---|
| 24 | class JCFont |
---|
| 25 | { |
---|
| 26 | int tl,th; |
---|
| 27 | trans_image *let[256]; |
---|
| 28 | public: |
---|
| 29 | JCFont(image *letters); |
---|
| 30 | void put_char(image *screen, int x, int y, char ch, int color=-1); |
---|
| 31 | void put_string(image *screen, int x, int y, char *st, int color=-1); |
---|
| 32 | int height() { return th; } |
---|
| 33 | int length() { return tl; } |
---|
| 34 | int width() { return tl; } |
---|
| 35 | ~JCFont(); |
---|
| 36 | } ; |
---|
| 37 | |
---|
| 38 | #endif |
---|
| 39 | |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.