0
이 원을 어떻게 확대하여 개별 픽셀 수를 계산할 수 있습니까? 저는 Minecraft에서 서클을 그리며 각 서클에 적합한 템플릿을 원합니다.이 원을 어떻게 확대하여 개별 픽셀을 셀 수 있습니까?
// Import the basic graphics classes.
import java.awt.*;
import javax.swing.*;
public class BasicJPanel2 extends JPanel{
private static final long serialVersionUID = 1L;
// Create a constructor method
public BasicJPanel2(){
super();
}
public void paintComponent(Graphics g){
// draw a circle
int upperLeft_x = 10;
int upperLeft_y = 20;
int width = 65;
int height = 65;
g.drawOval(upperLeft_x,upperLeft_y,width,height); // draw circle
}
}