Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P4
-
Resolution: Fixed
-
Affects Version/s: 1.0.2
-
Fix Version/s: 1.1
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:1.1
-
CPU:sparc
-
OS:solaris_2.6
-
Verification:Not verified
Description
The documentaton indicates that drawPolygon will close the polygon. JDK 1.02. does not for Solaris or Win32.
The code below exeplifies the problem.
// class to provide a frame for testing Image Keys
class PolygonTest extends Frame implements Runnable
{
static int X = 50;
static int Y = 50;
int inner_xpoints[] = { 0, 0, X, X };
int inner_ypoints[] = { 0, Y, Y, 0 };
public PolygonTest()
{
resize(200,200);
show();
}
public static void main(String[] args)
{
new PolygonTest();
}
public void run()
{
}
public void paint(Graphics g) {
g.translate(50,50);
g.drawPolygon(inner_xpoints, inner_ypoints, 4);
}
}
public abstract void
drawPolygon(int xPoints[], int yPoints[], int nPoints)
Draws a closed polygon defined by an array of x points and y points.
This method draws the polygon defined by npoint line segments, where
the first npoint-1 line segments are lines segments from [Image] to
[Image], for [Image]. The last line segment starts at the final point
and ends at the first point.
The code below exeplifies the problem.
// class to provide a frame for testing Image Keys
class PolygonTest extends Frame implements Runnable
{
static int X = 50;
static int Y = 50;
int inner_xpoints[] = { 0, 0, X, X };
int inner_ypoints[] = { 0, Y, Y, 0 };
public PolygonTest()
{
resize(200,200);
show();
}
public static void main(String[] args)
{
new PolygonTest();
}
public void run()
{
}
public void paint(Graphics g) {
g.translate(50,50);
g.drawPolygon(inner_xpoints, inner_ypoints, 4);
}
}
public abstract void
drawPolygon(int xPoints[], int yPoints[], int nPoints)
Draws a closed polygon defined by an array of x points and y points.
This method draws the polygon defined by npoint line segments, where
the first npoint-1 line segments are lines segments from [Image] to
[Image], for [Image]. The last line segment starts at the final point
and ends at the first point.