@Test public void polyPointCheckerTest() { PdfDocument doc = new PdfDocument(new PdfWriter(new ByteArrayOutputStream())); doc.addNewPage(); ISvgNodeRenderer root = new PolylineSvgNodeRenderer(); Map<String, String> polyLineAttributes = new HashMap<>(); polyLineAttributes.put(SvgConstants.Attributes.POINTS, "0,0 100,100 200,200 300,300"); root.setAttributesAndStyles(polyLineAttributes); SvgDrawContext context = new SvgDrawContext(null, null); PdfCanvas cv = new PdfCanvas(doc, 1); context.pushCanvas(cv); root.draw(context); List<Point> expectedPoints = new ArrayList<>(); expectedPoints.add(new Point(0, 0)); expectedPoints.add(new Point(75, 75)); expectedPoints.add(new Point(150, 150)); expectedPoints.add(new Point(225, 225)); List<Point> attributePoints = ((PolylineSvgNodeRenderer) root).getPoints(); Assert.assertEquals(expectedPoints.size(), attributePoints.size()); for (int x = 0; x < attributePoints.size(); x++) { Assert.assertEquals(expectedPoints.get(x), attributePoints.get(x)); } }
protected List<Point> getPoints() { return this.points; }
PolylineSvgNodeRenderer extends AbstractSvgNodeRenderer implements IMarkerCapable { protected List<Point> getPoints() { return this.points; } }
PolylineSvgNodeRenderer extends AbstractSvgNodeRenderer implements IMarkerCapable { protected List<Point> getPoints() { return this.points; }  }
PolylineSvgNodeRenderer extends AbstractSvgNodeRenderer implements IMarkerCapable { protected List<Point> getPoints() { return this.points; }  @Override ISvgNodeRenderer createDeepCopy(); @Override void drawMarker(SvgDrawContext context, final MarkerVertexType markerVertexType); @Override double getAutoOrientAngle(MarkerSvgNodeRenderer marker, boolean reverse); }
PolylineSvgNodeRenderer extends AbstractSvgNodeRenderer implements IMarkerCapable { protected List<Point> getPoints() { return this.points; }  @Override ISvgNodeRenderer createDeepCopy(); @Override void drawMarker(SvgDrawContext context, final MarkerVertexType markerVertexType); @Override double getAutoOrientAngle(MarkerSvgNodeRenderer marker, boolean reverse);  }