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.
     */
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 paintBar(Canvas canvas, BarRenderer renderer, int row,
            int column, RectShape bar, RectangleEdge base) {
        PaintType itemPaintType = renderer.getItemPaintType(row, column);
        Paint paint = PaintUtility.createPaint(
                Paint.ANTI_ALIAS_FLAG, 
                itemPaintType);
        paint.setStyle(Style.FILL);
        canvas.drawRect((float) bar.getMinX(), (float) bar.getMinY(),
                (float) bar.getMaxX(), (float) bar.getMaxY(), paint);
        if (renderer.isDrawBarOutline()) {
            float stroke = renderer.getItemOutlineStroke(row, column);
            PaintType paintType = renderer.getItemOutlinePaintType(row, column);
            if (stroke != 0.0f && paintType != null) {
                paint = PaintUtility.createPaint(
                        paintType, 
                        stroke, 
                        renderer.getItemOutlineEffect(row, column));
                paint.setStyle(Paint.Style.STROKE);
                canvas.drawRect((float) bar.getMinX(), (float) bar.getMinY(),
                        (float) bar.getMaxX(), (float) bar.getMaxY(), paint);
            }
        }
    }
public void paintBar ( Canvas canvas , BarRenderer renderer , int row , int column , RectShape bar , RectangleEdge base ) { PaintType itemPaintType = renderer . getItemPaintType ( row , column ) ; Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , itemPaintType ) ; paint . setStyle ( Style . FILL ) ; canvas . drawRect ( ( float ) bar . getMinX ( ) , ( float ) bar . getMinY ( ) , ( float ) bar . getMaxX ( ) , ( float ) bar . getMaxY ( ) , paint ) ; if ( renderer . isDrawBarOutline ( ) ) { float stroke = renderer . getItemOutlineStroke ( row , column ) ; PaintType paintType = renderer . getItemOutlinePaintType ( row , column ) ; if ( stroke != 0.0f && paintType != null ) { paint = PaintUtility . createPaint ( paintType , stroke , renderer . getItemOutlineEffect ( row , column ) ) ; paint . setStyle ( Paint . Style . STROKE ) ; canvas . drawRect ( ( float ) bar . getMinX ( ) , ( float ) bar . getMinY ( ) , ( float ) bar . getMaxX ( ) , ( float ) bar . getMaxY ( ) , paint ) ; } } }
Paints a single bar instance.
Paints a single bar instance .
//        GradientPaintTransformer t = renderer.getGradientPaintTransformer(); //        if (t != null && itemPaint instanceof GradientPaint) { //            itemPaint = t.transform((GradientPaint) itemPaint, bar); //        } //        canvas.setPaint(itemPaint); //        canvas.fill(bar); // draw the outline... // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) { //                canvas.setStroke(stroke); //                canvas.setPaint(paint); //                canvas.draw(bar);