File: rvpgplot.h

package info (click to toggle)
pgplot5 5.2.2-19.8
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 7,192 kB
  • sloc: fortran: 39,795; ansic: 22,554; objc: 1,534; sh: 1,298; makefile: 269; pascal: 233; perl: 209; tcl: 190; awk: 51; csh: 25
file content (57 lines) | stat: -rw-r--r-- 1,603 bytes parent folder | download | duplicates (16)
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