[cairo] Questions about clipping

Behdad Esfahbod behdad at behdad.org
Tue Feb 20 09:58:50 PST 2007


On Tue, 2007-02-20 at 03:26 -0500, Enzo Ferrari wrote:
> Hello,
> I am a software developer trying to use the Cairo version 1.2.6 in my 
> application.
> There's question I'd like to ask about clipping: I know that visible 
> region has (0,0)-(1,1) range, but we need in some case to draw an object 
> which contour is ALL outside the visible region.

Well, cairo's visible range is not (0,0)-(1,1) by default.  You can make
it be so by using cairo_scale() though.

> For example: we'd like to draw a filled circle having radius greater 
> than 0.5, centered in (0.5,0.5), resulting in a circle that is 
> completely outside visible area.
> If I try to make this, Cairo crashes with an exception.
> How can I avoid this error? Are there some ways to correctly clip?

It shouldn't.  Can you attach a simple test program showing this?

> Thanks in advance.
> 
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list