Package java.awt.geom

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


          path.closePath();
          break;
        }
        case PathIterator.SEG_CUBICTO:
        {
          path.curveTo(segments[i].getX1(), segments[i].getY1(),
              segments[i].getX2(), segments[i].getY2(),
              segments[i].getX3(), segments[i].getY3());
          break;
        }
        case PathIterator.SEG_LINETO:
View Full Code Here


        path.quadTo(coordinates[0], coordinates[1],
        coordinates[2], coordinates[3]);
        break;

    case PathIterator.SEG_CUBICTO:
        path.curveTo(coordinates[0], coordinates[1],
         coordinates[2], coordinates[3],
         coordinates[4], coordinates[5]);
              break;

    case PathIterator.SEG_CLOSE:
View Full Code Here

     */
    public void testGeneralPathSerialization() {
        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();
View Full Code Here

                            break;
                        case PathIterator.SEG_LINETO :
                            gp.lineTo(args[0], args[1]);
                            break;
                        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;
View Full Code Here

        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);
        curveShape.closePath();
View Full Code Here

                                cp2Y = (float)( scaleY * ( vpY + mr.ElementAt( j*6+6 ).intValue()));

                                endX = (float)( scaleX * ( vpX + mr.ElementAt( j*6+7 ).intValue()));
                                endY = (float)( scaleY * ( vpY + mr.ElementAt( j*6+8 ).intValue()));

                                gp.curveTo( cp1X, cp1Y, cp2X, cp2Y, endX, endY );
                                _startX = endX;
                                _startY = endY;
                            }
                                //gp.closePath();
                            g2.setStroke( solid );
View Full Code Here

                                cp2Y = (float)( scaleY * ( vpY + mr.ElementAt( j*6+6 ).intValue()));

                                endX = (float)( scaleX * ( vpX + mr.ElementAt( j*6+7 ).intValue()));
                                endY = (float)( scaleY * ( vpY + mr.ElementAt( j*6+8 ).intValue()));

                                gp.curveTo( cp1X, cp1Y, cp2X, cp2Y, endX, endY );
                                _startX = endX;
                                _startY = endY;
                            }
                                //gp.closePath();
                            g2.setStroke( solid );
View Full Code Here

                                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;
                            }
                        }
                        break;
                    }
View Full Code Here

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

          path.closePath();
          break;
        }
        case PathIterator.SEG_CUBICTO:
        {
          path.curveTo(segments[i].getX1(), segments[i].getY1(),
              segments[i].getX2(), segments[i].getY2(),
              segments[i].getX3(), segments[i].getY3());
          break;
        }
        case PathIterator.SEG_LINETO:
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.