afreechart/src/main/java/org/afree/chart/renderer/xy/GradientXYBarPainter.java
/**
     * Paints a single bar instance.
     *
     * @param canvas  the graphics target.
     * @param renderer  the renderer.
     * @param row  the row index.
     * @param column  the column index.
     * @param bar  the bar
     * @param base  indicates which side of the RectShape is the base of the
     *              bar.
     * @param pegShadow  peg the shadow to the base of the bar?
     */
Paints a single bar instance.
@param canvas  the graphics target.
@param renderer  the renderer.
@param row  the row index.
@param column  the column index.
@param bar  the bar
@param base  indicates which side of the RectShape is the base of the
bar.
Paints a single bar instance . @param canvas the graphics target . @param renderer the renderer . @param row the row index . @param column the column index . @param bar the bar @param base indicates which side of the RectShape is the base of the bar .
public void paintBarShadow(Canvas canvas, XYBarRenderer renderer, int row,
            int column, RectShape bar, RectangleEdge base,
            boolean pegShadow) {
        PaintType itemPaint = renderer.getItemPaintType(row, column);
        /*
        if (itemPaint instanceof Color) {
            Color c = (Color) itemPaint;
            if (c.getAlpha() == 0) {
                return;
            }
        }
        */
        if (itemPaint.getAlpha() == 0) {
            return;
        }
        /*
        RectShape shadow = createShadow(bar, renderer.getShadowXOffset(),
                renderer.getShadowYOffset(), base, pegShadow);
        canvas.setPaint(Color.gray);
        canvas.fill(shadow);
        */
        RectShape shadow = createShadow(bar,
                renderer.getShadowXOffset(), renderer.getShadowYOffset(), base,
                pegShadow);
        Paint paint = PaintUtility.createPaint(
                Paint.ANTI_ALIAS_FLAG,
                renderer.getShadowPaintType());
        shadow.fill(canvas, paint);
    }
public void paintBarShadow ( Canvas canvas , XYBarRenderer renderer , int row , int column , RectShape bar , RectangleEdge base , boolean pegShadow ) { PaintType itemPaint = renderer . getItemPaintType ( row , column ) ; /*
        if (itemPaint instanceof Color) {
            Color c = (Color) itemPaint;
            if (c.getAlpha() == 0) {
                return;
            }
        }
        */ if ( itemPaint . getAlpha ( ) == 0 ) { return ; } /*
        RectShape shadow = createShadow(bar, renderer.getShadowXOffset(),
                renderer.getShadowYOffset(), base, pegShadow);
        canvas.setPaint(Color.gray);
        canvas.fill(shadow);
        */ RectShape shadow = createShadow ( bar , renderer . getShadowXOffset ( ) , renderer . getShadowYOffset ( ) , base , pegShadow ) ; Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , renderer . getShadowPaintType ( ) ) ; shadow . fill ( canvas , paint ) ; }
Paints a single bar instance.
Paints a single bar instance .
// handle a special case - if the bar colour has alpha == 0, it is // invisible so we shouldn't draw any shadow