Question

I'm trying to draw a Path object with only lines, but with different stroke widths. Is that possible?

My try:

    border.setStrokeWidth(2);
    border.getElements().addAll(mTo, lTop);
    border.setStrokeWidth(5);
    border.getElements().addAll(lRight, lBottom, lLeft);

Not a success, the last stroke width is used for the whole Path.

Was it helpful?

Solution

IMO that is not possible. Use different Paths for different stroke styles. Or use javafx.​scene.​shape.Lines directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top