comparison artifacts/src/main/java/org/dive4elements/river/themes/ThemeDocument.java @ 7820:6b880df95a3a

Fixed WSPLGEN classes. Allow 0 for 'to' in differences.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 19 Mar 2014 15:08:44 +0100
parents 4b67eb1a3a68
children e4606eae8ea5
comparison
equal deleted inserted replaced
7818:20053d86fa5e 7820:6b880df95a3a
657 String strEndColor = getValue(WSPLGEN_ENDCOLOR); 657 String strEndColor = getValue(WSPLGEN_ENDCOLOR);
658 Color endColor = strEndColor != null 658 Color endColor = strEndColor != null
659 ? parseColor(strEndColor) 659 ? parseColor(strEndColor)
660 : new Color(2, 27, 42); 660 : new Color(2, 27, 42);
661 661
662 to = to != 0 ? to : 9999; 662 to = to >= 0 ? to : 9999;
663 step = step != 0 ? step : to; 663 step = step != 0 ? step : to;
664 664
665 int numClasses = (int)((to - from) / step); 665 int numClasses = (int)((to - from) / step);
666 666
667 float rd = (endColor.getRed() - startColor.getRed()) / (float)numClasses; 667 float rd = (endColor.getRed() - startColor.getRed()) / (float)numClasses;

http://dive4elements.wald.intevation.org