当前位置: 首页>>代码示例>>Java>>正文


Java PathIterator.SEG_CUBICTO属性代码示例

本文整理汇总了Java中java.awt.geom.PathIterator.SEG_CUBICTO属性的典型用法代码示例。如果您正苦于以下问题:Java PathIterator.SEG_CUBICTO属性的具体用法?Java PathIterator.SEG_CUBICTO怎么用?Java PathIterator.SEG_CUBICTO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.awt.geom.PathIterator的用法示例。


在下文中一共展示了PathIterator.SEG_CUBICTO属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSegment

public int getSegment(double coords[]) {
    if (direction == INCREASING) {
        coords[0] = cx0;
        coords[1] = cy0;
        coords[2] = cx1;
        coords[3] = cy1;
        coords[4] = x1;
        coords[5] = y1;
    } else {
        coords[0] = cx1;
        coords[1] = cy1;
        coords[2] = cx0;
        coords[3] = cy0;
        coords[4] = x0;
        coords[5] = y0;
    }
    return PathIterator.SEG_CUBICTO;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:Order3.java

示例2: curveTo

/**
 * Delegates to the enclosed <code>GeneralPath</code>.
 */
public synchronized void curveTo(float x1, float y1, float x2, float y2,
		float x3, float y3)
{
	checkMoveTo(); // check if prev command was moveto
	path.curveTo(x1, y1, x2, y2, x3, y3);

	makeRoom(6);
	types[numSeg++] = PathIterator.SEG_CUBICTO;
	values[numVals++] = x1;
	values[numVals++] = y1;
	values[numVals++] = x2;
	values[numVals++] = y2;
	cx = values[numVals++] = x3;
	cy = values[numVals++] = y3;
}
 
开发者ID:GDSRS,项目名称:TrabalhoFinalEDA2,代码行数:18,代码来源:ExtendedGeneralPath.java

示例3: getType

public String getType() {
  final StringBuilder buffer = new StringBuilder();
  if (shape != null) {
    final PathIterator it = shape.getPathIterator(new AffineTransform());
    final float[] pts = new float[6];
    while (!it.isDone()) {
      switch (it.currentSegment(pts)) {
      case PathIterator.SEG_MOVETO:
        buffer.append('m')
              .append(',')
              .append(Math.round(pts[0]))
              .append(',')
              .append(Math.round(pts[1]));
        break;
      case PathIterator.SEG_LINETO:
      case PathIterator.SEG_CUBICTO:
      case PathIterator.SEG_QUADTO:
        buffer.append('l')
              .append(',')
              .append(Math.round(pts[0]))
              .append(',')
              .append(Math.round(pts[1]));
        break;
      case PathIterator.SEG_CLOSE:
        buffer.append('c');
        break;
      }
      it.next();
      if (!it.isDone()) {
        buffer.append(',');
      }
    }
  }
  return ID + buffer.toString();
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:35,代码来源:NonRectangular.java

示例4: shapeToSVG

private static String shapeToSVG(Shape sh) {
	StringBuffer s = new StringBuffer();
	double[] pts = new double[6];
	for (PathIterator p = sh.getPathIterator(null); !p.isDone(); p.next()) {
		switch (p.currentSegment(pts)) {
		case PathIterator.SEG_MOVETO:
			s.append('M'); s.append(' ');
			s.append(svgRound(pts[0])); s.append(' ');
			s.append(svgRound(pts[1])); s.append(' ');
			break;
		case PathIterator.SEG_LINETO:
			s.append('L'); s.append(' ');
			s.append(svgRound(pts[0])); s.append(' ');
			s.append(svgRound(pts[1])); s.append(' ');
			break;
		case PathIterator.SEG_QUADTO:
			s.append('Q'); s.append(' ');
			s.append(svgRound(pts[0])); s.append(' ');
			s.append(svgRound(pts[1])); s.append(' ');
			s.append(svgRound(pts[2])); s.append(' ');
			s.append(svgRound(pts[3])); s.append(' ');
			break;
		case PathIterator.SEG_CUBICTO:
			s.append('C'); s.append(' ');
			s.append(svgRound(pts[0])); s.append(' ');
			s.append(svgRound(pts[1])); s.append(' ');
			s.append(svgRound(pts[2])); s.append(' ');
			s.append(svgRound(pts[3])); s.append(' ');
			s.append(svgRound(pts[4])); s.append(' ');
			s.append(svgRound(pts[5])); s.append(' ');
			break;
		case PathIterator.SEG_CLOSE:
			s.append('Z'); s.append(' ');
			break;
		}
	}
	return s.toString().trim();
}
 
开发者ID:kreativekorp,项目名称:vexillo,代码行数:38,代码来源:SVGExporter.java

示例5: addGeneralPath

private void addGeneralPath(GeneralPath path) {
        PathIterator itr = path.getPathIterator(null, 0.1);
        ArrayList<Point2D.Float> pathList = new ArrayList();
        Point2D.Float pathStart = null, lastPoint = null;
        boolean closed = false;
        while (!itr.isDone()) {
            float[] coords = new float[6];
            int segtype = itr.currentSegment(coords);
            switch (segtype) {
                case PathIterator.SEG_MOVETO:
                    pathStart = new Point2D.Float(coords[0], coords[1]); // save start point
                case PathIterator.SEG_LINETO:
                case PathIterator.SEG_QUADTO:
                case PathIterator.SEG_CUBICTO:
                    pathList.add((lastPoint = new Point2D.Float(coords[0], coords[1]))); // TODO store quads/cubes as well as linesSVG
                    break;
                case PathIterator.SEG_CLOSE:
                    closed = true;
//                            if (pathStart != null) {
//                                pathList.add(pathStart);
//                            }
                    break;
                default:
                    log.info("found other element " + segtype);
            }
            itr.next();
        }
        if (closed && lastPoint != null) {
            pathList.remove(lastPoint);
        }
        if (pathList.size() > longestPath) {
            ballPathSVG = pathList;
            longestPath = ballPathSVG.size();
        }
        pathsSVG.add(pathList);
    }
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:36,代码来源:LabyrinthMap.java

示例6: feedConsumer

/**
 * Utility method to feed a {@link PathConsumer2D} object from a
 * given {@link PathIterator}.
 * This method deals with the details of running the iterator and
 * feeding the consumer a segment at a time.
 */
public static void feedConsumer(PathIterator pi, PathConsumer2D consumer) {
    float coords[] = new float[6];
    while (!pi.isDone()) {
        switch (pi.currentSegment(coords)) {
        case PathIterator.SEG_MOVETO:
            consumer.moveTo(coords[0], coords[1]);
            break;
        case PathIterator.SEG_LINETO:
            consumer.lineTo(coords[0], coords[1]);
            break;
        case PathIterator.SEG_QUADTO:
            consumer.quadTo(coords[0], coords[1],
                            coords[2], coords[3]);
            break;
        case PathIterator.SEG_CUBICTO:
            consumer.curveTo(coords[0], coords[1],
                             coords[2], coords[3],
                             coords[4], coords[5]);
            break;
        case PathIterator.SEG_CLOSE:
            consumer.closePath();
            break;
        }
        pi.next();
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:RenderingEngine.java

示例7: drawShape

/** Draws a shape. */
public OurPDFWriter drawShape(Shape shape, boolean fillOrNot) {
   if (shape instanceof Polygon) {
      Polygon obj = (Polygon)shape;
      for(int i = 0; i < obj.npoints; i++) buf.writes(obj.xpoints[i]).writes(obj.ypoints[i]).write(i==0 ? "m\n" : "l\n");
      buf.write("h\n");
   } else {
      double moveX = 0, moveY = 0, nowX = 0, nowY = 0, pt[] = new double[6];
      for(PathIterator it = shape.getPathIterator(null); !it.isDone(); it.next()) switch(it.currentSegment(pt)) {
         case PathIterator.SEG_MOVETO:
            nowX = moveX = pt[0]; nowY = moveY = pt[1]; buf.writes(nowX).writes(nowY).write("m\n"); break;
         case PathIterator.SEG_CLOSE:
            nowX = moveX; nowY = moveY; buf.write("h\n"); break;
         case PathIterator.SEG_LINETO:
            nowX = pt[0]; nowY = pt[1]; buf.writes(nowX).writes(nowY).write("l\n"); break;
         case PathIterator.SEG_CUBICTO:
            nowX = pt[4]; nowY = pt[5];
            buf.writes(pt[0]).writes(pt[1]).writes(pt[2]).writes(pt[3]).writes(nowX).writes(nowY).write("c\n"); break;
         case PathIterator.SEG_QUADTO: // Convert quadratic bezier into cubic bezier using de Casteljau algorithm
            double px = nowX + (pt[0] - nowX)*(2.0/3.0), qx = px + (pt[2] - nowX)/3.0;
            double py = nowY + (pt[1] - nowY)*(2.0/3.0), qy = py + (pt[3] - nowY)/3.0;
            nowX = pt[2]; nowY = pt[3];
            buf.writes(px).writes(py).writes(qx).writes(qy).writes(nowX).writes(nowY).write("c\n"); break;
      }
   }
   buf.write(fillOrNot ? "f\n" : "S\n");
   return this;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:28,代码来源:OurPDFWriter.java

示例8: convertToPSPath

/**
* Given a Java2D {@code PathIterator} instance,
* this method translates that into a PostScript path..
*/
void convertToPSPath(PathIterator pathIter) {

    float[] segment = new float[6];
    int segmentType;

    /* Map the PathIterator's fill rule into the PostScript
     * fill rule.
     */
    int fillRule;
    if (pathIter.getWindingRule() == PathIterator.WIND_EVEN_ODD) {
        fillRule = FILL_EVEN_ODD;
    } else {
        fillRule = FILL_WINDING;
    }

    beginPath();

    setFillMode(fillRule);

    while (pathIter.isDone() == false) {
        segmentType = pathIter.currentSegment(segment);

        switch (segmentType) {
         case PathIterator.SEG_MOVETO:
            moveTo(segment[0], segment[1]);
            break;

         case PathIterator.SEG_LINETO:
            lineTo(segment[0], segment[1]);
            break;

        /* Convert the quad path to a bezier.
         */
         case PathIterator.SEG_QUADTO:
            float lastX = getPenX();
            float lastY = getPenY();
            float c1x = lastX + (segment[0] - lastX) * 2 / 3;
            float c1y = lastY + (segment[1] - lastY) * 2 / 3;
            float c2x = segment[2] - (segment[2] - segment[0]) * 2/ 3;
            float c2y = segment[3] - (segment[3] - segment[1]) * 2/ 3;
            bezierTo(c1x, c1y,
                     c2x, c2y,
                     segment[2], segment[3]);
            break;

         case PathIterator.SEG_CUBICTO:
            bezierTo(segment[0], segment[1],
                     segment[2], segment[3],
                     segment[4], segment[5]);
            break;

         case PathIterator.SEG_CLOSE:
            closeSubpath();
            break;
        }


        pathIter.next();
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:64,代码来源:PSPrinterJob.java

示例9: drawShape

/** Draws a shape. */
public OurPDFWriter drawShape(Shape shape, boolean fillOrNot) {
	if (shape instanceof Polygon) {
		Polygon obj = (Polygon) shape;
		for (int i = 0; i < obj.npoints; i++)
			buf.writes(obj.xpoints[i]).writes(obj.ypoints[i]).write(i == 0 ? "m\n" : "l\n");
		buf.write("h\n");
	} else {
		double moveX = 0, moveY = 0, nowX = 0, nowY = 0, pt[] = new double[6];
		for (PathIterator it = shape.getPathIterator(null); !it.isDone(); it.next())
			switch (it.currentSegment(pt)) {
				case PathIterator.SEG_MOVETO :
					nowX = moveX = pt[0];
					nowY = moveY = pt[1];
					buf.writes(nowX).writes(nowY).write("m\n");
					break;
				case PathIterator.SEG_CLOSE :
					nowX = moveX;
					nowY = moveY;
					buf.write("h\n");
					break;
				case PathIterator.SEG_LINETO :
					nowX = pt[0];
					nowY = pt[1];
					buf.writes(nowX).writes(nowY).write("l\n");
					break;
				case PathIterator.SEG_CUBICTO :
					nowX = pt[4];
					nowY = pt[5];
					buf.writes(pt[0]).writes(pt[1]).writes(pt[2]).writes(pt[3]).writes(nowX).writes(nowY).write(
							"c\n");
					break;
				case PathIterator.SEG_QUADTO : // Convert quadratic bezier
												// into cubic bezier using
												// de Casteljau algorithm
					double px = nowX + (pt[0] - nowX) * (2.0 / 3.0), qx = px + (pt[2] - nowX) / 3.0;
					double py = nowY + (pt[1] - nowY) * (2.0 / 3.0), qy = py + (pt[3] - nowY) / 3.0;
					nowX = pt[2];
					nowY = pt[3];
					buf.writes(px).writes(py).writes(qx).writes(qy).writes(nowX).writes(nowY).write("c\n");
					break;
			}
	}
	buf.write(fillOrNot ? "f\n" : "S\n");
	return this;
}
 
开发者ID:AlloyTools,项目名称:org.alloytools.alloy,代码行数:46,代码来源:OurPDFWriter.java

示例10: currentSegment

public int currentSegment(float[] coords) {
    int type = src.currentSegment(coords);

    int lastCoord;
    switch(type) {
    case PathIterator.SEG_CUBICTO:
        lastCoord = 4;
        break;
    case PathIterator.SEG_QUADTO:
        lastCoord = 2;
        break;
    case PathIterator.SEG_LINETO:
    case PathIterator.SEG_MOVETO:
        lastCoord = 0;
        break;
    case PathIterator.SEG_CLOSE:
        // we don't want to deal with this case later. We just exit now
        curx_adjust = movx_adjust;
        cury_adjust = movy_adjust;
        return type;
    default:
        throw new InternalError("Unrecognized curve type");
    }

    // normalize endpoint
    float x_adjust = (float)Math.floor(coords[lastCoord] + lval) +
                 rval - coords[lastCoord];
    float y_adjust = (float)Math.floor(coords[lastCoord+1] + lval) +
                 rval - coords[lastCoord + 1];

    coords[lastCoord    ] += x_adjust;
    coords[lastCoord + 1] += y_adjust;

    // now that the end points are done, normalize the control points
    switch(type) {
    case PathIterator.SEG_CUBICTO:
        coords[0] += curx_adjust;
        coords[1] += cury_adjust;
        coords[2] += x_adjust;
        coords[3] += y_adjust;
        break;
    case PathIterator.SEG_QUADTO:
        coords[0] += (curx_adjust + x_adjust) / 2;
        coords[1] += (cury_adjust + y_adjust) / 2;
        break;
    case PathIterator.SEG_LINETO:
        break;
    case PathIterator.SEG_MOVETO:
        movx_adjust = x_adjust;
        movy_adjust = y_adjust;
        break;
    case PathIterator.SEG_CLOSE:
        throw new InternalError("This should be handled earlier.");
    }
    curx_adjust = x_adjust;
    cury_adjust = y_adjust;
    return type;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:58,代码来源:PiscesRenderingEngine.java

示例11: feedConsumer

private void feedConsumer(PathConsumer consumer, PathIterator pi) {
    try {
        consumer.beginPath();
        boolean pathClosed = false;
        float mx = 0.0f;
        float my = 0.0f;
        float point[]  = new float[6];

        while (!pi.isDone()) {
            int type = pi.currentSegment(point);
            if (pathClosed == true) {
                pathClosed = false;
                if (type != PathIterator.SEG_MOVETO) {
                    // Force current point back to last moveto point
                    consumer.beginSubpath(mx, my);
                }
            }
            switch (type) {
            case PathIterator.SEG_MOVETO:
                mx = point[0];
                my = point[1];
                consumer.beginSubpath(point[0], point[1]);
                break;
            case PathIterator.SEG_LINETO:
                consumer.appendLine(point[0], point[1]);
                break;
            case PathIterator.SEG_QUADTO:
                consumer.appendQuadratic(point[0], point[1],
                                         point[2], point[3]);
                break;
            case PathIterator.SEG_CUBICTO:
                consumer.appendCubic(point[0], point[1],
                                     point[2], point[3],
                                     point[4], point[5]);
                break;
            case PathIterator.SEG_CLOSE:
                consumer.closedSubpath();
                pathClosed = true;
                break;
            }
            pi.next();
        }

        consumer.endPath();
    } catch (PathException e) {
        throw new InternalError("Unable to Stroke shape ("+
                                e.getMessage()+")", e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:49,代码来源:DuctusRenderingEngine.java

示例12: currentSegment

@Override
public final int currentSegment(final float[] coords) {
    int lastCoord;
    final int type = src.currentSegment(coords);

    switch(type) {
        case PathIterator.SEG_MOVETO:
        case PathIterator.SEG_LINETO:
            lastCoord = 0;
            break;
        case PathIterator.SEG_QUADTO:
            lastCoord = 2;
            break;
        case PathIterator.SEG_CUBICTO:
            lastCoord = 4;
            break;
        case PathIterator.SEG_CLOSE:
            // we don't want to deal with this case later. We just exit now
            curx_adjust = movx_adjust;
            cury_adjust = movy_adjust;
            return type;
        default:
            throw new InternalError("Unrecognized curve type");
    }

    // normalize endpoint
    float coord, x_adjust, y_adjust;

    coord = coords[lastCoord];
    x_adjust = normCoord(coord); // new coord
    coords[lastCoord] = x_adjust;
    x_adjust -= coord;

    coord = coords[lastCoord + 1];
    y_adjust = normCoord(coord); // new coord
    coords[lastCoord + 1] = y_adjust;
    y_adjust -= coord;

    // now that the end points are done, normalize the control points
    switch(type) {
        case PathIterator.SEG_MOVETO:
            movx_adjust = x_adjust;
            movy_adjust = y_adjust;
            break;
        case PathIterator.SEG_LINETO:
            break;
        case PathIterator.SEG_QUADTO:
            coords[0] += (curx_adjust + x_adjust) / 2.0f;
            coords[1] += (cury_adjust + y_adjust) / 2.0f;
            break;
        case PathIterator.SEG_CUBICTO:
            coords[0] += curx_adjust;
            coords[1] += cury_adjust;
            coords[2] += x_adjust;
            coords[3] += y_adjust;
            break;
        case PathIterator.SEG_CLOSE:
            // handled earlier
        default:
    }
    curx_adjust = x_adjust;
    cury_adjust = y_adjust;
    return type;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:64,代码来源:MarlinRenderingEngine.java

示例13: append

/**
 * Delegates to the enclosed <code>GeneralPath</code>.
 */
public void append(ExtendedPathIterator epi, boolean connect)
{
	float[] vals = new float[7];
	while (!epi.isDone())
	{
		Arrays.fill(vals, 0);
		int type = epi.currentSegment(vals);
		epi.next();
		if (connect && (numVals != 0))
		{
			if (type == PathIterator.SEG_MOVETO)
			{
				float x = vals[0];
				float y = vals[1];
				if ((x != cx) || (y != cy))
				{
					// Change MOVETO to LINETO.
					type = PathIterator.SEG_LINETO;
				}
				else
				{
					// Redundant segment (move to current loc) drop it...
					if (epi.isDone())
						break; // Nothing interesting
					type = epi.currentSegment(vals);
					epi.next();
				}
			}
			connect = false;
		}

		switch (type)
		{
			case PathIterator.SEG_CLOSE:
				closePath();
				break;
			case PathIterator.SEG_MOVETO:
				moveTo(vals[0], vals[1]);
				break;
			case PathIterator.SEG_LINETO:
				lineTo(vals[0], vals[1]);
				break;
			case PathIterator.SEG_QUADTO:
				quadTo(vals[0], vals[1], vals[2], vals[3]);
				break;
			case PathIterator.SEG_CUBICTO:
				curveTo(vals[0], vals[1], vals[2], vals[3], vals[4],
						vals[5]);
				break;
			case ExtendedPathIterator.SEG_ARCTO:
				arcTo(vals[0], vals[1], vals[2], (vals[3] != 0),
						(vals[4] != 0), vals[5], vals[6]);
				break;
		}
	}
}
 
开发者ID:GDSRS,项目名称:TrabalhoFinalEDA2,代码行数:59,代码来源:ExtendedGeneralPath.java

示例14: convertToPSPath

/**
* Given a Java2D <code>PathIterator</code> instance,
* this method translates that into a PostScript path..
*/
void convertToPSPath(PathIterator pathIter) {

    float[] segment = new float[6];
    int segmentType;

    /* Map the PathIterator's fill rule into the PostScript
     * fill rule.
     */
    int fillRule;
    if (pathIter.getWindingRule() == PathIterator.WIND_EVEN_ODD) {
        fillRule = FILL_EVEN_ODD;
    } else {
        fillRule = FILL_WINDING;
    }

    beginPath();

    setFillMode(fillRule);

    while (pathIter.isDone() == false) {
        segmentType = pathIter.currentSegment(segment);

        switch (segmentType) {
         case PathIterator.SEG_MOVETO:
            moveTo(segment[0], segment[1]);
            break;

         case PathIterator.SEG_LINETO:
            lineTo(segment[0], segment[1]);
            break;

        /* Convert the quad path to a bezier.
         */
         case PathIterator.SEG_QUADTO:
            float lastX = getPenX();
            float lastY = getPenY();
            float c1x = lastX + (segment[0] - lastX) * 2 / 3;
            float c1y = lastY + (segment[1] - lastY) * 2 / 3;
            float c2x = segment[2] - (segment[2] - segment[0]) * 2/ 3;
            float c2y = segment[3] - (segment[3] - segment[1]) * 2/ 3;
            bezierTo(c1x, c1y,
                     c2x, c2y,
                     segment[2], segment[3]);
            break;

         case PathIterator.SEG_CUBICTO:
            bezierTo(segment[0], segment[1],
                     segment[2], segment[3],
                     segment[4], segment[5]);
            break;

         case PathIterator.SEG_CLOSE:
            closeSubpath();
            break;
        }


        pathIter.next();
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:64,代码来源:PSPrinterJob.java

示例15: convertToWPath

/**
 * Given a Java2D <code>PathIterator</code> instance,
 * this method translates that into a Window's path
 * in the printer device context.
 */
private void convertToWPath(PathIterator pathIter) {

    float[] segment = new float[6];
    int segmentType;

    WPrinterJob wPrinterJob = (WPrinterJob) getPrinterJob();

    /* Map the PathIterator's fill rule into the Window's
     * polygon fill rule.
     */
    int polyFillRule;
    if (pathIter.getWindingRule() == PathIterator.WIND_EVEN_ODD) {
        polyFillRule = WPrinterJob.POLYFILL_ALTERNATE;
    } else {
        polyFillRule = WPrinterJob.POLYFILL_WINDING;
    }
    wPrinterJob.setPolyFillMode(polyFillRule);

    wPrinterJob.beginPath();

    while (pathIter.isDone() == false) {
        segmentType = pathIter.currentSegment(segment);

        switch (segmentType) {
         case PathIterator.SEG_MOVETO:
            wPrinterJob.moveTo(segment[0], segment[1]);
            break;

         case PathIterator.SEG_LINETO:
            wPrinterJob.lineTo(segment[0], segment[1]);
            break;

        /* Convert the quad path to a bezier.
         */
         case PathIterator.SEG_QUADTO:
            int lastX = wPrinterJob.getPenX();
            int lastY = wPrinterJob.getPenY();
            float c1x = lastX + (segment[0] - lastX) * 2 / 3;
            float c1y = lastY + (segment[1] - lastY) * 2 / 3;
            float c2x = segment[2] - (segment[2] - segment[0]) * 2/ 3;
            float c2y = segment[3] - (segment[3] - segment[1]) * 2/ 3;
            wPrinterJob.polyBezierTo(c1x, c1y,
                                     c2x, c2y,
                                     segment[2], segment[3]);
            break;

         case PathIterator.SEG_CUBICTO:
            wPrinterJob.polyBezierTo(segment[0], segment[1],
                                     segment[2], segment[3],
                                     segment[4], segment[5]);
            break;

         case PathIterator.SEG_CLOSE:
            wPrinterJob.closeFigure();
            break;
        }


        pathIter.next();
    }

    wPrinterJob.endPath();

}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:69,代码来源:WPathGraphics.java


注:本文中的java.awt.geom.PathIterator.SEG_CUBICTO属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。