Canvas does not draw smooth lines
I am not able to get anitialiazed lines when doing freehand drawing in javafx canvas. Following is the code ... import javafx.application.*; import javafx.event.*; import javafx.scene.*; import javafx.scene.canvas.*; import javafx.scene.control.*; import javafx.scene.input.*; import javafx.scene.shape.*; import javafx.stage.*; public class Test2 extends Application { GraphicsContext gc; public static void main(String[] args) { launch(args); } private class MouseDragged implements EventHandler<MouseEvent> { public void handle( MouseEvent e ) { gc.lineTo( e.getX(), e.getY() ); gc.stroke(); } }