From 9ad02f173cca3f7c0d51f641d0d668219a561e7d Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 25 Jul 2004 09:05:59 +0000 Subject: [PATCH] added matrix argument to swf_SetDefineText(). --- lib/example/edittext.c | 2 +- lib/modules/swftext.c | 4 ++-- lib/python/tags.c | 2 +- lib/rfxswf.h | 2 +- src/swfc.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/example/edittext.c b/lib/example/edittext.c index 463b888..10fa39d 100644 --- a/lib/example/edittext.c +++ b/lib/example/edittext.c @@ -111,7 +111,7 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag,ST_DEFINETEXT); swf_SetU16(tag, 33); //id - swf_SetDefineText(tag, font, &rgb, "Password:", 20); + swf_SetDefineText(tag, font, &rgb, "Password:", 20, 0); tag = swf_InsertTag(tag,ST_PLACEOBJECT2); m.tx = width/2*20; diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index 2b2bf91..0adaf2b 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -1184,7 +1184,7 @@ void swf_SetEditText(TAG*tag, U16 flags, SRECT r, char*text, RGBA*color, swf_SetString(tag,text); } -SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale) +SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale, MATRIX* m) { SRECT r; U8 gbits, abits; @@ -1204,7 +1204,7 @@ SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale) } swf_SetRect(tag,&r); - swf_SetMatrix(tag,NULL); + swf_SetMatrix(tag,m); swf_TextCountBitsUTF8(font,text,scale*20,&gbits,&abits); swf_SetU8(tag,gbits); swf_SetU8(tag,abits); diff --git a/lib/python/tags.c b/lib/python/tags.c index 7235e1e..a646180 100644 --- a/lib/python/tags.c +++ b/lib/python/tags.c @@ -426,7 +426,7 @@ static int text_fillTAG(tag_internals_t*self) text_internal_t*ti = (text_internal_t*)self->data; self->tag= swf_InsertTag(0, ST_DEFINETEXT2); swf_SetU16(self->tag, /*ID*/0); - ti->bbox = swf_SetDefineText(self->tag, ti->swffont, &ti->rgba, ti->text, ti->size); + ti->bbox = swf_SetDefineText(self->tag, ti->swffont, &ti->rgba, ti->text, ti->size, 0); return 1; } static PyObject* text_getattr(tag_internals_t*self,char*a) diff --git a/lib/rfxswf.h b/lib/rfxswf.h index 60edecb..4c94cb4 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -590,7 +590,7 @@ int swf_TextPrintDefineText(TAG * t,SWFFONT * f); void swf_SetEditText(TAG*tag, U16 flags, SRECT r, char*text, RGBA*color, int maxlength, U16 font, U16 height, EditTextLayout*layout, char*variable); -SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale); +SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale, MATRIX* m); void swf_DrawText(drawer_t*draw, SWFFONT*font, int size, char*text); diff --git a/src/swfc.c b/src/swfc.c index 3f2df35..3901cd0 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -901,7 +901,7 @@ void s_text(char*name, char*fontname, char*text, int size, RGBA color) s_box(name, 0, 0, black, 20, 0); return; } - r = swf_SetDefineText(tag, font, &color, text, size); + r = swf_SetDefineText(tag, font, &color, text, size, 0); s_addcharacter(name, id, tag, r); incrementid(); -- 1.7.10.4