NhlGetBB
The Fortran name of this function is NhlFGetBB.
This function returns the coordinates of the left, right, top, and
bottom edges of a View class object's bounding box in
NDC units.
C Synopsis
#include <ncarg/hlu/hlu.h>
#include <hfile for View class object>
NhlErrorTypes NhlGetBB(
int pid,
NhlBoundingBox *thebox
)
Fortran Synopsis
subroutine NhlFGetBB(pid, top, bottom, left, right, ierr)
integer pid, ierr
real top, bottom, left, right
C Arguments
- pid (input)
- Id of object whose bounding box is requested.
- thebox (output)
- Pointer to a struct of type NhlBoundingBox containing
on output the NDC values of the top, bottom, left, and right edges of
the bounding box of the View class object.
Fortran Arguments
- pid (input)
- Id of object whose bounding box is requested.
- top (output)
- On output contains the NDC value of the top edge of
the bounding box of the View class object.
- bottom (output)
- On output contains the NDC value of the bottom edge of
the bounding box of the View class object.
- left (output)
- On output contains the NDC value of the left edge of
the bounding box of the View class object.
- right (output)
- On output contains the NDC value of the right edge of
the bounding box of the View class object.
- ierr (output)
- Error code.
Types
Type name: <none>
Definition:
typedef struct _NhlBoundingBox {
int set;
float t;
float b;
float l;
float r;
} NhlBoundingBox;
Type name: NhlTErrorTypes
Definition:
typedef enum _NhlErrType{
NhlFATAL = -4, /* "FATAL" */
NhlWARNING = -3, /* "WARNING" */
NhlINFO = -2, /* "INFO" */
NhlNOERROR = -1 /* "NOERROR" */
} NhlErrorTypes;
Description
View class objects are not restricted to drawing
inside their viewport. A number of elements belonging to a
View object, such as tickmarks and titles (which may
be implemented as child objects of the View object in
question) are most naturally located outside the viewport. This
function allows you to determine the smallest rectangle enclosing all
plotted elements belonging to a View class object. This
rectangle is the bounding box of the View object.
The struct of type NhlBoundingBox represented by the
variable thebox must have defined storage on entrance to this
function. The struct member set is used internally by the
NhlGetBB but has no useful meaning at the user level.
The members t, b, r, and l return
the top, bottom, right, and left coordinates respectively of a
rectangular bounding box oriented with the viewport.
Return Values
The NhlGetBB C function returns a value of type
NhlErrorTypes, and the NhlFGetBB
Fortran subroutine returns the error in ierr. The following
table indicates what the various return Error Values mean:
Value | Meaning
--------+-------------------------------------------------
NOERROR | function successful
--------+-------------------------------------------------
INFO | minor recoverable error
--------+-------------------------------------------------
WARNING | recoverable error
--------+-------------------------------------------------
FATAL | function failed; continuing the program
| may result in core dump
See Also
Copyright
Copyright 1987-1999 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
NCAR Graphics is a registered trademark of the University
Corporation for Atmospheric Research.
Reference Manual Control Panel
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?
$Revision: 1.11 $ $Date: 1998/06/15 21:26:12 $