[Schmitzm-commits] r175 - trunk/src/schmitzm/geotools/styling
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jul 1 12:06:27 CEST 2009
Author: alfonx
Date: 2009-07-01 12:06:26 +0200 (Wed, 01 Jul 2009)
New Revision: 175
Modified:
trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
* Corrected an NPE when creating a "simplyColoredStyle" for point features..
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-06-30 20:48:02 UTC (rev 174)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-07-01 10:06:26 UTC (rev 175)
@@ -1582,25 +1582,23 @@
style.addFeatureTypeStyle(STYLE_FACTORY.createFeatureTypeStyle());
Symbolizer[] symbolizers = new Symbolizer[0];
- final Expression redExpression = STYLE_BUILDER.colorExpression(color);
switch (geometryForm) {
case POINT:
- PointSymbolizer ps = STYLE_BUILDER.createPointSymbolizer();
- ps.getGraphic().getMarks()[0].getFill().setColor( redExpression);
+ PointSymbolizer ps = STYLE_BUILDER.createPointSymbolizer(STYLE_BUILDER.createGraphic(null, STYLE_BUILDER.createMark("circle"), null));
+ ps.getGraphic().getMarks()[0].setFill(STYLE_BUILDER.createFill(color, 0.5));
+ ps.getGraphic().getMarks()[0].setSize(STYLE_BUILDER.literalExpression(8.));
+ ps.getGraphic().setSize(STYLE_BUILDER.literalExpression(8.));
ps.getGraphic().getMarks()[0].setStroke(STYLE_BUILDER.createStroke(color2));
symbolizers = LangUtil.extendArray(symbolizers, ps);
break;
case POLYGON:
- PolygonSymbolizer polS = STYLE_BUILDER.createPolygonSymbolizer();
- polS.getFill().setColor( redExpression);
- polS.setStroke(STYLE_BUILDER.createStroke(color2));
+ PolygonSymbolizer polS = STYLE_BUILDER.createPolygonSymbolizer(STYLE_BUILDER.createStroke(color2), STYLE_BUILDER.createFill(color));
symbolizers = LangUtil.extendArray(symbolizers, polS);
case LINE:
- LineSymbolizer ls = STYLE_BUILDER.createLineSymbolizer();
- ls.getStroke().setColor(redExpression);
+ LineSymbolizer ls = STYLE_BUILDER.createLineSymbolizer(STYLE_BUILDER.createStroke(color));
symbolizers = LangUtil.extendArray(symbolizers, ls);
break;
More information about the Schmitzm-commits
mailing list