next up previous
Next: astTran1 - Transform 1-dimensional coordinates
Up: AST Function Descriptions
Previous: astTest - Test if an Object attribute value is set

astText - Draw a text string for a Plot   

Description:
This function draws a string of text at a position specified in the physical coordinate system of a Plot. The physical position is transformed into graphical coordinates to determine where the text should appear within the plotting area.

Synopsis:
void astText( AstPlot *this, const char *text, const double pos[], const float up[ 2 ], const char *just )

Parameters:
this
Pointer to the Plot.
text
Pointer to a null-terminated character string containing the text to be drawn. Trailing white space is ignored.
pos
An array, with one element for each axis of the Plot, giving the physical coordinates of the point where the reference position of the text string is to be placed.
up
An array holding the components of a vector in the "up" direction of the text (in graphical coordinates). For example, to get horizontal text, the vector {0.0f,1.0f} should be supplied.
just
Pointer to a null-terminated character string identifying the reference point for the text being drawn. The first character in this string identifies the reference position in the "up" direction and may be "B", "C" or "T". The second character identifies the side-to-side reference position and may be "L", "C" or "R" (for left, centre or right). The string is case-insensitive, and only the first two characters are significant.

For example, a value of "BL" means that the bottom left point of the original (un-rotated) text is to be drawn at the position given by "pos".

Notes:
  • Text is not drawn at positions which have any coordinate equal to the value AST__BAD (or where the transformation into graphical coordinates yields coordinates containing the value AST__BAD).
  • If the plotting position is clipped (see astClip), then no text is drawn.
  • An error results if the base Frame of the Plot is not 2-dimensional.
  • An error also results if the transformation between the current and base Frames of the Plot is not defined (i.e. the Plot's TranInverse attribute is zero).



next up previous
Next: astTran1 - Transform 1-dimensional coordinates
Up: AST Function Descriptions
Previous: astTest - Test if an Object attribute value is set

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils