Doubts on LinearGradient#proportional=true
Gerrit Grunwald
han.solo at muenster.de
Fri Jun 8 07:55:10 PDT 2012
Ok got it, but it seems the gradient coordinates are related to the complete drawing area instead of the node which makes sense to me. Otherwise you won't be able to create gradients outside of the bounds of a node right ?
Am 08.06.2012 um 16:50 schrieb Tom Schindl:
>>>> Group g = new Group();
>>>> Rectangle r = new Rectangle(40,0,90,75);
>>>> List<Stop> stops = new ArrayList<Stop>();
>>>> stops.add(new Stop(0, Color.RED));
>>>> stops.add(new Stop(1, Color.BLUE));
>>>> LinearGradient lg = new LinearGradient(0, 0, 90, 0, false, CycleMethod.NO_CYCLE, stops);
>>>> r.setFill(lg);
>>>> g.getChildren().add(r);
More information about the openjfx-dev
mailing list