JAVA Graphics2D种drawLine方法

tech2022-08-15  139

一线线是由两点组成的,启点和终点,所有在drawLine方法中有四个参数来控制两点,参数如下:

@param x1 the first point's <i>x</i> coordinate. (x1) @param y1 the first point's <i>y</i> coordinate. (y1) @param x2 the second point's <i>x</i> coordinate. (x2) @param y2 the second point's <i>y</i> coordinate.(y2)

public abstract void drawLine(int x1, int y1, int x2, int y2); 点A(x1,y1),B(x2,y2)

最新回复(0)