question: public void draw ( final Graphics g , final int height , final int width ) { int constantDim ; int changingDim ; if ( orientation == X_AXIS ) { changingDim = width ; constantDim = height ; } else { changingDim = height ; constantDim = width ; } int dimStep ; if ( fixedSteps ) { dimStep = changingDim / STEPS ; } else { dimStep = 2 ; STEPS = changingDim / dimStep ; } float red = _redT ; float green = _greenT ; float blue = _blueT ; int offset = 0 ; for ( int i = 0 ; i < STEPS ; i ++ ) { Color c = new Color ( round ( red ) , round ( green ) , round ( blue ) ) ; g . setColor ( c ) ; drawRect ( g , offset , constantDim , dimStep ) ; offset += dimStep ; float value = shader . getValue ( ( float ) i / ( float ) STEPS ) ; red = _redT + ( _redB - _redT ) * value ; green = _greenT + ( _greenB - _greenT ) * value ; blue = _blueT + ( _blueB - _blueT ) * value ; } Color c = new Color ( round ( red ) , round ( green ) , round ( blue ) ) ; g . setColor ( c ) ; drawRect ( g , offset , constantDim , changingDim - offset ) ; }
target:  Draws the requested fade to g, with the given width and height.