The curved trapezoid algorithm

"Igor V. Melichev" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.devel,gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
I'd appreciate a help with testing this.

Igor.

--------------------------------------------------------

[Log message beg]
Generalize the trapezoid filling algorithm for curves, step 22 - a release
candidate 1.

DETAILS :

This patch switches to the new algorithm.

Please note that the main purpose of the curved algorithm is the spotan
device.
It renders almost same raster as the uncurved one.
Only difference is

    -r300 chilis_black.pdf

A help wanted to analyze it.
I guess it is another banding problem besides the fixed one
http://www.ghostscript.com/pipermail/gs-cvs/2003-December/003918.html .
Really Y-steps depend on all spot items, but both the old and the new
algorithms ignore ones outside the band to save a CPU time.

With comparefiles on Zeon 3.06 the curved algorithm appears in 1% slower.
This is a kind of unexpected and to be optimized.
Probably we should optimize the copying of gx_flattened_iterator states.

An useful improvement is to upgrade the scanline algorithm with
gx_flattened_iterator and the new add_y_list.
It would release some RAM and make it some faster.

Another wanted improvement is to remove the pco_small_curves and
pco_monotonize rudiments. After the scanline algorithm is improved,
there will no need for curve decomposition.

EXPECTED DIFFERENCES :

-r300 chilis_black.pdf
[Log message end]


Changes:



*** f:\casper\HEAD\gs\src\gx.h Mon Dec 29 07:35:06 2003
--- files\gs\src\gx.h Mon Dec 29 07:36:25 2003
***************
*** 32,36 ****
  #define NEW_TT_INTERPRETER 1
  #define TT_GRID_FITTING (NEW_TT_INTERPRETER && 0) /* old code = 0, new
code = 1. */
! #define CURVED_TRAPEZOID_FILL 0 /* old code = 0, new code = 1. */
  /* The following switches are only important with CURVED_TRAPEZOID_FILL 1.
*/
  #   define CURVED_TRAPEZOID_FILL_HEAVY_TEST 0  /* Temporarily used for a
debug purpose. */
--- 32,36 ----
  #define NEW_TT_INTERPRETER 1
  #define TT_GRID_FITTING (NEW_TT_INTERPRETER && 0) /* old code = 0, new
code = 1. */
! #define CURVED_TRAPEZOID_FILL 1 /* old code = 0, new code = 1. */
  /* The following switches are only important with CURVED_TRAPEZOID_FILL 1.
*/
  #   define CURVED_TRAPEZOID_FILL_HEAVY_TEST 0  /* Temporarily used for a
debug purpose. */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.