Package org.piccolo2d

Examples of org.piccolo2d.PNode.addChild()


            for (Vector2D vertex : hull.getVertices()) {
                final PPath node = PPath.createEllipse(vertex.getX() - 1, vertex.getY() - 1, 2, 2);
                node.addAttribute("tooltip", vertex);
                node.setPaint(Color.red);
                node.setStrokePaint(Color.red);
                hullNode.addChild(node);
            }

            for (Segment line : hull.getLineSegments()) {
                final PPath node = PPath.createLine(line.getStart().getX(), line.getStart().getY(),
                                                    line.getEnd().getX(), line.getEnd().getY());
View Full Code Here


                final PPath node = PPath.createLine(line.getStart().getX(), line.getStart().getY(),
                                                    line.getEnd().getX(), line.getEnd().getY());
                node.setPickable(false);
                node.setPaint(Color.red);
                node.setStrokePaint(Color.red);
                hullNode.addChild(node);
            }

            canvas.getLayer().addChild(hullNode);

            Encloser<Euclidean2D, Vector2D> encloser =
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.