diff options
| author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-11-03 00:21:06 +0100 |
|---|---|---|
| committer | Aaron Franke <arnfranke@yahoo.com> | 2020-11-03 04:46:08 -0500 |
| commit | 7adb6b91b33e297b4833ef5f82adcf64a15777f4 (patch) | |
| tree | 8a47d75e5a7ea66f1b5deec162408887090cdd11 /modules/gdnative | |
| parent | 873d4617852cddfd368e3046f718f410eade6a3e (diff) | |
Remove `Color.contrasted()` as its behavior is barely useful
Returning the most contrasting color isn't a trivial task, as there
are often many possible choices. It's usually best left for the user
to implement using a script.
Diffstat (limited to 'modules/gdnative')
| -rw-r--r-- | modules/gdnative/gdnative/color.cpp | 7 | ||||
| -rw-r--r-- | modules/gdnative/gdnative_api.json | 7 | ||||
| -rw-r--r-- | modules/gdnative/include/gdnative/color.h | 2 |
3 files changed, 0 insertions, 16 deletions
diff --git a/modules/gdnative/gdnative/color.cpp b/modules/gdnative/gdnative/color.cpp index c75e74daba..e08183ab63 100644 --- a/modules/gdnative/gdnative/color.cpp +++ b/modules/gdnative/gdnative/color.cpp @@ -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; diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 82bfbd23de..40d0f75871 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -1255,13 +1255,6 @@ ] }, { - "name": "godot_color_contrasted", - "return_type": "godot_color", - "arguments": [ - ["const godot_color *", "p_self"] - ] - }, - { "name": "godot_color_lerp", "return_type": "godot_color", "arguments": [ diff --git a/modules/gdnative/include/gdnative/color.h b/modules/gdnative/include/gdnative/color.h index e7737bf8e1..e64097ef57 100644 --- a/modules/gdnative/include/gdnative/color.h +++ b/modules/gdnative/include/gdnative/color.h @@ -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); |