bgimg | Display an image in a window |
<graphic> | name of the graphic structure |
-img <name> | image name in namespace |
[-x0 <x-coord>] | x-coordinate of a portion |
[-y0 <y-coord>] | y-coordinate of a portion |
[-w <width>] | width of a portion |
[-h <height>] | height of a portion |
bgimg <graphic> -rm | Remove existing image from a window |
This command can be used to add an image to be drawn on the background of a window. Switches -x0, -y0, -w and -h can be used to specify a portion to be used instead of the whole picture.
Example: In this example an image file is loaded and a portion of it is visualized in a window.
... # Load the image file into namespace NDA> loadimg map.gif # Create a graphic structure and assign a 300 by 300 pixel portion # of the image starting at (100, 100) NDA> mkgrp win NDA> bgimp win -img map -x0 100 -y0 100 -w 300 -h 300 NDA> show win ... # Remove the background image NDA> bgimg win -rm NDA> draw /win