X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.h;h=85b0c98de666703651d285dafa1078d8a9d58b9b;hb=295dd98fad95646311da550526a4156a61929970;hp=b5e062c308f2a1c929f1d34775652566bb053e76;hpb=1956e0151faa149f8b66daad15a7244ede6e1ded;p=swftools.git diff --git a/lib/rfxswf.h b/lib/rfxswf.h index b5e062c..85b0c98 100644 --- a/lib/rfxswf.h +++ b/lib/rfxswf.h @@ -151,6 +151,9 @@ typedef struct _TAG // NEVER access a Tag-Struct directly ! } TAG, * LPTAG; +#define swf_ResetReadBits(tag) if (tag->readBit) { tag->pos++; tag->readBit = 0; } +#define swf_ResetWriteBits(tag) if (tag->writeBit) { tag->writeBit = 0; } + typedef struct _SOUNDINFO { U8 stop; @@ -583,7 +586,9 @@ int swf_TextSetCharRecord(TAG * t,SWFFONT * font,U8 * s,int scale,U8 gbits,U8 ab int swf_TextPrintDefineText(TAG * t,SWFFONT * f); // Prints text defined in tag t with font f to stdout -/* notice: if you set the fontid, make sure the corresponding font has layout information */ +void swf_FontPrepareForEditText(SWFFONT * f); + +/* notice: if you set the fontid, make sure you call swf_FontPrepareForEditText() for the font first */ void swf_SetEditText(TAG*tag, U16 flags, SRECT r, char*text, RGBA*color, int maxlength, U16 font, U16 height, EditTextLayout*layout, char*variable); @@ -597,6 +602,8 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename); SWFFONT* swf_LoadT1Font(char*filename); SWFFONT* swf_LoadFont(char*filename); +void swf_SetLoadFontParameters(int scale, int skip_unused); + // swfdump.c void swf_DumpHeader(FILE * f,SWF * swf);