{
numSegments = abs_dy/MAX_EDGE_SIZE + 1;
}
else
{
StraightEdgeRecord ser = new StraightEdgeRecord(dx, dy);
shapeRecords.add(ser);
return shapeRecords;
}
int xSeg = dx/numSegments;
int ySeg = dy/numSegments;
for (int i=0; i < numSegments; i++)
{
if (i == numSegments-1)
{
//make up for any rounding errors
int lastx = dx - xSeg*(numSegments-1);
int lasty = dy - ySeg*(numSegments-1);
StraightEdgeRecord ser = new StraightEdgeRecord(lastx, lasty);
shapeRecords.add(ser);
}
else
{
StraightEdgeRecord ser = new StraightEdgeRecord(xSeg, ySeg);
shapeRecords.add(ser);
}
}
return shapeRecords;