Summary: | Rounded boxes with zero height have a white triangle inside in gs 9.x | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Pavel Roskin <proski> |
Component: | Graphics Library | Assignee: | Robin Watts <robin.watts> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | wl |
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: |
Lilypond output
Rendering to pngalpha - with white triangle Rendering to pnggray - without white triangle Patch to fix the white triangle |
Description
Pavel Roskin
2012-02-16 22:12:36 UTC
Created attachment 8361 [details]
Rendering to pngalpha - with white triangle
Rendered by
gs -r300 -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=box-alpha.png box.ps
Created attachment 8362 [details]
Rendering to pnggray - without white triangle
Rendered by
gs -r300 -dBATCH -dNOPAUSE -sDEVICE=pnggray -sOutputFile=box-gray.png box.ps
Created attachment 8363 [details] Patch to fix the white triangle This is essentially a revert of commit commit cbcc4ac3c4d74ef2ca915c13c6d35a8a930ae4ff Author: Robin Watts <robin.watts@artifex.com> Date: Wed Apr 7 13:13:57 2010 +0000 Fix for bug 691228, problems with wide strokes with round caps/joins with antialiasing enabled. 2 small problems in the same code. In the antialiased case, we stroke by forming 2 paths (one up either side of the line) and then reverse one and concatenate it. This should happen whenever we meet a closepath, but due to a misplaced return, was being missed out in some round join cases. Also, when using a round join in the case where 2 lines meet 'in-line' we would inadvertently leave the point on the wrong side of the line. No changes in localcluster testing as this only affects antialiased results and that's not tested currently. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11031 a1074d23-0009-0410-80fe-cf8c14f379e6 (In reply to comment #3) > Created attachment 8363 [details] > Patch to fix the white triangle > > This is essentially a revert of commit Simple reversion is clearly not the right fix, as that reintroduces all the problems that caused bug 691228 in the first place. I have implemented a fix that makes the fix dependent on the relative direction of the vectors, and this seems to fix both cases. commit 6961e71d7b6b9162f6b75fae60469175a4c8d43e Author: Robin Watts <robin.watts@artifex.com> Date: Thu Mar 7 00:45:41 2013 +0000 Bug 692862: Fix stroking problem with antialiasing The fix for bug 691228 causes problems in some cases; when joining two segment that are directly in line with the next, we add a circular line cap to ensure correct rendering. Which side of this end cap we end up on depends on which direction the line then continues in. Thanks for the report! |