PacDroid
PacDroid

Reputation: 541

JavaFX Path with lines with different stroke width

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.

Upvotes: 2

Views: 6846

Answers (1)

Uluk Biy
Uluk Biy

Reputation: 49195

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

Upvotes: 1

Related Questions