summaryrefslogtreecommitdiffstats
path: root/servers/rendering_server.compat.inc
diff options
context:
space:
mode:
authorYaohua Xiong <xiongyaohua@gmail.com>2024-05-09 19:36:30 +0800
committerYaohua Xiong <xiongyaohua@gmail.com>2024-05-13 19:03:31 +0800
commited3d311687429086e2890b1d65d099ce5dc66aad (patch)
tree151c7a3f3f4c17a9463a16ac52231630f2c29773 /servers/rendering_server.compat.inc
parentc6f1f614bbab9334675026fe21f5af4951b9c890 (diff)
downloadredot-engine-ed3d311687429086e2890b1d65d099ce5dc66aad.tar.gz
Add antialias support for CanvasItem draw primitives
including - rect, circle; both filled and unfilled. - polyline, multiline
Diffstat (limited to 'servers/rendering_server.compat.inc')
-rw-r--r--servers/rendering_server.compat.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/servers/rendering_server.compat.inc b/servers/rendering_server.compat.inc
index 0cef3c906c..99f2de9a9a 100644
--- a/servers/rendering_server.compat.inc
+++ b/servers/rendering_server.compat.inc
@@ -34,8 +34,23 @@ void RenderingServer::_environment_set_fog_bind_compat_84792(RID p_env, bool p_e
environment_set_fog(p_env, p_enable, p_light_color, p_light_energy, p_sun_scatter, p_density, p_height, p_height_density, p_aerial_perspective, p_sky_affect, RS::EnvironmentFogMode::ENV_FOG_MODE_EXPONENTIAL);
}
+void RenderingServer::_canvas_item_add_multiline_bind_compat_84523(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, float p_width) {
+ canvas_item_add_multiline(p_item, p_points, p_colors, p_width, false);
+}
+
+void RenderingServer::_canvas_item_add_rect_bind_compat_84523(RID p_item, const Rect2 &p_rect, const Color &p_color) {
+ canvas_item_add_rect(p_item, p_rect, p_color, false);
+}
+
+void RenderingServer::_canvas_item_add_circle_bind_compat_84523(RID p_item, const Point2 &p_pos, float p_radius, const Color &p_color) {
+ canvas_item_add_circle(p_item, p_pos, p_radius, p_color, false);
+}
+
void RenderingServer::_bind_compatibility_methods() {
ClassDB::bind_compatibility_method(D_METHOD("environment_set_fog", "env", "enable", "light_color", "light_energy", "sun_scatter", "density", "height", "height_density", "aerial_perspective", "sky_affect"), &RenderingServer::_environment_set_fog_bind_compat_84792);
+ ClassDB::bind_compatibility_method(D_METHOD("canvas_item_add_multiline", "item", "points", "colors", "width"), &RenderingServer::_canvas_item_add_multiline_bind_compat_84523, DEFVAL(-1.0));
+ ClassDB::bind_compatibility_method(D_METHOD("canvas_item_add_rect", "item", "rect", "color"), &RenderingServer::_canvas_item_add_rect_bind_compat_84523);
+ ClassDB::bind_compatibility_method(D_METHOD("canvas_item_add_circle", "item", "pos", "radius", "color"), &RenderingServer::_canvas_item_add_circle_bind_compat_84523);
}
#endif