Function CDM_DisplaceAnnotation


Definition:#include <CDM.h>
Prototype:CDM_Annotation CDM_DisplaceAnnotation(CDM_Annotation Annotation, long offset, long displacement);
Arguments:

Annotation: The Annotation to be displaced (CDM_Annotation)
offset: A character offset after which all offsets are modified (long)
displacement: The number of characters that offsets will be moved (long)

C/C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

This function displases or "moves" the specified Annotation by "displacement" characters. This function will iterate over all spans contained in the Annotation. For each span all the offsets contained in it (either start or end) will be examined: if any of this offsets is equal or greater than the value specified through the "offset" parameter, then the value of the "displacement" parameter will be added to it.

Return Value:

The return value from this function will be a new Annotation object, if any displacement happened. In this case, the user is responsible to free the returned Annotation (through Tcl_DecrRefCount of CDM_Free) when it is not needed any more.

If no displacement occured, then the specified Annotation through the "Annotation" parameter will be returned.

Finally, in case of an error, NULL will be returned and a message will be left at the current interpreter (CDM_Interp).

Notes:

This function is equivelant to tip_DisplaceAnnotation (Tcl API).

See Also:

CDM_DisplaceAnnotations, CDM_Free, Tcl_DecrRefCount, tip_DisplaceAnnotation


Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.