plcalc_world
( | rx, |
ry, | |
wx, | |
wy, | |
window) ; |
Calculate world coordinates,
and
wx
, and corresponding
wy
index
from relative device coordinates,
window
and
rx
.
ry
rx
(PLFLT
, input)
Input relative device coordinate (0.0-1.0) for the x coordinate.
ry
(PLFLT
, input)
Input relative device coordinate (0.0-1.0) for the y coordinate.
wx
(PLFLT_NC_SCALAR
, output)
Returned value of the x world coordinate corresponding
to the relative device coordinates
and
rx
.
ry
wy
(PLFLT_NC_SCALAR
, output)
Returned value of the y world coordinate corresponding
to the relative device coordinates
and
rx
.
ry
window
(PLINT_NC_SCALAR
, output)
Returned value of the last defined window index that corresponds to the
input relative device coordinates (and the returned world
coordinates). To give some background on the window index,
for each page the initial window index is set to
zero, and each time plwind
is called within the page, world
and device coordinates are stored for the window and the window
index is incremented. Thus, for a simple page layout with
non-overlapping viewports and one window per viewport,
corresponds to
the viewport index (in the order which the viewport/windows
were created) of the only viewport/window corresponding to
window
and
rx
. However, for
more complicated layouts with potentially overlapping viewports
and possibly more than one window (set of world coordinates) per
viewport, ry
and the corresponding output world coordinates
corresponds to the last window created that fulfills the criterion
that the relative device coordinates are inside it. Finally, in
all cases where the input relative device coordinates are not
inside any viewport/window, then the returned value of the last
defined window index is set to -1.
window
Redacted form:
General: plcalc_world(rx, ry, wx, wy, window)
This function is used in example 31.