?? brush.java
字號:
import java.awt.*;
/**
*
* @author hysun
*/
public class Brush extends FreeShape {
public Brush(Color c, Stroke s, int x, int y) {
super(c, s, x, y);
}
public Brush() {
super();
}
public void draw(Graphics2D g) {
g.setColor(color);
g.setStroke(stroke);
int[][] points = pointsSet.getPoints();
if (points == null)
return;
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 + -