Except that the drawing is inclusive of the endpoints; if it excluded the endpoints (which, if I remember my basic math correctly, would be expressed as (x1,y1)-(x2,y2), instead of [x1,y1]-[x2,y2], similar to saying the interval (0,5] excludes 0 but includes 5...) Besides, while that may be true from a strictly mathematical perspective (a point has no dimension; no width, no height, no nuthin!), the poor computer can't draw a pixel that small :) Otherwise, how would you draw a single point? if you try something like:

g.DrawLine 0,0,0,1

you'll get a 2-pixel long line starting at 0,0 and ending at 0,1, for a length of 2; probably not what the user had in mind, methinks... same if you go from 0,0 to 1,0... :P
  Otherwise, DIMming (or REDIMming) an array for 0;

[Re]Dim myArray(0) [As <datatype>] // 'As' part not needed for ReDim

would result in an array with no elements (which is what -1 is for). Just my 2 red, copper monetary denominations...
  Cursors, foiled again! :)

On Oct 13, 2006, at 9:18 AM, [EMAIL PROTECTED] wrote:

On Oct 13, 2006, at 12:55 UTC, Richard wrote:

In the method:
   Graphics.DrawLine(x1,y1,x2,y2)
If x1=x2 and y1=y2, there is no line drawn. Yes, it's only 1 pixel
but I would expect a 1-pixel line.

I wouldn't; the length of this line is x2-x1=0, and the height is
y2-y1=0.  That's not a 1-pixel line, that's a 0-pixel line.  Correct
behavior would be to draw nothing.  (Though I can imagine poorly
thought-out systems that would actually draw a pixel under these
circumstances, I would consider such a system to be flawed.)

Any suggestions?

Yes: don't do that.  :)

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to