Package java.awt.geom

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


       
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
            polyline.lineTo ((float) p.getX (), (float) p.getY ());
        }
       
        return polyline;
    }
   
View Full Code Here


        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
            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;
    }
View Full Code Here

       
        WhiteboardPoint p;
        for (int i =0; i<points.size ();i++)
        {
            p = points.get (i);
            polygon.lineTo ((float) p.getX (), (float) p.getY ());
        }
       
        polygon.closePath ();
        return polygon;
    }
View Full Code Here

            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);
            if(gp == null) {
View Full Code Here

            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

                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);
        }

        public void draw(Graphics2D g) {
View Full Code Here

                shapes.put(c, gp);
            }
            gp.moveTo(x1, y1);
            gp.lineTo(x2, y1);
            gp.lineTo(x2, y2);
            gp.lineTo(x1, y2);
            gp.lineTo(x1, y1);
        }

        public void draw(Graphics2D g) {
            for (Color c : shapes.keySet()) {
View Full Code Here

            }
            gp.moveTo(x1, y1);
            gp.lineTo(x2, y1);
            gp.lineTo(x2, y2);
            gp.lineTo(x1, y2);
            gp.lineTo(x1, y1);
        }

        public void draw(Graphics2D g) {
            for (Color c : shapes.keySet()) {
                g.setColor(c);
View Full Code Here

        // 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);
        curveShape.closePath();

        // draw into the buffer a gradient (bottom to top), and the text "Login"
View Full Code Here

        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);
        curveShape.closePath();

        // draw into the buffer a gradient (bottom to top), and the text "Login"
        GradientPaint gp = new GradientPaint(0, h, UIManager
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.