将点从坐标系转换为 java ,
在 Java 框架中
+-------x | | | 是的
我想要它作为这个
是 | | +-----x
请帮我
你可以改变它,让y = Ymax - y
public void paintControl(PaintEvent e) {
Canvas canvas = (Canvas) e.widget;
int maxX = canvas.getSize().x - 20;
int maxY = canvas.getSize().y - 20;
e.gc.setForeground(e.display.getSystemColor(SWT.COLOR_BLUE));
int h = 0;
int pixelCount = 4;
e.gc.drawLine(50, maxY, maxX, maxY);
e.gc.drawLine(50, maxY, 50, 0 + 20);