Bug in randr/rrtransform.c : RRTrasnformCompute()

Stirling Westrup swestrup at gmail.com
Mon Nov 7 19:54:22 UTC 2016


On Thu, Nov 3, 2016 at 3:45 PM, Stirling Westrup <swestrup at gmail.com> wrote:

> I've noticed that the transformation matrices that this function builds
> for rotated screens is not quite correct.
>
> In particular, it consistently builds maps from 0 to width or height
> instead of from 0 to width-1 or height-1.
>
> This means that an inverted screen maps (0,0) to (width,height) instead of
> (width-1,height-1). This causes out-of-boundary errors when mapping screens.
>
>
OMG. I just worked out that this is a *DELIBERATE* error in order to
accommodate the half-open-interval method of describing rectangles. The
transforms as created work for half-open boundaries, but then fail to work
for mapping individual pixels. If the code were fixed to correctly handle
pixel coordinates, all of the boundary calculations in X would be off by
one...



-- 
Stirling Westrup
Programmer, Entrepreneur.
https://www.linkedin.com/e/fpf/77228
http://www.linkedin.com/in/swestrup
http://technaut.livejournal.com
http://sourceforge.net/users/stirlingwestrup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20161107/bc2a14c6/attachment.html>


More information about the xorg-devel mailing list