Open sloganking opened 1 year ago
Actually, there already is the Image::gen_image_color
function, which creates a new image with the given dimensions filled with the given color. Therefore, one can simply call Image::gen_image_color(screen_width() as u16, screen_height() as u16, BLANK)
, so I don't see much value in adding a new constructor just for blank images.
Problem
Creating an image in
Macroquad
is verbose and unsafe. To create an image in macroquad I have to:If you do ANY of this wrong. You'll get segfaults or unsafe and undefined behavior.
Feature request
Why can't we have a safe image abstraction like the
Image
crate does? This is not only safer but also more convenient as it lets you create an image in one line.See their docs for more.