1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
g2d.setColor(Color.RED);
Path2D.Double path2D = new Path2D.Double();
path2D.moveTo(0, 0);
path2D.lineTo(80, 0);
path2D.moveTo(80, 0);
path2D.curveTo(90, 0, 100, 10, 100, 20);
path2D.moveTo(100, 20);
path2D.lineTo(100, 100);
path2D.moveTo(100, 100);
path2D.curveTo(100, 110, 90, 120, 80, 120);
path2D.moveTo(80, 120);
path2D.lineTo(80, 500);
path2D.moveTo(80, 500);
path2D.curveTo(80, 520, 60, 540, 40, 540);
path2D.moveTo(40, 540);
path2D.lineTo(0, 540);
path2D.moveTo(0, 540);
path2D.lineTo(0, 0);
path2D.closePath();
g2d.draw(path2D);
g2d.setColor(new Color(255,0,0,140));
g2d.fill(path2D); |