summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-04-11 16:42:14 (GMT)
committerjoye <joye>2014-04-11 16:42:14 (GMT)
commitfcc86a2d2288dcdfcf6138ee6d9941076e87aa82 (patch)
tree10612a5c5e99e8901c53703a640cf0feb870e119 /src
parentbbf3ce66d2bed48818d0ea0de7cb71c80eb3bae3 (diff)
downloadblt-fcc86a2d2288dcdfcf6138ee6d9941076e87aa82.zip
blt-fcc86a2d2288dcdfcf6138ee6d9941076e87aa82.tar.gz
blt-fcc86a2d2288dcdfcf6138ee6d9941076e87aa82.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrAxis.C30
-rw-r--r--src/bltGrAxisOp.C30
-rw-r--r--src/bltGrAxisOp.h4
-rw-r--r--src/bltGrElemBar.C1
-rw-r--r--src/bltGrElemLine.C1
-rw-r--r--src/bltGraph.h4
6 files changed, 36 insertions, 34 deletions
diff --git a/src/bltGrAxis.C b/src/bltGrAxis.C
index 4fe4105..8500d32 100644
--- a/src/bltGrAxis.C
+++ b/src/bltGrAxis.C
@@ -766,36 +766,6 @@ double Axis::vMap(double y)
// Support
-Point2d Blt_Map2D(Graph* graphPtr, double x, double y, Axis2d *axesPtr)
-{
- Point2d point;
-
- if (graphPtr->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 Blt_InvMap2D(Graph* graphPtr, double x, double y, Axis2d *axesPtr)
-{
- Point2d point;
-
- if (graphPtr->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 GetDataLimits(Axis *axisPtr, double min, double max)
{
if (axisPtr->valueRange_.min > min) {
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C
index 3a349e5..d53a6ed 100644
--- a/src/bltGrAxisOp.C
+++ b/src/bltGrAxisOp.C
@@ -903,3 +903,33 @@ void Blt_ResetAxes(Graph* graphPtr)
REDRAW_WORLD);
}
+Point2d Blt_Map2D(Graph* graphPtr, double x, double y, Axis2d *axesPtr)
+{
+ Point2d point;
+
+ if (graphPtr->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 Blt_InvMap2D(Graph* graphPtr, double x, double y, Axis2d *axesPtr)
+{
+ Point2d point;
+
+ if (graphPtr->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;
+}
+
diff --git a/src/bltGrAxisOp.h b/src/bltGrAxisOp.h
index d5ebf3c..63cc2d0 100644
--- a/src/bltGrAxisOp.h
+++ b/src/bltGrAxisOp.h
@@ -51,5 +51,9 @@ extern void Blt_GridsToPostScript(Graph* graphPtr, Blt_Ps ps);
extern Axis *Blt_GetFirstAxis(Blt_Chain chain);
extern Axis *Blt_NearestAxis(Graph* graphPtr, int x, int y);
+extern Point2d Blt_InvMap2D(Graph* graphPtr, double x, double y,
+ Axis2d *pairPtr);
+extern Point2d Blt_Map2D(Graph* graphPtr, double x, double y,
+ Axis2d *pairPtr);
#endif
diff --git a/src/bltGrElemBar.C b/src/bltGrElemBar.C
index 6ba73ac..20e7a7d 100644
--- a/src/bltGrElemBar.C
+++ b/src/bltGrElemBar.C
@@ -33,6 +33,7 @@
#include "bltGrElemOption.h"
#include "bltGrPenOp.h"
#include "bltGrAxis.h"
+#include "bltGrAxisOp.h"
#define CLAMP(x,l,h) ((x) = (((x)<(l))? (l) : ((x)>(h)) ? (h) : (x)))
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index 62ea9ce..770ede5 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -37,6 +37,7 @@ extern "C" {
#include "bltGrElemOption.h"
#include "bltGrPenOp.h"
#include "bltGrAxis.h"
+#include "bltGrAxisOp.h"
#define SEARCH_X 0
#define SEARCH_Y 1
diff --git a/src/bltGraph.h b/src/bltGraph.h
index 34e02b1..0c4ea73 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -411,10 +411,6 @@ extern MakeTagProc Blt_MakeAxisTag;
extern Blt_BindTagProc Blt_GraphTags;
extern Blt_BindTagProc Blt_AxisTags;
-extern Point2d Blt_InvMap2D(Graph* graphPtr, double x, double y,
- Axis2d *pairPtr);
-extern Point2d Blt_Map2D(Graph* graphPtr, double x, double y,
- Axis2d *pairPtr);
extern Graph *Blt_GetGraphFromWindowData(Tk_Window tkwin);
extern int Blt_PolyRectClip(Region2d *extsPtr, Point2d *inputPts,
int nInputPts, Point2d *outputPts);