Re: Canvas : 2 pixel thick line width

2015-04-02 Thread Jim Graham
Hi Damien, The main problem is that the definition of a stroked path and the definition of a filled path are at odds. If the default stroke width is 1.0 and the default stroke type is "CENTERED", then the stroke is centered on the outline of a path and half of it falls on either side of the

Re: Canvas : 2 pixel thick line width

2015-04-01 Thread Damien Dudouit
Hello, I have found the following answer : http://stackoverflow.com/questions/27846659/how-to-draw-an-1-pixel-line-using-javafx-canvas *Imagine each pixel as a (small) rectangle (instead of a point). The integer coordinates are the boundaries between pixels; so a (horizontal or vertical) line wi

Canvas : 2 pixel thick line width

2015-04-01 Thread Damien Dudouit
Hello, I'm using a Canvas to display some content (mostly text with lines also for underline). I've just noticed something that is a big problem for me : with line-width=1 and no scaling, actual line-width on display takes 2 pixels. Canvas canvas = new Canvas(300, 300); GraphicsContext g