- Call one or more GPI functions. Each function generates
one element of the segment. This is the simplest way of supplying graphics
data to a segment.
- Call GpiBeginElement,
and follow it with one or more GPI functions. Close the element using GpiEndElement.
All the GPI functions enclosed within the bracket and GpiBeginElement
and GpiEndElement generate
a single element of the segment, and therefore occupy a single-element-pointer
position. Subsequently, the graphics orders cannot be accessed individually
with the element pointer, although the orders can be accessed directly,
for example, using GpiGetData.
- Call GpiElement.
As input, you supply the graphics orders themselves, rather than the GPI
functions that generate them. No matter how much data you supply on this
request, it is considered a single element of the segment.
Multiple orders added to a segment in this way cannot be accessed individually
using the element pointer, but they can be accessed directly, for example,
using GpiGetData.
GpiElement cannot be included
within a GpiBeginElement-GpiEndElement
bracket. The data passed by GpiElement
must not include GpiBeginElement
and GpiEndElement.
- Call GpiPutData.
As with GpiElement, supply graphics
orders as input. You can even include GpiBeginElement
and GpiEndElement orders in
this data, and thus add more than one element to the segment. GpiPutData
is useful when there is a large amount of data to add to a segment.
GpiPutData cannot be used if the
segment editing mode is set to SEGEM_REPLACE. When the segment editing mode
is SEGEM_INSERT, the element pointer must point to the last element in the
current segment. The segment editing mode can be set by using GpiSetEditMode..
GpiPutData is most often used
in conjunction with GpiGetData,
which copies data as a list of drawing orders from a segment to application
storage.