@Override boolean isPaintValid(SunGraphics2D sg2d){
  MultipleGradientPaint paint=(MultipleGradientPaint)sg2d.paint;
  if (paint.getFractions().length > MULTI_MAX_FRACTIONS) {
    return false;
  }
  OGLSurfaceData dstData=(OGLSurfaceData)sg2d.surfaceData;
  OGLGraphicsConfig gc=dstData.getOGLGraphicsConfig();
  if (!gc.isCapPresent(CAPS_EXT_GRAD_SHADER)) {
    return false;
  }
  return true;
}

@ Override boolean isPaintValid ( SunGraphics2D sg2d ) { MultipleGradientPaint paint = ( MultipleGradientPaint ) sg2d . paint ; if ( paint . getFractions ( ) . length > MULTI_MAX_FRACTIONS ) { return false ; } OGLSurfaceData dstData = ( OGLSurfaceData ) sg2d . surfaceData ; OGLGraphicsConfig gc = dstData . getOGLGraphicsConfig ( ) ; if ( ! gc . isCapPresent ( CAPS_EXT_GRAD_SHADER ) ) { return false ; } return true ; }
returns true if the given multiplegradientpaint instance can be used by the accelerated oglpaints . multigradient implementation . a multiplegradientpaint is considered valid if the following conditions are met : - the number of gradient " stops " is < = max_fractions - the destination has support for fragment shaders
