[gs-bugs] [Bug 691320] Extra trapezoids and rectangles being painted

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed May 19 16:05:07 UTC 2010


--- Comment #4 from Robin Watts <robin.watts at artifex.com> 2010-05-19 16:05:04 UTC ---
Revision 11282 contains a partial fix for this, in that it reduces the number
of shapes plotted to 4 rather than 5. (The commit message incorrectly says 3).

The first and last things plotted are the "hack" rectangles (from the dropout
prevention code). These are not actually required in this particular instance
as the shapes plotted by the slant_into_trapezoids code are sufficient (1
rectangle, followed by 1 trapezoid).

Various ideas present themselves as things to try:

1) Remove the "hack" code that does drop out prevention:

   This causes the dumbell case to go wrong. This is to be expected as not all
horizontal lines will have a trapezoid shape abutting them.

2) Change the code in slant_into_trapezoids to generate smaller traps:

 If we are sure that all horizontal lines are going to be plotted because of
the drop out code, can we perhaps make use of this in slant_into_trapezoids by
generating smaller traps? I think the answer here is no, because not all traps
are going to come from shapes that genuinely have horizontal lines along their
top and bottom edges. There is no easy way inside this routine to know that
some (or all) of the top/bottom edges may already have been drawn.

3) Can we replace the "hack" with smarter dropout prevention, such that it only
draws rectangles for horizontal lines if they weren't going to be rendered as
part of a shape anyway?

 I cannot currently see a way to do this. Doing this would be complicated by
the fact that some of a horizontal line might need drop out prevention, and
some might not. I suspect any time saved by not having to generate a trap would
be more than lost in the additional checks required.

4) Can we (as Ray suggests in comment 2) roll some generated traps together?

 Given that the important thing for the customer appears to be the number of
traps generated, this may be worth pursuing.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list