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>

typedef struct _NhlBoundingBox {
        int     set;
        float   t;
        float   b;
        float   l;
        float   r;
} NhlBoundingBox;

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
Id of object whose bounding box is requested.
thebox
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
Id of object whose bounding box is requested.
top
On output contains the NDC value of the top edge of the bounding box of the View class object.
bottom
On output contains the NDC value of the bottom edge of the bounding box of the View class object.
left
On output contains the NDC value of the left edge of the bounding box of the View class object.
right
On output contains the NDC value of the right edge of the bounding box of the View class object.
ierr
Error code.

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,1988,1989,1991,1993,1994,1995
University Corporation for Atmospheric Research
All Rights Reserved

Reference Manual Control Panel

NG4 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?


$Revision: 1.7 $ $Date: 1995/07/26 23:27:42 $