Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gpr_pgon_decomp_technique(A) — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gpr_$inq_pgon_decomp_technique

GPR_$PGON_DECOMP_TECHNIQUE        GPR Calls         GPR_$PGON_DECOMP_TECHNIQUE


NAME
     gpr_$pgon_decomp_technique - sets a mode used to decompose and render
     polygons.

FORMAT
     gpr_$pgon_decomp_technique (decomp_technique, status)

DESCRIPTION
     This routine sets a mode which controls the algorithm used to decompose
     and render polygons.

     This routine establishes a mode setting, not an attribute.  sets a mode
     used to decompose and render polygons.  Setting the decomposition tech-
     nique applies to all polygons drawn during a particular session of GPR
     (within a gpr_$init and gpr_$terminate), not just the polygons drawn in
     the current bitmap.

     Polygons without self-crossing and "normal" self-crossing polygons work
     with the gpr_$fast_traps setting. Polygons with multiple self-crossings
     and/or vertices in close proximity may not be filled correctly with the
     gpr_$fast_traps setting.  Fill these polygons using the
     gpr_$precise_traps, gpr_$non_overlapping_tris, or gpr_$render_exact set-
     ting.

   Input Parameters
     decomp_technique
          Sets a mode that controls the algorithm used to decompose and render
          polygons in gpr_$decomp_technique_t format.  This is a 2-byte
          integer.  Specify only one of the following predefined values:

          gpr_$fast_traps
               This is the default value on DN3XX, DN4XX, DN550/560, DN600/660
               which indicates that the fast, but less precise, algorithm is
               to be used. This is the only algorithm that existed prior to
               SR9.

          gpr_$precise_traps
               This value indicates that a slower, but more precise, version
               of the trapezoid decomposition algorithm is to be used.

          gpr_$non_overlapping_tris
               This is the default value on all other devices.

          gpr_$render_exact
               This value indicates that the most precise rendering algorithm
               is to be used. It provides the best performance for rectilinear
               and axis-aligned polygons, and it renders self-intersecting
               polygons more accurately than any of the other techniques in
               the following situation: when the intersection of two edges of
               the polygon is located at a noninteger.

   Output Parameters
     status
          Completion status, in status_$t format.

SEE ALSO
     gpr_$inq_pgon_decomp_technique.

NOTES
     The gpr_$fast_traps decomposition technique supports the filling of com-
     plex polygons except in the case where two polygon edges are parallel and
     have no pixels between them (they are coincident).  In this case, an
     integer divide by zero occurs, and the fill fails.  Use
     gpr_$precise_traps or gpr_$nonoverlapping_tris to eliminate this problem.




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026