afreechart/src/main/java/org/afree/chart/renderer/category/StandardBarPainter.java
/**
     * Creates a shadow for the bar.
     *
     * @param bar  the bar shape.
     * @param xOffset  the x-offset for the shadow.
     * @param yOffset  the y-offset for the shadow.
     * @param base  the edge that is the base of the bar.
     * @param pegShadow  peg the shadow to the base?
     *
     * @return A rectangle for the shadow.
     */
Creates a shadow for the bar.
@param bar  the bar shape.
@param xOffset  the x-offset for the shadow.
@param yOffset  the y-offset for the shadow.
@param base  the edge that is the base of the bar.

@return A rectangle for the shadow.
Creates a shadow for the bar . @param bar the bar shape . @param xOffset the x - offset for the shadow . @param yOffset the y - offset for the shadow . @param base the edge that is the base of the bar . @return A rectangle for the shadow .
private RectShape createShadow(RectShape bar, double xOffset,
            double yOffset, RectangleEdge base, boolean pegShadow) {
        double x0 = bar.getMinX();
        double x1 = bar.getMaxX();
        double y0 = bar.getMinY();
        double y1 = bar.getMaxY();
        if (base == RectangleEdge.TOP) {
            x0 += xOffset;
            x1 += xOffset;
            if (!pegShadow) {
                y0 += yOffset;
            }
            y1 += yOffset;
        }
        else if (base == RectangleEdge.BOTTOM) {
            x0 += xOffset;
            x1 += xOffset;
            y0 += yOffset;
            if (!pegShadow) {
                y1 += yOffset;
            }
        }
        else if (base == RectangleEdge.LEFT) {
            if (!pegShadow) {
                x0 += xOffset;
            }
            x1 += xOffset;
            y0 += yOffset;
            y1 += yOffset;
        }
        else if (base == RectangleEdge.RIGHT) {
            x0 += xOffset;
            if (!pegShadow) {
                x1 += xOffset;
            }
            y0 += yOffset;
            y1 += yOffset;
        }
        return new RectShape(x0, y0, (x1 - x0), (y1 - y0));
    }
private RectShape createShadow ( RectShape bar , double xOffset , double yOffset , RectangleEdge base , boolean pegShadow ) { double x0 = bar . getMinX ( ) ; double x1 = bar . getMaxX ( ) ; double y0 = bar . getMinY ( ) ; double y1 = bar . getMaxY ( ) ; if ( base == RectangleEdge . TOP ) { x0 += xOffset ; x1 += xOffset ; if ( ! pegShadow ) { y0 += yOffset ; } y1 += yOffset ; } else if ( base == RectangleEdge . BOTTOM ) { x0 += xOffset ; x1 += xOffset ; y0 += yOffset ; if ( ! pegShadow ) { y1 += yOffset ; } } else if ( base == RectangleEdge . LEFT ) { if ( ! pegShadow ) { x0 += xOffset ; } x1 += xOffset ; y0 += yOffset ; y1 += yOffset ; } else if ( base == RectangleEdge . RIGHT ) { x0 += xOffset ; if ( ! pegShadow ) { x1 += xOffset ; } y0 += yOffset ; y1 += yOffset ; } return new RectShape ( x0 , y0 , ( x1 - x0 ) , ( y1 - y0 ) ) ; }
Creates a shadow for the bar.
Creates a shadow for the bar .