i am drawing a circle for my assignment in simple canvas
public void drawJP(int width){
int height = width * 7/10;
SimpleCanvas c = new SimpleCanvas("Japan", width, height);
c.setForegroundColour(java.awt.Color.red);
for (int i = 0; i < 360 ; i++) {
c.drawLine( width/2 , height/2, (Math.sin(i) * width/6) , (Math.cos(i) * width/6) );
}
}
But a error showed up
drawLine(int,int,int,int) in SimpleCanvas cannot be applied to (int,int, double, double)
can anyone help me with that
public void drawJP(int width){
int height = width * 7/10;
SimpleCanvas c = new SimpleCanvas("Japan", width, height);
c.setForegroundColour(java.awt.Color.red);
for (int i = 0; i < 360 ; i++) {
c.drawLine( width/2 , height/2, (Math.sin(i) * width/6) , (Math.cos(i) * width/6) );
}
}
But a error showed up
drawLine(int,int,int,int) in SimpleCanvas cannot be applied to (int,int, double, double)
can anyone help me with that