Package java.awt.geom

Examples of java.awt.geom.GeneralPath.closePath()


            polygon.moveTo(x + 25, y);
            for (int i = 0; i < xcoords.length; i++)
            {
                polygon.lineTo(xcoords[i], ycoords[i]);
            }
            polygon.closePath();
            g2.fill(polygon);
            BasicStroke wideStroke = new BasicStroke(2.0f);
            g2.setColor(Color.black);
            g2.setStroke(wideStroke);
            g2.draw(polygon);
View Full Code Here


            polygon.moveTo(x + 25, y);
            for (int i = 0; i < xcoords.length; i++)
            {
                polygon.lineTo(xcoords[i], ycoords[i]);
            }
            polygon.closePath();
            g2.fill(polygon);
            BasicStroke wideStroke = new BasicStroke(2.0f);
            g2.setColor(Color.black);
            g2.setStroke(wideStroke);
            g2.draw(polygon);
View Full Code Here

        GeneralPath g1 = new GeneralPath();
        g1.moveTo(1.0f, 2.0f);
        g1.lineTo(3.0f, 4.0f);
        g1.curveTo(5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f);
        g1.quadTo(1.0f, 2.0f, 3.0f, 4.0f);
        g1.closePath();
        GeneralPath g2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutputStream out = new ObjectOutputStream(buffer);
            SerialUtilities.writeShape(g1, out);
View Full Code Here

                            break;
                        case PathIterator.SEG_QUADTO :
                            gp.quadTo(args[0], args[1], args[2], args[3]);
                            break;
                        case PathIterator.SEG_CLOSE :
                            gp.closePath();
                            break;
                        default :
                            throw new RuntimeException(
                                    "JFreeChart - No path exists");
                    }
View Full Code Here

            w = new Point2D.Double (p.getX (), p.getY ());
            v = w2v.transform (w, null);
            polygon.lineTo ((int) v.getX (), (int) v.getY ());
        }
       
        polygon.closePath ();
        return polygon;
    }
   
    /**
     * Creates a GeneralPath with all the WhiteboardPoint.
View Full Code Here

        {
            p = points.get (i);
            polygon.lineTo ((float) p.getX (), (float) p.getY ());
        }
       
        polygon.closePath ();
        return polygon;
    }
   
    /**
     * Returns a list of all the <tt>WhiteboardPoint</tt> instances that this
View Full Code Here

        curveShape.curveTo(w * .167f, h * 1.2f, w * .667f, h * -.5f, w,
                h * .75f);
        curveShape.lineTo(w, h);
        curveShape.lineTo(0, h);
        curveShape.lineTo(0, h * .8f);
        curveShape.closePath();

        // draw into the buffer a gradient (bottom to top), and the text "Login"
        GradientPaint gp = new GradientPaint(0, h, UIManager
                .getColor("JXLoginPane.banner.darkBackground"), 0, 0, UIManager
                .getColor("JXLoginPane.banner.lightBackground"));
View Full Code Here

                System.arraycopy(boxes, 0, chull, 0, 8);
                int npts = makeConvexHull(chull, 8);
                gp.moveTo(chull[0].x, chull[0].y);
                for(int n=1; n<npts; n++)
                    gp.lineTo(chull[n].x, chull[n].y);
                gp.closePath();
            } else {
                // Merge all previous areas
                mergeAreas(shape, areas, nAreas);
                nAreas = 0; // Start fresh...
View Full Code Here

                if (i==2) {
                    gp.moveTo(boxes[0].x, boxes[0].y);
                    gp.lineTo(boxes[1].x, boxes[1].y);
                    gp.lineTo(boxes[2].x, boxes[2].y);
                    gp.lineTo(boxes[3].x, boxes[3].y);
                    gp.closePath();
                    shape.append(gp, false);
                    gp.reset();
                }
                gp.moveTo(boxes[4].x, boxes[4].y);
                gp.lineTo(boxes[5].x, boxes[5].y);
View Full Code Here

                }
                gp.moveTo(boxes[4].x, boxes[4].y);
                gp.lineTo(boxes[5].x, boxes[5].y);
                gp.lineTo(boxes[6].x, boxes[6].y);
                gp.lineTo(boxes[7].x, boxes[7].y);
                gp.closePath();
            }
            areas[nAreas++] = new Area(gp);
        }

        mergeAreas(shape, areas, nAreas);
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.