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

📄 xallocnamedcolor.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: XAllocNamedColor</TITLE></HEAD><BODY><H1 ALIGN=center>XAllocNamedColor</H1><H2>Syntax</H2><!.IN "Allocation" "read-only colormap cells"><!.IN "Read-only colormap cells" "allocating"><!.IN "Color" "naming"><!.IN "Color" "allocation"><!.IN "XAllocNamedColor" "" "@DEF@"><CODE><PRE><B><A HREF="../introduction/errors.html#Status">Status</A></B> XAllocNamedColor(<B>display</B>, <B>colormap</B>, \<B>color_name</B>, <B>screen_def_return</B>, <B>exact_def_return</B>)      <A HREF="../display/opening.html#Display">Display</A> *<B>display</B>;      <A HREF="./#colormap">Colormap</A> <B>colormap</B>;      char *<B>color_name</B>;      <A HREF="structures.html">XColor</A> *<B>screen_def_return</B>, *<B>exact_def_return</B>;</PRE></CODE><H2>Arguments</H2><TABLE><TR><TD> <B>display</B><TD> Specifies the connection to the X server.<TR><TD> <B>colormap</B><TD> Specifies the colormap.<TR><TD> <B>color_name</B><TD> Specifies the color name string (for example, red) whose color definition structure you want returned.<TR><TD> <B>screen_def_return</B><TD> Returns the closest RGB values provided by the hardware.<TR><TD> <B>exact_def_return</B><TD> Returns the exact RGB values.</TABLE><H2>Description</H2> The<B>XAllocNamedColor()</B>function looks up the named color with respect to the screen that isassociated with the specified colormap.It returns both the exact database definition andthe closest color supported by the screen.The allocated color cell is read-only.The pixel value is returned in screen_def_return.If the color name is not in the Host Portable Character Encoding, the result is implementation dependent.Use of uppercase or lowercase does not matter.If screen_def_return and exact_def_returnpoint to the same structure, the pixel field will be set correctly but thecolor values are undefined.<B>XAllocNamedColor()</B>returns nonzero if a cell is allocated;otherwise, it returns zero.<P><B>XAllocNamedColor()</B>can generate a<B>BadColor</B>error. <H2>Diagnostics</H2><TABLE><TR><TD><B>BadColor</B><TD>  A value for a Colormap argument does not name a      defined Colormap.</TABLE><H2>See also</H2><B><A HREF="XAllocColor.html">XAllocColor()</A></B>,<B><A HREF="XAllocColorCells.html">XAllocColorCells()</A></B>,<B><A HREF="XAllocColorPlanes.html">XAllocColorPlanes()</A></B>,<B><A HREF="XCreateColormap.html">XCreateColormap()</A></B>,<B><A HREF="XFreeColors.html">XFreeColors()</A></B>,<B><A HREF="XQueryColor.html">XQueryColor()</A></B>,<B><A HREF="XStoreColors.html">XStoreColors()</A></B>,"<A HREF="cell.html">Allocating and Freeing Color Cells</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 + -