Merge pull request #43283 from Calinou/color-remove-contrasted
Remove `Color.contrasted()` as its behavior is barely useful
This commit is contained in:
commit
52c1b5fc41
10 changed files with 1 additions and 66 deletions
|
|
@ -148,13 +148,6 @@ godot_color GDAPI godot_color_inverted(const godot_color *p_self) {
|
|||
return dest;
|
||||
}
|
||||
|
||||
godot_color GDAPI godot_color_contrasted(const godot_color *p_self) {
|
||||
godot_color dest;
|
||||
const Color *self = (const Color *)p_self;
|
||||
*((Color *)&dest) = self->contrasted();
|
||||
return dest;
|
||||
}
|
||||
|
||||
godot_color GDAPI godot_color_lerp(const godot_color *p_self, const godot_color *p_b, const godot_real p_t) {
|
||||
godot_color dest;
|
||||
const Color *self = (const Color *)p_self;
|
||||
|
|
|
|||
|
|
@ -1254,13 +1254,6 @@
|
|||
["const godot_color *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_color_contrasted",
|
||||
"return_type": "godot_color",
|
||||
"arguments": [
|
||||
["const godot_color *", "p_self"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "godot_color_lerp",
|
||||
"return_type": "godot_color",
|
||||
|
|
|
|||
|
|
@ -93,8 +93,6 @@ godot_int GDAPI godot_color_to_argb32(const godot_color *p_self);
|
|||
|
||||
godot_color GDAPI godot_color_inverted(const godot_color *p_self);
|
||||
|
||||
godot_color GDAPI godot_color_contrasted(const godot_color *p_self);
|
||||
|
||||
godot_color GDAPI godot_color_lerp(const godot_color *p_self, const godot_color *p_b, const godot_real p_t);
|
||||
|
||||
godot_color GDAPI godot_color_blend(const godot_color *p_self, const godot_color *p_over);
|
||||
|
|
|
|||
|
|
@ -256,20 +256,6 @@ namespace Godot
|
|||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the most contrasting color.
|
||||
/// </summary>
|
||||
/// <returns>The most contrasting color</returns>
|
||||
public Color Contrasted()
|
||||
{
|
||||
return new Color(
|
||||
(r + 0.5f) % 1.0f,
|
||||
(g + 0.5f) % 1.0f,
|
||||
(b + 0.5f) % 1.0f,
|
||||
a
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new color resulting from making this color darker
|
||||
/// by the specified ratio (on the range of 0 to 1).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue