git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aee5cc7
)
added bbox parsing.
author
kramm
<kramm>
Sat, 18 Dec 2004 19:19:24 +0000
(19:19 +0000)
committer
kramm
<kramm>
Sat, 18 Dec 2004 19:19:24 +0000
(19:19 +0000)
src/swfdump.c
patch
|
blob
|
history
diff --git
a/src/swfdump.c
b/src/swfdump.c
index
a697900
..
1f038a6
100644
(file)
--- a/
src/swfdump.c
+++ b/
src/swfdump.c
@@
-56,6
+56,7
@@
static int showtext = 0;
static int showshapes = 0;
static int hex = 0;
static int used = 0;
static int showshapes = 0;
static int hex = 0;
static int used = 0;
+static int bbox = 0;
static struct options_t options[] = {
{"h", "help"},
static struct options_t options[] = {
{"h", "help"},
@@
-70,6
+71,7
@@
static struct options_t options[] = {
{"Y", "height"},
{"r", "rate"},
{"f", "frames"},
{"Y", "height"},
{"r", "rate"},
{"f", "frames"},
+{"b", "bbox"},
{"d", "hex"},
{"u", "used"},
{0,0}
{"d", "hex"},
{"u", "used"},
{0,0}
@@
-125,6
+127,10
@@
int args_callback_option(char*name,char*val)
used = 1;
return 0;
}
used = 1;
return 0;
}
+ else if(name[0]=='b') {
+ bbox = 1;
+ return 0;
+ }
else if(name[0]=='D') {
action = placements = showtext = showshapes = 1;
return 0;
else if(name[0]=='D') {
action = placements = showtext = showshapes = 1;
return 0;
@@
-1035,6
+1041,15
@@
int main (int argc,char ** argv)
else {
printf("\n");
}
else {
printf("\n");
}
+
+ if(bbox && swf_isDefiningTag(tag) && tag->id != ST_DEFINESPRITE) {
+ SRECT r = swf_GetDefineBBox(tag);
+ printf(" %s bbox [%.2f, %.2f, %.2f, %.2f]\n", prefix,
+ r.xmin/20.0,
+ r.ymin/20.0,
+ r.xmax/20.0,
+ r.ymax/20.0);
+ }
sprintf(myprefix, " %s", prefix);
sprintf(myprefix, " %s", prefix);