LinearGradient lg = new LinearGradient(p1.getX(), p1.getY(),
p2.getX(), p2.getY(), false, CycleMethod.NO_CYCLE, stops);
this.gc.setStroke(lg);
this.gc.setFill(lg);
} else if (paint instanceof MultipleGradientPaint) {
MultipleGradientPaint mgp = (MultipleGradientPaint) paint;
Color[] colors = mgp.getColors();
float[] fractions = mgp.getFractions();
Stop[] stops = new Stop[colors.length];
for (int i = 0; i < colors.length; i++) {
stops[i] = new Stop(fractions[i], awtColorToJavaFX(colors[i]));
}