Reputation: 541
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
Reputation: 49195
IMO that is not possible. Use different Path
s for different stroke styles. Or use javafx.scene.shape.Line
s directly.
Upvotes: 1