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

📄 xsetdashes.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: XSetDashes</TITLE></HEAD><BODY><H1 ALIGN=center>XSetDashes</H1><H2>Syntax</H2><!.IN "XSetDashes" "" "@DEF@"><CODE><PRE>XSetDashes(<B>display</B>, <B>gc</B>, <B>dash_offset</B>, <B>dash_list</B>, <B>n</B>)        <A HREF="../../display/opening.html#Display">Display</A> *<B>display</B>;        <A HREF="../manipulating.html">GC</A> <B>gc</B>;        int <B>dash_offset</B>;        char <B>dash_list</B>[];        int <B>n</B>;</PRE></CODE><H2>Arguments</H2><TABLE><TR><TD> <B>display</B><TD> Specifies the connection to the X server.<TR><TD> <B>gc</B><TD> Specifies the GC.<TR><TD> <B>dash_offset</B><TD> Specifies the phase of the pattern for the dashed line-style you want to setfor the specified GC. <TR><TD> <B>dash_list</B><TD> Specifies the dash-list for the dashed line-styleyou want to set for the specified GC. <TR><TD> <B>n</B><TD> Specifies the number of elements in dash_list. </TABLE><H2>Description</H2> The<B>XSetDashes()</B>function sets the dash-offset and dash-list attributes for dashed line stylesin the specified GC.There must be at least one element in the specified dash_list,or a<B>BadValue</B>error results. The initial and alternating elements (second, fourth, and so on) of the dash_list are the even dashes, andthe others are the odd dashes.Each element specifies a dash length in pixels.All of the elements must be nonzero,or a<B>BadValue</B>error results.Specifying an odd-length list is equivalent to specifying the same listconcatenated with itself to produce an even-length list.<P>The dash-offset defines the phase of the pattern,specifying how many pixels into the dash-list the patternshould actually begin in any single graphics request.Dashing is continuous through path elements combined with a join-stylebut is reset to the dash-offset between each sequence of joined lines.<P>The unit of measure for dashes is the same for the ordinary coordinate system.Ideally, a dash length is measured along the slope of the line, but implementationsare only required to match this ideal for horizontal and vertical lines.Failing the ideal semantics, it is suggested that the length be measured along themajor axis of the line.The major axis is defined as the x axis for lines drawn at an angle of between-45 and +45 degrees or between 135 and 225 degrees from the x axis.For all other lines, the major axis is the y axis.<P><B>XSetDashes()</B>can generate<B>BadAlloc</B> ,<B>BadGC</B> ,and<B>BadValue</B> errors.<H2>Diagnostics</H2><TABLE><TR><TD><B>BadAlloc</B><TD> The server failed to allocate the requested     source or server memory.<TR><TD><B>BadGC</B><TD>A value for a <B><A HREF="../GContext.html">GContext</A></B> 	argument does not name a defined 	<B><A HREF="../GContext.html">GContext</A></B>.<TR><TD><B>BadValue</B><TD> Some numeric value falls outside the range of values accepted by the request.     Unless a specific range is specified for an argument, the full range defined     by the argument's type is accepted.  Any argument defined as a set of     alternatives can generate this error.</TABLE><H2>See also</H2><B><A HREF="../XCreateGC.html">XCreateGC()</A></B>,<B><A HREF="XQueryBestSize.html">XQueryBestSize()</A></B>,<B><A HREF="XSetArcMode.html">XSetArcMode()</A></B>,<B><A HREF="XSetClipOrigin.html">XSetClipOrigin()</A></B>,<B><A HREF="XSetFillStyle.html">XSetFillStyle()</A></B>,<B><A HREF="XSetFont.html">XSetFont()</A></B>,<B><A HREF="XSetLineAttributes.html">XSetLineAttributes()</A></B>,<B><A HREF="XSetState.html">XSetState()</A></B>,<B><A HREF="XSetTile.html">XSetTile()</A></B>,"<A HREF="line-dashes.html">Setting the Line Attributes and Dashes</A>".<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 + -