Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 16, 2024

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).

Testing project: test_color_rect.zip

Preview

Screenshot_20240516_185707

…rRect

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.
@Calinou Calinou force-pushed the colorrect-add-outline-antialiasing branch from a0fc59f to f783013 Compare May 16, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Glitching happens when the camera moves continuously, on sprites or ColorRects with hard edges
1 participant