From 2cb5e2da8a910e8afeabba2eadf259260052ae3b Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 2 Jun 2004 19:19:54 +0000 Subject: [PATCH] added a size argment to swf_DrawText. --- lib/modules/swftext.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index b0b4cc2..683f494 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -1254,7 +1254,7 @@ void swf_FontCreateLayout(SWFFONT*f) } } -void swf_DrawText(drawer_t*draw, SWFFONT*font, char*text) +void swf_DrawText(drawer_t*draw, SWFFONT*font, int size, char*text) { U8*s = (U8*)text; int advance = 0; @@ -1270,26 +1270,26 @@ void swf_DrawText(drawer_t*draw, SWFFONT*font, char*text) while(l) { if(l->type == moveTo) { FPOINT to; - to.x = l->x/20.0+advance; - to.y = l->y/20.0; + to.x = l->x*size/100.0/20.0+advance; + to.y = l->y*size/100.0/20.0; draw->moveTo(draw, &to); } else if(l->type == lineTo) { FPOINT to; - to.x = l->x/20.0+advance; - to.y = l->y/20.0; + to.x = l->x*size/100.0/20.0+advance; + to.y = l->y*size/100.0/20.0; draw->lineTo(draw, &to); } else if(l->type == splineTo) { FPOINT mid,to; - mid.x = l->sx/20.0+advance; - mid.y = l->sy/20.0; - to.x = l->x/20.0+advance; - to.y = l->y/20.0; + mid.x = l->sx*size/100.0/20.0+advance; + mid.y = l->sy*size/100.0/20.0; + to.x = l->x*size/100.0/20.0+advance; + to.y = l->y*size/100.0/20.0; draw->splineTo(draw, &mid, &to); } l = l->next; } swf_Shape2Free(shape2); - advance += font->glyph[g].advance/20.0; + advance += font->glyph[g].advance*size/100.0/20.0; } } -- 1.7.10.4