git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small fix in new text selection code
[swftools.git]
/
lib
/
modules
/
swfrender.c
diff --git
a/lib/modules/swfrender.c
b/lib/modules/swfrender.c
index
9683622
..
6524089
100644
(file)
--- a/
lib/modules/swfrender.c
+++ b/
lib/modules/swfrender.c
@@
-23,6
+23,9
@@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <assert.h>
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "../rfxswf.h"
/* one bit flag: */
#define clip_type 0
/* one bit flag: */
#define clip_type 0
@@
-362,7
+365,7
@@
void swf_Render_Delete(RENDERBUF*dest)
/* delete line buffers */
for(y=0;y<i->height2;y++) {
/* delete line buffers */
for(y=0;y<i->height2;y++) {
- swf_DeleteTag(i->lines[y].points);
+ swf_DeleteTag(0, i->lines[y].points);
i->lines[y].points = 0;
}
i->lines[y].points = 0;
}
@@
-1045,7
+1048,7
@@
typedef struct
SHAPE2**glyphs;
} font_t;
SHAPE2**glyphs;
} font_t;
-enum CHARACTER_TYPE {none_type, shape_type, image_type, text_type, font_type, sprite_type};
+enum CHARACTER_TYPE {none_type, shape_type, image_type, text_type, edittext_type, font_type, sprite_type};
typedef struct
{
TAG*tag;
typedef struct
{
TAG*tag;
@@
-1230,6
+1233,12
@@
static void renderFromTag(RENDERBUF*buf, character_t*idtable, TAG*firstTag, MATR
info.buf = buf;
swf_ParseDefineText(tag, textcallback, &info);
info.buf = buf;
swf_ParseDefineText(tag, textcallback, &info);
+ } else if(idtable[id].type == edittext_type) {
+ TAG* tag = idtable[id].tag;
+ U16 flags = swf_GetBits(tag, 16);
+ if(flags & ET_HASTEXT) {
+ fprintf(stderr, "edittext not supported yet (id %d)\n", id);
+ }
} else {
fprintf(stderr, "Unknown/Unsupported Object Type for id %d: %s\n", id, swf_TagGetName(idtable[id].tag));
}
} else {
fprintf(stderr, "Unknown/Unsupported Object Type for id %d: %s\n", id, swf_TagGetName(idtable[id].tag));
}
@@
-1244,6
+1253,7
@@
void swf_RenderSWF(RENDERBUF*buf, SWF*swf)
int t;
RGBA color;
int t;
RGBA color;
+ swf_OptimizeTagOrder(swf);
swf_FoldAll(swf);
character_t* idtable = (character_t*)rfx_calloc(sizeof(character_t)*65536); // id to character mapping
swf_FoldAll(swf);
character_t* idtable = (character_t*)rfx_calloc(sizeof(character_t)*65536); // id to character mapping
@@
-1299,6
+1309,8
@@
void swf_RenderSWF(RENDERBUF*buf, SWF*swf)
idtable[id].type = text_type;
} else if(tag->id == ST_DEFINESPRITE) {
idtable[id].type = sprite_type;
idtable[id].type = text_type;
} else if(tag->id == ST_DEFINESPRITE) {
idtable[id].type = sprite_type;
+ } else if(tag->id == ST_DEFINEEDITTEXT) {
+ idtable[id].type = edittext_type;
}
}
tag = tag->next;
}
}
tag = tag->next;