Repository navigation
Conversation
Less bloat, more clarity. The class may be eventually adapted for `Debug3D` usages as well.
Allows to draw snapshots individually if `accumulate = false`. Initialize canvas item at constructor, otherwise leads to crashes.
This was used to replicate `accumulate` functionality, not needed anymore.
Allows to submit draw commands to arbitrary objects which extend `CanvasItem`.
Due to this, added `get_base()` in order to reset current canvas with the default one.
There are other methods that could be compiled out, but we have to be careful about assumptions regarding what kind of functions are required in release logic.
Currently just `color`.
Better reflects `CanvasItem` API. But not sure if needed in the first place, because this should rather be not modified for all commands and could lead to confusion.
This is meant to be configured per method call, does not make much sense to override this. Instead, `draw_set_transform()` will be added.
Disabled by default. May look bad with transparent colors.
No need to instantiate a `Control` node to draw a string with default font...
Added `enabled ` property as well.
The `draw_rect()` method used used to draw regions for the most part. This also makes it consistent with other methods in Goost such as `Random2D.point_in_region()`. The method is renamed because of `draw_rectangle()` which is going to be implemented to draw rectangular shapes. Again, this would correspond to methods such as `GoostGeometry2D.rectangle()`.
Contributor
Author
|
Implemented Pushed a snippet in GDScript which I used during prototyping, in case modifications are needed: goostengine/goost-plugins@354d4a0 |
Works better some use cases, especially when antialiasing is enabled.
Xrayez
marked this pull request as ready for review
December 5, 2021 20:04
Contributor
Author
|
I'm more or less satisfied with current API. Further enhancements and changes are fine to make further down the road because it only affects debug builds. Things to do:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

See discussion #161, this is meant to resolve godotengine/godot-proposals#112, resolve godotengine/godot-proposals#5196.
Notable features include:
_draw()calls._draw()for each node if needed).To-do
draw_set_color(),draw_set_filled()).Example
Test project
debug_2d.zip