Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XHPWindowTo(3X) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XHPFileToPixmap(3X)

XHPFileToWindow(3X)

XHPPixmapToFile(3X)

XHPQueryImageFile(3X)

XHPWindowToFile(3X)  —  Subroutines

Series 300 and 800 Only

NAME

XHPWindowToFile - Save the contents of a rectangular window in a file. 

SYNOPSIS


XHPWindowToFile (display, w, x, y, width, height, plane_mask, format, filename)
Display∗display;
Windoww;
intx,y;
        unsigned intwidth, height;
longplane_mask;
intformat;
char∗filename;

ARGUMENTS

display Specifies the connection to the X server. 

w Specifies the window ID of the image to be saved. 

x, y Specifies the x and y coordinates.  These coordinates define the upper left corner of the rectangle and are relative to the origin of the drawable. 

width, height Specifies the width and height of the subimage. These arguments define the dimensions of the rectangle. 

plane_mask Specifies the plane mask. 

format Specifies the format for the image. You can pass XYPixmap or ZPixmap. 

filename Specifies the file name to use. The format of the file name is operating system specific. 

DESCRIPTION

XHPWindowToFile saves the specified window rectangle in the format defined by the xwd (X Window Dump) utility program. This stores a file header and a color map along with the image. 

The plane_mask parameter controls which image planes will be included in the file. A value of ~0 (or -1) can be given to have all image planes be stored. 

Images saved using XHPWindowToFile may be viewed using the xwud utility or restored under program control using XHPFileToWindow or XHPFileToPixmap. 

Hardcopy of a saved image can be generated using the xpr utility or by translating the image into Starbase format using xwd2sb and piping the result to the pcltrans utility. This can be done under program control using the system(3S) library routine to issue the appropriate shell command. 

RETURN VALUE

The XHPWindowToFile function returns one of the following values defined in /usr/include/X11/XHPImageIO.h:

XHPIFSuccess Successful completion. 

XHPIFDrawableErr Couldn’t get drawable attributes or geometry. 

XHPIFFileErr Problem accessing file. 

XHPIFRequestErr Bad placement or size. 

XHPIFAllocErr Memory allocation failure. 

FILES

none

ORIGIN

Hewlett-Packard Company

SEE ALSO

XHPFileToPixmap(3X), XHPFileToWindow(3X), XHPPixmapToFile(3X), XHPQueryImageFile(3X)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026