_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 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 specified 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 possible Y scanline, all rectangles that include that scanline have an identical 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.