int CHARMIDX = 0;
int CHARMIDY = 0;
+char fillstylechanged = 0;
+
static void startshape(struct swfoutput* obj);
static void starttext(struct swfoutput* obj);
static void endshape();
{
int rx = (int)(p0.x*20);
int ry = (int)(p0.y*20);
- if(rx!=swflastx || ry!=swflasty) {
+ if(rx!=swflastx || ry!=swflasty || fillstylechanged) {
swf_ShapeSetMove (tag, shape, rx,ry);
+ fillstylechanged = 0;
}
swflastx=rx;
swflasty=ry;
if(shapeid<0)
startshape(obj);
- if(!lastwasfill)
+ if(!lastwasfill) {
swf_ShapeSetStyle(tag,shape,0x8000,fillstyleid,0);
+ fillstylechanged = 1;
+ }
lastwasfill = 1;
int lf = fill;
{
if(textid>=0)
endtext();
+
+ /* XXX the following is needed due to a bug in the SWF player.
+ Filled shapes consisting solely of curves don't get
+ filled correctly if they are in the same shape */
+ if(shapeid>=0 && fill) {
+ endshape();
+ }
+
if(shapeid<0)
startshape(output);
if(lastwasfill && !fill)
{
swf_ShapeSetStyle(tag,shape,linestyleid,0x8000,0);
+ fillstylechanged = 1;
lastwasfill = 0;
}
if(!lastwasfill && fill)
{
swf_ShapeSetStyle(tag,shape,0x8000,fillstyleid,0);
+ fillstylechanged = 1;
lastwasfill = 1;
}
s.bits.fill = 1;
s.bits.line = 0;
swf_ShapeSetStyle(ftag,&s,0,1,0);
+ fillstylechanged = 1;
int lastfill = fill;
fill = 1;
storefont = 1;
obj->fillrgb.g == g &&
obj->fillrgb.b == b &&
obj->fillrgb.a == a) return;
-
if(shapeid>=0)
endshape();
+
obj->fillrgb.r = r;
obj->fillrgb.g = g;
obj->fillrgb.b = b;