code: protected final RadialGradientPaint createRadialGradient(float x, float y, float r, float[] midpoints, Color[] colors) {
          if (r == 0f) {
              r = .00001f;
          }
  
          return new RadialGradientPaint(x, y, r, midpoints, colors);
      }
docs: Given parameters for creating a RadialGradientPaint, this method will
  create and return a radial gradient paint. One primary purpose for this
  method is to avoid creating a RadialGradientPaint where the radius is
  non-positive. In such a case, the radius is just slightly increased to
  avoid 0.
  
  @param  x
  @param  y
  @param  r
  @param  midpoints
  @param  colors
  
  @return a valid RadialGradientPaint. This method never returns null.