diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-03-18 14:44:42 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-03-18 16:37:43 +0100 |
commit | 4ca1e73ff9ae4855db082a43b05542ac9e4d6ff5 (patch) | |
tree | 4067ab5c600e8faa941a7761441121f9b25ab9ae /doc/classes/Color.xml | |
parent | 2fd445cc18dd4cf0d65a511f9d714763f74a3e20 (diff) |
doc: Sync classref with current source
And move GLTF docs to its module folder.
Diffstat (limited to 'doc/classes/Color.xml')
-rw-r--r-- | doc/classes/Color.xml | 130 |
1 files changed, 105 insertions, 25 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index ce88e0ae88..c33d007735 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -56,10 +56,8 @@ </return> <argument index="0" name="code" type="String"> </argument> - <argument index="1" name="alpha" type="float"> - </argument> <description> - Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. + Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> @@ -67,8 +65,10 @@ </return> <argument index="0" name="code" type="String"> </argument> + <argument index="1" name="alpha" type="float"> + </argument> <description> - Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. + Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> @@ -80,16 +80,14 @@ </argument> <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="float"> - </argument> <description> - Constructs a [Color] from RGBA values, typically between 0 and 1. + Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` + var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` + var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` [/csharp] [/codeblocks] </description> @@ -103,19 +101,21 @@ </argument> <argument index="2" name="b" type="float"> </argument> + <argument index="3" name="a" type="float"> + </argument> <description> - Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. + Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` + var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` [/csharp] [/codeblocks] </description> </method> - <method name="blend"> + <method name="blend" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="over" type="Color"> @@ -136,7 +136,7 @@ [/codeblocks] </description> </method> - <method name="darkened"> + <method name="darkened" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="amount" type="float"> @@ -155,7 +155,87 @@ [/codeblocks] </description> </method> - <method name="inverted"> + <method name="find_named_color" qualifiers="static"> + <return type="int"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="from_rgbe9995" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="rgbe" type="int"> + </argument> + <description> + </description> + </method> + <method name="from_string" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="str" type="String"> + </argument> + <argument index="1" name="default" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_named_color" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_named_color_count" qualifiers="static"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_named_color_name" qualifiers="static"> + <return type="String"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="hex" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="hex" type="int"> + </argument> + <description> + </description> + </method> + <method name="hex64" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="hex" type="int"> + </argument> + <description> + </description> + </method> + <method name="html" qualifiers="static"> + <return type="Color"> + </return> + <argument index="0" name="rgba" type="String"> + </argument> + <description> + </description> + </method> + <method name="html_is_valid" qualifiers="static"> + <return type="bool"> + </return> + <argument index="0" name="color" type="String"> + </argument> + <description> + </description> + </method> + <method name="inverted" qualifiers="const"> <return type="Color"> </return> <description> @@ -172,7 +252,7 @@ [/codeblocks] </description> </method> - <method name="is_equal_approx"> + <method name="is_equal_approx" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="to" type="Color"> @@ -181,7 +261,7 @@ Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> - <method name="lerp"> + <method name="lerp" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="to" type="Color"> @@ -204,7 +284,7 @@ [/codeblocks] </description> </method> - <method name="lightened"> + <method name="lightened" qualifiers="const"> <return type="Color"> </return> <argument index="0" name="amount" type="float"> @@ -323,7 +403,7 @@ <description> </description> </method> - <method name="to_abgr32"> + <method name="to_abgr32" qualifiers="const"> <return type="int"> </return> <description> @@ -340,7 +420,7 @@ [/codeblocks] </description> </method> - <method name="to_abgr64"> + <method name="to_abgr64" qualifiers="const"> <return type="int"> </return> <description> @@ -357,7 +437,7 @@ [/codeblocks] </description> </method> - <method name="to_argb32"> + <method name="to_argb32" qualifiers="const"> <return type="int"> </return> <description> @@ -374,7 +454,7 @@ [/codeblocks] </description> </method> - <method name="to_argb64"> + <method name="to_argb64" qualifiers="const"> <return type="int"> </return> <description> @@ -391,7 +471,7 @@ [/codeblocks] </description> </method> - <method name="to_html"> + <method name="to_html" qualifiers="const"> <return type="String"> </return> <argument index="0" name="with_alpha" type="bool" default="true"> @@ -413,7 +493,7 @@ [/codeblocks] </description> </method> - <method name="to_rgba32"> + <method name="to_rgba32" qualifiers="const"> <return type="int"> </return> <description> @@ -430,7 +510,7 @@ [/codeblocks] </description> </method> - <method name="to_rgba64"> + <method name="to_rgba64" qualifiers="const"> <return type="int"> </return> <description> |