Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.java @ 6428:39aba54a4c15
issue1370: StyledSeriesBuilder: Added add function with translation and scale factors.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Jun 2013 12:38:54 +0200 |
parents | 450bf0017690 |
children | 126c76184c3e |
comparison
equal
deleted
inserted
replaced
6427:6d58f5a4c96a | 6428:39aba54a4c15 |
---|---|
212 for (int i = 0; i < size; i++) { | 212 for (int i = 0; i < size; i++) { |
213 series.add(wqkms.getQ(i), wqkms.getW(i), false); | 213 series.add(wqkms.getQ(i), wqkms.getW(i), false); |
214 } | 214 } |
215 } | 215 } |
216 | 216 |
217 /** | |
218 * Add points to series (q to 1st dim, w to 2nd dim), adding wTrans to the | |
219 * W values and scaling it with wScale. | |
220 * | |
221 * @param series Series to add points to. | |
222 * @param wqkms WQKms to add to series. | |
223 * @param wAdd Value to add to each Q while adding to series. | |
224 * @param wScale multiply with | |
225 */ | |
226 public static void addPointsQW(XYSeries series, WQKms wqkms, double wTrans, double wScale) { | |
227 if (wqkms == null) { | |
228 return; | |
229 } | |
230 | |
231 int size = wqkms.size(); | |
232 | |
233 for (int i = 0; i < size; i++) { | |
234 series.add(wqkms.getQ(i), wScale * (wqkms.getW(i) + wTrans), false); | |
235 } | |
236 } | |
217 | 237 |
218 /** | 238 /** |
219 * Add points to series (q to 1st dim, w to 2nd dim). | 239 * Add points to series (q to 1st dim, w to 2nd dim). |
220 * | 240 * |
221 * @param series Series to add points to. | 241 * @param series Series to add points to. |