Stroke not always rendered for tiled paths
Posted: 2006-12-02T13:39:31-07:00
I was originally hesitant to post this, but I'm now sure I've found a bug.
I'm using perlmagick (ImageMagick 6.3.0) and generating vertical graduated fills for draw paths:
1) create 1-pixel wide graduated image, height of object
2) composite this onto a 1-pixel wide image the height of the destination image, at the appropriate y-offset.
3) draw the object using the tile option.
The problem I found was that my mask didn't cover the entire height of the object. After some investigation, I discovered that if there is a thick stroke line specified then it isn't rendered as line, but as fill (tile). So there is a region at the top and bottom of the drawn area which is outside the graduated region created in (2).
I tried to make a small demo of this, and the damn thing renders fine.
In fact this problem seems to be quite dependent on the parameters used:
renders fine (embedded in my program), while
doesn't. The stroke isn't drawn.
The pragmatic solution is to do the fill separately, but still, it rankles. And the current behaviour is clearly buggy.
I'm using perlmagick (ImageMagick 6.3.0) and generating vertical graduated fills for draw paths:
1) create 1-pixel wide graduated image, height of object
2) composite this onto a 1-pixel wide image the height of the destination image, at the appropriate y-offset.
3) draw the object using the tile option.
The problem I found was that my mask didn't cover the entire height of the object. After some investigation, I discovered that if there is a thick stroke line specified then it isn't rendered as line, but as fill (tile). So there is a region at the top and bottom of the drawn area which is outside the graduated region created in (2).
I tried to make a small demo of this, and the damn thing renders fine.
In fact this problem seems to be quite dependent on the parameters used:
Code: Select all
$image->Draw(primitive=>'path',points=>$points,
stroke=>$current[$pp{linecol}],
strokewidth=>2,
$drawstyle=>$drawfn,
antialias=>'true');
Code: Select all
$image->Draw(primitive=>'path',points=>$points,
stroke=>$current[$pp{linecol}],
strokewidth=>3,
$drawstyle=>$drawfn,
antialias=>'true');
The pragmatic solution is to do the fill separately, but still, it rankles. And the current behaviour is clearly buggy.