- 215 名前:デフォルトの名無しさん mailto:sage [2007/10/13(土) 17:51:43 ]
- >>82の58〜79行目なんですが各行でどのような処理が行われてるかも
考えないといけないんですが 簡単にでいいのでお願いします。 private void drawSaturn(Graphics g, int cx, int cy, double a) { double r = 100 * a; double x0 = 180 * a; double x1 = 150 * a; double y0 = 50 * a; double y1 = 30 * a; GeneralPath path = new GeneralPath(); path.append(new Line2D.Double(cx - x0, cy, cx - x1, cy), false); path.append(new Arc2D.Double(cx - x1, cy - y1, x1 * 2, y1 * 2, 180, -180, Arc2D.OPEN), true); path.append(new Line2D.Double(cx + x1, cy, cx + x0, cy), true); path.append(new Arc2D.Double(cx - x0, cy - y0, x0 * 2, y0 * 2, 0, 180, Arc2D.OPEN), true); path.closePath(); g.setColor(Color.RED); ((Graphics2D)g).fill(path); g.setColor(new Color(190, 100, 60)); ((Graphics2D)g).fill(new Ellipse2D.Double(cx - r, cy - r, r * 2, r * 2)); AffineTransform at = new AffineTransform(); at.rotate(Math.PI, cx, cy); path.transform(at); g.setColor(Color.RED); ((Graphics2D)g).fill(path); }
|

|