openclonk/docs/sdk/script/fn/GetRGBaValue.xml

64 lines
1.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>GetRGBaValue</title>
<category>Arithmetics</category>
<version>5.1 OC</version>
<syntax>
<rtype>int</rtype>
<params>
<param>
<type>int</type>
<name>Val</name>
<desc>32 bit color value</desc>
</param>
<param>
<type>int</type>
<name>select</name>
<desc>0-3: desired value to be returned</desc>
</param>
</params>
</syntax>
<desc>
Returns one of the three color fractions of the specified 32 bit color value:
<table>
<rowh>
<col>select</col>
<col>Return value</col>
</rowh>
<row>
<col>0</col>
<col>Alpha value</col>
</row>
<row>
<col>1</col>
<col>Red value</col>
</row>
<row>
<col>2</col>
<col>Green value</col>
</row>
<row>
<col>3</col>
<col>Blue value</col>
</row>
</table>
</desc>
<examples>
<example>
<code>GetRGBaValue(<funclink>GetColor</funclink>(<funclink>GetCursor</funclink>()),2);</code>
<text>Returns the green fraction of the currently selected clonk.</text>
</example>
</examples>
<related>
<funclink>RGBa</funclink>
<funclink>SetRGBaValue</funclink>
</related>
</func>
<author>Tyron</author><date>2004-08</date>
</funcs>