[Kst] extragear/graphics/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Tue Jun 7 21:45:27 CEST 2005
SVN commit 423191 by rchern:
Reverse plotting of images, curves, and data markers
M +40 -0 kst2dplot.cpp
--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #423190:423191
@@ -2619,7 +2619,23 @@
bt_label[i_bt] = "Plot Labels";
bt[i_bt++] = bench_time.elapsed();
#endif
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
+ if (_yReversed) {
+ p.scale(1,-1);
+ p.translate(0, d2i(-1 * Hy - Ly));
+ }
plotImages(p, Lx, Hx, Ly, Hy, m_X, m_Y, b_X, b_Y, x_max, y_max, x_min, y_min);
+ if (_yReversed) {
+ p.scale(1,-1);
+ p.translate(0, d2i(-1 * Hy - Ly));
+ }
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
#ifdef BENCHMARK
bt_label[i_bt] = "Plot Images";
bt[i_bt++] = bench_time.elapsed();
@@ -2644,7 +2660,23 @@
#endif
}
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
+ if (_yReversed) {
+ p.scale(1,-1);
+ p.translate(0, d2i(-1 * Hy - Ly));
+ }
plotCurves(p, Lx, Hx, Ly, Hy, m_X, m_Y, b_X, b_Y, penWidth);
+ if (_yReversed) {
+ p.scale(1,-1);
+ p.translate(0, d2i(-1 * Hy - Ly));
+ }
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
#ifdef BENCHMARK
bt_label[i_bt] = "Plot Curves";
bt[i_bt++] = bench_time.elapsed();
@@ -2658,7 +2690,15 @@
bt_label[i_bt] = "plot Axes";
bt[i_bt++] = bench_time.elapsed();
#endif
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
plotPlotMarkers(p, m_X, b_X, x_max, x_min, y_px, ytop_bdr_px, ybot_bdr_px);
+ if (_xReversed) {
+ p.scale(-1,1);
+ p.translate(d2i(-1 * Hx - Lx), 0);
+ }
#ifdef BENCHMARK
bt_label[i_bt] = "plot Markers";
bt[i_bt++] = bench_time.elapsed();
More information about the Kst
mailing list