surface clipping

Steven J Abner pheonix.sja at att.net
Wed Jul 31 23:22:55 UTC 2024


On Sun, Jul 28 2024 at 01:50:12 AM +0000, Steven J Abner 
<pheonix.sja at att.net> wrote:
> for the issue, is there an operator that handles this or is it up to 
> the programmer to calculate clipping of surfaces?

  I am responding to this, assuming the issue to be closed. But have a 
caveat:
Firstly, the clipping code has a flaw, does not handle extreme cases 
that should have been handled during creation of rectangle surface, 
rectangles outside the target's rectangle. This is due to my learning 
of what was meant by creating a rectangle surface from a target.
  The 'cairo_surface_create_for_rectangle()' doesn't seem to care about 
anything other than its valid and has a visual. One can create a 
surface using a 'target' surface of { 0, 0, 1, 1 } and create a 
subsurface using that of 'target' with local translated coordinates { 
200, 50, 300, 700 } and have it display when the initial 'target' of 
1,1 size was created from a 'target' of say { 0, 0, 600, 1000 }.
  I mistakenly thought it was that of inheritance, so that's I'm bad :(
  I don't know why anyone would do the above, but the issue I had was 
the resizing of a window, with the rectangle draw areas responding to 
size and positioning.
  Sorry to have troubled all by my lack of understanding.
Steve





More information about the cairo mailing list