Displays a text string for existing locators
#include <AlAnnotationLocator.h> class AlAnnotationLocator : public AlLocator AlAnnotationLocator(); virtual ~AlAnnotationLocator(); virtual AlObject * copyWrapper() const; virtual AlObjectType type() const; statusCode create(const AlPointLocator *, const char *, double, double, double); statusCode setString(const char *); statusCode setWorldLeaderPosition(double x = 0.0, double y = 0.0, double z = 0.0); statusCode setLocalLeaderPosition(double x = 0.0, double y = 0.0, double z = 0.0); statusCode setLeftJustify(boolean); const char * string() const; statusCode worldLeaderPosition(double &, double &, double &) const; statusCode localLeaderPosition(double &, double &, double &) const; statusCode leftJustify(boolean &) const;
This class creates an annotation to existing point locators (for example, the space locator, curve locator, curve on surface locator, and surface locator). An annotation is a line of text and a leader (line with arrow) that is drawn relative to a locator (point type).
To create an annotation locator, first create a point locator and then attach the annotation string through this class using its create method. There are also methods to manipulate the position and starting point of the leader line for the annotation.
Constructs an AlAnnotationLocator wrapper object.
Deletes an AlAnnotationLocator wrapper object.
Returns an exact copy of the AlAnnotationLocator wrapper.
Returns the class identifier kAnnotationLocatorType.
Creates an annotation locator on another point locator.
> pointLocator - The AlPointLocator on which the annotation locator is created. The pointLocator should be created before creating the annotation locator.
> string - The string to be displayed in the annotation.
> x, y, z - The coordinates relative to the point locator on which annotation depends, at which the leader line of the text starts.
sSuccess - the text change was successful
sAlreadyCreated - the annotation locator was created already
sInvalidArgument - the point locator has not been created, or the string argument is NULL
sFailure - the method failed to create an annotation locator
Changes the string in an annotation locator.
< string - the string to substitute in the present annotation locator
sSuccess - the text change was successful
sInvalidObject - the object is not valid
sInsufficientMemory - there was not enough memory to create a copy of the string
sInvalidArgument - a NULL argument was supplied
Returns a pointer to the annotation string.
NULL - if the annotation locator is not valid, or the string is NULL
Sets the position of the annotation leader line in world coordinates.
> x, y, z - the world coordinates at which the leader line starts
sInvalidObject - the object is not valid
sSuccess - change was successful
Sets the position of the annotation leader line, relative to the point locator on which the annotation locator is created.
> x, y, z - the local coordinates at which the leader line starts
sInvalidObject - the object is not valid
sSuccess - change was successful
Sets the justification of the annotation text for the annotation locator. The text can be right justified or left justified.
< leftJustify - a value of true left-justifies the text; a value of false right-justifies it.
sSuccess - the setting was successful
sInvalidObject - the object is not valid
Gets the position of the annotation leader line in world coordinates.
< x, y, z - the world coordinates at which the leader line starts
sInvalidObject - the object is not valid
sSuccess - the change was successful
Gets the position of the annotation leader line, relative to the point locator on which the annotation locator is created.
< x, y, z - the local coordinates at which the leader line starts.
sInvalidObject - the object is not valid
sSuccess - the change was successful
Determines whether the annotation text is left-justified or right-justified.
> leftJustify - a value of true indicates that it is left-justified; false indicates right-justification
sSuccess - the justification was found
sInvalidObject - the object is not valid