1PLCALC_WORLD(3plplot)             PLplot API             PLCALC_WORLD(3plplot)
2
3
4

NAME

6       plcalc_world - Calculate world coordinates and corresponding window in‐
7       dex from relative device coordinates
8

SYNOPSIS

10       plcalc_world(rx, ry, wx, wy, window)
11

DESCRIPTION

13       Calculate world coordinates, wx and wy, and corresponding window  index
14       from relative device coordinates, rx and ry.
15
16       Redacted form: General: plcalc_world(rx, ry, wx, wy, window)
17
18
19       This function is used in example 31.
20

ARGUMENTS

22       rx (PLFLT(3plplot), input)
23              Input relative device coordinate (0.0-1.0) for the x coordinate.
24
25       ry (PLFLT(3plplot), input)
26              Input relative device coordinate (0.0-1.0) for the y coordinate.
27
28       wx (PLFLT_NC_SCALAR(3plplot), output)
29              Returned  value  of  the x world coordinate corresponding to the
30              relative device coordinates rx and ry.
31
32       wy (PLFLT_NC_SCALAR(3plplot), output)
33              Returned value of the y world coordinate  corresponding  to  the
34              relative device coordinates rx and ry.
35
36       window (PLINT_NC_SCALAR(3plplot), output)
37              Returned value of the last defined window index that corresponds
38              to the input relative device coordinates (and the returned world
39              coordinates).   To give some background on the window index, for
40              each page the initial window index is set to zero, and each time
41              plwind(3plplot)  is called within the page, world and device co‐
42              ordinates are stored for the window and the window index is  in‐
43              cremented.   Thus, for a simple page layout with non-overlapping
44              viewports and one window per viewport, window corresponds to the
45              viewport  index  (in  the  order which the viewport/windows were
46              created) of the only viewport/window corresponding to rx and ry.
47              However,  for more complicated layouts with potentially overlap‐
48              ping viewports and possibly more than one window (set  of  world
49              coordinates)  per  viewport, window and the corresponding output
50              world coordinates corresponds to the last  window  created  that
51              fulfills  the criterion that the relative device coordinates are
52              inside it.  Finally, in all cases where the input  relative  de‐
53              vice  coordinates  are  not inside any viewport/window, then the
54              returned value of the last defined window index is set to -1.
55
56

AUTHORS

58       Many developers (who  are  credited  at  http://plplot.org/credits.php)
59       have contributed to PLplot over its long history.
60

SEE ALSO

62       PLplot documentation at http://plplot.org/documentation.php.
63
64
65
66                                 August, 2021            PLCALC_WORLD(3plplot)
Impressum