afreechart/src/main/java/org/afree/chart/renderer/category/StandardBarPainter.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 rectangle 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 rectangle 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 rectangle is the base of the bar .
public void paintBarShadow(Canvas canvas, BarRenderer renderer, int row,
            int column, RectShape bar, RectangleEdge base,
            boolean pegShadow) {
        PaintType itemPaintType = renderer.getItemPaintType(row, column);
        if (itemPaintType.getAlpha() == 0) {
            return;
        }
        RectShape shadow = createShadow(bar, renderer.getShadowXOffset(),
                renderer.getShadowYOffset(), base, pegShadow);
        PaintType p = renderer.getShadowPaintType();
        Paint paint = PaintUtility.createPaint(
                Paint.ANTI_ALIAS_FLAG, 
                p);
        paint.setStyle(Paint.Style.FILL);
        canvas.drawRect((float) shadow.getMinX(), (float) shadow.getMinY(),
                (float) shadow.getMaxX(), (float) shadow.getMaxY(), paint);
    }
public void paintBarShadow ( Canvas canvas , BarRenderer renderer , int row , int column , RectShape bar , RectangleEdge base , boolean pegShadow ) { PaintType itemPaintType = renderer . getItemPaintType ( row , column ) ; if ( itemPaintType . getAlpha ( ) == 0 ) { return ; } RectShape shadow = createShadow ( bar , renderer . getShadowXOffset ( ) , renderer . getShadowYOffset ( ) , base , pegShadow ) ; PaintType p = renderer . getShadowPaintType ( ) ; Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , p ) ; paint . setStyle ( Paint . Style . FILL ) ; canvas . drawRect ( ( float ) shadow . getMinX ( ) , ( float ) shadow . getMinY ( ) , ( float ) shadow . getMaxX ( ) , ( float ) shadow . getMaxY ( ) , 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 //        if (itemPaint instanceof Color) { //            Color c = (Color) itemPaint; //            if (c.getAlpha() == 0) { //                return; //            } //        } //        RectangularShape shadow = createShadow(bar, renderer.getShadowXOffset(), //                renderer.getShadowYOffset(), base, pegShadow); //        canvas.setPaint(renderer.getShadowPaint()); //        canvas.fill(shadow);