summaryrefslogtreecommitdiffstats
path: root/src/bltGraph.C
diff options
context:
space:
mode:
authorjoye <joye>2014-04-18 17:56:52 (GMT)
committerjoye <joye>2014-04-18 17:56:52 (GMT)
commite99f62660663d130a8358ec69c3fda614512fd74 (patch)
tree010ca11e365b7d5effb0e745ded66ca02b7c6d33 /src/bltGraph.C
parenta42c9243c09c908e0fdbe8eef5784b2fc5e22b39 (diff)
downloadblt-e99f62660663d130a8358ec69c3fda614512fd74.zip
blt-e99f62660663d130a8358ec69c3fda614512fd74.tar.gz
blt-e99f62660663d130a8358ec69c3fda614512fd74.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGraph.C')
-rw-r--r--src/bltGraph.C32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 840884a..366e1e6 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -1433,6 +1433,38 @@ void Graph::adjustAxes()
}
}
+Point2d Graph::map2D(double x, double y, Axis2d* axesPtr)
+{
+ GraphOptions* ops = (GraphOptions*)ops_;
+
+ Point2d point;
+ if (ops->inverted) {
+ point.x = axesPtr->y->hMap(y);
+ point.y = axesPtr->x->vMap(x);
+ }
+ else {
+ point.x = axesPtr->x->hMap(x);
+ point.y = axesPtr->y->vMap(y);
+ }
+ return point;
+}
+
+Point2d Graph::invMap2D(double x, double y, Axis2d* axesPtr)
+{
+ GraphOptions* ops = (GraphOptions*)ops_;
+
+ Point2d point;
+ if (ops->inverted) {
+ point.x = axesPtr->x->invVMap(y);
+ point.y = axesPtr->y->invHMap(x);
+ }
+ else {
+ point.x = axesPtr->x->invHMap(x);
+ point.y = axesPtr->y->invVMap(y);
+ }
+ return point;
+}
+
void Graph::resetAxes()
{
GraphOptions* gops = (GraphOptions*)ops_;