Hi!
Sounds logical, but my experience speaks differently (sorry). There are two technical arguments against this:
- Doing clipping at lower levels is pretty easy while clipping
higher-level primitives is much more challenging (clipping horizontal lines that form a rectangle is trivial; clipping the whole rectangle means ritual dances with vectors and the result might not be a triangle anymore).
- Low-level primitives require clipping anyway (drawing over screen
borders must be safe - unless you want the user to compute all clipping at higher levels, which is a pretty sadistic approach). Allowing the user to specify the rectangle manually brings no additional cost.
I was thinking about removing clipping in favor of subcontexes. All drawing then would be explicitly clipped to fit into subcontext which must be done anyway and we would get reasonable and consistent interface.