Issues

Issue #540 wontfix

love.graphics.setIcon accepting ImageData and Canvases

hahawoo
created an issue

Maybe love.graphics.setIcon could accept ImageData and Canvases?

Comments (3)

  1. Simon Larsen

    Just to make sure you're aware of this, you can always create an Image object from an ImageData object. And you can retrieve the ImageData of a Canvas with canvas:getImageData().

  2. hahawoo reporter

    Ah yes, that's true, thanks for mentioning that! I really should have mentioned the reason for suggesting this in the first place, hehe, sorry. I was looking at what setIcon does internally, and it seems it actually uses ImageData on some level, but a lover can only use an Image, which then (I think) gets converted to ImageData. So if there's no technical reason why this isn't possible I thought hey, why not, it would save lovers from having to create an Image they wouldn't otherwise need if they wanted to set the icon to an ImageData or Canvas.

    Edit: Actually I guess it's pretty... random... to accept these.

  3. Log in to comment