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

📄 xcmsallocnamedcolor.html

📁 linux图形界面x liberary手册
💻 HTML
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: XcmsAllocNamedColor</TITLE></HEAD><BODY><H1 ALIGN=center>XcmsAllocNamedColor</H1><H2>Syntax</H2><!.IN "Allocation" "read-only colormap cells"><!.IN "Read-only colormap cells" "allocating"><!.IN "Color" "naming"><!.IN "Color" "allocation"><!.IN "XcmsAllocNamedColor" "" "@DEF@"><CODE><PRE><B><A HREF="conversion-contexts-and-gamut-mapping.html#cmsStatus">Status</A></B> XcmsAllocNamedColor(<B>display</B>, <B>colormap</B>, <B>color_string</B>, <B>color_screen_return</B>, <B>color_exact_return</B>,                            <B>result_format</B>)      <A HREF="../display/opening.html#Display">Display</A> *<B>display</B>;      <A HREF="./#colormap">Colormap</A> <B>colormap</B>;      char *<B>color_string</B>;      <A HREF="structures.html#XcmsColor">XcmsColor</A> *<B>color_screen_return</B>;      <A HREF="structures.html#XcmsColor">XcmsColor</A> *<B>color_exact_return</B>;      <A HREF="structures.html#XcmsColor">XcmsColorFormat</A> <B>result_format</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..ds St \ whose color definition structure is to be returned<TR><TD> <B>color_string</B><TD> Specifies the color string\*(St.<TR><TD> <B>color_screen_return</B><TD> Returns the pixel value of the color cell and color specification that actually is stored for that cell.<TR><TD> <B>color_exact_return</B><TD> Returns the color specification parsed from the color stringor parsed from the corresponding string found in a color name database.<TR><TD> <B>result_format</B><TD> Specifies the color format for the returned colorspecifications (color_screen_return and color_exact_return arguments).If the format is<B><A HREF="structures.html#XcmsUndefinedFormat">XcmsUndefinedFormat</A></B>and the color string contains anumerical color specification,the specification is returned in the format used in that numericalcolor specification.If the format is<B><A HREF="structures.html#XcmsUndefinedFormat">XcmsUndefinedFormat</A></B>and the color string contains a color name,the specification is returned in the format used to store the color in the database.</TABLE><H2>Description</H2>The<B>XcmsAllocNamedColor()</B>function is similar to<B><A HREF="XAllocNamedColor.html">XAllocNamedColor()</A></B>except the color returned can be in any format specified.This functionultimately calls<B><A HREF="XAllocColor.html">XAllocColor()</A></B>to allocate a read-only color cell withthe color specified by a color string.The color string is parsed into an<A HREF="structures.html#XcmsColor">XcmsColor</A>structure (see<B><A HREF="XcmsLookupColor.html">XcmsLookupColor()</A></B>),convertedto an RGB value, and finally passed to<B><A HREF="XAllocColor.html">XAllocColor()</A></B>.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.<P>This function returns both the color specification as a resultof parsing (exact specification) and the actual color specificationstored (screen specification).This screen specification is the result of converting the RGB valuereturned by<B><A HREF="XAllocColor.html">XAllocColor()</A></B>into the format specified in result_format.If there is no interest in a returned color specification,unnecessary computation can be bypassed if result_format is set to<B><A HREF="structures.html#XcmsRGBFormat">XcmsRGBFormat</A></B>.If color_screen_return and color_exact_returnpoint to the same structure, the pixel field will be set correctly but thecolor values are undefined.<P><B>XcmsAllocNamedColor()</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="XcmsAllocColor.html">XcmsAllocColor()</A></B>,<B><A HREF="XcmsQueryColor.html">XcmsQueryColor()</A></B>,<B><A HREF="XcmsStoreColor.html">XcmsStoreColor()</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 + -