


XCreatePixmap(3X11)					  XCreatePixmap(3X11)
X11R5									X11R5



NAME
  XCreatePixmap, XFreePixmap - create or destroy pixmaps

SYNTAX
  Pixmap XCreatePixmap(_d_i_s_p_l_a_y,	_d, _w_i_d_t_h, _h_e_i_g_h_t, _d_e_p_t_h)
	Display	*_d_i_s_p_l_a_y;
	Drawable _d;
	unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
	unsigned int _d_e_p_t_h;

  XFreePixmap(_d_i_s_p_l_a_y, _p_i_x_m_a_p)
	Display	*_d_i_s_p_l_a_y;
	Pixmap _p_i_x_m_a_p;

ARGUMENTS

  _d	    Specifies which screen the pixmap is created on.

  _d_e_p_t_h	    Specifies the depth	of the pixmap.

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

  _p_i_x_m_a_p    Specifies the pixmap.

  _w_i_d_t_h
  _h_e_i_g_h_t    Specify the	width and height, which	define the dimensions of the
	    pixmap.

DESCRIPTION
  The _X_C_r_e_a_t_e_P_i_x_m_a_p function creates a pixmap of the width, height, and	depth
  you specified	and returns a pixmap ID	that identifies	it.  It	is valid to
  pass an _I_n_p_u_t_O_n_l_y window to the drawable argument.  The width	and height
  arguments must be nonzero, or	a _B_a_d_V_a_l_u_e error results.  The depth argument
  must be one of the depths supported by the screen of the specified draw-
  able,	or a _B_a_d_V_a_l_u_e error results.

  The server uses the specified	drawable to determine on which screen to
  create the pixmap.  The pixmap can be	used only on this screen and only
  with other drawables of the same depth (see _X_C_o_p_y_P_l_a_n_e for an	exception to
  this rule).  The initial contents of the pixmap are undefined.

  _X_C_r_e_a_t_e_P_i_x_m_a_p	can generate _B_a_d_A_l_l_o_c, _B_a_d_D_r_a_w_a_b_l_e, and	_B_a_d_V_a_l_u_e errors.

  The _X_F_r_e_e_P_i_x_m_a_p function first deletes the association between the pixmap
  ID and the pixmap.  Then, the	X server frees the pixmap storage when there
  are no references to it.  The	pixmap should never be referenced again.

  _X_F_r_e_e_P_i_x_m_a_p can generate a _B_a_d_P_i_x_m_a_p error.




DIAGNOSTICS

  _B_a_d_A_l_l_o_c  The	server failed to allocate the requested	resource or server
	    memory.

  _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_P_i_x_m_a_p A value for	a Pixmap argument does not name	a defined Pixmap.

  _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
  XCopyArea(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e




















































