-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 anti alias support for linear Canvasitem draw primitives #84497
Add anti alias support for linear Canvasitem draw primitives #84497
Conversation
Make it possible to draw unfilled circle, like draw_rect().
- unfilled rect and circle - multiline and dashed_line
Draws a circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon]. | ||
If [param filled] is [code]true[/code], the cricle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the circle will be drawn as a stroke with the [param color] and [param width] specified. | ||
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. | ||
[b]Note:[/b] [param width] and [param antialiased] is only effective if [param filled] is [code]false[/code]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is -> are
<description> | ||
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect]. | ||
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. | ||
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code]. | ||
[b]Note:[/b] [param width] and [param antialiased] is only effective if [param filled] is [code]false[/code]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is -> are
Could you show how antialiased multiline looks? I'm also interested in how transparency affects its drawing |
@MewPurPur The multiline drawing behaviour should be identical to the original line. Here are some examples.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the code, looks good to me.
Any updates on this? |
It's intended as a follow-up to a PR that hasn't been merged yet, so see: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
6118592), it works as expected in all rendering methods.
Testing project: test-antialiased-rect-line.zip
Remember to add GDExtension compatibility methods as you did in #84472.
@xiongyaohua Now that #84472 has been merged, you should be able to rebase this PR onto the latest |
I'm going to close this PR, as all codes are incorporated into the following PR #84523. Review can be done over there. |
(This PR is an follow-up for #84472, kept as draft for now. see #84472 (comment))
Add anti alias to the following canvasitem draw primitives