afreechart/src/main/java/org/afree/chart/renderer/category/BarRenderer3D.java
/**
     * Draws the background for the plot.
     *
     * @param canvas  the graphics device.
     * @param plot  the plot.
     * @param dataArea  the area inside the axes.
     */
Draws the background for the plot.
@param canvas  the graphics device.
@param plot  the plot.
@param dataArea  the area inside the axes.
Draws the background for the plot . @param canvas the graphics device . @param plot the plot . @param dataArea the area inside the axes .
public void drawBackground(Canvas canvas, CategoryPlot plot,
                               RectShape dataArea) {
        float x0 = (float) dataArea.getX();
        float x1 = x0 + (float) Math.abs(this.xOffset);
        float x3 = (float) dataArea.getMaxX();
        float x2 = x3 - (float) Math.abs(this.xOffset);
        float y0 = (float) dataArea.getMaxY();
        float y1 = y0 - (float) Math.abs(this.yOffset);
        float y3 = (float) dataArea.getMinY();
        float y2 = y3 + (float) Math.abs(this.yOffset);
        PathShape clip = new PathShape();
        clip.moveTo(x0, y0);
        clip.lineTo(x0, y2);
        clip.lineTo(x1, y3);
        clip.lineTo(x3, y3);
        clip.lineTo(x3, y1);
        clip.lineTo(x2, y0);
        clip.closePath();
        PaintType backgroundPaintType = plot.getBackgroundPaintType();
        if (backgroundPaintType != null) {
            Paint backgroundPaint = PaintUtility.createPaint(Paint.ANTI_ALIAS_FLAG, backgroundPaintType);
            clip.fill(canvas, backgroundPaint);
        }
        Paint wallPaint = PaintUtility.createPaint(Paint.ANTI_ALIAS_FLAG, getWallPaintType());
        PathShape leftWall = new PathShape();
        leftWall.moveTo(x0, y0);
        leftWall.lineTo(x0, y2);
        leftWall.lineTo(x1, y3);
        leftWall.lineTo(x1, y1);
        leftWall.closePath();
        leftWall.fill(canvas, wallPaint);
        PathShape bottomWall = new PathShape();
        bottomWall.moveTo(x0, y0);
        bottomWall.lineTo(x1, y1);
        bottomWall.lineTo(x3, y1);
        bottomWall.lineTo(x2, y0);
        bottomWall.closePath();
        bottomWall.fill(canvas, wallPaint);
        wallPaint.setColor(Color.LTGRAY);
        LineShape corner = new LineShape(x0, y0, x1, y1);
        corner.draw(canvas, wallPaint);
        corner.setLine(x1, y1, x1, y3);
        corner.draw(canvas, wallPaint);
        corner.setLine(x1, y1, x3, y1);
        corner.draw(canvas, wallPaint);
        /*Image backgroundImage = plot.getBackgroundImage();
        if (backgroundImage != null) {
            RectShape adjusted = new RectShape(dataArea.getX()
                    + getXOffset(), dataArea.getY(),
                    dataArea.getWidth() - getXOffset(),
                    dataArea.getHeight() - getYOffset());
            plot.drawBackgroundImage(canvas, adjusted);
        }*/
    }
public void drawBackground ( Canvas canvas , CategoryPlot plot , RectShape dataArea ) { float x0 = ( float ) dataArea . getX ( ) ; float x1 = x0 + ( float ) Math . abs ( this . xOffset ) ; float x3 = ( float ) dataArea . getMaxX ( ) ; float x2 = x3 - ( float ) Math . abs ( this . xOffset ) ; float y0 = ( float ) dataArea . getMaxY ( ) ; float y1 = y0 - ( float ) Math . abs ( this . yOffset ) ; float y3 = ( float ) dataArea . getMinY ( ) ; float y2 = y3 + ( float ) Math . abs ( this . yOffset ) ; PathShape clip = new PathShape ( ) ; clip . moveTo ( x0 , y0 ) ; clip . lineTo ( x0 , y2 ) ; clip . lineTo ( x1 , y3 ) ; clip . lineTo ( x3 , y3 ) ; clip . lineTo ( x3 , y1 ) ; clip . lineTo ( x2 , y0 ) ; clip . closePath ( ) ; PaintType backgroundPaintType = plot . getBackgroundPaintType ( ) ; if ( backgroundPaintType != null ) { Paint backgroundPaint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , backgroundPaintType ) ; clip . fill ( canvas , backgroundPaint ) ; } Paint wallPaint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , getWallPaintType ( ) ) ; PathShape leftWall = new PathShape ( ) ; leftWall . moveTo ( x0 , y0 ) ; leftWall . lineTo ( x0 , y2 ) ; leftWall . lineTo ( x1 , y3 ) ; leftWall . lineTo ( x1 , y1 ) ; leftWall . closePath ( ) ; leftWall . fill ( canvas , wallPaint ) ; PathShape bottomWall = new PathShape ( ) ; bottomWall . moveTo ( x0 , y0 ) ; bottomWall . lineTo ( x1 , y1 ) ; bottomWall . lineTo ( x3 , y1 ) ; bottomWall . lineTo ( x2 , y0 ) ; bottomWall . closePath ( ) ; bottomWall . fill ( canvas , wallPaint ) ; wallPaint . setColor ( Color . LTGRAY ) ; LineShape corner = new LineShape ( x0 , y0 , x1 , y1 ) ; corner . draw ( canvas , wallPaint ) ; corner . setLine ( x1 , y1 , x1 , y3 ) ; corner . draw ( canvas , wallPaint ) ; corner . setLine ( x1 , y1 , x3 , y1 ) ; corner . draw ( canvas , wallPaint ) ; /*Image backgroundImage = plot.getBackgroundImage();
        if (backgroundImage != null) {
            RectShape adjusted = new RectShape(dataArea.getX()
                    + getXOffset(), dataArea.getY(),
                    dataArea.getWidth() - getXOffset(),
                    dataArea.getHeight() - getYOffset());
            plot.drawBackgroundImage(canvas, adjusted);
        }*/ }
Draws the background for the plot.
Draws the background for the plot .
// fill background... // highlight the background corners... // draw background image, if there is one... // TODO: implement draw background image //canvas.setComposite(originalComposite); //canvas.setAlpha(oldAlpha);