I try to find the way to rotate the LinearGradient
object nested into e.g. Rectangle
object, say:
Rectangle rect = new Rectangle(0, 0, 200, 200);
LinearGradient lg = new LinearGradient(0, 0, 100, 0, false, CycleMethod.REPEAT, new Stop[] {
new Stop(0, Color.BLACK);
new Stop(0.5, Color.WHITE);
new Stop(1, Color.BLACK);
});
rect.setFill(lg);
Now, I try to rotate this lg
object, for example for 45 degrees to the left, but without rotating the whole rect
. Is there any way to achieve that?
new LinearGradient(0, 0, 70, 70...)
already do this? – CurioLinearGradient
by any degree? – InsecurityLinearGradient
. Can you do this computation? – Kurtz