afreechart/src/main/java/org/afree/chart/plot/RingPlot.java
/**
     * Creates a new line by extending an existing line.
     *
     * @param line  the line (<code>null</code> not permitted).
     * @param startPercent  the amount to extend the line at the start point
     *                      end.
     * @param endPercent  the amount to extend the line at the end point end.
     *
     * @return A new line.
     */
Creates a new line by extending an existing line.
@param line  the line (null not permitted).
@param startPercent  the amount to extend the line at the start point
end.
@param endPercent  the amount to extend the line at the end point end.

@return A new line.
Creates a new line by extending an existing line . @param line the line ( null not permitted ) . @param startPercent the amount to extend the line at the start point end . @param endPercent the amount to extend the line at the end point end . @return A new line .
private LineShape extendLine(LineShape line, double startPercent,
                              double endPercent) {
        if (line == null) {
            throw new IllegalArgumentException("Null 'line' argument.");
        }
        double x1 = line.getX1();
        double x2 = line.getX2();
        double deltaX = x2 - x1;
        double y1 = line.getY1();
        double y2 = line.getY2();
        double deltaY = y2 - y1;
        x1 = x1 - (startPercent * deltaX);
        y1 = y1 - (startPercent * deltaY);
        x2 = x2 + (endPercent * deltaX);
        y2 = y2 + (endPercent * deltaY);
        return new LineShape(x1, y1, x2, y2);
    }
private LineShape extendLine ( LineShape line , double startPercent , double endPercent ) { if ( line == null ) { throw new IllegalArgumentException ( "Null 'line' argument." ) ; } double x1 = line . getX1 ( ) ; double x2 = line . getX2 ( ) ; double deltaX = x2 - x1 ; double y1 = line . getY1 ( ) ; double y2 = line . getY2 ( ) ; double deltaY = y2 - y1 ; x1 = x1 - ( startPercent * deltaX ) ; y1 = y1 - ( startPercent * deltaY ) ; x2 = x2 + ( endPercent * deltaX ) ; y2 = y2 + ( endPercent * deltaY ) ; return new LineShape ( x1 , y1 , x2 , y2 ) ; }
Creates a new line by extending an existing line.
Creates a new line by extending an existing line .