Hello,
this is kinda of a feature request, but also a request for clarification because maybe I just got things wrong.
I am trying to work on go-sdl2 so that SDL Surfaces implements go's image.Image and image/draw.Image interfaces. The idea is to be able to render directly on SDL surfaces. After making such changes and trying to use freetype raster's on that surfaces, I noticed that there are a certain number of painters, each of which is working with a specific image format.
Now, I find this confusing: isn't image/color.Model there to perform color conversion from one model to another? So, my question boils down to: why isn't there a painter which can deal with a generic image/draw.Image and use its color model to map the pixels produced by rasterizer to whatever color format the image is using? Is this feasible at all or did I get all wrong?
I thought that, given a certain color you wanted to draw on the image, one could just do img.Set(img.ColorModel().Convert(your_color)). Is a painter like this possible to have?
Hello, this is kinda of a feature request, but also a request for clarification because maybe I just got things wrong. I am trying to work on go-sdl2 so that SDL Surfaces implements go's
image.Image
andimage/draw.Image
interfaces. The idea is to be able to render directly on SDL surfaces. After making such changes and trying to use freetype raster's on that surfaces, I noticed that there are a certain number of painters, each of which is working with a specific image format.Now, I find this confusing: isn't
image/color.Model
there to perform color conversion from one model to another? So, my question boils down to: why isn't there a painter which can deal with a genericimage/draw.Image
and use its color model to map the pixels produced by rasterizer to whatever color format the image is using? Is this feasible at all or did I get all wrong?I thought that, given a certain color you wanted to draw on the image, one could just do
img.Set(img.ColorModel().Convert(your_color))
. Is a painter like this possible to have?Thanks!