⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manipulating.html

📁 linux图形界面x liberary手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<B>JoinBevel</B>join-style is used instead.<TR><TD><B>JoinRound</B><TD>The corner is a circular arc with the diameter equal to the line-width, centered on the joinpoint.<TR><TD><B>JoinBevel</B><TD>The corner has<B>CapButt</B>endpoint styles with the triangular notch filled.</TABLE><P>For a line with coincident endpoints (x1=x2, y1=y2), when the cap-style is applied to both endpoints, the semantics depends on the line-width and the cap-style:<TABLE><TR><TD><B>CapNotLast</B><TD>thin<TD>The results are device-dependent, but the desired effect is that nothing is drawn.<TR><TD><B>CapButt</B><TD>thin<TD>The results are device-dependent, but the desired effect is that a single pixel is drawn.<TR><TD><B>CapRound</B><TD>thin<TD>The results are the same as for<B>CapButt</B>/thin.<TR><TD><B>CapProjecting</B><TD>thin<TD>The results are the same as for<B>CapButt</B>/thin.<TR><TD><B>CapButt</B><TD>wide<TD>Nothing is drawn.<TR><TD><B>CapRound</B><TD>wide<TD>The closed path is a circle, centered at the endpoint, andwith the diameter equal to the line-width.<TR><TD><B>CapProjecting</B><TD>wide<TD>The closed path is a square, aligned with the coordinate axes, centered at theendpoint, and with the sides equal to the line-width.</TABLE><P>For a line with coincident endpoints (x1=x2, y1=y2), when the join-style is applied at one or both endpoints, the effect is as if the line was removed from the overall path.However, if the total path consists of or is reduced to a single point joinedwith itself, the effect is the same as when the cap-style is applied at bothendpoints.<A NAME="tile"></A><A NAME="stipple"></A><A NAME="tile-stipple-x-origin"></A><A NAME="tile-stipple-y-origin"></A><P>The tile/stipple represents an infinite two-dimensional plane,with the tile/stipple replicated in all dimensions.When that plane is superimposed on the drawablefor use in a graphics operation, the upper-left cornerof some instance of the tile/stipple is at the coordinates withinthe drawable specified by the tile/stipple origin.The tile/stipple and clip origins are interpreted relative to theorigin of whatever destination drawable is specified in a graphicsrequest.The tile pixmap must have the same root and depth as the GC,or a<B>BadMatch</B>error results.The stipple pixmap must have depth one and must have the same root as theGC, or a <B>BadMatch</B>error results.  For stipple operations where the fill-style is<B>FillStippled</B>but not <B>FillOpaqueStippled</B>,the stipple pattern is tiled in asingle plane and acts as an additional clip mask to be ANDed with the clip-mask.Although some sizes may be faster to use than others,any size pixmap can be used for tiling or stippling.<A NAME="fill-style"></A><P>The fill-style defines the contents of the source for line, text, andfill requests.  For all text and fill requests (for example,<B><A HREF="../graphics/drawing-text/XDrawText.html">XDrawText()</A></B>, <B><A HREF="../graphics/drawing-text/XDrawText16.html">XDrawText16()</A></B>,<B><A HREF="../graphics/filling-areas/XFillRectangle.html">XFillRectangle()</A></B>, <B><A HREF="../graphics/filling-areas/XFillPolygon.html">XFillPolygon()</A></B>, and<B><A HREF="../graphics/filling-areas/XFillArc.html">XFillArc()</A></B>);for line requests with <A HREF="manipulating.html#line-style">line-style</A> <B>LineSolid</B>(for example,<B><A HREF="../graphics/drawing/XDrawLine.html">XDrawLine()</A></B>,<B><A HREF="../graphics/drawing/XDrawSegments.html">XDrawSegments()</A></B>, <B><A HREF="../graphics/drawing/XDrawRectangle.html">XDrawRectangle()</A></B>,<B><A HREF="../graphics/drawing/XDrawArc.html">XDrawArc()</A></B>);and for the even dashes for line requests with line-style <B>LineOnOffDash</B>or <B>LineDoubleDash</B>,the following apply:<TABLE><TR><TD><B>FillSolid</B><TD>Foreground<TR><TD><B>FillTiled</B><TD>Tile<TR><TD><B>FillOpaqueStippled</B><TD>A tile with the same width and height as stipple,but with background everywhere stipple has a zeroand with foreground everywhere stipple has a one<TR><TD><B>FillStippled</B><TD>Foreground masked by stipple</TABLE><P>When drawing lines with line-style<B>LineDoubleDash</B>,the odd dashes are controlled by the fill-style in the following manner:<TABLE><TR><TD><B>FillSolid</B><TD>Background<TR><TD><B>FillTiled</B><TD>Same as for even dashes<TR><TD><B>FillOpaqueStippled</B><TD>Same as for even dashes<TR><TD><B>FillStippled</B><TD>Background masked by stipple</TABLE><P>Storing a pixmap in a GC might or might not result in a copybeing made.If the pixmap is later used as the destination for a graphics request,the change might or might not be reflected in the GC.If the pixmap is used simultaneously in a graphics request both asa destination and as a tile or stipple,the results are undefined.<P>For optimum performance,you should draw as much as possible with the same GC (without changing its components).The costs of changing GC components relative to using different GCsdepend upon the display hardware and the server implementation.It is quite likely that some amount of GC information will becached in display hardware and that such hardware can only cache a small numberof GCs.<A NAME="dashes"></A><P>The dashes value is actually a simplified form of themore general patterns that can be set with <B><A HREF="convenience-functions/XSetDashes.html">XSetDashes()</A></B>.  Specifying avalue of N is equivalent to specifying the two-element list [N, N] in <B><A HREF="convenience-functions/XSetDashes.html">XSetDashes()</A></B>. The value must be nonzero,or a<B>BadValue</B>error results.<A NAME="clip-mask"></A><P>The clip-mask restricts writes to the destination drawable.  If the clip-mask is set to a pixmap,it must have depth one and have the same root as the GC,or a<B>BadMatch</B>error results.If clip-mask is set to<B>None</B>,the pixels are always drawn regardless of the clip origin.The clip-mask also can be set by calling the<B><A HREF="convenience-functions/XSetClipRectangles.html">XSetClipRectangles()</A></B>or<B><A HREF="../utilities/regions/XSetRegion.html">XSetRegion()</A></B>functions.Only pixels where the clip-mask has a bit set to 1 are drawn.  Pixels are not drawn outside the area covered by the clip-mask or where the clip-mask has a bit set to 0.The clip-mask affects all graphics requests.The clip-mask does not clip sources.The clip-mask origin is interpreted relative to the origin of whateverdestination drawable is specified in a graphics request.<A NAME="subwindow-mode"></A><P>You can set the subwindow-mode to<B>ClipByChildren</B>or<B>IncludeInferiors</B>.For <B>ClipByChildren</B>, both source and destination windows areadditionally clipped by all viewable <B><A HREF="../window/create.html#InputClass">InputOutput</A></B>children.  For <B>IncludeInferiors</B>,neither source nor destination window is clipped by inferiors. This will result in including subwindow contents in the sourceand drawing through subwindow boundaries of the destination.The use of <B>IncludeInferiors</B>on a window of one depth with mappedinferiors of differing depth is not illegal, but the semantics areundefined by the core protocol.<A NAME="fill-rule"></A><P>The fill-rule defines what pixels are inside (drawn) forpaths given in <B><A HREF="../graphics/filling-areas/XFillPolygon.html">XFillPolygon()</A></B>requests and can be set to <B>EvenOddRule</B>or<B>WindingRule</B>.For<B>EvenOddRule</B>,a point is inside ifan infinite ray with the point as origin crosses the path an odd numberof times.  For <B>WindingRule</B>, a point is inside if an infinite ray with thepoint as origin crosses an unequal number of clockwise andcounterclockwise directed path segments.A clockwise directed path segment is one that crosses the ray from left toright as observed from the point.A counterclockwise segment is one that crosses the ray from right to leftas observed from the point.The case where a directed line segment is coincident with the ray isuninteresting because you can simply choose a different ray that is notcoincident with a segment.<P>For both <B>EvenOddRule</B>and<B>WindingRule</B>,a point is infinitely small, and the path is an infinitely thin line.  A pixel is inside if the center point of the pixel is insideand the center point is not on the boundary.  If the center point is on the boundary,the pixel is inside if and only if the polygon interior is immediately toits right (x increasing direction).  Pixels with centers on a horizontal edge are a special case and are inside if and only if the polygon interior is immediately below (y increasing direction).<A NAME="arc-mode"></A><P>The arc-mode controls filling in the <B><A HREF="../graphics/filling-areas/XFillArcs.html">XFillArcs()</A></B>function and can be set to<B>ArcPieSlice</B>or<B>ArcChord</B>.For<B>ArcPieSlice</B>,the arcs are pie-slice filled.For<B>ArcChord</B>,the arcs are chord filled.<A NAME="graphics-exposure"></A><P>The graphics-exposure flag controls <B><A HREF="../events/exposure/graphics-expose-and-no-expose.html">GraphicsExpose</A></B>event generationfor <B><A HREF="../graphics/XCopyArea.html">XCopyArea()</A></B>and <B><A HREF="../graphics/XCopyPlane.html">XCopyPlane()</A></B>requests (and any similar requests defined by extensions).<P>To create a new GC that is usable on a given screen with a depth of drawable, use<B><A HREF="XCreateGC.html">XCreateGC()</A></B>.<P>To copy components from a source GC to a destination GC, use<B><A HREF="XCopyGC.html">XCopyGC()</A></B>.<P>To change the components in a given GC, use<B><A HREF="XChangeGC.html">XChangeGC()</A></B>.<P>To obtain components of a given GC, use<B><A HREF="XGetGCValues.html">XGetGCValues()</A></B>.<P>To free a given GC, use<B><A HREF="XFreeGC.html">XFreeGC()</A></B>.<P>To obtain the <B><A HREF="/toto/GContext.html">GContext</A></B>resource ID for a given GC, use <B><A HREF="XGContextFromGC.html">XGContextFromGC()</A></B><P>Xlib usually defers sending changes to the components of a GC to the serveruntil a graphics function is actually called with that GC.This permits batching of component changes into a single server request.In some circumstances, however, it may be necessary for the clientto explicitly force sending the changes to the server.An example might be when a protocol extension uses the GC indirectly,in such a way that the extension interface cannot know what GC will be used.To force sending GC component changes, use<B><A HREF="XFlushGC.html">XFlushGC()</A></B>.<H5 ALIGN=right><I>Next: <A HREF="convenience-functions/">Using GC Convenience Routines</A></I></H5><HR><ADDRESS><A HREF="http://tronche.com/">Christophe Tronche</A>, <A HREF="mailto:ch.tronche@computer.org">ch.tronche@computer.org</A></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -