Trouble in trapezoid land

Keith Packard <[email protected]>
Newsgroups gmane.comp.xfree86.render
Message-ID <E178FfY-0003tE-00@localhost>
I've got an alpha computation problem.  I fear for the algorithm.  Here's
the picture:

	                                     0.ff4f
	0                                    |1
2	o-------------------------------------p
	|                                     |
	|                                     |
.36ed	q................                     |  Tiny little triangle 'A'
	|                ..........           | /
.58fe	r==========================........s==t/		
	|                                    .u... .5916
	|                                     |
	|                                     |
.989c	v=====================================w==
	|                                     |
	|                                     |
	|                                     |
3	+-------------------------------------+

The error terms aren't relevant here, we're just computing alphas.

This edge (....) is a left edge, so we trying to compute the alpha of the
tiny little triangle 'A' in the upper right corner of the trapezoid,
that's 'rtwv' - 'rsuwv'

'rtwv' = 'opwv' - 'optr'
'rsuwv' = 'quwv' - 'qsr'

Note that these computations have little to do with one another.  Rounding 
areas and converting to alpha (in this case) makes 'rtwv' smaller than
'rsuwv'.  Very bad.

I'll have to think of how we can fix this case without breaking everything 
else.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.