From 1591677eb8b8a08a8e9c1308b73171f59c24d2b8 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Wed, 1 Jan 2020 11:39:07 +0100 Subject: Fixed antialiasing option for Polygon2D Some cases were not handled properly for Polygon2D after making changes in common code to fix Line2D antialiasing. Added an option for drawing polygons to differentiate the two use cases. Fixes #34568 --- core/class_db.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'core') diff --git a/core/class_db.h b/core/class_db.h index 5df425e662..bc289bc3ca 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -293,6 +293,15 @@ public: return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, ptr, 7); } + template + static MethodBind *bind_method(N p_method_name, M p_method, const Variant &p_def1, const Variant &p_def2, const Variant &p_def3, const Variant &p_def4, const Variant &p_def5, const Variant &p_def6, const Variant &p_def7, const Variant &p_def8) { + + MethodBind *bind = create_method_bind(p_method); + const Variant *ptr[8] = { &p_def1, &p_def2, &p_def3, &p_def4, &p_def5, &p_def6, &p_def7, &p_def8 }; + + return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, ptr, 8); + } + template static MethodBind *bind_vararg_method(uint32_t p_flags, StringName p_name, M p_method, const MethodInfo &p_info = MethodInfo(), const Vector &p_default_args = Vector()) { -- cgit v1.2.3