git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
introduced cross-asset dependencies
[swftools.git]
/
lib
/
readers
/
swf.c
diff --git
a/lib/readers/swf.c
b/lib/readers/swf.c
index
fac12e2
..
5bff2a1
100644
(file)
--- a/
lib/readers/swf.c
+++ b/
lib/readers/swf.c
@@
-234,7
+234,15
@@
static void renderFilled(render_t*r, gfxline_t*line, FILLSTYLE*f, CXFORM*cx, MAT
} else if(f->type == FILL_LINEAR || f->type == FILL_RADIAL) {
gfxmatrix_t m;
gfxgradient_t* g;
} else if(f->type == FILL_LINEAR || f->type == FILL_RADIAL) {
gfxmatrix_t m;
gfxgradient_t* g;
- convertMatrix(&f->m, &m);
+ MATRIX* m2 = &f->m;
+ //swf_MatrixJoin(&m2, po_m, &f->m);
+
+ double z = f->type==FILL_RADIAL?4:4;
+ m.m00 = m2->sx/z/20.0; m.m10 = m2->r1/z/20.0;
+ m.m01 = m2->r0/z/20.0; m.m11 = m2->sy/z/20.0;
+ m.tx = m2->tx/20.0;
+ m.ty = m2->ty/20.0;
+
g = convertGradient(&f->gradient);
r->device->fillgradient(r->device, line, g, f->type == FILL_LINEAR ? gfxgradient_linear : gfxgradient_radial, &m);
free(g);
g = convertGradient(&f->gradient);
r->device->fillgradient(r->device, line, g, f->type == FILL_LINEAR ? gfxgradient_linear : gfxgradient_radial, &m);
free(g);
@@
-598,15
+606,13
@@
void swfpage_render(gfxpage_t*page, gfxdevice_t*output)
int t;
for(t=0;t<65536;t++) {
int t;
for(t=0;t<65536;t++) {
+ if(depths->ids[t]) {
+ placeObject(&r, t, depths->ids[t]);
+ }
int i;
int i;
-
for(i=0; i<r.clips_waiting[t]; i++) {
output->endclip(output);
}
for(i=0; i<r.clips_waiting[t]; i++) {
output->endclip(output);
}
-
- if(depths->ids[t]) {
- placeObject(&r, t, depths->ids[t]);
- }
}
free(r.clips_waiting);
}
}
free(r.clips_waiting);
}
@@
-626,7
+632,7
@@
void swf_doc_destroy(gfxdocument_t*gfx)
free(gfx);gfx=0;
}
free(gfx);gfx=0;
}
-void swf_doc_set_parameter(gfxdocument_t*gfx, const char*name, const char*value)
+void swf_doc_setparameter(gfxdocument_t*gfx, const char*name, const char*value)
{
swf_doc_internal_t*i= (swf_doc_internal_t*)gfx->internal;
}
{
swf_doc_internal_t*i= (swf_doc_internal_t*)gfx->internal;
}
@@
-654,7
+660,7
@@
gfxpage_t* swf_doc_getpage(gfxdocument_t*doc, int page)
return swf_page;
}
return swf_page;
}
-void swf_set_parameter(gfxsource_t*src, const char*name, const char*value)
+void swf_setparameter(gfxsource_t*src, const char*name, const char*value)
{
msg("<verbose> setting parameter %s to \"%s\"", name, value);
}
{
msg("<verbose> setting parameter %s to \"%s\"", name, value);
}
@@
-699,7
+705,7
@@
gfxdocument_t*swf_open(gfxsource_t*src, const char*filename)
swf_doc->internal = i;
swf_doc->get = 0;
swf_doc->destroy = swf_doc_destroy;
swf_doc->internal = i;
swf_doc->get = 0;
swf_doc->destroy = swf_doc_destroy;
- swf_doc->set_parameter = swf_doc_set_parameter;
+ swf_doc->setparameter = swf_doc_setparameter;
swf_doc->getpage = swf_doc_getpage;
return swf_doc;
swf_doc->getpage = swf_doc_getpage;
return swf_doc;
@@
-716,7
+722,7
@@
gfxsource_t*gfxsource_swf_create()
{
gfxsource_t*src = (gfxsource_t*)malloc(sizeof(gfxsource_t));
memset(src, 0, sizeof(gfxsource_t));
{
gfxsource_t*src = (gfxsource_t*)malloc(sizeof(gfxsource_t));
memset(src, 0, sizeof(gfxsource_t));
- src->set_parameter = swf_set_parameter;
+ src->setparameter = swf_setparameter;
src->open = swf_open;
src->destroy = swf_destroy;
return src;
src->open = swf_open;
src->destroy = swf_destroy;
return src;