J
James F. Bellinger
DrawRectangle draws from Left to Right, it appears.
However, Rectangle seems to think the rectangle does
not include the pixel referred to in its Right property..
the range includes Left and every pixel up to but not
including Right.
You can see this strange inconsistency (though at which
of the two it should be changed, I'm not sure ... I'd say
DrawRectangle, and then Rectangle needs to have clearer
documentation (largely because going:
for (int i = r.Top; i < r.Bottom; i ++)
Seems the way one would normally do things. You can see it
by doing a DrawRectangle, constructing a Rectangle using
the override that accepts a Size parameter. The right and bottom
edges of the rectangle will be one pixel off.
Have a nice day
Jim Bellinger
However, Rectangle seems to think the rectangle does
not include the pixel referred to in its Right property..
the range includes Left and every pixel up to but not
including Right.
You can see this strange inconsistency (though at which
of the two it should be changed, I'm not sure ... I'd say
DrawRectangle, and then Rectangle needs to have clearer
documentation (largely because going:
for (int i = r.Top; i < r.Bottom; i ++)
Seems the way one would normally do things. You can see it
by doing a DrawRectangle, constructing a Rectangle using
the override that accepts a Size parameter. The right and bottom
edges of the rectangle will be one pixel off.
Have a nice day
Jim Bellinger