Next: astFrame - Create a Frame
Up: AST Function Descriptions
Previous: astFluxFrame - Create a FluxFrame
astFormat
-
Format a coordinate value for a Frame axis
- Description:
- This function returns a pointer to a string containing the
formatted (character) version of a coordinate value for a Frame
axis. The formatting applied is determined by the Frame's
attributes and, in particular, by any Format attribute string
that has been set for the axis. A suitable default format (based
on the Digits attribute value) will be applied if necessary.
- Synopsis:
- const char
astFormat( AstFrame
this, int axis, double value )
- Parameters:
-
this
-
Pointer to the Frame.
-
axis
-
The number of the Frame axis for which formatting is to be
performed (axis numbering starts at 1 for the first axis).
-
value
-
The coordinate value to be formatted.
- Returned Value:
-
astFormat()
-
A pointer to a null-terminated string containing the formatted
value.
- Notes:
- The returned pointer is guaranteed to remain valid and the
string to which it points will not be over-written for a total
of 50 successive invocations of this function. After this, the
memory containing the string may be re-used, so a copy of the
string should be made if it is needed for longer than this.
- A formatted value may be converted back into a numerical (double)
value using astUnformat.
- A NULL pointer will be returned if this function is invoked
with the AST error status set, or if it should fail for any
reason.
Next: astFrame - Create a Frame
Up: AST Function Descriptions
Previous: astFluxFrame - Create a FluxFrame
AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk
Copyright (C) 2009 Science \& Technology Facilities Council