Examples of closePath()


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

        GeneralPath path = new GeneralPath();
        path.moveTo(start[0], start[1]);
        path.append(ne, true);
        path.append(sw, true);
        path.closePath();

        shape = path;
    }

    private static void savePrefs() {
View Full Code Here

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

        for (int n=0; n<count; n++) {
            Shape curve = Cubic.createShape(xPoly[n], yPoly[n]);
            segments.add(curve);
            path.append(curve, true);
        }
        path.closePath();
        shape = path;
    }

    /** Calculates the closed natural cubic spline that interpolates
     * x[0], x[1], ... x[n].  The first segment is returned as
View Full Code Here

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

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

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

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

        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

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

                            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

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

            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

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

        {
            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

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

        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
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.