Examples of quadTo()


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

                        case PathIterator.SEG_CUBICTO :
                            gp.curveTo(args[0], args[1], args[2],
                                    args[3], args[4], args[5]);
                            break;
                        case PathIterator.SEG_QUADTO :
                            gp.quadTo(args[0], args[1], args[2], args[3]);
                            break;
                        case PathIterator.SEG_CLOSE :
                            gp.closePath();
                            break;
                        default :
View Full Code Here

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

                                break;
                            case java.awt.geom.PathIterator.SEG_LINETO:
                                s.lineTo(coords[0], coords[1]);
                                break;
                            case java.awt.geom.PathIterator.SEG_QUADTO:
                                s.quadTo(coords[0], coords[1], coords[2], coords[3]);
                                break;
                            case java.awt.geom.PathIterator.SEG_CUBICTO:
                                s.curveTo(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
                                break;
                            }
View Full Code Here

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

          {
            final float x1 = in.readFloat();
            final float y1 = in.readFloat();
            final float x2 = in.readFloat();
            final float y2 = in.readFloat();
            gp.quadTo(x1, y1, x2, y2);
            break;
          }
        case PathIterator.SEG_CUBICTO:
          {
            final float x1 = in.readFloat();
View Full Code Here

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

          path.moveTo(segments[i].getX1(), segments[i].getY1());
          break;
        }
        case PathIterator.SEG_QUADTO:
        {
          path.quadTo(segments[i].getX1(), segments[i].getY1(),
              segments[i].getX2(), segments[i].getY2());
          break;
        }
        default:
          throw new IllegalStateException("Unexpected result from path iterator.");
View Full Code Here

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

    path.lineTo(-10, -20);
    pt.setLocation(-10, -20);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 6
    path.quadTo(1, 2, 3, 4);
    pt.setLocation(3, 4);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 7
    path.curveTo(5, 6, 7, 8, 9, 10);
View Full Code Here

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

    path.moveTo(50, 51);
    pt.setLocation(50, 51);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 10
    path.quadTo(52, 53, 54, 55);
    pt.setLocation(54, 55);
    harness.check(pt.equals(path.getCurrentPoint()));

    // Check 11
    path.closePath();
View Full Code Here

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

    GeneralPath path;
    path = new GeneralPath();
    path.moveTo(1.1f, 1.2f);
    path.lineTo(2.1f, 2.2f);
    path.quadTo(3.1f, 3.2f, 4.1f, 4.2f);
    path.closePath();
    path.moveTo(5.1f, 5.2f);
    path.curveTo(6.1f, 6.2f, 7.1f, 7.2f, 8.1f, 8.2f);

  }
View Full Code Here

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

    path = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    pit = path.getPathIterator(null);
    h.check(pit.getWindingRule(), PathIterator.WIND_EVEN_ODD); // 1
    h.check(!pit.isDone());                                    // 2
View Full Code Here

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

    path = new GeneralPath(GeneralPath.WIND_NON_ZERO);
    path.moveTo(10, 11);
    path.lineTo(20, 21);
    path.closePath();
    path.moveTo(30, 31);
    path.quadTo(40, 41, 42, 43);
    path.curveTo(50, 51, 52, 53, 54, 55);
   
    tx = new AffineTransform();
    tx.translate(2, 3);
    tx.scale(10, 10);
View Full Code Here

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

            final AffineTransform tx = new AffineTransform();
            tx.translate(50, h / 2);
            tx.scale(0.25, -0.25);
            final GeneralPath gp = new GeneralPath();
            gp.moveTo(w, 0);
            gp.quadTo(w, h, 0, h);
            gp.closePath();
            final Graphics2D g2d = (Graphics2D) g;
            g2d.draw(gp);
            g.setColor(Color.RED);
            drawQuadCurve(g, w, 0, w, h, 0, h);
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.