[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] Problem clearing edge of a clip region
From:       Jonathan Morton <jonathan.morton () movial ! com>
Date:       2009-09-30 7:30:37
Message-ID: 1254295837.6830.4.camel () sd070 ! hel ! movial ! fi
[Download RAW message or body]

On Tue, 2009-09-29 at 16:28 -0300, Ian Britten wrote:
> Bill Spitzak wrote:
> > I'm pretty certain this is antialiasing causing it. Clearing an 
> > antialised clip region will only partially clear the edge pixels.
> 
> That's what I had suspected/feared.
> I guess I would have hoped that a 'clear' operation would have
> cleared any pixels that were 'drawn' - Sortof like a symmetric, but
> inverse, operation.
> 
> > You should see if you can round up your clip region to pixel boundaries.
> 
> In the example I gave, the context has a default/1-1 scaling on it,
> and the clip points are all integral.
> However, that's not really the problem I'm seeing.  The problem is
> all the intermediate (diagonal) pixels between the path points that
> I'm seeing aren't being cleared, and hence my question.

Pixels are not points; they are usually thought of as squares.  Any
diagonal edge will only partially cover the pixels along it.

Antialiasing is always an approximation.  Cairo uses a coverage model
which produces smooth images but doesn't allow "painter's model erase"
operations that you may be accustomed to using on un-antialiased drawing
models.  Other coverage models are theoretically possible (and usually
implemented by 3D rasterisers), which have different tradeoffs.

-- 
------
From: Jonathan Morton
      jonathan.morton@movial.com


_______________________________________________
cairo mailing list
cairo@cairographics.org
http://lists.cairographics.org/mailman/listinfo/cairo
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic