C
Chris Berg
In java.awt.Graphics, this is what they say about drawLine(..):
/**
* Draws a line, using the current color, between the points
* <code>(x1, y1)</code> and <code>(x2, y2)</code>
* in this graphics context's coordinate system.
* @param x1 the first point's <i>x</i> coordinate.
* @param y1 the first point's <i>y</i> coordinate.
* @param x2 the second point's <i>x</i> coordinate.
* @param y2 the second point's <i>y</i> coordinate.
*/
public abstract void drawLine(int x1, int y1, int x2, int y2);
But how long is the line? Or, to be more precise, does it include both
end-points? The reason I ask, is that this seems to be different on
different platforms. On Sun VM on Win, and on MS VM, both end-points
are included, but on OSX on Mac w. IE, the last point is not, or so it
seems. Shouldn't Sun have been more precise here? Is it specified
better somewhere else in Sun's papers? And if not, is it really too
late now?
Chris
/**
* Draws a line, using the current color, between the points
* <code>(x1, y1)</code> and <code>(x2, y2)</code>
* in this graphics context's coordinate system.
* @param x1 the first point's <i>x</i> coordinate.
* @param y1 the first point's <i>y</i> coordinate.
* @param x2 the second point's <i>x</i> coordinate.
* @param y2 the second point's <i>y</i> coordinate.
*/
public abstract void drawLine(int x1, int y1, int x2, int y2);
But how long is the line? Or, to be more precise, does it include both
end-points? The reason I ask, is that this seems to be different on
different platforms. On Sun VM on Win, and on MS VM, both end-points
are included, but on OSX on Mac w. IE, the last point is not, or so it
seems. Shouldn't Sun have been more precise here? Is it specified
better somewhere else in Sun's papers? And if not, is it really too
late now?
Chris