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

  1.  
  2.  
  3.  
  4. XDrawRectangle(3X11)      XLIB FUNCTIONS     XDrawRectangle(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XDrawRectangle, XDrawRectangles, XRectangle - draw rectan-
  9.        gles and rectangles structure
  10.  
  11. SSYYNNTTAAXX
  12.        XDrawRectangle(_d_i_s_p_l_a_y, _d, _g_c, _x, _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.          int _x, _y;
  17.          unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  18.  
  19.        XDrawRectangles(_d_i_s_p_l_a_y, _d, _g_c, _r_e_c_t_a_n_g_l_e_s, _n_r_e_c_t_a_n_g_l_e_s)
  20.          Display *_d_i_s_p_l_a_y;
  21.          Drawable _d;
  22.          GC _g_c;
  23.          XRectangle _r_e_c_t_a_n_g_l_e_s[];
  24.          int _n_r_e_c_t_a_n_g_l_e_s;
  25.  
  26. AARRGGUUMMEENNTTSS
  27.        _d     Specifies the drawable.
  28.  
  29.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  30.  
  31.        _g_c     Specifies the GC.
  32.  
  33.        _n_r_e_c_t_a_n_g_l_e_s
  34.          Specifies the number of rectangles in the array.
  35.  
  36.        _r_e_c_t_a_n_g_l_e_s
  37.          Specifies an array of rectangles.
  38.  
  39.        _w_i_d_t_h
  40.        _h_e_i_g_h_t     Specify the width and height, which specify the
  41.          dimensions of the rectangle.
  42.  
  43.        _x
  44.        _y     Specify the x and y coordinates, which specify
  45.          the upper-left corner of the rectangle.
  46.  
  47. DDEESSCCRRIIPPTTIIOONN
  48.        The _X_D_r_a_w_R_e_c_t_a_n_g_l_e and _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s functions draw the
  49.        outlines of the specified rectangle or rectangles as if a
  50.        five-point _P_o_l_y_L_i_n_e protocol request were specified for
  51.        each rectangle:
  52.  
  53.           [x,y] [x+width,y] [x+width,y+height] [x,y+height]
  54.           [x,y]
  55.  
  56.        For the specified rectangle or rectangles, these functions
  57.        do not draw a pixel more than once.  _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s draws
  58.        the rectangles in the order listed in the array.     If rect-
  59.        angles intersect, the intersecting pixels are drawn multi-
  60.        ple times.
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XDrawRectangle(3X11)      XLIB FUNCTIONS     XDrawRectangle(3X11)
  71.  
  72.  
  73.        Both functions use these GC components: function, plane-
  74.        mask, line-width, line-style, cap-style, join-style, fill-
  75.        style, subwindow-mode, clip-x-origin, clip-y-origin, and
  76.        clip-mask.  They also use these GC mode-dependent compo-
  77.        nents: foreground, background, tile, stipple, tile-
  78.        stipple-x-origin, tile-stipple-y-origin, dash-offset, and
  79.        dash-list.
  80.  
  81.        _X_D_r_a_w_R_e_c_t_a_n_g_l_e and _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s can generate
  82.        _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.
  83.  
  84. SSTTRRUUCCTTUURREESS
  85.        The _X_R_e_c_t_a_n_g_l_e structure contains:
  86.  
  87.        typedef struct {
  88.         short x, y;
  89.         unsigned short width, height;
  90.        } XRectangle;
  91.  
  92.        All x and y members are signed integers.     The width and
  93.        height members are 16-bit unsigned integers.  You should
  94.        be careful not to generate coordinates and sizes out of
  95.        the 16-bit ranges, because the protocol only has 16-bit
  96.        fields for these values.
  97.  
  98. DDIIAAGGNNOOSSTTIICCSS
  99.        _B_a_d_D_r_a_w_a_b_l_e
  100.          A value for a Drawable argument does not name a
  101.          defined Window or Pixmap.
  102.  
  103.        _B_a_d_G_C     A value for a GContext argument does not name a
  104.          defined GContext.
  105.  
  106.        _B_a_d_M_a_t_c_h     An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  107.  
  108.        _B_a_d_M_a_t_c_h     Some argument or pair of arguments has the cor-
  109.          rect type and range but fails to match in some
  110.          other way required by the request.
  111.  
  112. SSEEEE AALLSSOO
  113.        XDrawArc(3X11), XDrawLine(3X11), XDrawPoint(3X11)
  114.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.