NAME
xmag − magnify parts of the screen.
SYNTAX
xmag [options]
DESCRIPTION
This reference page documents the Release 5 version of xmag, which operates significantly differently from prior releases. For instructions on using the Release 5 version, see Chapter 7, Graphics Utilities.
The xmag program allows you to magnify portions of the screen. If no explicit region is specified, a square with the pointer in the upper-left corner is displayed indicating the area to be enlarged. The area can be dragged out to the desired size by pressing pointer Button2. Once a region has been selected, a window is popped up showing an enlarged version of the region in which each pixel in the source image is represented by a small square of the same color. Pressing Button1 in the enlargement window shows the position and RGB value of the pixel under the pointer until the button is released.
The xmag client features five command buttons, described in the next section.
Two of the command buttons enable you to select multiple areas to be enlarged. You can open multiple instances of the magnification window or replace the current enlargement with a new image, using the new or replace command buttons, respectively.
Note that you can copy and paste images between xmag and bitmap. (See Chapter 7, Graphics Utilities, for more information.)
Resizing xmag resizes the current magnification area. xmag preserves the colormap, visual, and window depth of the source.
To quit xmag, type q, Q, or Control-C in the enlargement window, or select the close command button.
Command Buttons
There are five command buttons across the top of the xmag window. Close deletes the particular magnification instance (window). Replace brings up the rubber band selector again to select another region for this magnification window. New brings up the rubber band selector to create a new magnification window. Cut puts the magnification image into the PRIMARY selection. Paste copies the PRIMARY selection buffer into xmag. (You can copy and paste images between xmag and bitmap. See Chapter 7 for instructions.)
OPTIONS
xmag accepts all of the standard X Toolkit command-line options, which are listed on the X reference page. (We’ve included some of the more commonly used Toolkit options later in this section.) In addition, xmag accepts the following application-specific options:
−mag mag_factor
Specifies a factor by which the source region should be enlarged. The default magnification is 5. This is used with the size of the source to compute the default enlargement window size. (Specifying a size with -geometry can distort the program’s results. See -geometry below.)
−source geometry
Specifies the size and/or location of the source region on the screen. By default, a 64×64 square is provided for the user to select an area of the screen. The size of the source is used with the desired magnification to compute the default enlargement window size. (Specifying a size with -geometry can distort the program’s results. See -geometry below.)
The following standard X Toolkit options are commonly used with xmag:
−bg color_or_pixel_value
Specifies the name of the color to be used as the background of the enlargement window. If the name begins with a percent sign (%), it is interpreted to be an absolute pixel value. This is useful when displaying large areas, since pixels that are the same color as the background do not need to be painted in the enlargement. The default is to use the BlackPixel of the screen.
-display [host]:server[.screen]
Allows you to specify the display, server, and screen to use for both reading the screen and displaying the enlarged version of the image. host is the hostname of the physical display, server specifies the server number, and screen specifies the screen number. For example: % xmag -display your_node:0.1 specifies screen 1 of server 0 on the display named by your_node. Either or both the host and screen elements to the display specification can be omitted. If host is omitted, the local display is assumed. If screen is omitted, screen 0 is assumed (and the period is unnecessary). The colon and server are necessary in all cases.
−fn fontname
This option specifies the name of a font to use when displaying pixel values (used when button 1 is pressed in the enlargement window).
-geometry geometry
The enlargement window is created with the specified size and location determined by the supplied geometry specification. See the X reference page for a description of usage. Note that using the -geometry option with xmag can affect how the program works. By default, the size of the xmag window is computed from the size of the source region and the desired magnification. Therefore, specifying a size with -geometry can distort the program’s results. As a general rule, you should only specify the location of the xmag window, as in: % xmag -geometry -0-0 & which places the window in the lower-right corner of the screen.
RESOURCES
The xmag program defines the following application resources:
mag(class Mag)
Specifies the enlargement factor. See the -mag option for more information.
source (class Source)
Specifies the size and/or location of the source region on the screen. Takes as an argument the standard geometry string. See the -source option for more information.
titleSpecifies a string that may be used by the window manager (e.g., in a titlebar) when displaying this application.
The following X Toolkit resources are commonly used with xmag:
background (class Background)
Specifies the color or pixel value to be used for the background of the enlargement window.
font (class Font)
Specifies the name of the font to be used for the command buttons, and when displaying pixel values when the user presses button 1 in the enlargement window.
foreground (class Foreground)
Specifies the color or pixel value to be used for the foreground text of the enlargement window.
geometry (class Geometry)
Specifies the size and/or location of the enlargement window.
WIDGET HIERARCHY
xmag uses the X Toolkit and the Athena Widget Set. The magnified image is displayed in the Scale widget. In order to specify resources, it is useful to know the hierarchy of the widgets that compose xmag. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name. Xmag xmag RootWindow root TopLevelShell xmag Paned pane1 Paned pane2 Command close Command replace Command new Command select Command paste Label xmag label Paned pane2 Scale scale OverrideShell pixShell Label pixLabel See Appendix G, Athena Widget Resources, for a list of resources that can be set for the Athena widgets.
SEE ALSO
X, bitmap, xwd; Chapter 7, Graphics Utilities.
AUTHOR
Release 5 version written by Dave Sternlicht and Davor Matic, MIT X Consortium;
Previous version by Jim Fulton, MIT X Consortium.