You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A 2d platformer game with procedurally generated levels.
Describe the problem or limitation you are having in your project
There is not a function to fill a rectangular section of an Image with a color. However, there is a function to fill the entire image with a color - Image.fill(color: Color).
Describe the feature / enhancement and how it helps to overcome the problem or limitation
This function would fill a section of an image, defined by a Rect2, with a single color.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It would look like this: Image.fill_rect(rect: Rect2, color: Color) I know nothing about C++, but I would assume this would be relatively easy to add.
If this enhancement will not be used often, can it be worked around with a few lines of script?
I think it would be used often enough to justify adding it to the Godot API, but there are two ways in which this could be done now:
Create an Image, set its size to the size of your fill Rect2, fill the image with a color, and use blit_rect on the original image with the new image.
Describe the project you are working on
A 2d platformer game with procedurally generated levels.
Describe the problem or limitation you are having in your project
There is not a function to fill a rectangular section of an Image with a color. However, there is a function to fill the entire image with a color -
Image.fill(color: Color)
.Describe the feature / enhancement and how it helps to overcome the problem or limitation
This function would fill a section of an image, defined by a Rect2, with a single color.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It would look like this:
Image.fill_rect(rect: Rect2, color: Color)
I know nothing about C++, but I would assume this would be relatively easy to add.If this enhancement will not be used often, can it be worked around with a few lines of script?
I think it would be used often enough to justify adding it to the Godot API, but there are two ways in which this could be done now:
blit_rect
on the original image with the new image.Is there a reason why this should be core and not an add-on in the asset library?
It is a part of the built-in Image class, which can't be modified by add-ons.
The text was updated successfully, but these errors were encountered: