📄 polyline.java
字号:
/* * PolyLine.java * * Created on April 29, 2005, 6:38 PM */package hysun.draw;import java.awt.*;/** * * @author hysun */public class PolyLine extends FreeShape { public PolyLine(Color c, Stroke s, int x, int y) { super(c, s, x, y); } public void draw(Graphics2D g) { g.setColor(color); g.setStroke(stroke); int[][] points = pointsSet.getPoints(); int s = points[0].length; if (s == 1) { int x = points[0][0]; int y = points[1][0]; g.drawLine(x, y, x, y); } else { g.drawPolyline(points[0], points[1], s); } } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -