|
|
| version 1.84, 2002/11/27 09:43:53 | version 1.85, 2002/11/28 08:38:14 |
|---|---|
| Line 891 static void _polybar(Request& r, const S | Line 891 static void _polybar(Request& r, const S |
| // font | // font |
| #define Y(y)(y+index*height+1) | #define Y(y)(y+index*height) |
| /// simple gdImage-based font storage & text output | /// simple gdImage-based font storage & text output |
| class Font : public Pooled { | class Font: public Pooled { |
| public: | public: |
| const static int letter_spacing; | const static int letter_spacing; |
| Line 906 public: | Line 906 public: |
| Font(Pool& pool, | Font(Pool& pool, |
| const String& aalphabet, | const String& aalphabet, |
| gdImage& aifont, int aheight, int amonospace, int aspacebarspace) : Pooled(pool), | gdImage& aifont, int aheight, int amonospace, int aspacebarspace): Pooled(pool), |
| alphabet(aalphabet), | alphabet(aalphabet), |
| height(aheight), monospace(amonospace), spacebarspace(aspacebarspace), | height(aheight), monospace(amonospace), spacebarspace(aspacebarspace), |
| ifont(aifont) { | ifont(aifont) { |
| Line 933 public: | Line 933 public: |
| void index_display(gdImage& image, int x, int y, int index){ | void index_display(gdImage& image, int x, int y, int index){ |
| if(index>=0) | if(index>=0) |
| ifont.Copy(image, x, y, 0, Y(0), index_width(index), height-1); | ifont.Copy(image, x, y, 0, Y(0), index_width(index), height); |
| } | } |
| /* ******************************** string ********************************** */ | /* ******************************** string ********************************** */ |