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
All inputs in the gfx package that take image.Rectangles accept empty rectangles to mean the entire area, which is often quite useful. The downside is that it causes a lot of typing which isn't obvious to someone who hasn't read the docs:
Comment by slimsag Tuesday Nov 04, 2014 at 18:20 GMT
With version two we have the ability to re-think things like this. The image package has any rectangle such as image.Rect(0, 0, 0, 0) considered an empty rectangle.
I am wondering if what we originally did (allowing a empty rectangle to be considered the entire area) was wrong.
What I think we should do is:
Make it so that any Clear operation on a Canvas with a empty rectangle argument is no-op.
Recommend the use of Renderer.Bounds() instead of an empty rectangle in order to specify the whole area.
Issue by slimsag
Tuesday Oct 14, 2014 at 23:01 GMT
Originally opened as azul3d-legacy/gfx#15
All inputs in the gfx package that take
image.Rectangle
s accept empty rectangles to mean the entire area, which is often quite useful. The downside is that it causes a lot of typing which isn't obvious to someone who hasn't read the docs:If we exposed a variable in the gfx package named e.g.
WholeArea
, like so:Then the above code would simply become:
Which I believe to be more easy for newcomers.
The text was updated successfully, but these errors were encountered: