Package diva.util.java2d

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


    public void createPolyline() {
        FigureLayer layer = graphicsPane.getForegroundLayer();
        Polyline2D path = new Polyline2D.Double();
        path.moveTo(240, 120);
        path.lineTo(280, 140);
        path.lineTo(240, 160);
        path.lineTo(280, 180);
        path.lineTo(240, 200);
        path.lineTo(280, 220);
        path.lineTo(240, 240);
View Full Code Here


        FigureLayer layer = graphicsPane.getForegroundLayer();
        Polyline2D path = new Polyline2D.Double();
        path.moveTo(240, 120);
        path.lineTo(280, 140);
        path.lineTo(240, 160);
        path.lineTo(280, 180);
        path.lineTo(240, 200);
        path.lineTo(280, 220);
        path.lineTo(240, 240);

        Figure line = new BasicFigure(path);
View Full Code Here

        Polyline2D path = new Polyline2D.Double();
        path.moveTo(240, 120);
        path.lineTo(280, 140);
        path.lineTo(240, 160);
        path.lineTo(280, 180);
        path.lineTo(240, 200);
        path.lineTo(280, 220);
        path.lineTo(240, 240);

        Figure line = new BasicFigure(path);
        layer.add(line);
View Full Code Here

        path.moveTo(240, 120);
        path.lineTo(280, 140);
        path.lineTo(240, 160);
        path.lineTo(280, 180);
        path.lineTo(240, 200);
        path.lineTo(280, 220);
        path.lineTo(240, 240);

        Figure line = new BasicFigure(path);
        layer.add(line);
    }
View Full Code Here

        path.lineTo(280, 140);
        path.lineTo(240, 160);
        path.lineTo(280, 180);
        path.lineTo(240, 200);
        path.lineTo(280, 220);
        path.lineTo(240, 240);

        Figure line = new BasicFigure(path);
        layer.add(line);
    }
View Full Code Here

                shapes[0] = new Rectangle2D.Double(10, 20, 30, 40);
                shapes[1] = new Ellipse2D.Double(10, 20, 30, 40);
                shapes[2] = new Area(ShapeUtilities.createSwatchShape());

                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);
View Full Code Here

                shapes[1] = new Ellipse2D.Double(10, 20, 30, 40);
                shapes[2] = new Area(ShapeUtilities.createSwatchShape());

                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);
View Full Code Here

                shapes[0] = new Area(ShapeUtilities.createSwatchShape());
                shapes[1] = new Rectangle2D.Double(10, 20, 30, 40);
                shapes[2] = new Ellipse2D.Double(10, 20, 30, 40);

                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);
View Full Code Here

                shapes[1] = new Rectangle2D.Double(10, 20, 30, 40);
                shapes[2] = new Ellipse2D.Double(10, 20, 30, 40);

                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);
View Full Code Here

                    .get("points"));
            Polyline2D poly = new Polyline2D.Double();
            poly.moveTo(coords[0], coords[1]);

            for (int i = 2; i < coords.length; i += 2) {
                poly.lineTo(coords[i], coords[i + 1]);
            }

            PaintedPath pp = new PaintedPath(poly);
            processPaintedPathAttributes(pp, attributes);
            return pp;
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.