Package diva.util.java2d

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


            // Create the graphic
            PaintedList graphic = new PaintedList();

            Polygon2D polygon = new Polygon2D.Double();
            polygon.moveTo(30, 50);
            polygon.lineTo(70, 80);
            polygon.lineTo(70, 20);
            graphic.add(new PaintedShape(polygon, Color.red, 1.0f));

            Line2D line1 = new Line2D.Double(10, 50, 30, 50);
            graphic.add(new PaintedPath(line1));
View Full Code Here


            PaintedList graphic = new PaintedList();

            Polygon2D polygon = new Polygon2D.Double();
            polygon.moveTo(30, 50);
            polygon.lineTo(70, 80);
            polygon.lineTo(70, 20);
            graphic.add(new PaintedShape(polygon, Color.red, 1.0f));

            Line2D line1 = new Line2D.Double(10, 50, 30, 50);
            graphic.add(new PaintedPath(line1));
View Full Code Here

                Polyline2D polyline = new Polyline2D.Double(10, 20, 30, 40);
                polyline.lineTo(50, 60);
                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
View Full Code Here

                polyline.lineTo(50, 60);
                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
                shapes[5] = new GeneralPath(ShapeUtilities.createSwatchShape());
View Full Code Here

                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
                shapes[5] = new GeneralPath(ShapeUtilities.createSwatchShape());
View Full Code Here

                Polyline2D polyline = new Polyline2D.Double(10, 20, 30, 40);
                polyline.lineTo(50, 60);
                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
View Full Code Here

                polyline.lineTo(50, 60);
                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
                shapes[5] = new GeneralPath(ShapeUtilities.createSwatchShape());
View Full Code Here

                polyline.lineTo(50, 60);

                Polygon2D polygon = new Polygon2D.Double(10, 20);
                polygon.lineTo(20, 30);
                polygon.lineTo(40, 50);
                polygon.lineTo(60, 70);

                shapes[3] = polyline;
                shapes[4] = polygon;
                shapes[5] = new GeneralPath(ShapeUtilities.createSwatchShape());
            }
View Full Code Here

        oval.setInteractor(selectionInteractor);

        // Create a star using a general path object
        Polygon2D p = new Polygon2D.Double();
        p.moveTo(-100.0f, -25.0f);
        p.lineTo(+100.0f, -25.0f);
        p.lineTo(-50.0f, +100.0f);
        p.lineTo(+0.0f, -100.0f);
        p.lineTo(+50.0f, +100.0f);
        p.closePath();
View Full Code Here

        // Create a star using a general path object
        Polygon2D p = new Polygon2D.Double();
        p.moveTo(-100.0f, -25.0f);
        p.lineTo(+100.0f, -25.0f);
        p.lineTo(-50.0f, +100.0f);
        p.lineTo(+0.0f, -100.0f);
        p.lineTo(+50.0f, +100.0f);
        p.closePath();

        // translate origin towards center of canvas
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.