[PATCH 4 of 7] issue1378: Prepare StyledSeriesBuilder to get double[][] values to translate
Wald Commits
scm-commit at wald.intevation.org
Wed Aug 21 11:03:04 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1377076245 -7200
# Node ID 32af7e5cb00fd43a363fdb765720065d902e6d43
# Parent 8a4e344b309adc646b349f7179d5281766fb65ba
issue1378: Prepare StyledSeriesBuilder to get double[][] values to translate.
diff -r 8a4e344b309a -r 32af7e5cb00f artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Tue Aug 20 15:05:07 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java Wed Aug 21 11:10:45 2013 +0200
@@ -304,6 +304,27 @@
* W values and scaling it with wScale.
*
* @param series Series to add points to.
+ * @param qws to add to series.
+ * @param wAdd Value to add to each Q while adding to series.
+ * @param wScale multiply with
+ */
+ public static void addPointsQW(XYSeries series, double[][] qws, double wTrans, double wScale) {
+ if (qws == null || qws.length == 0) {
+ return;
+ }
+
+ double x[] = qws[0];
+ double y[] = qws[1];
+
+ for (int i = 0; i < x.length; i++) {
+ series.add(x[i], wScale * (y[i] + wTrans), false);
+ }
+ }
+ /**
+ * Add points to series (q to 1st dim, w to 2nd dim), adding wTrans to the
+ * W values and scaling it with wScale.
+ *
+ * @param series Series to add points to.
* @param wqkms WQKms to add to series.
* @param wAdd Value to add to each Q while adding to series.
* @param wScale multiply with
More information about the Dive4elements-commits
mailing list