Difference between revisions of "API Component.Property.SetColor"

From Flowcode Help
Jump to navigationJump to search
(XML import API auto-gen)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
API contents
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Sets a components 'color' property as a R,G,B value
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetColor'''
 +
|-
 +
| colspan="2" | Sets a components 'color' property as a R,G,B value 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Handle
 +
|-
 +
| colspan="2" | The component handle of the property owner 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Red
 +
|-
 +
| colspan="2" | The 0-255 red part of the colour 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Green
 +
|-
 +
| colspan="2" | The 0-255 green part of the colour 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Blue
 +
|-
 +
| colspan="2" | The 0-255 blue part of the colour 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - NONE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===Parameters===
+
==Detailed description==
''[[Variable types|HANDLE]] Handle''
+
This is a helper function that takes the red, green and blue values form 0-255 and calls [[API Component.Property.SetValue|SetValue]] with the property name "color" and the argument the RGB value built from this calls arguments.
:The component handle of the property owner
 
  
''[[Variable types|BYTE]] Red''
 
:The 0-255 red part of the colour
 
  
''[[Variable types|BYTE]] Green''
+
No check is made to see if the target ''Handle'' has a property called "color", and no error is returned if it does not.
:The 0-255 green part of the colour
 
  
''[[Variable types|BYTE]] Blue''
 
:The 0-255 blue part of the colour
 
  
===Return value===
+
==Examples==
''This call does not return a value''
+
===Calling in a calculation===
 
+
* Add to a calculation icon: <pre class="brush:[cpp]">::Component.Property.SetColor(handle, red, green, blue)</pre>
===Detailed description===
 
''No additional information''
 
 
 
===Examples===
 
====Calling in a calculation====
 
* Add to a calculation icon: ::Component.Property.SetColor(handle, red, green, blue)
 

Latest revision as of 11:54, 16 January 2023

Fc9-comp-macro.png SetColor
Sets a components 'color' property as a R,G,B value 
Fc9-h32-icon.png - HANDLE Handle
The component handle of the property owner 
Fc9-u8-icon.png - BYTE Red
The 0-255 red part of the colour 
Fc9-u8-icon.png - BYTE Green
The 0-255 green part of the colour 
Fc9-u8-icon.png - BYTE Blue
The 0-255 blue part of the colour 
Fc9-void-icon.png - NONE Return


Detailed description

This is a helper function that takes the red, green and blue values form 0-255 and calls SetValue with the property name "color" and the argument the RGB value built from this calls arguments.


No check is made to see if the target Handle has a property called "color", and no error is returned if it does not.


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Component.Property.SetColor(handle, red, green, blue)