-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Closed
Labels
Milestone
Description
Currently image.Uniform is unbounded (infinite-sized) Image. But all other Images in the package are bounded. This unmatched property is cumbersome to me.
Because an unbounded image is good for filling all area, but bad for filling specific area.
For example, I usually code like this, but with Uniform, I can't.
draw.Draw(dst, src.Bounds(), src, src.Bounds().Min, draw.Src)I once created my own Uniform image that has size. But draw.Draw got slower. (draw.Draw knows how to optimize image.Uniform but not MyUniform)
So I propose add bound to Uniform and new function like NewUniformBounded or NewUniformSized.
The original NewUniform will still there, so we could generate both bounded and unbounded images easily.
bronze1man