Next: tv3, Previous: ttut1, Up: Internal Routines [Contents][Index]
tv, image [, x=x, y=y, window=window,
scale=scale] [, /dev, /dvi, /img, /plt, /rim, /rpl] [, /pdev,
/screen, /postscript, /plotwindow, /zoom, /center, /bit24]
[x11]
Displays an image.
Parameters:
image
The image to display. It must be a two-dimensional non-complex
numerical array, except if /bit24
is specified (see below). If
image
is a byte
array, then it is taken to contain
indices into the color map and tv
acts like tvmap
.
Otherwise, the image values are scaled for maximum image contrast.
x, y
The coordinates at which the image is to be displayed. They must be
scalars. The coordinate system is determined by some of the keywords
(see below). If these parameters are not specified, then the image is
displayed at coordinates !tvix, !tviy
.
window
The window or pixmap in which the image is to be displayed. It must be
a scalar, between -#max_pixmap
and #max_window
(inclusive). If this parameter is not specified, then the value from
!window
is used.
scale
The scale at which the image is to be displayed. This must be a
nonnegative scalar. A value of 0
(or /noscale
) yields the
images’s natural size (with one array element corresponding to one
pixel). A value of 1
(or /scale
) yields the greatest
integer scale value that still allows display of the whole image within
the window. Any other value (either smaller or greater than 1) yields
an image that is scaled by that factor relative to its natural
dimensions. If scale
is greater than 1, then interpolation
is used in generating the expanded view. The type of interpolation is
governed by !tvsmt
. If this argument is not specified, then the
value from !tvscale
is used. If /zoom
or
/plotwindow
are specified, then this argument is ignored.
Keywords:
/dev, /dvi, /img, /plt, /rim, /rpl
These keywords specify the coordinate system in which the position of
the image is interpreted. The default is the device-dependent
(dev
) system.
/pdev, /screen, /postscript
These keywords specify where the image is sent. /screen
selects
display on the screen, /postscript
selects sending to the
PostScript file indicated by !ps_file
, and /pdev
selects
the target based on the value of !pdev
. By default,
/screen
is assumed.
/plotwindow
If this keyword is selected, then the image fills the current plot
window (governed by !wxb, !wxt, !wyb, !wyt
).
/zoom
If this keyword is selected, then that part of the image is displayed
that corresponds to the last use of zoom
(governed by
!zoomx, !zoomy, !zoommag
).
/center
If this keyword is selected, then the x
and y
coordinates refer to the center of the image rather than its lower
left-had corner.
/bit24
If this keyword is selected, then image
must be a
three-dimensional non-complex array with 3 elements in the third
dimension. Then the third dimension selects the red, green, and blue
components for each pixel in the image. This keyword is only useful
if a 24-bit visual is used (xopen).
Affected system variables:
!tvix
The dev
x coordinate of the left edge of the image.
!tvixb
The dev
x coordinate of the right edge of the image.
!tviy
The dev
y coordinate of the bottom edge of the image.
!tviyb
The dev
y coordinate of the top edge of the image.
!tvscale
The used magnification scale, if any. This variable is unaffected if
/plotwindow
is set.
For backward compatibility with older versions of LUX, if
set,/ulimcoords
has been executed beforehand, then the position
(x,y)
is counted from the upper left-hand corner
instead, and images are shown with their y coordinate increasing
downward rather than upward.
Alias: xtv
See also: #max_pixmap, #max_window, !pdev, !ps_file, set, Screen Coordinates, tvmap, !tvix, !tvixb, !tviy, !tviyb, tvraw, !tvscale, !tvsmt, !window, !wxb, !wxt, !wyb, !wyt, xcopy, xopen, xsetaction, xtvread, !zoomx, !zoomy, !zoommag
Next: tv3, Previous: ttut1, Up: Internal Routines [Contents][Index]