g2.setPaint(
       new GradientPaint(
          0.5f*ds,-1.0f*ds,Color.red,
          1.5f*ds,-1.0f*ds,Color.orange,false));

Figure 3