Just increase the size of the image created using the following for line 3:
I believe that should fix it.
GreenfootImage image = new GreenfootImage(radius+1, radius+1);
GreenfootImage image = new GreenfootImage(radius+1, radius+1);
GreenfootImage image = new GreenfootImage(radius+1, radius+1);
// pixel setting
public GreenfootImage getClearQuarterCircle(int radius, java.awt.Color exteriorColor)
{
GreenfootImage image = new GreenfootImage(radius+1, radius+1);
for (int y=0; y<radius+1; y++)
for (int x=radius; x>= 0; x--)
if (Math.hypot(x, y) > radius) image.setColorAt(x, y, exteriorColor); else break;
return image;
}
// line drawing
public GreenfootImage getClearQuarterCircle(int radius, java.awt.Color exteriorColor)
{
GreenfootImage image = new GreenfootImage(radius+1, radius+1);
image.setColor(exteriorColor);
for (int y=0; y<=radius+1; y++) image.drawLine((int)Math.sqrt(radius*radius-y*y)+1, y, radius, y);
return image;
}