git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed handling of empty clip shapes
[swftools.git]
/
lib
/
devices
/
swf.c
diff --git
a/lib/devices/swf.c
b/lib/devices/swf.c
index
ab6734f
..
8b7e21f
100644
(file)
--- a/
lib/devices/swf.c
+++ b/
lib/devices/swf.c
@@
-2078,7
+2078,16
@@
static void swf_startclip(gfxdevice_t*dev, gfxline_t*line)
swf_SetShapeBits(i->tag,shape);
swf_ShapeSetAll(i->tag,shape,UNDEFINED_COORD,UNDEFINED_COORD,0,fsid,0);
i->swflastx = i->swflasty = UNDEFINED_COORD;
swf_SetShapeBits(i->tag,shape);
swf_ShapeSetAll(i->tag,shape,UNDEFINED_COORD,UNDEFINED_COORD,0,fsid,0);
i->swflastx = i->swflasty = UNDEFINED_COORD;
+ i->shapeisempty = 1;
drawgfxline(dev, line);
drawgfxline(dev, line);
+ if(i->shapeisempty) {
+ /* an empty clip shape is equivalent to a shape with no area */
+ int x = line?line->x:0;
+ int y = line?line->y:0;
+ moveto(dev, i->tag, x,y);
+ lineto(dev, i->tag, x,y);
+ lineto(dev, i->tag, x,y);
+ }
swf_ShapeSetEnd(i->tag);
swf_ShapeFree(shape);
swf_ShapeSetEnd(i->tag);
swf_ShapeFree(shape);
@@
-2332,7
+2341,7
@@
static void swf_fillgradient(gfxdevice_t*dev, gfxline_t*line, gfxgradient_t*grad
msg("<error> Gradient filling not implemented yet");
}
msg("<error> Gradient filling not implemented yet");
}
-static SWFFONT* gfxfont_to_swffont(gfxfont_t*font, char* id)
+static SWFFONT* gfxfont_to_swffont(gfxfont_t*font, const char* id)
{
SWFFONT*swffont = (SWFFONT*)rfx_calloc(sizeof(SWFFONT));
int t;
{
SWFFONT*swffont = (SWFFONT*)rfx_calloc(sizeof(SWFFONT));
int t;
@@
-2473,7
+2482,7
@@
static void swf_addfont(gfxdevice_t*dev, gfxfont_t*font)
}
}
}
}
-static void swf_switchfont(gfxdevice_t*dev, char*fontid)
+static void swf_switchfont(gfxdevice_t*dev, const char*fontid)
{
swfoutput_internal*i = (swfoutput_internal*)dev->internal;
{
swfoutput_internal*i = (swfoutput_internal*)dev->internal;