home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xputimage.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  10.2 KB  |  265 lines

  1.  
  2.  
  3.  
  4. XPutImage(3X11)          XLIB FUNCTIONS      XPutImage(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XPutImage, XGetImage, XGetSubImage - transfer images
  9.  
  10. SSYYNNTTAAXX
  11.        XPutImage(_d_i_s_p_l_a_y, _d, _g_c, _i_m_a_g_e, _s_r_c___x, _s_r_c___y, _d_e_s_t___x,
  12.        _d_e_s_t___y, _w_i_d_t_h, _h_e_i_g_h_t)
  13.            Display *_d_i_s_p_l_a_y;
  14.            Drawable _d;
  15.            GC _g_c;
  16.            XImage *_i_m_a_g_e;
  17.            int _s_r_c___x, _s_r_c___y;
  18.            int _d_e_s_t___x, _d_e_s_t___y;
  19.            unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  20.  
  21.        XImage *XGetImage(_d_i_s_p_l_a_y, _d, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t,
  22.        _p_l_a_n_e___m_a_s_k, _f_o_r_m_a_t)
  23.            Display *_d_i_s_p_l_a_y;
  24.            Drawable _d;
  25.            int _x, _y;
  26.            unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  27.            unsigned long _p_l_a_n_e___m_a_s_k;
  28.            int _f_o_r_m_a_t;
  29.  
  30.        XImage *XGetSubImage(_d_i_s_p_l_a_y, _d, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t,
  31.        _p_l_a_n_e___m_a_s_k, _f_o_r_m_a_t, _d_e_s_t___i_m_a_g_e, _d_e_s_t___x,
  32.                 _d_e_s_t___y)
  33.          Display *_d_i_s_p_l_a_y;
  34.          Drawable _d;
  35.          int _x, _y;
  36.          unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  37.          unsigned long _p_l_a_n_e___m_a_s_k;
  38.          int _f_o_r_m_a_t;
  39.          XImage *_d_e_s_t___i_m_a_g_e;
  40.          int _d_e_s_t___x, _d_e_s_t___y;
  41.  
  42. AARRGGUUMMEENNTTSS
  43.        _d     Specifies the drawable.
  44.  
  45.        _d_e_s_t___i_m_a_g_e
  46.          Specifies the destination image.
  47.  
  48.        _d_e_s_t___x
  49.        _d_e_s_t___y     Specify the x and y coordinates, which are rela-
  50.          tive to the origin of the drawable and are the
  51.          coordinates of the subimage or which are rela-
  52.          tive to the origin of the destination rectangle,
  53.          specify its upper-left corner, and determine
  54.          where the subimage is placed in the destination
  55.          image.
  56.  
  57.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  58.  
  59.        _f_o_r_m_a_t     Specifies the format for the image.  You can
  60.          pass _X_Y_P_i_x_m_a_p or _Z_P_i_x_m_a_p.
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XPutImage(3X11)          XLIB FUNCTIONS      XPutImage(3X11)
  71.  
  72.  
  73.        _g_c     Specifies the GC.
  74.  
  75.        _i_m_a_g_e     Specifies the image you want combined with the
  76.          rectangle.
  77.  
  78.        _p_l_a_n_e___m_a_s_k
  79.          Specifies the plane mask.
  80.  
  81.        _s_r_c___x     Specifies the offset in X from the left edge of
  82.          the image defined by the _X_I_m_a_g_e structure.
  83.  
  84.        _s_r_c___y     Specifies the offset in Y from the top edge of
  85.          the image defined by the _X_I_m_a_g_e structure.
  86.  
  87.        _w_i_d_t_h
  88.        _h_e_i_g_h_t     Specify the width and height of the subimage,
  89.          which define the dimensions of the rectangle.
  90.  
  91.        _x
  92.        _y     Specify the x and y coordinates, which are rela-
  93.          tive to the origin of the drawable and define
  94.          the upper-left corner of the rectangle.
  95.  
  96. DDEESSCCRRIIPPTTIIOONN
  97.        The _X_P_u_t_I_m_a_g_e function combines an image with a rectangle
  98.        of the specified drawable.  The section of the image
  99.        defined by the src_x, src_y, width, and height arguments
  100.        is drawn on the specified part of the drawable.    If
  101.        _X_Y_B_i_t_m_a_p format is used, the depth of the image must be
  102.        one, or a _B_a_d_M_a_t_c_h error results.  The foreground pixel in
  103.        the GC defines the source for the one bits in the image,
  104.        and the background pixel defines the source for the zero
  105.        bits.  For _X_Y_P_i_x_m_a_p and _Z_P_i_x_m_a_p, the depth of the image
  106.        must match the depth of the drawable, or a _B_a_d_M_a_t_c_h error
  107.        results.
  108.  
  109.        If the characteristics of the image (for example,
  110.        byte_order and bitmap_unit) differ from what the server
  111.        requires, _X_P_u_t_I_m_a_g_e automatically makes the appropriate
  112.        conversions.
  113.  
  114.        This function uses these GC components: function, plane-
  115.        mask, subwindow-mode, clip-x-origin, clip-y-origin, and
  116.        clip-mask.  It also uses these GC mode-dependent compo-
  117.        nents: foreground and background.
  118.  
  119.        _X_P_u_t_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, _B_a_d_M_a_t_c_h, and
  120.        _B_a_d_V_a_l_u_e errors.
  121.  
  122.        The _X_G_e_t_I_m_a_g_e function returns a pointer to an _X_I_m_a_g_e
  123.        structure.  This structure provides you with the contents
  124.        of the specified rectangle of the drawable in the format
  125.        you specify.  If the format argument is _X_Y_P_i_x_m_a_p, the
  126.        image contains only the bit planes you passed to the
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XPutImage(3X11)          XLIB FUNCTIONS      XPutImage(3X11)
  137.  
  138.  
  139.        plane_mask argument.  If the plane_mask argument only
  140.        requests a subset of the planes of the display, the depth
  141.        of the returned image will be the number of planes
  142.        requested.  If the format argument is _Z_P_i_x_m_a_p, _X_G_e_t_I_m_a_g_e
  143.        returns as zero the bits in all planes not specified in
  144.        the plane_mask argument.     The function performs no range
  145.        checking on the values in plane_mask and ignores extrane-
  146.        ous bits.
  147.  
  148.        _X_G_e_t_I_m_a_g_e returns the depth of the image to the depth mem-
  149.        ber of the _X_I_m_a_g_e structure.  The depth of the image is as
  150.        specified when the drawable was created, except when get-
  151.        ting a subset of the planes in _X_Y_P_i_x_m_a_p format, when the
  152.        depth is given by the number of bits set to 1 in
  153.        plane_mask.
  154.  
  155.        If the drawable is a pixmap, the given rectangle must be
  156.        wholly contained within the pixmap, or a _B_a_d_M_a_t_c_h error
  157.        results.     If the drawable is a window, the window must be
  158.        viewable, and it must be the case that if there were no
  159.        inferiors or overlapping windows, the specified rectangle
  160.        of the window would be fully visible on the screen and
  161.        wholly contained within the outside edges of the window,
  162.        or a _B_a_d_M_a_t_c_h error results.  Note that the borders of the
  163.        window can be included and read with this request.  If the
  164.        window has backing-store, the backing-store contents are
  165.        returned for regions of the window that are obscured by
  166.        noninferior windows.  If the window does not have backing-
  167.        store, the returned contents of such obscured regions are
  168.        undefined.  The returned contents of visible regions of
  169.        inferiors of a different depth than the specified window's
  170.        depth are also undefined.  The pointer cursor image is not
  171.        included in the returned contents.  If a problem occurs,
  172.        _X_G_e_t_I_m_a_g_e returns NULL.
  173.  
  174.        _X_G_e_t_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_M_a_t_c_h, and _B_a_d_V_a_l_u_e
  175.        errors.
  176.  
  177.        The _X_G_e_t_S_u_b_I_m_a_g_e function updates dest_image with the
  178.        specified subimage in the same manner as _X_G_e_t_I_m_a_g_e.  If
  179.        the format argument is _X_Y_P_i_x_m_a_p, the image contains only
  180.        the bit planes you passed to the plane_mask argument.  If
  181.        the format argument is _Z_P_i_x_m_a_p, _X_G_e_t_S_u_b_I_m_a_g_e returns as
  182.        zero the bits in all planes not specified in the
  183.        plane_mask argument.  The function performs no range
  184.        checking on the values in plane_mask and ignores extrane-
  185.        ous bits.  As a convenience, _X_G_e_t_S_u_b_I_m_a_g_e returns a
  186.        pointer to the same _X_I_m_a_g_e structure specified by
  187.        dest_image.
  188.  
  189.        The depth of the destination _X_I_m_a_g_e structure must be the
  190.        same as that of the drawable.  If the specified subimage
  191.        does not fit at the specified location on the destination
  192.        image, the right and bottom edges are clipped.  If the
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XPutImage(3X11)          XLIB FUNCTIONS      XPutImage(3X11)
  203.  
  204.  
  205.        drawable is a pixmap, the given rectangle must be wholly
  206.        contained within the pixmap, or a _B_a_d_M_a_t_c_h error results.
  207.        If the drawable is a window, the window must be viewable,
  208.        and it must be the case that if there were no inferiors or
  209.        overlapping windows, the specified rectangle of the window
  210.        would be fully visible on the screen and wholly contained
  211.        within the outside edges of the window, or a _B_a_d_M_a_t_c_h
  212.        error results.  If the window has backing-store, then the
  213.        backing-store contents are returned for regions of the
  214.        window that are obscured by noninferior windows.     If the
  215.        window does not have backing-store, the returned contents
  216.        of such obscured regions are undefined.    The returned con-
  217.        tents of visible regions of inferiors of a different depth
  218.        than the specified window's depth are also undefined.  If
  219.        a problem occurs, _X_G_e_t_S_u_b_I_m_a_g_e returns NULL.
  220.  
  221.        _X_G_e_t_S_u_b_I_m_a_g_e can generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, _B_a_d_M_a_t_c_h,
  222.        and _B_a_d_V_a_l_u_e errors.
  223.  
  224. DDIIAAGGNNOOSSTTIICCSS
  225.        _B_a_d_D_r_a_w_a_b_l_e
  226.          A value for a Drawable argument does not name a
  227.          defined Window or Pixmap.
  228.  
  229.        _B_a_d_G_C     A value for a GContext argument does not name a
  230.          defined GContext.
  231.  
  232.        _B_a_d_M_a_t_c_h     An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  233.  
  234.        _B_a_d_M_a_t_c_h     Some argument or pair of arguments has the cor-
  235.          rect type and range but fails to match in some
  236.          other way required by the request.
  237.  
  238.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  239.          values accepted by the request.  Unless a spe-
  240.          cific range is specified for an argument, the
  241.          full range defined by the argument's type is
  242.          accepted.  Any argument defined as a set of
  243.          alternatives can generate this error.
  244.  
  245. SSEEEE AALLSSOO
  246.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.