Hi,
Arguments to move clipping from Context to drawing are
- One use of clipping is convenience when drawing primitives. This
should be handled with drawing functions. There, clipping can save some complicated reasoning.
- Blits should not respect clipping. Blitting a superset of
clip-region is very frequent and even if needed, calculating intersection of two rectangles is very easy.
Not sure about this; for myself I would say that a graphics system that does not respect clipping with some primitives and does with some others is confusing (how to remember which is which? Does a textured triangle, which is both a blit and a primitive, respect clipping?)
Hmm, what about this: We are most probably going to have a family of "styled" drawing functions (where style may include dithering, font, bgcolor, transparency, quality), be it through some drawing context or otherwise. Let the "styled" functions respect clipping and the "crude" ones not. ("crude" probably means only blit, putpixel, rect).
Good coding, Tomas