private void runSingleLayerTest(String styleName) throws Exception { runSingleLayerTest(styleName, 100); }
@Test public void testWktComposite() throws Exception { testParametricMark( "wktcomposite", "wkt://MULTILINESTRING((-0.5 -0.5, 0.5 0.5), (0 -0.5, 0 0.5))"); }
private void runSingleLayerTest(String styleName, int threshold) throws Exception { Style style = RendererBaseTest.loadStyle(this, styleName); runSingleLayerTest(styleName, threshold, style); }
@Test public void testHorLine() throws Exception { testParametricMark("horline", "shape://horline"); }
@Test public void testSlash() throws Exception { runSingleLayerTest("fillSlash.sld"); }
@Test public void testPlus() throws Exception { testParametricMark("plus", "shape://plus"); }
@Test public void testMarkFillRotated() throws Exception { runSingleLayerTest("fillMarkRotated.sld"); }
@Test public void testVertLine() throws Exception { testParametricMark("vertline", "shape://vertline"); }
@Test public void testImageFill() throws Exception { runSingleLayerTest("fillImage.sld"); }
@Test public void testBackslash() throws Exception { testParametricMark("backslash", "shape://backslash"); }
@Test public void testCrossFill() throws Exception { runSingleLayerTest("fillCross.sld", 300); }
@Test public void testTimes() throws Exception { testParametricMark("times", "shape://times"); }
@Test public void testTriangleFill() throws Exception { runSingleLayerTest("fillTriangle.sld", 250); }
@Test public void testWktShortSlash() throws Exception { testParametricMark("shortslash", "wkt://LINESTRING(-0.5 0, 0.5 0.5)"); }
@Test public void testCircleFill() throws Exception { runSingleLayerTest("fillCircle.sld"); }
@Test public void testWktShortBackslash() throws Exception { testParametricMark("shortbackslash", "wkt://LINESTRING(-0.5 0.5, 0.5 0)"); }
@Test public void testFontFill() throws Exception { runSingleLayerTest("fillTTFDecorative.sld"); }
public void testParametricMark(String fileName, final String markName) throws Exception { Style slashStyle = RendererBaseTest.loadStyle(this, "fillSlash.sld"); final DuplicatingStyleVisitor markReplacer = new DuplicatingStyleVisitor() { @Override public void visit(Mark mark) { super.visit(mark); Mark copy = (Mark) pages.peek(); copy.setWellKnownName(ff.literal(markName)); } }; slashStyle.accept(markReplacer); Style style = (Style) markReplacer.getCopy(); runSingleLayerTest(fileName, 100, style); } }