1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#ifndef rvpgplot_h
#define rvpgplot_h
#ifdef __cplusplus
extern "C" {
#endif
#define RIVETONLY
#include <rivet.h>
/* Rivet/Tk PGPLOT-widget package-initialization command */
int Rvpgplot_Init(Tcl_Interp *interp);
/*
* Record the official PGPLOT device name of the widget driver.
*/
#define TK_PGPLOT_DEVICE "XRV"
/*
* The following function returns an unambiguous PGPLOT device-specification
* that can be used as the FILE argument of cpgbeg() to open a given PGPLOT
* widget. It simply returns a string composed of the widget name, followed
* by a "/" followed by TK_PGPLOT_DEVICE. Note that the returned string is
* owned by the widget and must not be free()d or overwritten.
*/
char *rvp_device_name(Rivetobj);
/*
* After a widget has been opened to PGPLOT (via pgopen or pgbeg), the
* following function can be used to return the PGPLOT id of the device.
* When multiple PGPLOT devices are open this id can then be used with
* the PGPLOT cpgslct() function to select the widget as the currently
* selected PGPLOT graphics device.
*
* If the specified widget has not been opened to pgplot, or has been
* closed and not re-opened, then 0 will be returned.
*/
int rvp_device_id(Rivetobj);
/*
* Convert from X window pixel coordinates (px,py) to PGPLOT
* world coordinates (*wx,*wy).
*/
int rvp_xwin2world(Rivetobj widget, int px, int py, float *wx, float *wy);
/*
* Convert from PGPLOT world coordinates (wx,wy) to X window
* pixel coordinates (*px,*py).
*/
int rvp_world2xwin(Rivetobj widget, float wx, float wy, int *px, int *py);
#ifdef __cplusplus
}
#endif
#endif
|