243244245246247248249
// linear gradient do a full planar rotation LinearGradient1 getLinGrad(double deg) { double rad = Math.PI * deg / 180.0; double x0 = Math.sin(rad) / 2.0; double y0 = Math.cos(rad) / 2.0; return new LinearGradient1(x0, y0, -x0, -y0); }