0
我擴展了Canvas3D,然後重寫了「postSwap()」方法,但是我的奇偶行效果閃爍了很多,插入這個過程有什麼好處?Java 3D:我可以在哪裏插入「後期渲染」FX?
public void postSwap() {
Graphics2D g2 = (Graphics2D)this.getGraphics();
Map map = new HashMap();
map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g2.addRenderingHints(map);
g2.setColor(WipideaApplet.BCK2);
int h = this.getHeight(), w = this.getWidth();
for (int i=0;i<h;i++) {
if (i%2==0)
g2.drawLine(0, i, w, i);
}
}