godot icon indicating copy to clipboard operation
godot copied to clipboard

Add antialiased, draw outline and line color/width properties to ColorRect

Open Calinou opened this issue 1 year ago • 0 comments

  • Follow-up to https://github.com/godotengine/godot/pull/84523.

This exposes recently-added CanvasItem functionality to the ColorRect node, so that custom drawing methods don't need to be called if you want to benefit from antialiasing or non-filled rects.

The outline is drawn on top of the background, which can also now be disabled.

A similar approach could be used to expose functionality such as drawing circles and regular polygons, although this may make more sense as an extension of the Polygon2D node instead (since ColorRect is all about rectangles).

  • This closes https://github.com/godotengine/godot/issues/91947.

Testing project: test_color_rect.zip

Preview

Screenshot_20240516_185707

Calinou avatar May 16 '24 17:05 Calinou