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

List:       xfree-render
Subject:    Re: [Render] Point sampling trapezoid alpha (was: Another subtle issue...)
From:       Keith Packard <keithp () keithp ! com>
Date:       2002-12-19 18:42:25
[Download RAW message or body]


Around 12 o'clock on Dec 19, Carl Worth wrote:

> The next question is how to place these points on Render's subpixel
> grid. I propose that the first point should be placed on the integer
> coordinate of the whole-pixel grid.

I'd like to explore an "exact" solution first to see if it's 
computationaly tractable.  Given a line with rational endpoints and a 
rational slope, it's easy to test whether another point with rational 
coordinates falls to the left or right of the line.  The question is 
whether we can perform that computation in a reasonable number of bits for 
alpha depths up to 8 (or 16 if you like).

Snapping the sample point locations to the pixel grid should reduce the 
number of bits required for this "exact" comparison to no more than the 
subpixel-level bresenham computation itself, so we needn't worry about 
rounding the pixel coordinates of the line intersections.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


_______________________________________________
Render mailing list
Render@XFree86.Org
http://XFree86.Org/mailman/listinfo/render
[prev in list] [next in list] [prev in thread] [next in thread] 

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