Support density and non-density pixels in raster style

This commit is contained in:
vshcherb 2013-09-13 00:47:54 +02:00
parent b10ad5e6b5
commit 90ca9db0f7

View file

@ -138,9 +138,9 @@ public class RenderingRuleProperty {
if(colon != -1) { if(colon != -1) {
int c = 0; int c = 0;
if(c > 0) { if(c > 0) {
c += Integer.parseInt(value.substring(0, c)); c += Integer.parseInt(value.substring(0, colon));
} }
c += Integer.parseInt(value.substring(c + 1)); c += Integer.parseInt(value.substring(colon + 1));
return c; return c;
} }
return Integer.parseInt(value); return Integer.parseInt(value);
@ -172,9 +172,9 @@ public class RenderingRuleProperty {
if(colon != -1) { if(colon != -1) {
float c = 0; float c = 0;
if(c > 0) { if(c > 0) {
c += Float.parseFloat(value.substring(0, c)); c += Float.parseFloat(value.substring(0, colon));
} }
c += Float.parseFloat(value.substring(c + 1)); c += Float.parseFloat(value.substring(colon + 1));
return c; return c;
} }
return Float.parseFloat(value); return Float.parseFloat(value);