Varying a stroke width of a curve in JavaFX -
is there way create curve in javafx varying stroke width? example, starting @ 10 point , end @ 1 point. you can't vary stroke width. you can simulate behavior though, creating path layers multiple curves, start @ different starting positions converge single point. import javafx.application.application; import javafx.scene.group; import javafx.scene.scene; import javafx.scene.paint.color; import javafx.scene.shape.*; import javafx.stage.stage; import java.util.random; public class dividedpath extends application { private static final double width = 400, height = 400; private static final random random = new random(42); @override public void start(stage stage) { cubiccurve curve = randomcurve(width, height); path path = new path(); (int = -5; <= +5; i++) { path.getelements().addall( new moveto(curve.getstartx() + i, curve.getstarty()), new cubiccurveto(