/** * Utility method for creating an ExtendedGeneralPath. * @param r The reader used to read the path specification. * @param wr The winding rule to use for creating the path. */ public static Shape createShape(Reader r, int wr) throws IOException, ParseException { PointsParser p = new PointsParser(); AWTPolygonProducer ph = new AWTPolygonProducer(); ph.setWindingRule(wr); p.setPointsHandler(ph); p.parse(r); return ph.getShape(); }
shapeNode.setShape(DEFAULT_SHAPE); } else { AWTPolygonProducer app = new AWTPolygonProducer(); app.setWindingRule(CSSUtilities.convertFillRule(e)); app.startPoints(); for (int i = 0; i < size; i++) { SVGPoint p = pl.getItem(i); app.point(p.getX(), p.getY()); app.endPoints(); shapeNode.setShape(app.getShape());
shapeNode.setShape(DEFAULT_SHAPE); } else { AWTPolygonProducer app = new AWTPolygonProducer(); app.setWindingRule(CSSUtilities.convertFillRule(e)); app.startPoints(); for (int i = 0; i < size; i++) { SVGPoint p = pl.getItem(i); app.point(p.getX(), p.getY()); app.endPoints(); shapeNode.setShape(app.getShape());
shapeNode.setShape(DEFAULT_SHAPE); } else { AWTPolygonProducer app = new AWTPolygonProducer(); app.setWindingRule(CSSUtilities.convertFillRule(e)); app.startPoints(); for (int i = 0; i < size; i++) { SVGPoint p = pl.getItem(i); app.point(p.getX(), p.getY()); app.endPoints(); shapeNode.setShape(app.getShape());
/** * Utility method for creating an ExtendedGeneralPath. * @param r The reader used to read the path specification. * @param wr The winding rule to use for creating the path. */ public static Shape createShape(Reader r, int wr) throws IOException, ParseException { PointsParser p = new PointsParser(); AWTPolygonProducer ph = new AWTPolygonProducer(); ph.setWindingRule(wr); p.setPointsHandler(ph); p.parse(r); return ph.getShape(); }
/** * Utility method for creating an ExtendedGeneralPath. * @param r The reader used to read the path specification. * @param wr The winding rule to use for creating the path. */ public static Shape createShape(Reader r, int wr) throws IOException, ParseException { PointsParser p = new PointsParser(); AWTPolygonProducer ph = new AWTPolygonProducer(); ph.setWindingRule(wr); p.setPointsHandler(ph); p.parse(r); return ph.getShape(); }