Package diva.util.java2d

Examples of diva.util.java2d.Polygon2D.transform()


        p.closePath();

        // translate origin towards center of canvas
        AffineTransform at = new AffineTransform();
        at.translate(200.0f, 200.0f);
        p.transform(at);

        BasicFigure star = new BasicFigure(p);
        star.setLineWidth(2);
        star.setStrokePaint(Color.blue);
        figureLayer.add(star);
View Full Code Here


                pos.y);
        polygon.lineTo(
                pos.x + l2,
                pos.y - w);
        polygon.closePath();
        polygon.transform(at);
        return polygon;
    }

    /**
     * test main: usage: java GraphicsImageDisplay <filename>.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.