I just did some tests with Path of JavaFX, and I observed a bug when I work with the LineTo :
Path border = GraphUtil.buildBorder(w, h, ARC_BORDER);
border.setStroke(Color.BLACK);
border.setStrokeWidth(0.3);
border.setOpacity(0.8);
With my utility method :
public class GraphUtil {
public static Path buildBorder(double w, double h, double arcBorder) {
//FIXME apply arcborder
Path border = new Path();
MoveTo mTo = new MoveTo();
mTo.setX(0);
mTo.setY(0);
LineTo lTop = new LineTo();
lTop.setX(w);
lTop.setY(0);
LineTo lRight = new LineTo();
lRight.setX(w);
lRight.setY(h);
LineTo lBottom = new LineTo();
lBottom.setX(0);
lBottom.setY(h);
LineTo lLeft = new LineTo();
lLeft.setX(0);
lLeft.setY(0);
border.getElements().addAll(mTo, lTop, lRight, lBottom, lLeft);
return border;
}
}
When I do that, it's ok. But when I want the strokewidth to be smaller (0.2 or 0.1), the left border is invisible, the other ones are visible.. Does someone know why? Thanks.