Package java.awt.geom

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


                    for (int i = 0; i < 6; i++) {
                        args[i] = stream.readFloat();
                    }
                    switch (type) {
                        case PathIterator.SEG_MOVETO :
                            gp.moveTo(args[0], args[1]);
                            break;
                        case PathIterator.SEG_LINETO :
                            gp.lineTo(args[0], args[1]);
                            break;
                        case PathIterator.SEG_CUBICTO :
View Full Code Here


        if(points.size ()<=0)
            return polyline;
        WhiteboardPoint start = points.get (0);
        Point2D w = new Point2D.Double (start.getX (), start.getY ());
        Point2D v = w2v.transform (w, null);
        polyline.moveTo ((int) v.getX (), (int) v.getY ());
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
            w = new Point2D.Double (p.getX (), p.getY ());
View Full Code Here

        GeneralPath polyline = new GeneralPath (
          GeneralPath.WIND_EVEN_ODD, points.size ());
        if(points.size ()<=0)
            return polyline;
        WhiteboardPoint start = points.get (0);
        polyline.moveTo ((float) start.getX (), (float) start.getY ());
       
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
View Full Code Here

            return polygon;
       
        WhiteboardPoint start = points.get (0);
        Point2D w = new Point2D.Double (start.getX (), start.getY ());
        Point2D v = w2v.transform (w, null);
        polygon.moveTo ((int) v.getX (), (int) v.getY ());
       
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
View Full Code Here

          GeneralPath.WIND_EVEN_ODD, points.size ());
        if(points.size ()<=0)
            return polygon;
       
        WhiteboardPoint start = points.get (0);
        polygon.moveTo ((float) start.getX (), (float) start.getY ());
       
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
View Full Code Here

            GeneralPath gp = shapes.get(c);
            if(gp == null) {
                gp = new GeneralPath();
                shapes.put(c, gp);
            }
            gp.moveTo(x1, y1);
            gp.lineTo(x2, y2);
        }

        public void addRect(Color c, int x1, int y1, int x2, int y2) {
            GeneralPath gp = shapes.get(c);
View Full Code Here

            GeneralPath gp = shapes.get(c);
            if(gp == null) {
                gp = new GeneralPath();
                shapes.put(c, gp);
            }
            gp.moveTo(x1, y1);
            gp.lineTo(x2, y1);
            gp.lineTo(x2, y2);
            gp.lineTo(x1, y2);
            gp.lineTo(x1, y1);
        }
View Full Code Here

        g2.setColor(UIManager.getColor("JXLoginPane.banner.darkBackground"));
        g2.fillRect(0, 0, w, h);

        // create the curve shape
        GeneralPath curveShape = new GeneralPath(GeneralPath.WIND_NON_ZERO);
        curveShape.moveTo(0, h * .6f);
        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);
 
View Full Code Here

    public void drawPolyline(int xPoints[], int yPoints[], int nPoints)
    {
        if(nPoints > 0)
        {
            GeneralPath generalpath = new GeneralPath();
            generalpath.moveTo(xPoints[0], yPoints[0]);
            for(int j = 1; j < nPoints; j++)
                generalpath.lineTo(xPoints[j], yPoints[j]);

            draw(generalpath);
        }
View Full Code Here

            GeneralPath gp = new GeneralPath();
            if (dist < sz) {
                // Close enough to merge with previous char...
                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
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.