Skip to content

Add a custom drawing in 2D demo #1185

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

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

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 4, 2025

Tested on 4.4.stable. Works on all rendering methods, but Forward+/Mobile are preferred as they support 2D MSAA.

Note

If godotengine/godot#105122 is merged, this demo should be modified to remove the antialiased width compensation tweaks.

Preview

Custom Drawing in 2D

TODO

  • Fix draw_char() example keming. I've tried to use font advance to position each glyph, but it looks strange (bottom string uses draw_string() instead):

image

Fixed now:

image

@Calinou Calinou requested a review from bruvzg April 4, 2025 19:32
@Calinou Calinou force-pushed the add-custom-drawing-in-2d-demo-2 branch from 69cc093 to 4e37df2 Compare April 4, 2025 20:36
@Calinou Calinou force-pushed the add-custom-drawing-in-2d-demo-2 branch from 0d75c4f to 10fc184 Compare April 4, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants