@Implementation protected void setFillType(Path.FillType fillType) { mFillType = fillType; mPath.setWindingRule(getWindingRule(fillType)); }
@Override public void setFillRule(FillRule fillRule) { this.path2D.setWindingRule(getWindingRule(fillRule)); } }
int pathSegmentType = pi.currentSegment(coords); int windingRule = pi.getWindingRule(); gp.setWindingRule(windingRule); if (pathSegmentType == PathIterator.SEG_MOVETO) { gp = new GeneralPath(); gp.setWindingRule(windingRule); gp.moveTo(coords[0], coords[1]); System.out.println(ii++ + " \t" + coords[0] + "," + coords[1]);
int pathSegmentType = pi.currentSegment(coords); int windingRule = pi.getWindingRule(); gp.setWindingRule(windingRule); if (pathSegmentType == PathIterator.SEG_MOVETO) { gp = new GeneralPath(); gp.setWindingRule(windingRule); gp.moveTo(coords[0], coords[1]); } else if (pathSegmentType == PathIterator.SEG_LINETO) {
@Override public void setFillRule(FillRule fillRule) { this.path2D.setWindingRule(getWindingRule(fillRule)); } }
@Implementation protected void setFillType(Path.FillType fillType) { mFillType = fillType; mPath.setWindingRule(getWindingRule(fillType)); }
/** * Draw this polygon to a {@link Path2D} instance. * * @param path2d the Path2d instance. */ public void drawTo(Path2D path2d) { for (PathElement pe : path) pe.drawTo(path2d); if (closed) path2d.closePath(); if (evenOdd) path2d.setWindingRule(Path2D.WIND_EVEN_ODD); }
@Override public void draw(HwmfGraphics ctx) { if (polyList.isEmpty()) { return; } int windingRule = getWindingRule(ctx); Area area = null; for (Path2D poly : polyList) { Path2D p = (Path2D)poly.clone(); p.setWindingRule(windingRule); Area newArea = new Area(p); if (area == null) { area = newArea; } else { area.exclusiveOr(newArea); } } ctx.fill(area); } }
@Override public void draw(HwmfGraphics ctx) { Path2D shape = getShape(); Path2D p = (Path2D)shape.clone(); p.setWindingRule(getWindingRule(ctx)); ctx.draw(p); } }
@Override public void draw(HwmfGraphics ctx) { Path2D shape = getShape(); // shape.closePath(); Path2D p = (Path2D)shape.clone(); p.setWindingRule(getWindingRule(ctx)); ctx.fill(p); }
arrow.setWindingRule(GeneralPath.WIND_EVEN_ODD); arrow.moveTo(0, 0); arrow.lineTo(0, -100);
clipPath.setWindingRule(Path2D.WIND_EVEN_ODD);
clipPath.setWindingRule(Path2D.WIND_EVEN_ODD);
int pathSegmentType = shapeSegment.getPathSegmentType(); int windingRule = shapeSegment.getWindingRule(); gp.setWindingRule(windingRule); if (pathSegmentType == PathIterator.SEG_MOVETO) { gp.moveTo(coords[0], coords[1]);
closed = pathSegmentType == PathIterator.SEG_CLOSE; int windingRule = pi.getWindingRule(); gp.setWindingRule(windingRule); if (pathSegmentType == PathIterator.SEG_MOVETO) { gp.moveTo(coords[0], coords[1]);