AdgPrimitive — A wrapper for CpmlPrimitive
typedef AdgPrimitive; AdgPrimitive * adg_primitive_dup (const AdgPrimitive *primitive); AdgPrimitive * adg_primitive_deep_dup (const AdgPrimitive *primitive);
typedef CpmlPrimitive AdgPrimitive;
Another name for CpmlPrimitive: check its documentation for the fields description and visibility details.
AdgPrimitive * adg_primitive_dup (const AdgPrimitive *primitive);
Duplicates primitive. This function makes a shallow duplication of
primitives, that is the internal pointers of the resulting primitive
struct refer to the same memory as the original primitive. Check
out adg_primitive_deep_dup() if it is required also the content
duplication.
|
|
an AdgPrimitive structure |
|
Returns : |
a shallow duplicate of primitive: must be freed
with g_free() when no longer needed.
|
AdgPrimitive * adg_primitive_deep_dup (const AdgPrimitive *primitive);
Duplicates primitive. This function makes a deep duplication of
primitive, that is it duplicates also the definition data (both
org and data).
Furthermore, the new segment field will
point to a fake duplicated segment with only its first primitive
set (the first primitive of a segment should be a CPML_MOVE).
This is needed in order to let a CPML_CLOSE work as expected.
All the data is allocated in the same chunk of memory so freeing the returned pointer releases all the occupied memory.
|
|
an AdgPrimitive structure |
|
Returns : |
a deep duplicate of primitive: must be freed
with g_free() when no longer needed.
|
AdgPrimitivewas last modified by gtk-doc on Sun 21 Feb 2010 10:22:17 PM CET