home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XDrawLine.z / XDrawLine
Encoding:
Text File  |  2002-10-03  |  8.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))     XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XDrawLine, XDrawLines, XDrawSegments, XSegment - draw lines,
  10.           polygons, and line structure
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XDrawLine(_d_i_s_p_l_a_y, _d, _g_c, _x_1, _y_1, _x_2, _y_2)
  14.                 Display *_d_i_s_p_l_a_y;
  15.                 Drawable _d;
  16.                 GC _g_c;
  17.                 int _x_1, _y_1, _x_2, _y_2;
  18.  
  19.           XDrawLines(_d_i_s_p_l_a_y, _d, _g_c, _p_o_i_n_t_s, _n_p_o_i_n_t_s, _m_o_d_e)
  20.                 Display *_d_i_s_p_l_a_y;
  21.                 Drawable _d;
  22.                 GC _g_c;
  23.                 XPoint *_p_o_i_n_t_s;
  24.                 int _n_p_o_i_n_t_s;
  25.                 int _m_o_d_e;
  26.  
  27.           XDrawSegments(_d_i_s_p_l_a_y, _d, _g_c, _s_e_g_m_e_n_t_s, _n_s_e_g_m_e_n_t_s)
  28.                 Display *_d_i_s_p_l_a_y;
  29.                 Drawable _d;
  30.                 GC _g_c;
  31.                 XSegment *_s_e_g_m_e_n_t_s;
  32.                 int _n_s_e_g_m_e_n_t_s;
  33.  
  34.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  35.           _d         Specifies the drawable.
  36.  
  37.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  38.  
  39.           _g_c        Specifies the GC.
  40.  
  41.           _m_o_d_e      Specifies the coordinate mode. You can pass
  42.                     _C_o_o_r_d_M_o_d_e_O_r_i_g_i_n or _C_o_o_r_d_M_o_d_e_P_r_e_v_i_o_u_s.
  43.  
  44.           _n_p_o_i_n_t_s   Specifies the number of points in the array.
  45.  
  46.           _n_s_e_g_m_e_n_t_s Specifies the number of segments in the array.
  47.  
  48.           _p_o_i_n_t_s    Specifies an array of points.
  49.  
  50.           _s_e_g_m_e_n_t_s  Specifies an array of segments.
  51.  
  52.           _x_1
  53.           _y_1
  54.           _x_2
  55.           _y_2        Specify the points (x1, y1) and (x2, y2) to be
  56.                     connected.
  57.  
  58.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  59.           The _X_D_r_a_w_L_i_n_e function uses the components of the specified
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))     XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           GC to draw a line between the specified set of points (x1,
  75.           y1) and (x2, y2).  It does not perform joining at coincident
  76.           endpoints.  For any given line, _X_D_r_a_w_L_i_n_e does not draw a
  77.           pixel more than once.  If lines intersect, the intersecting
  78.           pixels are drawn multiple times.
  79.  
  80.           The _X_D_r_a_w_L_i_n_e_s function uses the components of the specified
  81.           GC to draw npoints-1 lines between each pair of points
  82.           (point[i], point[i+1]) in the array of _X_P_o_i_n_t structures.
  83.           It draws the lines in the order listed in the array.  The
  84.           lines join correctly at all intermediate points, and if the
  85.           first and last points coincide, the first and last lines
  86.           also join correctly.  For any given line, _X_D_r_a_w_L_i_n_e_s does
  87.           not draw a pixel more than once.  If thin (zero line-width)
  88.           lines intersect, the intersecting pixels are drawn multiple
  89.           times.  If wide lines intersect, the intersecting pixels are
  90.           drawn only once, as though the entire _P_o_l_y_L_i_n_e protocol
  91.           request were a single, filled shape.  _C_o_o_r_d_M_o_d_e_O_r_i_g_i_n treats
  92.           all coordinates as relative to the origin, and
  93.           _C_o_o_r_d_M_o_d_e_P_r_e_v_i_o_u_s treats all coordinates after the first as
  94.           relative to the previous point.
  95.  
  96.           The _X_D_r_a_w_S_e_g_m_e_n_t_s function draws multiple, unconnected
  97.           lines. For each segment, _X_D_r_a_w_S_e_g_m_e_n_t_s draws a line between
  98.           (x1, y1) and (x2, y2).  It draws the lines in the order
  99.           listed in the array of _X_S_e_g_m_e_n_t structures and does not
  100.           perform joining at coincident endpoints.  For any given
  101.           line, _X_D_r_a_w_S_e_g_m_e_n_t_s does not draw a pixel more than once. If
  102.           lines intersect, the intersecting pixels are drawn multiple
  103.           times.
  104.  
  105.           All three functions use these GC components:  function,
  106.           plane-mask, line-width, line-style, cap-style, fill-style,
  107.           subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
  108.           The _X_D_r_a_w_L_i_n_e_s function also uses the join-style GC
  109.           component.  All three functions also use these GC mode-
  110.           dependent components:  foreground, background, tile,
  111.           stipple, tile-stipple-x-origin, tile-stipple-y-origin,
  112.           dash-offset, and dash-list.
  113.  
  114.           _X_D_r_a_w_L_i_n_e, _X_D_r_a_w_L_i_n_e_s, and _X_D_r_a_w_S_e_g_m_e_n_t_s can generate
  115.           _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.  _X_D_r_a_w_L_i_n_e_s can
  116.           also generate a _B_a_d_V_a_l_u_e error.
  117.  
  118.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  119.           The _X_S_e_g_m_e_n_t structure contains:
  120.  
  121.           typedef struct {
  122.                short x1, y1, x2, y2;
  123.           } XSegment;
  124.  
  125.           All x and y members are signed integers.  The width and
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))    XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))     XXXXDDDDrrrraaaawwwwLLLLiiiinnnneeee((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           height members are 16-bit unsigned integers.  You should be
  141.           careful not to generate coordinates and sizes out of the
  142.           16-bit ranges, because the protocol only has 16-bit fields
  143.           for these values.
  144.  
  145.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  146.           _B_a_d_D_r_a_w_a_b_l_e
  147.                     A value for a Drawable argument does not name a
  148.                     defined Window or Pixmap.
  149.  
  150.           _B_a_d_G_C     A value for a GContext argument does not name a
  151.                     defined GContext.
  152.  
  153.           _B_a_d_M_a_t_c_h  An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  154.  
  155.           _B_a_d_M_a_t_c_h  Some argument or pair of arguments has the correct
  156.                     type and range but fails to match in some other
  157.                     way required by the request.
  158.  
  159.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  160.                     values accepted by the request.  Unless a specific
  161.                     range is specified for an argument, the full range
  162.                     defined by the argument's type is accepted.  Any
  163.                     argument defined as a set of alternatives can
  164.                     generate this error.
  165.  
  166.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  167.           XDrawArc(3X11), XDrawPoint(3X11), XDrawRectangle(3X11)
  168.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.