NhlDataPolyline
The Fortran name of this function is NhlFDataPolyline.
Given arrays containing the X and Y coordinates of points in data
coordinate space, this function outputs an immediate-mode polyline
connecting each of the points.
C Synopsis
#include <ncarg/hlu/hlu.h>
#include <hfile for Transform class object>
NhlErrorTypes NhlDataPolyline(
int pid,
int gsid,
float *x,
float *y,
int n,
)
Fortran Synopsis
subroutine NhlFDataPolyline(pid, gsid, x, y, n, ierr)
integer pid, gsid, n, ierr
real x(n), y(n)
Arguments
- pid (input)
- Id of a Transform or Workstation object.
- gsid (input)
- Id of a GraphicStyle object.
- x (input)
- Array of X-Axis coordinate values in data coordinate space.
- y (input)
- Array of Y-Axis coordinate values in data coordinate space.
- n (input)
- Number of elements in the coordinate arrays x and y.
- ierr (output, Fortran only)
- Error code.
Types
Type name: NhlTErrorTypes
Definition:
typedef enum _NhlErrType{
NhlFATAL = -4, /* "FATAL" */
NhlWARNING = -3, /* "WARNING" */
NhlINFO = -2, /* "INFO" */
NhlNOERROR = -1 /* "NOERROR" */
} NhlErrorTypes;
Description
If the parameter pid specifies a transform
(a plot object), this function draws an immediate-mode polyline in the
object's current data coordinate space. The polyline is clipped to
the object's viewport. If the parameter pid specifies a
workstation, the polyline is drawn in a data
coordinate space that is identical to NDC space with boundaries of
(0.0,0.0) at the lower left and (1.0,1.0) at the upper right. Clipping
occurs only at the viewspace boundaries. An immediate-mode
polyline appears as soon as the low-level point buffer is flushed
after the function is called. It is not drawn when the
object's Draw method is invoked.
You specify the polyline's attributes by passing in a
GraphicStyle object using the parameter
gsid. If gsid is set to NhlNULLOBJID
(0) then the line attributes are determined by the current settings of
the Workstation default GraphicStyle
object. Retrieve the id of the default GraphicStyle
object using the read-only Workstation resource
wkDefGraphicStyleId.
Return Values
The NhlDataPolyline C function returns a value of
type NhlErrorTypes, and the
NhlFDataPolyline 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.15 $ $Date: 1998/08/19 03:11:40 $