


XSetClipOrigin(3X11)					 XSetClipOrigin(3X11)
X11R5									X11R5



NAME
  XSetClipOrigin, XSetClipMask,	XSetClipRectangles - GC	convenience routines

SYNTAX
  XSetClipOrigin(_d_i_s_p_l_a_y, _g_c, _c_l_i_p__x__o_r_i_g_i_n, _c_l_i_p__y__o_r_i_g_i_n)
	Display	*_d_i_s_p_l_a_y;
	GC _g_c;
	int _c_l_i_p__x__o_r_i_g_i_n, _c_l_i_p__y__o_r_i_g_i_n;

  XSetClipMask(_d_i_s_p_l_a_y,	_g_c, _p_i_x_m_a_p)
	Display	*_d_i_s_p_l_a_y;
	GC _g_c;
	Pixmap _p_i_x_m_a_p;

  XSetClipRectangles(_d_i_s_p_l_a_y, _g_c, _c_l_i_p__x__o_r_i_g_i_n, _c_l_i_p__y__o_r_i_g_i_n,	_r_e_c_t_a_n_g_l_e_s,
  _n, _o_r_d_e_r_i_n_g)
	Display	*_d_i_s_p_l_a_y;
	GC _g_c;
	int _c_l_i_p__x__o_r_i_g_i_n, _c_l_i_p__y__o_r_i_g_i_n;
	XRectangle _r_e_c_t_a_n_g_l_e_s[];
	int _n;
	int _o_r_d_e_r_i_n_g;

ARGUMENTS

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

  _c_l_i_p__x__o_r_i_g_i_n
  _c_l_i_p__y__o_r_i_g_i_n
	    Specify the	x and y	coordinates of the clip-mask origin.

  _g_c	    Specifies the GC.

  _n	    Specifies the number of rectangles.

  _o_r_d_e_r_i_n_g  Specifies the ordering relations on	the rectangles.	 You can pass
	    _U_n_s_o_r_t_e_d, _Y_S_o_r_t_e_d, _Y_X_S_o_r_t_e_d, or _Y_X_B_a_n_d_e_d.

  _p_i_x_m_a_p    Specifies the pixmap or _N_o_n_e.

  _r_e_c_t_a_n_g_l_e_s
	    Specifies an array of rectangles that define the clip-mask.

DESCRIPTION
  The _X_S_e_t_C_l_i_p_O_r_i_g_i_n function sets the clip origin in the specified GC.	 The
  clip-mask origin is interpreted relative to the origin of whatever destina-
  tion drawable	is specified in	the graphics request.

  _X_S_e_t_C_l_i_p_O_r_i_g_i_n can generate _B_a_d_A_l_l_o_c and _B_a_d_G_C errors.

  The _X_S_e_t_C_l_i_p_M_a_s_k function sets the clip-mask in the specified	GC to the
  specified pixmap.  If	the clip-mask is set to	_N_o_n_e, the pixels are always
  drawn	(regardless of the clip-origin).

  _X_S_e_t_C_l_i_p_M_a_s_k can generate _B_a_d_A_l_l_o_c, _B_a_d_G_C, _B_a_d_M_a_t_c_h, and _B_a_d_V_a_l_u_e errors.

  The _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s function changes the clip-mask	in the specified GC
  to the specified list	of rectangles and sets the clip	origin.	 The output
  is clipped to	remain contained within	the rectangles.	 The clip-origin is
  interpreted relative to the origin of	whatever destination drawable is
  specified in a graphics request. The rectangle coordinates are interpreted
  relative to the clip-origin. The rectangles should be	nonintersecting, or
  the graphics results will be undefined.  Note	that the list of rectangles
  can be empty,	which effectively disables output.  This is the	opposite of
  passing _N_o_n_e as the clip-mask	in _X_C_r_e_a_t_e_G_C, _X_C_h_a_n_g_e_G_C, and _X_S_e_t_C_l_i_p_M_a_s_k.

  If known by the client, ordering relations on	the rectangles can be speci-
  fied with the	ordering argument. This	may provide faster operation by	the
  server. If an	incorrect ordering is specified, the X server may generate a
  _B_a_d_M_a_t_c_h error, but it is not	required to do so.  If no error	is generated,
  the graphics results are undefined.  _U_n_s_o_r_t_e_d	means the rectangles are in
  arbitrary order.  _Y_S_o_r_t_e_d means that the rectangles are nondecreasing	in
  their	Y origin.  _Y_X_S_o_r_t_e_d additionally constrains _Y_S_o_r_t_e_d order in that all
  rectangles with an equal Y origin are	nondecreasing in their X origin.
  _Y_X_B_a_n_d_e_d additionally	constrains _Y_X_S_o_r_t_e_d by requiring that, for every pos-
  sible	Y scanline, all	rectangles that	include	that scanline have an identi-
  cal Y	origins	and Y extents.

  _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s can generate _B_a_d_A_l_l_o_c, _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_A_l_l_o_c  The	server failed to allocate the requested	resource or server
	    memory.

  _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  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
  XCreateGC(3X11), XDrawRectangle(3X11), XQueryBestSize(3X11),
  XSetArcMode(3X11), XSetFillStyle(3X11), XSetFont(3X11),
  XSetLineAttributes(3X11), XSetState(3X11), XSetTile(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






















