<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span style="font-family:arial,sans-serif;color:rgb(34,34,34)">On Thu, May 25, 2017 at 5:19 AM, Ralph Boland </span><span dir="ltr" style="font-family:arial,sans-serif;color:rgb(34,34,34)"><<a href="mailto:rpboland@gmail.com" target="_blank">rpboland@gmail.com</a>></span><span style="font-family:arial,sans-serif;color:rgb(34,34,34)"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I just attempted to draw a rectangle with dimensions  3@3 corner: 9@3.<br>
Nothing gets drawn.  The reason that nothing is drawn is that the width of<br>
the rectangle is 0.  This makes sense for real numbers but for a pixelated<br>
screen or other display medium the dimensions of the rectangle<br>
should be 1 x 7  not  0 x 6!?.  This is 7 pixels needed to draw, not 0.<br>
<br>
The same issues occur for the height of the rectangles.<br>
<br>
I would think that the way things work would cause all kinds of problems<br>
but since Rectangles are pretty basic, either I am wrong,<br>
or every bit of Squeak code using rectangles has adjusted accordingly.<br>
<br>
Please clarify.<br></blockquote><div><br></div><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">​The coordinates refer to the imaginary lines between pixels. Thus, if you draw a rectangle from x=4 to x=5 its width is 1.​ This is so that if you draw multiple rectangles, they do not overlap (imagine drawing from 5 to 12 and from 12 to 19).</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
How do Java and other languages handle this?<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​Same. There's a nice illustration on this page: <a href="http://math.hws.edu/~bridgeman/courses/124/f13/doc/paint/paint.html">http://math.hws.edu/~bridgeman/courses/124/f13/doc/paint/paint.html</a>​</div></div><div><img src="http://math.hws.edu/~bridgeman/courses/124/f13/doc/paint/paint-class_files/gui_coordinates.png" alt="" align="right" style="margin-right: 0px;"></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​- Bert -​</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div></div></div></div>