API documentation for visualization library

Michael Galloy

single page | use frames     summary     class     fields     routine details     file attributes



includes main-level program

top vis_textbackground

vis_textbackground [, color=byte/long/bytarr(3)] [, alpha=float] [, location=lonarr(2)/fltarr(2)] [, dimensions=lonarr(2)/fltarr(2)] [, /data] [, /device] [, /normal]

Create a transparent box on a graphic. This can be used to create a background over an image suitable for display text on.


color in optional type=byte/long/bytarr(3) default=0

color over background

alpha in optional type=float default=0.5

alpha blending between background and color; value is 0.0 to 1.0 where 0.0 is completely background and 1.0 is completely color

location in optional type=lonarr(2)/fltarr(2)

lower-left location of box to draw; default depends on the coordinate system, uses ![xy].crange in data coordinates, [0, 0] in device coordinates, [0., 1] in normal coordinates

dimensions in optional type=lonarr(2)/fltarr(2)

width and height of box

data in optional type=boolean

set to use data-coordinates (the default) for LOCATION and DIMENSIONS

device in optional type=boolean

set to use device coordinates for LOCATION and DIMENSIONS

normal in optional type=boolean

set to use normal coordinates for LOCATION and DIMENSIONS


For example, the main-level program at the end of this file makes use of this routine to make a box over an image suitable as a background for text. To run the example, do:

IDL> .run vis_textbackground
This should produce the following graphic:

The program displays an image, creates the text background, and then uses XYOUTS to place text over the image:

IDL> vis_image, read_image(file_which('people.jpg')), /new_window IDL> vis_textbackground, dimensions=[256, 40], alpha=0.75, /device IDL> xyouts, 10, 23, 'Ali Bahrami!CRSI first employee', $ IDL> /device, charsize=1.25, font=0

File attributes

Modification date: Wed May 16 14:24:20 2012
Lines: 118
Docformat: rst rst