Mercurial > mxd2map
comparison src/java/de/intevation/mxd/writer/FillStyleWriter.java @ 101:461ee9193097
Write PATTERN to the style if a hatch symbol is used to fill a
polygon.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 08 Jun 2011 12:29:26 +0200 |
parents | 18e4f143896b |
children | 11d63bf00326 |
comparison
equal
deleted
inserted
replaced
100:bab3946a8bdc | 101:461ee9193097 |
---|---|
181 -4); | 181 -4); |
182 style.setOutlinecolor(outlineColor); | 182 style.setOutlinecolor(outlineColor); |
183 style.setOutlinewidth(Double.parseDouble( | 183 style.setOutlinewidth(Double.parseDouble( |
184 symbolElement.getAttribute("outline_size"))); | 184 symbolElement.getAttribute("outline_size"))); |
185 } | 185 } |
186 if(symbolElement.hasAttribute("linestyle")) { | |
187 String ls = symbolElement.getAttribute("linestyle"); | |
188 double[] vals; | |
189 if(ls.equals("dash")) { | |
190 style.setPatternlength(2); | |
191 vals = new double[] {2.0, 2.0}; | |
192 style.setPattern(vals); | |
193 } | |
194 else if(ls.equals("dot")) { | |
195 style.setPatternlength(2); | |
196 vals = new double[] {1.0, 2.0}; | |
197 style.setPattern(vals); | |
198 } | |
199 else if(ls.equals("dashdot")) { | |
200 style.setPatternlength(4); | |
201 vals = new double[] {2.0, 2.0, 1.0, 2.0}; | |
202 style.setPattern(vals); | |
203 } | |
204 else if (ls.equals("dashdotdot")) { | |
205 style.setPatternlength(6); | |
206 vals = new double[] {2.0, 2.0, 1.0, 2.0, 1.0, 2.0}; | |
207 style.setPattern(vals); | |
208 } | |
209 } | |
186 | 210 |
187 if(type.equals("marker")) { | 211 if(type.equals("marker")) { |
188 style.setSymbolByName(map, name); | 212 style.setSymbolByName(map, name); |
189 SymbolWriter sw = new SymbolWriter(this.map, this.cl); | 213 SymbolWriter sw = new SymbolWriter(this.map, this.cl); |
190 sw.write(symbolElement); | 214 sw.write(symbolElement); |