src/main/java/de/javagl/geom/Lines.java
/**
     * Transform the given line with the given transform, and store the
     * result in the given destination. If the given destination is
     * <code>null</code>, then a new line will be created and returned
     * 
     * @param at The affine transform
     * @param lineSrc The source line
     * @param lineDst The destination line
     * @return The destination line
     */
Transform the given line with the given transform, and store the
result in the given destination. If the given destination is
null, then a new line will be created and returned

@param at The affine transform
@param lineSrc The source line
@param lineDst The destination line
@return The destination line
Transform the given line with the given transform and store the result in the given destination . If the given destination is null then a new line will be created and returned @param at The affine transform @param lineSrc The source line @param lineDst The destination line @return The destination line
public static Line2D transform(
        AffineTransform at, Line2D lineSrc, Line2D lineDst)
    {
        if (lineDst == null) 
        {
            lineDst = new Line2D.Double();
        }
        double sx1 = lineSrc.getX1();
        double sy1 = lineSrc.getY1();
        double sx2 = lineSrc.getX2();
        double sy2 = lineSrc.getY2();
        double dx1 = AffineTransforms.computeX(at, sx1, sy1);
        double dy1 = AffineTransforms.computeY(at, sx1, sy1);
        double dx2 = AffineTransforms.computeX(at, sx2, sy2);
        double dy2 = AffineTransforms.computeY(at, sx2, sy2);
        lineDst.setLine(dx1, dy1, dx2, dy2);
        return lineDst;
    }
public static Line2D transform ( AffineTransform at , Line2D lineSrc , Line2D lineDst ) { if ( lineDst == null ) { lineDst = new Line2D . Double ( ) ; } double sx1 = lineSrc . getX1 ( ) ; double sy1 = lineSrc . getY1 ( ) ; double sx2 = lineSrc . getX2 ( ) ; double sy2 = lineSrc . getY2 ( ) ; double dx1 = AffineTransforms . computeX ( at , sx1 , sy1 ) ; double dy1 = AffineTransforms . computeY ( at , sx1 , sy1 ) ; double dx2 = AffineTransforms . computeX ( at , sx2 , sy2 ) ; double dy2 = AffineTransforms . computeY ( at , sx2 , sy2 ) ; lineDst . setLine ( dx1 , dy1 , dx2 , dy2 ) ; return lineDst ; }
Transform the given line with the given transform, and store the
 result in the given destination.
Transform the given line with the given transform and store the result in the given destination .