public synchronized void put( String layerId, TextSymbolizer symbolizer, Feature feature, LiteShape2 shape, NumberRange<Double> scaleRange) { wrapped.put(layerId, symbolizer, feature, shape, scaleRange); }
public int currentSegment(double[] coords) { float[] fcoord = new float[2]; int retval = currentSegment(fcoord); coords[0] = fcoord[0]; coords[1] = fcoord[1]; return retval; }
@Test public void testExternalGraphicRectangleResized() throws Exception { Style style = RendererBaseTest.loadStyle(this, "externalGraphicRectImage.sld"); MetaBufferEstimator estimator = new MetaBufferEstimator(); style.accept(estimator); assertTrue(estimator.isEstimateAccurate()); // 32x64 image to size 16x32 should give the max. of width/height assertEquals(32, estimator.getBuffer()); }
@Test public void testDynamicSize() throws Exception { Style style = RendererBaseTest.loadStyle(this, "externalGraphicDynamicSize.sld"); MetaBufferEstimator estimator = new MetaBufferEstimator(); style.accept(estimator); assertFalse(estimator.isEstimateAccurate()); }
public void testLabelLineOrientation() throws Exception { Style style = RendererBaseTest.loadStyle(this, "textLineOrientation.sld"); DefaultMapContext mc = new DefaultMapContext(DefaultGeographicCRS.WGS84); mc.addLayer(fs, style); renderer.setContext(mc); RendererBaseTest.showRender("Lines with circl stroke", renderer, TIME, bounds); } }
public void paint( final Graphics2D graphics, final LiteShape2 shape, final Style2D style, final double scale) { paint(graphics, shape, style, scale, false); }
@Override public void featureRenderer(SimpleFeature feature) { count++; if (count > 10) { renderer.stopRendering(); } }
@Test public void testLabelSquareBordersPositiveOffset() throws Exception { PerpendicularOffsetVisitor visitor = new PerpendicularOffsetVisitor(10); checkRepeatedLabelsPolygonBorder( square, "repeatedLabelsAlongLine", "poly-perp-offset", visitor, 1700); }
/** * Builds a new renderable feature for the given layerId and set of lite feature type styles * * @param layerId * @param cloningRequired TODO * @return */ RenderableFeature createRenderableFeature(String layerId, boolean cloningRequired) { RenderableFeature rf = new RenderableFeature(layerId, cloningRequired); return rf; }
/** * Builds the blocking queue used to bridge between the data loading thread and the painting one * * @return */ protected BlockingQueue<RenderingRequest> getRequestsQueue() { return new RenderingBlockingQueue(10000); }
private void runSingleLayerTest(String styleName, int threshold) throws Exception { Style style = RendererBaseTest.loadStyle(this, styleName); runSingleLayerTest(styleName, threshold, style); }
@Override public void run() { TestImageFrame frame = new TestImageFrame(image, latch); frame.setVisible(true); } });
protected void evaluateWidth(Expression width) { int value = getPositiveValue(width); if (value < 0) { estimateAccurate = false; } else if (value > buffer) { buffer = value; } }
public void close() { if (iterator != null) { iterator.close(); iterator = null; currentFeature = null; currentKey = null; } }
public static BufferedImage renderImage( GTRenderer renderer, ReferencedEnvelope bounds, RenderListener listener) { int w = 300; int h = 300; return renderImage(renderer, bounds, listener, w, h); }
@Test public void testInlineContent() throws Exception { Style style = RendererBaseTest.loadStyle(this, "base64.sld"); MetaBufferEstimator estimator = new MetaBufferEstimator(); style.accept(estimator); assertTrue(estimator.isEstimateAccurate()); assertEquals(16, estimator.getBuffer()); }
@Test public void testLabelSquareBordersNegativeOffset() throws Exception { PerpendicularOffsetVisitor visitor = new PerpendicularOffsetVisitor(-10); checkRepeatedLabelsPolygonBorder( square, "repeatedLabelsAlongLine", "poly-perp-negative-offset", visitor, 1500); }