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

  1.  
  2.  
  3.  
  4. XCreateGC(3X11)          XLIB FUNCTIONS      XCreateGC(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XCreateGC, XCopyGC, XChangeGC, XGetGCValues, XFreeGC,
  9.        XGContextFromGC, XGCValues - create or free graphics con-
  10.        texts and graphics context structure
  11.  
  12. SSYYNNTTAAXX
  13.        GC XCreateGC(_d_i_s_p_l_a_y, _d, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s)
  14.          Display *_d_i_s_p_l_a_y;
  15.          Drawable _d;
  16.          unsigned long _v_a_l_u_e_m_a_s_k;
  17.          XGCValues *_v_a_l_u_e_s;
  18.  
  19.        XCopyGC(_d_i_s_p_l_a_y, _s_r_c, _v_a_l_u_e_m_a_s_k, _d_e_s_t)
  20.          Display *_d_i_s_p_l_a_y;
  21.          GC _s_r_c, _d_e_s_t;
  22.          unsigned long _v_a_l_u_e_m_a_s_k;
  23.  
  24.        XChangeGC(_d_i_s_p_l_a_y, _g_c, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s)
  25.          Display *_d_i_s_p_l_a_y;
  26.          GC _g_c;
  27.          unsigned long _v_a_l_u_e_m_a_s_k;
  28.          XGCValues *_v_a_l_u_e_s;
  29.  
  30.        Status XGetGCValues(_d_i_s_p_l_a_y, _g_c, _v_a_l_u_e_m_a_s_k, _v_a_l_u_e_s___r_e_t_u_r_n)
  31.          Display *_d_i_s_p_l_a_y;
  32.          GC _g_c;
  33.          unsigned long _v_a_l_u_e_m_a_s_k;
  34.          XGCValues *_v_a_l_u_e_s___r_e_t_u_r_n;
  35.  
  36.        XFreeGC(_d_i_s_p_l_a_y, _g_c)
  37.          Display *_d_i_s_p_l_a_y;
  38.          GC _g_c;
  39.  
  40.        GContext XGContextFromGC(_g_c)
  41.          GC _g_c;
  42.  
  43. AARRGGUUMMEENNTTSS
  44.        _d     Specifies the drawable.
  45.  
  46.        _d_e_s_t     Specifies the destination GC.
  47.  
  48.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  49.  
  50.        _g_c     Specifies the GC.
  51.  
  52.        _s_r_c     Specifies the components of the source GC.
  53.  
  54.        _v_a_l_u_e_m_a_s_k Specifies which components in the GC are to be
  55.          set, copied, changed, or returned .  This argu-
  56.          ment is the bitwise inclusive OR of zero or more
  57.          of the valid GC component mask bits.
  58.  
  59.        _v_a_l_u_e_s     Specifies any values as specified by the value-
  60.          mask.
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XCreateGC(3X11)          XLIB FUNCTIONS      XCreateGC(3X11)
  71.  
  72.  
  73.        _v_a_l_u_e_s___r_e_t_u_r_n
  74.          Returns the GC values in the specified _X_G_C_V_a_l_u_e_s
  75.          structure.
  76.  
  77. DDEESSCCRRIIPPTTIIOONN
  78.        The _X_C_r_e_a_t_e_G_C function creates a graphics context and
  79.        returns a GC.  The GC can be used with any destination
  80.        drawable having the same root and depth as the specified
  81.        drawable.  Use with other drawables results in a _B_a_d_M_a_t_c_h
  82.        error.
  83.  
  84.        _X_C_r_e_a_t_e_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_D_r_a_w_a_b_l_e, _B_a_d_F_o_n_t,
  85.        _B_a_d_M_a_t_c_h, _B_a_d_P_i_x_m_a_p, and _B_a_d_V_a_l_u_e errors.
  86.  
  87.        The _X_C_o_p_y_G_C function copies the specified components from
  88.        the source GC to the destination GC.  The source and des-
  89.        tination GCs must have the same root and depth, or a _B_a_d_-
  90.        _M_a_t_c_h error results.  The valuemask specifies which compo-
  91.        nent to copy, as for _X_C_r_e_a_t_e_G_C.
  92.  
  93.        _X_C_o_p_y_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors.
  94.  
  95.        The _X_C_h_a_n_g_e_G_C function changes the components specified by
  96.        valuemask for the specified GC.    The values argument con-
  97.        tains the values to be set.  The values and restrictions
  98.        are the same as for _X_C_r_e_a_t_e_G_C.  Changing the clip-mask
  99.        overrides any previous _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s request on the
  100.        context.     Changing the dash-offset or dash-list overrides
  101.        any previous _X_S_e_t_D_a_s_h_e_s request on the context.    The order
  102.        in which components are verified and altered is server
  103.        dependent.  If an error is generated, a subset of the com-
  104.        ponents may have been altered.
  105.  
  106.        _X_C_h_a_n_g_e_G_C can generate _B_a_d_A_l_l_o_c, _B_a_d_F_o_n_t, _B_a_d_G_C, _B_a_d_M_a_t_c_h,
  107.        _B_a_d_P_i_x_m_a_p, and _B_a_d_V_a_l_u_e errors.
  108.  
  109.        The _X_G_e_t_G_C_V_a_l_u_e_s function returns the components specified
  110.        by valuemask for the specified GC.  If the valuemask con-
  111.        tains a valid set of GC mask bits (_G_C_F_u_n_c_t_i_o_n,
  112.        _G_C_P_l_a_n_e_M_a_s_k, _G_C_F_o_r_e_g_r_o_u_n_d, _G_C_B_a_c_k_g_r_o_u_n_d, _G_C_L_i_n_e_W_i_d_t_h,
  113.        _G_C_L_i_n_e_S_t_y_l_e, _G_C_C_a_p_S_t_y_l_e, _G_C_J_o_i_n_S_t_y_l_e, _G_C_F_i_l_l_S_t_y_l_e,
  114.        _G_C_F_i_l_l_R_u_l_e, _G_C_T_i_l_e, _G_C_S_t_i_p_p_l_e, _G_C_T_i_l_e_S_t_i_p_X_O_r_i_g_i_n,
  115.        _G_C_T_i_l_e_S_t_i_p_Y_O_r_i_g_i_n, _G_C_F_o_n_t, _G_C_S_u_b_w_i_n_d_o_w_M_o_d_e,
  116.        _G_C_G_r_a_p_h_i_c_s_E_x_p_o_s_u_r_e_s, _G_C_C_l_i_p_X_O_r_i_g_i_n, _G_C_C_L_i_p_Y_O_r_i_g_i_n,
  117.        _G_C_D_a_s_h_O_f_f_s_e_t, or _G_C_A_r_c_M_o_d_e) and no error occurs, _X_G_e_t_G_C_-
  118.        _V_a_l_u_e_s sets the requested components in values_return and
  119.        returns a nonzero status.  Otherwise, it returns a zero
  120.        status.    Note that the clip-mask and dash-list (repre-
  121.        sented by the _G_C_C_l_i_p_M_a_s_k and _G_C_D_a_s_h_L_i_s_t bits, respec-
  122.        tively, in the valuemask) cannot be requested.  Also note
  123.        that an invalid resource ID (with one or more of the three
  124.        most significant bits set to 1) will be returned for
  125.        _G_C_F_o_n_t, _G_C_T_i_l_e, and _G_C_S_t_i_p_p_l_e if the component has never
  126.        been explicitly set by the client.
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XCreateGC(3X11)          XLIB FUNCTIONS      XCreateGC(3X11)
  137.  
  138.  
  139.        The _X_F_r_e_e_G_C function destroys the specified GC as well as
  140.        all the associated storage.
  141.  
  142.        _X_F_r_e_e_G_C can generate a _B_a_d_G_C error.
  143.  
  144. SSTTRRUUCCTTUURREESS
  145.        The _X_G_C_V_a_l_u_e_s structure contains:
  146.  
  147.  
  148.        /* GC attribute value mask bits */
  149.        #define     _G_C_F_u_n_c_t_i_o_n             (1L<<0)
  150.        #define     _G_C_P_l_a_n_e_M_a_s_k             (1L<<1)
  151.        #define     _G_C_F_o_r_e_g_r_o_u_n_d             (1L<<2)
  152.        #define     _G_C_B_a_c_k_g_r_o_u_n_d             (1L<<3)
  153.        #define     _G_C_L_i_n_e_W_i_d_t_h             (1L<<4)
  154.        #define     _G_C_L_i_n_e_S_t_y_l_e             (1L<<5)
  155.        #define     _G_C_C_a_p_S_t_y_l_e             (1L<<6)
  156.        #define     _G_C_J_o_i_n_S_t_y_l_e             (1L<<7)
  157.        #define     _G_C_F_i_l_l_S_t_y_l_e             (1L<<8)
  158.        #define     _G_C_F_i_l_l_R_u_l_e             (1L<<9)
  159.        #define     _G_C_T_i_l_e                 (1L<<10)
  160.        #define     _G_C_S_t_i_p_p_l_e             (1L<<11)
  161.        #define     _G_C_T_i_l_e_S_t_i_p_X_O_r_i_g_i_n         (1L<<12)
  162.        #define     _G_C_T_i_l_e_S_t_i_p_Y_O_r_i_g_i_n         (1L<<13)
  163.        #define     _G_C_F_o_n_t                 (1L<<14)
  164.        #define     _G_C_S_u_b_w_i_n_d_o_w_M_o_d_e         (1L<<15)
  165.        #define     _G_C_G_r_a_p_h_i_c_s_E_x_p_o_s_u_r_e_s         (1L<<16)
  166.        #define     _G_C_C_l_i_p_X_O_r_i_g_i_n             (1L<<17)
  167.        #define     _G_C_C_l_i_p_Y_O_r_i_g_i_n             (1L<<18)
  168.        #define     _G_C_C_l_i_p_M_a_s_k             (1L<<19)
  169.        #define     _G_C_D_a_s_h_O_f_f_s_e_t             (1L<<20)
  170.        #define     _G_C_D_a_s_h_L_i_s_t             (1L<<21)
  171.        #define     _G_C_A_r_c_M_o_d_e             (1L<<22)
  172.        /* Values */
  173.  
  174.        typedef struct {
  175.         int function;         /* logical operation */
  176.         unsigned long plane_mask;/* plane mask */
  177.         unsigned long foreground;/* foreground pixel */
  178.         unsigned long background;/* background pixel */
  179.         int line_width;         /* line width (in pixels) */
  180.         int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  181.         int cap_style;         /* CapNotLast, CapButt, CapRound, CapProjecting */
  182.         int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  183.         int fill_style;         /* FillSolid, FillTiled, FillStippled FillOpaqueStippled*/
  184.         int fill_rule;         /* EvenOddRule, WindingRule */
  185.         int arc_mode;         /* ArcChord, ArcPieSlice */
  186.         Pixmap tile;         /* tile pixmap for tiling operations */
  187.         Pixmap stipple;         /* stipple 1 plane pixmap for stippling */
  188.         int ts_x_origin;         /* offset for tile or stipple operations */
  189.         int ts_y_origin;
  190.         Font font;             /* default text font for text operations */
  191.         int subwindow_mode;         /* ClipByChildren, IncludeInferiors */
  192.         Bool graphics_exposures; /* boolean, should exposures be generated */
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. XCreateGC(3X11)          XLIB FUNCTIONS      XCreateGC(3X11)
  203.  
  204.  
  205.         int clip_x_origin;         /* origin for clipping */
  206.         int clip_y_origin;
  207.         Pixmap clip_mask;         /* bitmap clipping; other calls for rects */
  208.         int dash_offset;         /* patterned/dashed line information */
  209.         char dashes;
  210.        } XGCValues;
  211.  
  212.        The function attributes of a GC are used when you update a
  213.        section of a drawable (the destination) with bits from
  214.        somewhere else (the source).  The function in a GC defines
  215.        how the new destination bits are to be computed from the
  216.        source bits and the old destination bits.  _G_X_c_o_p_y is typi-
  217.        cally the most useful because it will work on a color dis-
  218.        play, but special applications may use other functions,
  219.        particularly in concert with particular planes of a color
  220.        display.     The 16 GC functions, defined in <_X_1_1_/_X_._h>, are:
  221.        -----------------------------------------------
  222.        FFuunnccttiioonn NNaammee     VVaalluuee     OOppeerraattiioonn
  223.        -----------------------------------------------
  224.        _G_X_c_l_e_a_r          0x0     0
  225.        _G_X_a_n_d          0x1     src AND dst
  226.        _G_X_a_n_d_R_e_v_e_r_s_e      0x2     src AND NOT dst
  227.        _G_X_c_o_p_y          0x3     src
  228.        _G_X_a_n_d_I_n_v_e_r_t_e_d      0x4     (NOT src) AND dst
  229.        _G_X_n_o_o_p          0x5     dst
  230.        _G_X_x_o_r          0x6     src XOR dst
  231.        _G_X_o_r          0x7     src OR dst
  232.        _G_X_n_o_r          0x8     (NOT src) AND (NOT
  233.                  dst)
  234.        _G_X_e_q_u_i_v          0x9     (NOT src) XOR dst
  235.        _G_X_i_n_v_e_r_t          0xa     NOT dst
  236.        _G_X_o_r_R_e_v_e_r_s_e      0xb     src OR (NOT dst)
  237.        _G_X_c_o_p_y_I_n_v_e_r_t_e_d      0xc     NOT src
  238.        _G_X_o_r_I_n_v_e_r_t_e_d      0xd     (NOT src) OR dst
  239.        _G_X_n_a_n_d          0xe     (NOT src) OR (NOT
  240.                  dst)
  241.        _G_X_s_e_t          0xf     1
  242.        -----------------------------------------------
  243.  
  244.        Many graphics operations depend on either pixel values or
  245.        planes in a GC.    The planes attribute is of type long, and
  246.        it specifies which planes of the destination are to be
  247.        modified, one bit per plane.  A monochrome display has
  248.        only one plane and will be the least significant bit of
  249.        the word.  As planes are added to the display hardware,
  250.        they will occupy more significant bits in the plane mask.
  251.  
  252.        In graphics operations, given a source and destination
  253.        pixel, the result is computed bitwise on corresponding
  254.        bits of the pixels.  That is, a Boolean operation is per-
  255.        formed in each bit plane.  The plane_mask restricts the
  256.        operation to a subset of planes.     A macro constant
  257.        _A_l_l_P_l_a_n_e_s can be used to refer to all planes of the screen
  258.        simultaneously.    The result is computed by the following:
  259.  
  260.  
  261.  
  262. X Version 11           Release 6.1                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ()                                   ()
  269.  
  270.  
  271.        ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask))
  272.  
  273.        Range checking is not performed on the values for fore-
  274.        ground, background, or plane_mask.  They are simply trun-
  275.        cated to the appropriate number of bits.     The line-width
  276.        is measured in pixels and either can be greater than or
  277.        equal to one (wide line) or can be the special value zero
  278.        (thin line).
  279.  
  280.        Wide lines are drawn centered on the path described by the
  281.        graphics request.  Unless otherwise specified by the join-
  282.        style or cap-style, the bounding box of a wide line with
  283.        endpoints [x1, y1], [x2, y2] and width w is a rectangle
  284.        with vertices at the following real coordinates:
  285.  
  286.        [x1-(w*sn/2), y1+(w*cs/2)], [x1+(w*sn/2), y1-(w*cs/2)],
  287.        [x2-(w*sn/2), y2+(w*cs/2)], [x2+(w*sn/2), y2-(w*cs/2)]
  288.  
  289.        Here sn is the sine of the angle of the line, and cs is
  290.        the cosine of the angle of the line.  A pixel is part of
  291.        the line and so is drawn if the center of the pixel is
  292.        fully inside the bounding box (which is viewed as having
  293.        infinitely thin edges).    If the center of the pixel is
  294.        exactly on the bounding box, it is part of the line if and
  295.        only if the interior is immediately to its right (x
  296.        increasing direction).  Pixels with centers on a horizon-
  297.        tal edge are a special case and are part of the line if
  298.        and only if the interior or the boundary is immediately
  299.        below (y increasing direction) and the interior or the
  300.        boundary is immediately to the right (x increasing direc-
  301.        tion).
  302.  
  303.        Thin lines (zero line-width) are one-pixel-wide lines
  304.        drawn using an unspecified, device-dependent algorithm.
  305.        There are only two constraints on this algorithm.
  306.  
  307.        1.   If a line is drawn unclipped from [x1,y1] to [x2,y2]
  308.         and if another line is drawn unclipped from
  309.         [x1+dx,y1+dy] to [x2+dx,y2+dy], a point [x,y] is
  310.         touched by drawing the first line if and only if the
  311.         point [x+dx,y+dy] is touched by drawing the second
  312.         line.
  313.  
  314.        2.   The effective set of points comprising a line cannot
  315.         be affected by clipping.  That is, a point is touched
  316.         in a clipped line if and only if the point lies
  317.         inside the clipping region and the point would be
  318.         touched by the line when drawn unclipped.
  319.  
  320.        A wide line drawn from [x1,y1] to [x2,y2] always draws the
  321.        same pixels as a wide line drawn from [x2,y2] to [x1,y1],
  322.        not counting cap-style and join-style.  It is recommended
  323.        that this property be true for thin lines, but this is not
  324.        required.  A line-width of zero may differ from a line-
  325.  
  326.  
  327.  
  328.                                 5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ()                                   ()
  335.  
  336.  
  337.        width of one in which pixels are drawn.    This permits the
  338.        use of many manufacturers' line drawing hardware, which
  339.        may run many times faster than the more precisely speci-
  340.        fied wide lines.
  341.  
  342.        In general, drawing a thin line will be faster than draw-
  343.        ing a wide line of width one.  However, because of their
  344.        different drawing algorithms, thin lines may not mix well
  345.        aesthetically with wide lines.  If it is desirable to
  346.        obtain precise and uniform results across all displays, a
  347.        client should always use a line-width of one rather than a
  348.        line-width of zero.
  349.  
  350.        The line-style defines which sections of a line are drawn:
  351.        _L_i_n_e_S_o_l_i_d       The full path of the line is drawn.
  352.        _L_i_n_e_D_o_u_-           The full path of the line is drawn, but the
  353.        _b_l_e_D_a_s_h           even dashes are filled differently from the
  354.                odd dashes (see fill-style) with _C_a_p_B_u_t_t
  355.                style used where even and odd dashes meet.
  356.        _L_i_n_e_O_n_O_f_f_D_a_s_h   Only the even dashes are drawn, and cap-style
  357.                applies to all internal ends of the individ-
  358.                ual dashes, except _C_a_p_N_o_t_L_a_s_t is treated as
  359.                _C_a_p_B_u_t_t.
  360.  
  361.        The cap-style defines how the endpoints of a path are
  362.        drawn:
  363.        _C_a_p_N_o_t_L_a_s_t      This is equivalent to _C_a_p_B_u_t_t except that for
  364.                a line-width of zero the final endpoint is
  365.                not drawn.
  366.        _C_a_p_B_u_t_t           The line is square at the endpoint (perpen-
  367.                dicular to the slope of the line) with no
  368.                projection beyond.
  369.        _C_a_p_R_o_u_n_d           The line has a circular arc with the diameter
  370.                equal to the line-width, centered on the end-
  371.                point.  (This is equivalent to _C_a_p_B_u_t_t for
  372.                line-width of zero).
  373.        _C_a_p_P_r_o_j_e_c_t_i_n_g   The line is square at the end, but the path
  374.                continues beyond the endpoint for a distance
  375.                equal to half the line-width.  (This is
  376.                equivalent to _C_a_p_B_u_t_t for line-width of
  377.                zero).
  378.  
  379.        The join-style defines how corners are drawn for wide
  380.        lines:
  381.        _J_o_i_n_M_i_t_e_r       The outer edges of two lines extend to meet
  382.                at an angle.  However, if the angle is less
  383.                than 11 degrees, then a _J_o_i_n_B_e_v_e_l join-style
  384.                is used instead.
  385.        _J_o_i_n_R_o_u_n_d       The corner is a circular arc with the diame-
  386.                ter equal to the line-width, centered on the
  387.                joinpoint.
  388.        _J_o_i_n_B_e_v_e_l       The corner has _C_a_p_B_u_t_t endpoint styles with
  389.                the triangular notch filled.
  390.  
  391.  
  392.  
  393.  
  394.                                 6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ()                                   ()
  401.  
  402.  
  403.        For a line with coincident endpoints (x1=x2, y1=y2), when
  404.        the cap-style is applied to both endpoints, the semantics
  405.        depends on the line-width and the cap-style:
  406.        _C_a_p_N_o_t_L_a_s_t      thin    The results are device dependent, but
  407.                    the desired effect is that nothing is
  408.                    drawn.
  409.        _C_a_p_B_u_t_t           thin    The results are device dependent, but
  410.                    the desired effect is that a single
  411.                    pixel is drawn.
  412.        _C_a_p_R_o_u_n_d           thin    The results are the same as for
  413.                    _C_a_p_B_u_t_t/thin.
  414.        _C_a_p_P_r_o_j_e_c_t_i_n_g   thin    The results are the same as for
  415.                    _C_a_p_B_u_t_t/thin.
  416.        _C_a_p_B_u_t_t           wide    Nothing is drawn.
  417.        _C_a_p_R_o_u_n_d           wide    The closed path is a circle, centered at
  418.                    the endpoint, and with the diameter
  419.                    equal to the line-width.
  420.        _C_a_p_P_r_o_j_e_c_t_i_n_g   wide    The closed path is a square, aligned
  421.                    with the coordinate axes, centered at
  422.                    the endpoint, and with the sides equal
  423.                    to the line-width.
  424.  
  425.        For a line with coincident endpoints (x1=x2, y1=y2), when
  426.        the join-style is applied at one or both endpoints, the
  427.        effect is as if the line was removed from the overall
  428.        path.  However, if the total path consists of or is
  429.        reduced to a single point joined with itself, the effect
  430.        is the same as when the cap-style is applied at both end-
  431.        points.
  432.  
  433.        The tile/stipple represents an infinite two-dimensional
  434.        plane, with the tile/stipple replicated in all dimensions.
  435.        When that plane is superimposed on the drawable for use in
  436.        a graphics operation, the upper-left corner of some
  437.        instance of the tile/stipple is at the coordinates within
  438.        the drawable specified by the tile/stipple origin.  The
  439.        tile/stipple and clip origins are interpreted relative to
  440.        the origin of whatever destination drawable is specified
  441.        in a graphics request.  The tile pixmap must have the same
  442.        root and depth as the GC, or a _B_a_d_M_a_t_c_h error results.
  443.        The stipple pixmap must have depth one and must have the
  444.        same root as the GC, or a _B_a_d_M_a_t_c_h error results.  For
  445.        stipple operations where the fill-style is _F_i_l_l_S_t_i_p_p_l_e_d
  446.        but not _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d, the stipple pattern is tiled
  447.        in a single plane and acts as an additional clip mask to
  448.        be ANDed with the clip-mask.  Although some sizes may be
  449.        faster to use than others, any size pixmap can be used for
  450.        tiling or stippling.
  451.  
  452.        The fill-style defines the contents of the source for
  453.        line, text, and fill requests.  For all text and fill
  454.        requests (for example, _X_D_r_a_w_T_e_x_t, _X_D_r_a_w_T_e_x_t_1_6,
  455.        _X_F_i_l_l_R_e_c_t_a_n_g_l_e, _X_F_i_l_l_P_o_l_y_g_o_n, and _X_F_i_l_l_A_r_c); for line
  456.        requests with line-style _L_i_n_e_S_o_l_i_d (for example,
  457.  
  458.  
  459.  
  460.                                 7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ()                                   ()
  467.  
  468.  
  469.        _X_D_r_a_w_L_i_n_e, _X_D_r_a_w_S_e_g_m_e_n_t_s, _X_D_r_a_w_R_e_c_t_a_n_g_l_e, _X_D_r_a_w_A_r_c); and
  470.        for the even dashes for line requests with line-style
  471.        _L_i_n_e_O_n_O_f_f_D_a_s_h or _L_i_n_e_D_o_u_b_l_e_D_a_s_h, the following apply:
  472.        _F_i_l_l_S_o_l_i_d        Foreground
  473.        _F_i_l_l_T_i_l_e_d        Tile
  474.        _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d   A tile with the same width and height as
  475.                 stipple, but with background everywhere
  476.                 stipple has a zero and with foreground
  477.                 everywhere stipple has a one
  478.        _F_i_l_l_S_t_i_p_p_l_e_d        Foreground masked by stipple
  479.  
  480.        When drawing lines with line-style _L_i_n_e_D_o_u_b_l_e_D_a_s_h, the odd
  481.        dashes are controlled by the fill-style in the following
  482.        manner:
  483.        _F_i_l_l_S_o_l_i_d        Background
  484.        _F_i_l_l_T_i_l_e_d        Same as for even dashes
  485.        _F_i_l_l_O_p_a_q_u_e_S_t_i_p_p_l_e_d   Same as for even dashes
  486.        _F_i_l_l_S_t_i_p_p_l_e_d        Background masked by stipple
  487.  
  488.        Storing a pixmap in a GC might or might not result in a
  489.        copy being made.     If the pixmap is later used as the des-
  490.        tination for a graphics request, the change might or might
  491.        not be reflected in the GC.  If the pixmap is used simul-
  492.        taneously in a graphics request both as a destination and
  493.        as a tile or stipple, the results are undefined.
  494.  
  495.        For optimum performance, you should draw as much as possi-
  496.        ble with the same GC (without changing its components).
  497.        The costs of changing GC components relative to using dif-
  498.        ferent GCs depend on the display hardware and the server
  499.        implementation.    It is quite likely that some amount of GC
  500.        information will be cached in display hardware and that
  501.        such hardware can only cache a small number of GCs.
  502.  
  503.        The dashes value is actually a simplified form of the more
  504.        general patterns that can be set with _X_S_e_t_D_a_s_h_e_s.  Speci-
  505.        fying a value of N is equivalent to specifying the two-
  506.        element list [N, N] in _X_S_e_t_D_a_s_h_e_s.  The value must be
  507.        nonzero, or a _B_a_d_V_a_l_u_e error results.
  508.  
  509.        The clip-mask restricts writes to the destination draw-
  510.        able.  If the clip-mask is set to a pixmap, it must have
  511.        depth one and have the same root as the GC, or a _B_a_d_M_a_t_c_h
  512.        error results.  If clip-mask is set to _N_o_n_e, the pixels
  513.        are always drawn regardless of the clip origin.    The clip-
  514.        mask also can be set by calling the _X_S_e_t_C_l_i_p_R_e_c_t_a_n_g_l_e_s or
  515.        _X_S_e_t_R_e_g_i_o_n functions.  Only pixels where the clip-mask has
  516.        a bit set to 1 are drawn.  Pixels are not drawn outside
  517.        the area covered by the clip-mask or where the clip-mask
  518.        has a bit set to 0.  The clip-mask affects all graphics
  519.        requests.  The clip-mask does not clip sources.    The clip-
  520.        mask origin is interpreted relative to the origin of what-
  521.        ever destination drawable is specified in a graphics
  522.        request.
  523.  
  524.  
  525.  
  526.                                 8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. ()                                   ()
  533.  
  534.  
  535.        You can set the subwindow-mode to _C_l_i_p_B_y_C_h_i_l_d_r_e_n or
  536.        _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s.  For _C_l_i_p_B_y_C_h_i_l_d_r_e_n, both source and
  537.        destination windows are additionally clipped by all view-
  538.        able _I_n_p_u_t_O_u_t_p_u_t children.  For _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s, neither
  539.        source nor destination window is clipped by inferiors.
  540.        This will result in including subwindow contents in the
  541.        source and drawing through subwindow boundaries of the
  542.        destination.  The use of _I_n_c_l_u_d_e_I_n_f_e_r_i_o_r_s on a window of
  543.        one depth with mapped inferiors of differing depth is not
  544.        illegal, but the semantics are undefined by the core pro-
  545.        tocol.
  546.  
  547.        The fill-rule defines what pixels are inside (drawn) for
  548.        paths given in _X_F_i_l_l_P_o_l_y_g_o_n requests and can be set to
  549.        _E_v_e_n_O_d_d_R_u_l_e or _W_i_n_d_i_n_g_R_u_l_e.  For _E_v_e_n_O_d_d_R_u_l_e, a point is
  550.        inside if an infinite ray with the point as origin crosses
  551.        the path an odd number of times.     For _W_i_n_d_i_n_g_R_u_l_e, a point
  552.        is inside if an infinite ray with the point as origin
  553.        crosses an unequal number of clockwise and counterclock-
  554.        wise directed path segments.  A clockwise directed path
  555.        segment is one that crosses the ray from left to right as
  556.        observed from the point.     A counterclockwise segment is
  557.        one that crosses the ray from right to left as observed
  558.        from the point.    The case where a directed line segment is
  559.        coincident with the ray is uninteresting because you can
  560.        simply choose a different ray that is not coincident with
  561.        a segment.
  562.  
  563.        For both _E_v_e_n_O_d_d_R_u_l_e and _W_i_n_d_i_n_g_R_u_l_e, a point is
  564.        infinitely small, and the path is an infinitely thin line.
  565.        A pixel is inside if the center point of the pixel is
  566.        inside and the center point is not on the boundary.  If
  567.        the center point is on the boundary, the pixel is inside
  568.        if and only if the polygon interior is immediately to its
  569.        right (x increasing direction).    Pixels with centers on a
  570.        horizontal edge are a special case and are inside if and
  571.        only if the polygon interior is immediately below (y
  572.        increasing direction).
  573.  
  574.        The arc-mode controls filling in the _X_F_i_l_l_A_r_c_s function
  575.        and can be set to _A_r_c_P_i_e_S_l_i_c_e or _A_r_c_C_h_o_r_d.  For
  576.        _A_r_c_P_i_e_S_l_i_c_e, the arcs are pie-slice filled.  For _A_r_c_C_h_o_r_d,
  577.        the arcs are chord filled.
  578.  
  579.        The graphics-exposure flag controls _G_r_a_p_h_i_c_s_E_x_p_o_s_e event
  580.        generation for _X_C_o_p_y_A_r_e_a and _X_C_o_p_y_P_l_a_n_e requests (and any
  581.        similar requests defined by extensions).
  582.  
  583. DDIIAAGGNNOOSSTTIICCSS
  584.        _B_a_d_A_l_l_o_c     The server failed to allocate the requested
  585.          resource or server memory.
  586.  
  587.        _B_a_d_D_r_a_w_a_b_l_e
  588.          A value for a Drawable argument does not name a
  589.  
  590.  
  591.  
  592.                                 9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. ()                                   ()
  599.  
  600.  
  601.          defined Window or Pixmap.
  602.  
  603.        _B_a_d_F_o_n_t     A value for a Font or GContext argument does not
  604.          name a defined Font.
  605.  
  606.        _B_a_d_G_C     A value for a GContext argument does not name a
  607.          defined GContext.
  608.  
  609.        _B_a_d_M_a_t_c_h     An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  610.  
  611.        _B_a_d_M_a_t_c_h     Some argument or pair of arguments has the cor-
  612.          rect type and range but fails to match in some
  613.          other way required by the request.
  614.  
  615.        _B_a_d_P_i_x_m_a_p A value for a Pixmap argument does not name a
  616.          defined Pixmap.
  617.  
  618.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  619.          values accepted by the request.  Unless a spe-
  620.          cific range is specified for an argument, the
  621.          full range defined by the argument's type is
  622.          accepted.  Any argument defined as a set of
  623.          alternatives can generate this error.
  624.  
  625. SSEEEE AALLSSOO
  626.        AllPlanes(3X11), XCopyArea(3X11), XCreateRegion(3X11),
  627.        XDrawArc(3X11), XDrawLine(3X11), XDrawRectangle(3X11),
  628.        XDrawText(3X11), XFillRectangle(3X11), XQueryBest-
  629.        Size(3X11), XSetArcMode(3X11), XSetClipOrigin(3X11), XSet-
  630.        FillStyle(3X11), XSetFont(3X11), XSetLineAttributes(3X11),
  631.        XSetState(3X11), XSetTile(3X11)
  632.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                                    10
  659.  
  660.  
  661.