int
kgeom_write_primitive(
kgeom_object *object,
kgeom_primitive *primitive)
none
In general, the kgeom_write_object()
function
should be used instead of this function. This
function has been made public to provide complete
flexibility for writing a geometry object. It should
only be used when you wish to write a geometry object
primitive-by-primitive.
If you wish to use this function to write out a primitive at a time, you should follow this sequence to write out the the object:
kgeom_write_header(object, "filename");
kgeom_start_writing_object(object);
At this point, you can start writing out individual
primitives using the kgeom_write_primitive()
function. The file to be written to is determined
from the open fid inside the object.
When you are done writing primitives, finish with the following calls :
kgeom_finish_writing_object(object);
kgeom_done_writing(object);
The object presentation is used to determine how much
data is present in the primitive, so make sure the
has_alpha, layout, location_dim, and other fields are
set correctly. These should be valid before the call
to kgeom_start_writing_object()
is made.
The primitive does not have to be present on the
object's primitive list to be written.
none
none
$DATASERV/objects/library/kgeom/src/prim_write.c