These low-level draw primitives let you render complex shapes
not supported by the Photon graphics drivers.

The functions draw a list of spans. The spans are defined as
a list of PgSpan_t records. Here are
the members of PgSpan_t:

shortx1

starting x position

shortx2

last x position

shorty

y position

The number of spans is defined by the
num parameter. The location of the
spans is offset by the pos parameter.

You can set flags to one of the
following:

Pg_DRAW_FILL — draw with fill parameters.

Pg_DRAW_STROKE — draw with stroke parameters.

Pg_DRAW_TEXT — draw with text parameters.

If you call the “v” forms of this function, the data isn't
physically copied into the draw buffer. Instead, a pointer
to the list of spans is stored until the draw buffer is flushed.
Make sure you call
PgFlush() or
PgFlushCx()
before you modify the list.

PgDrawSpan() and PgDrawSpanv() work on the current
draw context, while you can specify the draw context dc for
PgDrawSpanCx() and PgDrawSpanCxv().