Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XPutImage(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

XPutImage(3X)  —  X Version 11

NAME

XPutImage, XGetImage, XGetSubImage − transfer images

SYNTAX

XPutImage(display, d, gc, image, src_x, src_y, dst_x, dst_y, width, height)
        Display ∗display;
        Drawable d;
        GC gc;
        XImage ∗image;
        int src_x, src_y;
        int dst_x, dst_y;
        unsigned int width, height;

XImage ∗XGetImage(display, d, x, y, width, height, plane_mask, format)
        Display ∗display;
        Drawable d;
        int x, y;
        unsigned int width, height;
        long plane_mask;
        int format;

XImage ∗XGetSubImage(display, d, x, y, width, height, plane_mask, format, dest_image, dest_x,
                     dest_y)
      Display ∗display;
      Drawable d;
      int x, y;
      unsigned int width, height;
      unsigned long plane_mask;
      int format;
      XImage ∗dest_image;
      int dest_x, dest_y;

ARGUMENTS

dSpecifies the drawable. 

dest_x

dest_ySpecify the x and y coordinates of the destination rectangle relative to its origin.  These coordinates specify the upper left corner of the destination rectangle.  These coordinates determine where the subimage will be placed within the destination image. 

displaySpecifies the connection to the X server. 

dst_x

dst_ySpecify the x and y coordinates.  These are the coordinates of the subimage and are relative to the origin of the drawable where the image will be drawn. 

formatSpecifies the format for the image.  You can pass one of these constants: XYPixmap or ZPixmap.

gcSpecifies the graphics context. 

imageSpecifies the image you want combined with the rectangle. 

plane_maskSpecifies the plane mask. 

src_xSpecifies the offset in X from the left edge of the image defined by the XImage data structure.

src_ySpecifies the offset in from the top edge of the image defined by the XImage data structure.

width

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

x

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

DESCRIPTION

The XPutImage function combines an image in memory with a rectangle of the specified drawable. .PN XPutImage can generate BadDrawable, BadGC, BadMatch, and BadValue errors.

The XGetImage function returns the XImage structure. This structure provides you with the contents of the specified rectangle of the drawable in the format you specify. .PN XGetImage can generate BadDrawable, BadMatch, and BadValue errors.

The XGetSubImage function copies the contents of a rectangle in the specified drawable on the display to the specified location within a pre-existing image structure. .PN XGetSubImage can generate BadDrawable, BadGC, BadMatch, and BadValue errors.

DIAGNOSTICS

BadDrawable
A value for a Drawable argument does not name a defined Window or Pixmap.

BadGC A value for a GContext argument does not name a defined GContext. 

BadMatch An InputOnly window is used as a Drawable.

BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. 

BadValue Some numeric value falls outside the range of values accepted by the request.  Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted.  Any argument defined as a set of alternatives can generate this error. 

SEE ALSO

Xlib − C Language X Interface

1 March 1988

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