summaryrefslogtreecommitdiff
path: root/lib/shape.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shape.cc')
-rw-r--r--lib/shape.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/shape.cc b/lib/shape.cc
index a7ed137..7a3312a 100644
--- a/lib/shape.cc
+++ b/lib/shape.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: shape.cc,v 1.19 2004-11-27 21:48:03 pixel Exp $ */
+/* $Id: shape.cc,v 1.20 2005-12-01 13:48:12 pixel Exp $ */
#include <math.h>
#include <limits.h>
@@ -831,30 +831,30 @@ void mogltk::shape::window(int x1, int y1, int x2, int y2, const String & title,
LEAVE;
}
-void mogltk::shape::text(int x, int y, const String & text, ColorP textcolor, align_t align) {
- int tsize = SystemFont->singletextsize(text);
+void mogltk::shape::text(int x, int y, const String & text, ColorP textcolor, align_t align, mogltk::font * _font) {
+ int tsize = _font->singletextsize(text);
switch (align) {
case LEFT:
- SystemFont->putcursor(x, y);
+ _font->putcursor(x, y);
break;
case CENTER:
- SystemFont->putcursor(x - (tsize / 2), y);
+ _font->putcursor(x - (tsize / 2), y);
break;
case RIGHT:
- SystemFont->putcursor(x - tsize, y);
+ _font->putcursor(x - tsize, y);
break;
}
- SystemFont->setcolor(textcolor);
- SystemFont->setshadow(0);
- SystemFont->printf(text);
+ _font->setcolor(textcolor);
+ _font->setshadow(0);
+ _font->printf("%s", text.to_charp());
}
void mogltk::shape::text3d(int x, int y, const String & atext, ColorP textcolor,
ColorP shade1, ColorP shade2,
- align_t align, bool bevel) {
+ align_t align, bool bevel, mogltk::font * _font) {
ENTER;
- SystemFont->setwspace(1);
+ _font->setwspace(1);
if (!bevel) {
text(x - 1, y - 1, atext, shade2, align);
text(x + 1, y + 1, atext, shade1, align);
@@ -863,7 +863,7 @@ void mogltk::shape::text3d(int x, int y, const String & atext, ColorP textcolor,
text(x + 1, y + 1, atext, shade2, align);
}
text(x, y, atext, textcolor, align);
- SystemFont->setwspace(0);
+ _font->setwspace(0);
LEAVE;
}