[cairo] confirming behavior of cairo_clip() with cairo_show_glyphs()

Ko, Heinrich Heinrich.Ko at am.sony.com
Tue May 3 19:41:04 PDT 2011


Hi,

I have a series of calls as follows:
1. cairo_clip() with region x,y=(0,0) w,h=(1920,1080)
2. cairo_clip() with region x,y=(100,100) w,h=(100,100)
3. cairo_show_glyph()
(actual behavior) glyphs rendered with cairo_show_glyphs() with x,y=(401,101) are clipped.

The strange behavior is when cairo_clip() is called with an area that is outside the bounds of the current clip region. For example:
1. cairo_clip() with region x,y=(0,0) w,h=(1920,1080)
2. cairo_clip() with region x,y=(100,100) w,h=(100,100)
3. cairo_clip() with region x,y=(400,100) w,h=(100,100)
4. cairo_show_glyph()
(actual behavior) glyphs rendered with cairo_show_glyphs() with x,y=(401,101) are not clipped.  

With this observation, I would like to confirm whether or not the behavior is correct for the second case.  My expectation is that glyphs should be clipped as the 3rd call to cairo_clip() was not specified with a region that intersects the current clip region.

Thanks in advance,
Heinrich



More information about the cairo mailing list