[CpmlSegment] Removed dependencies on n_points
commit956d2d1665aa4caf93ba55b917b0781536304110
authorNicola Fontana <nicola@localhost.localdomain>
Sat, 20 Feb 2010 13:51:36 +0000 (20 14:51 +0100)
committerNicola Fontana <ntd@entidi.it>
Sat, 20 Feb 2010 14:30:59 +0000 (20 15:30 +0100)
tree18c54db4d19ae61a09a53ba1dc3b4f0fd2bc5ab0
parent4ed98e3e65b25feeb1e8564f2039398d5d3b2b38
[CpmlSegment] Removed dependencies on n_points

The primitive size does not depend on the number of points a primitive
may have but only on the "length" field. This because primitives could
embed additional data in the holes between the end of their points and
the effective data length.

The CpmlSegment APIs have been cleaned up and redesigned to deal with
this issue, that is without assuming anything about the data length.
Furthermore, their implementations are now more robust do to a strictly
check of CpmlSegment compliance: a segment must be contain exactly one
CPML_MOVE element, and only at its beginning. Failing to fulfill these
rules will result in a failing cpml_segment_from_cairo().

Closes issue #21: http://dev.entidi.com/p/adg/issues/21/
cpml/cpml-segment.c