Style2D createDynamicPolygonStyle( SimpleFeature feature, PolygonSymbolizer symbolizer, Range scaleRange) { PolygonStyle2D style = new DynamicPolygonStyle2D(feature, symbolizer); setScaleRange(style, scaleRange); // setStroke(style, symbolizer.getStroke(), feature); // setFill(style, symbolizer.getFill(), feature); return style; }
private ReservedAreaCache buildReservedAreaCache(Geometry conflictBounds) { if (conflictBounds != null) { return new DefaultReservedAreaCache(conflictBounds); } else { return new NoOpReservedAreaCache(); } }
Style2D createDynamicLineStyle( SimpleFeature feature, LineSymbolizer symbolizer, Range scaleRange) { LineStyle2D style = new DynamicLineStyle2D(feature, symbolizer); setScaleRange(style, scaleRange); // setStroke(style, symbolizer.getStroke(), feature); return style; }
PolygonStyle2D createPolygonStyle( Object feature, PolygonSymbolizer symbolizer, Range scaleRange) { PolygonStyle2D style = new PolygonStyle2D(); setScaleRange(style, scaleRange); style.setStroke(getStroke(symbolizer.getStroke(), feature)); style.setGraphicStroke( getGraphicStroke(symbolizer, symbolizer.getStroke(), feature, scaleRange)); style.setContour(getStrokePaint(symbolizer.getStroke(), feature)); style.setContourComposite(getStrokeComposite(symbolizer.getStroke(), feature)); setPolygonStyleFill(feature, style, symbolizer, scaleRange); return style; }
/** * Returns the default, system wide font cache * * @deprecated Use {@link #getDefaultInstance()} instead */ public static FontCache getDefaultInsance() { return getDefaultInstance(); }
/** * Finds all implementations of {@link ExternalGraphicFactory} which have registered using the * services mechanism. * * @return An iterator over all registered ExternalGraphicFactory */ public static synchronized Iterator<ExternalGraphicFactory> getExternalGraphicFactories() { return getExternalGraphicFactories(null); }
/** * Returns a shape that can be used to draw the mark at the x, y coordinates with appropriated * rotation and size (according to the current style) * * @param x the x coordinate where the mark will be drawn * @param y the y coordinate where the mark will be drawn * @return a shape that can be used to draw the mark */ public Shape getTransformedShape(float x, float y) { return getTransformedShape(x, y, 0, rotation); }
public void testLookupMarkFactories() { List<MarkFactory> result = loadIterator(DynamicSymbolFactoryFinder.getMarkFactories()); assertTrue(result.size() >= 2); assertContainsClassInstance(result, WellKnownMarkFactory.class); assertContainsClassInstance(result, TTFMarkFactory.class); }
/** * Builds a CQL expression equivalent to the specified string, see class javadocs for rules on * how to build the expression in string form * * @param expression * @return */ public static Expression extractCqlExpressions(String expression) { return catenateExpressions(splitCqlExpressions(expression)); } }
public void testDoubleClose() { try { ExpressionExtractor.splitCqlExpressions("I'm a plain string ${bla}}"); fail("Double cql exp open, should have failed"); } catch (IllegalArgumentException e) { // fine } }
@Override protected void tearDown() throws Exception { sld.setVectorRenderingEnabled(false); MarkStyle2D.setMaxMarkSizeEnabled(false); }
private void checkAlphaComposite(Map<String, String> options) { if (options != null) { Composite composite = SLDStyleFactory.getComposite(options); if (composite instanceof AlphaComposite) { alphaComposite = true; } } } }
/** * Check that at least the well known png and jpeg formats are supported * * @throws Exception */ public void testFormats() throws Exception { assertTrue(image.getSupportedMimeTypes().contains("image/png")); assertTrue(image.getSupportedMimeTypes().contains("image/jpeg")); }
/** * Returns the default, system wide font cache * * @since 2.6 */ public static FontCache getDefaultInstance() { if (defaultInstance == null) { defaultInstance = new FontCache(); } return defaultInstance; }
public void setJava2DHints(RenderingHints hints) { this.java2dHints = hints; styleFactory.setRenderingHints(hints); }
@Override public void clearCache() { resetCache(); } }
@Override public void clear() { super.clear(); usingVolatileFunctions = false; }
public void testDoubleOpen() { try { ExpressionExtractor.splitCqlExpressions("I'm a plain string ${bla ${bla}"); fail("Double cql exp open, should have failed"); } catch (IllegalArgumentException e) { // fine } }
/** * Looks up the composite from the vendor options, or returns null if no composite operation has * been specified in the options * * @param options * @return */ public static Composite getComposite(Map<String, String> options) { return getComposite(options, 1f); }
public void testOpenLingering() { try { ExpressionExtractor.splitCqlExpressions("I'm a plain string ${bla"); fail("Double cql exp open, should have failed"); } catch (IllegalArgumentException e) { // fine } }