git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pdf2swf: fixed polygon rendering of closed strokes
[swftools.git]
/
lib
/
gfxtools.c
diff --git
a/lib/gfxtools.c
b/lib/gfxtools.c
index
0c9e2ab
..
e79e6fe
100644
(file)
--- a/
lib/gfxtools.c
+++ b/
lib/gfxtools.c
@@
-203,7
+203,13
@@
void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phas
fprintf(stderr, "gfxtool: outline doesn't start with a moveTo");
return;
}
fprintf(stderr, "gfxtool: outline doesn't start with a moveTo");
return;
}
- if(!r || (r[0]<=0 && r[0]>-0.01)) {
+
+ int i;
+ double dashlen=0;
+ for(i=0;r[i]>=0;i++) {
+ dashlen+=r[i];
+ }
+ if(!r || (r[0]<=0 && r[0]>-0.01) || dashlen<0.001) {
// no dashing. just draw the thing
while(line) {
if(line->type == gfx_moveTo) {
// no dashing. just draw the thing
while(line) {
if(line->type == gfx_moveTo) {
@@
-222,7
+228,6
@@
void gfxtool_draw_dashed_line(gfxdrawer_t*d, gfxline_t*line, float*r, float phas
return;
}
return;
}
-
for(;line;line=line->next) {
if(line->type == gfx_moveTo) {
d->moveTo(d, line->x, line->y);
for(;line;line=line->next) {
if(line->type == gfx_moveTo) {
d->moveTo(d, line->x, line->y);