undid last change.
authorkramm <kramm>
Sun, 25 Jul 2004 09:06:12 +0000 (09:06 +0000)
committerkramm <kramm>
Sun, 25 Jul 2004 09:06:12 +0000 (09:06 +0000)
lib/example/edittext.c
lib/modules/swftext.c
lib/python/tags.c
lib/rfxswf.h
src/swfc.c

index 10fa39d..463b888 100644 (file)
@@ -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, 0);
+    swf_SetDefineText(tag, font, &rgb, "Password:", 20);
    
   tag = swf_InsertTag(tag,ST_PLACEOBJECT2);
   m.tx = width/2*20;
index 0adaf2b..2138275 100644 (file)
@@ -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, MATRIX* m)
+SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale)
 {
     SRECT r;
     U8 gbits, abits;
@@ -1204,7 +1204,15 @@ SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale, M
     }
 
     swf_SetRect(tag,&r);
-    swf_SetMatrix(tag,m);
+
+    /* The text matrix is pretty boring, as it doesn't apply to
+       individual characters, but rather whole text objects (or
+       at least whole char records- haven't tested).
+       So it can't do anything which we can't already do with
+       the placeobject tag we use for placing the text on the scene.
+    */
+    swf_SetMatrix(tag,0);
+
     swf_TextCountBitsUTF8(font,text,scale*20,&gbits,&abits);
     swf_SetU8(tag,gbits);
     swf_SetU8(tag,abits);
index a646180..7235e1e 100644 (file)
@@ -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, 0);
+    ti->bbox = swf_SetDefineText(self->tag, ti->swffont, &ti->rgba, ti->text, ti->size);
     return 1;
 }
 static PyObject* text_getattr(tag_internals_t*self,char*a)
index 4c94cb4..60edecb 100644 (file)
@@ -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, MATRIX* m);
+SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale);
 
 void swf_DrawText(drawer_t*draw, SWFFONT*font, int size, char*text);
 
index 3901cd0..2be9d1c 100644 (file)
@@ -889,7 +889,7 @@ void s_textshape(char*name, char*fontname, float size, char*_text)
 void s_text(char*name, char*fontname, char*text, int size, RGBA color)
 {
     SRECT r;
-
+    MATRIX _m,*m=0;
     SWFFONT*font;
     font = dictionary_lookup(&fonts, fontname);
     if(!font)
@@ -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, 0);
+    r = swf_SetDefineText(tag, font, &color, text, size);
    
     s_addcharacter(name, id, tag, r);
     incrementid();