<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 3, 2016 at 3:45 PM, Stirling Westrup <span dir="ltr"><<a href="mailto:swestrup@gmail.com" target="_blank">swestrup@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I've noticed that the transformation matrices that this function builds for rotated screens is not quite correct.<br><br></div>In particular, it consistently builds maps from 0 to width or height instead of from 0 to width-1 or height-1. <br><br>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.<span class="HOEnZb"><font color="#888888"><br></font></span><br></div></blockquote></div><br></div><div class="gmail_extra">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...<br><br><br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Stirling Westrup<br>Programmer, Entrepreneur.<br><a href="https://www.linkedin.com/e/fpf/77228" target="_blank">https://www.linkedin.com/e/fpf/77228</a><br><a href="http://www.linkedin.com/in/swestrup" target="_blank">http://www.linkedin.com/in/swestrup</a><br><a href="http://technaut.livejournal.com" target="_blank">http://technaut.livejournal.com</a><br><a href="http://sourceforge.net/users/stirlingwestrup" target="_blank">http://sourceforge.net/users/stirlingwestrup</a></div>
</div></div>