0
我正在試驗Java圖形AWT版本,而不是擺動(目前)。我的頭部一側有「頭髮」,在這個世界上,我是如何在另一側獲得同樣的位置,彎曲另一個方向?JAVA圖形,drawArc
我已經嘗試了很多組合,它從來沒有像它那樣在那裏和我感到沮喪。
public class main extends Applet {
public void init() {
// Customized Colors
Color wallColor = new Color(76, 70, 70);
// Applet Size
setSize(1500, 900);
// Set Applet Background Color
setBackground(wallColor);
}
public void stop() {
}
public void paint(Graphics g)
{
// Custom Colors
Color pictureFrame = new Color(188, 198, 204);
// Picture Frames
g.setColor(pictureFrame);
g.fillRect(50,50,300,450);
g.setColor(Color.BLUE);
g.fillRect(75,75,250,400);
//Face
g.setColor(Color.WHITE);
g.fillOval(120,120,170,170);
//Hair
g.setColor(Color.BLACK);
g.drawArc(195, 125, 70, 553, 0, 90);
g.drawArc(195, 125, 75, 553, 0, 90);
g.drawArc(195, 125, 80, 553, 0, 90);
g.drawArc(195, 125, 85, 553, 0, 90);
g.drawArc(195, 125, 90, 553, 0, 90);
g.drawArc(195, 125, 95, 553, 0, 90);
g.drawArc(195, 125, 100, 553, 0, 90);
g.drawArc(195, 125, 105, 553, 0, 90);
g.drawArc(195, 125, 110, 553, 0, 90);
g.drawArc(195, 125, 77, 553, 0, 90);
g.drawArc(195, 125, 77, 553, 0, 90);
g.drawArc(195, 125, 83, 553, 0, 90);
g.drawArc(195, 125, 87, 553, 0, 90);
g.drawArc(195, 125, 93, 553, 0, 90);
g.drawArc(195, 125, 97, 553, 0, 90);
g.drawArc(195, 125, 103, 553, 0, 90);
g.drawArc(195, 125, 107, 553, 0, 90);
g.drawArc(195, 125, 113, 553, 0, 90);
}
}
規模的'圖形'上下文由水平計劃中的'-1',演示[這裏](http://stackoverflow.com/questions/24522458/flipping-rotations-and-images/24523176#24523176)和[這裏](http:///stackoverflow.com/questions/13676364/flipping-shape-not-image/13676513#13676513)和[這裏](http://stackoverflow.com/questions/11911610/affine轉換 - 旋轉 - 如何做 - i-xlate旋轉和縮放在同一時間/ 11911758#11911758) – MadProgrammer
我寧願通過執行g.drawArc方法做到這一點...是可能? – CodedMe
當然,反轉所有的座標 – MadProgrammer