


XCopyArea(3X11)						      XCopyArea(3X11)
X11R5									X11R5



NAME
  XCopyArea, XCopyPlane	- copy areas

SYNTAX
  XCopyArea(_d_i_s_p_l_a_y, _s_r_c, _d_e_s_t,	_g_c, _s_r_c__x, _s_r_c__y, _w_i_d_t_h, _h_e_i_g_h_t,  _d_e_s_t__x,
  _d_e_s_t__y)
	Display	*_d_i_s_p_l_a_y;
	Drawable _s_r_c, _d_e_s_t;
	GC _g_c;
	int _s_r_c__x, _s_r_c__y;
	unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
	int _d_e_s_t__x, _d_e_s_t__y;

  XCopyPlane(_d_i_s_p_l_a_y, _s_r_c, _d_e_s_t, _g_c, _s_r_c__x, _s_r_c__y, _w_i_d_t_h, _h_e_i_g_h_t, _d_e_s_t__x,
  _d_e_s_t__y, _p_l_a_n_e)
	Display	*_d_i_s_p_l_a_y;
	Drawable _s_r_c, _d_e_s_t;
	GC _g_c;
	int _s_r_c__x, _s_r_c__y;
	unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
	int _d_e_s_t__x, _d_e_s_t__y;
	unsigned long _p_l_a_n_e;

ARGUMENTS

  _d_e_s_t__x
  _d_e_s_t__y    Specify the	x and y	coordinates, which are relative	to the origin
	    of the destination rectangle and specify its upper-left corner.

  _d_i_s_p_l_a_y   Specifies the connection to	the X server.

  _g_c	    Specifies the GC.

  _p_l_a_n_e	    Specifies the bit plane.  You must set exactly one bit to 1.

  _s_r_c
  _d_e_s_t	    Specify the	source and destination rectangles to be	combined.

  _s_r_c__x
  _s_r_c__y	    Specify the	x and y	coordinates, which are relative	to the origin
	    of the source rectangle and	specify	its upper-left corner.

  _w_i_d_t_h
  _h_e_i_g_h_t    Specify the	width and height, which	are the	dimensions of both
	    the	source and destination rectangles.

DESCRIPTION
  The _X_C_o_p_y_A_r_e_a	function combines the specified	rectangle of src with the
  specified rectangle of dest.	The drawables must have	the same root and
  depth, or a _B_a_d_M_a_t_c_h error results.


  If regions of	the source rectangle are obscured and have not been retained
  in backing store or if regions outside the boundaries	of the source draw-
  able are specified, those regions are	not copied. Instead, the following
  occurs on all	corresponding destination regions that are either visible or
  are retained in backing store. If the	destination is a window	with a back-
  ground other than _N_o_n_e, corresponding	regions	of the destination are tiled
  with that background (with plane-mask	of all ones and	_G_X_c_o_p_y function).
  Regardless of	tiling or whether the destination is a window or a pixmap, if
  graphics-exposures is	_T_r_u_e, then _G_r_a_p_h_i_c_s_E_x_p_o_s_e events for all correspond-
  ing destination regions are generated.  If graphics-exposures	is _T_r_u_e	but
  no _G_r_a_p_h_i_c_s_E_x_p_o_s_e events are generated, a _N_o_E_x_p_o_s_e event is generated.
  Note that by default graphics-exposures is _T_r_u_e in new GCs.

  This function	uses these GC components: function, plane-mask,	subwindow-
  mode,	graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask.

  _X_C_o_p_y_A_r_e_a can	generate _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors.

  The _X_C_o_p_y_P_l_a_n_e function uses a single	bit plane of the specified source
  rectangle combined with the specified	GC to modify the specified rectangle
  of dest.  The	drawables must have the	same root but need not have the	same
  depth.  If the drawables do not have the same	root, a	_B_a_d_M_a_t_c_h error
  results.  If plane does not have exactly one bit set to 1 and	the values of
  planes must be less than %2 sup n%, where _n is the depth of src, a _B_a_d_V_a_l_u_e
  error	results.

  Effectively, _X_C_o_p_y_P_l_a_n_e forms	a pixmap of the	same depth as the rectangle
  of dest and with a size specified by the source region. It uses the
  foreground/background	pixels in the GC (foreground everywhere	the bit	plane
  in src contains a bit	set to 1, background everywhere	the bit	plane in src
  contains a bit set to	0) and the equivalent of a _C_o_p_y_A_r_e_a protocol request
  is performed with all	the same exposure semantics.  This can also be
  thought of as	using the specified region of the source bit plane as a	stip-
  ple with a fill-style	of _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d for filling a rectangular	area
  of the destination.

  This function	uses these GC components: function, plane-mask,	foreground,
  background, subwindow-mode, graphics-exposures, clip-x-origin, clip-y-
  origin, and clip-mask.

  _X_C_o_p_y_P_l_a_n_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 _B_a_d_V_a_l_u_e errors.

DIAGNOSTICS

  _B_a_d_D_r_a_w_a_b_l_e
	    A value for	a Drawable argument does not name a defined Window or
	    Pixmap.

  _B_a_d_G_C	    A value for	a GContext argument does not name a defined GContext.

  _B_a_d_M_a_t_c_h  An _I_n_p_u_t_O_n_l_y window	is used	as a Drawable.

  _B_a_d_M_a_t_c_h  Some argument or pair of arguments has the correct type and	range
	    but	fails to match in some other way required by the request.

  _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of values accepted by
	    the	request.  Unless a specific range is specified for an argu-
	    ment, 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
  XClearArea(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e	delim off








