summaryrefslogtreecommitdiffstats
path: root/src/bltGraph.C
diff options
context:
space:
mode:
authorjoye <joye>2014-04-17 19:38:16 (GMT)
committerjoye <joye>2014-04-17 19:38:16 (GMT)
commitc0edde08a3ac9966828327b9af0f6326636d8047 (patch)
tree412f44f3833851a073c568a241a3005de5c69413 /src/bltGraph.C
parente3ff80289eb0252ad0597f11867c3eef59f28dc5 (diff)
downloadblt-c0edde08a3ac9966828327b9af0f6326636d8047.zip
blt-c0edde08a3ac9966828327b9af0f6326636d8047.tar.gz
blt-c0edde08a3ac9966828327b9af0f6326636d8047.tar.bz2
*** empty log message ***
Diffstat (limited to 'src/bltGraph.C')
-rw-r--r--src/bltGraph.C41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 3dc35c0..c36e7d0 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -62,8 +62,6 @@ extern void MarginsToPostScript(Graph* graphPtr, Blt_Ps ps);
static Blt_BindPickProc PickEntry;
-static void AdjustAxisPointers(Graph* graphPtr);
-
// OptionSpecs
static const char* barmodeObjOption[] =
@@ -319,7 +317,7 @@ Graph::Graph(ClientData clientData, Tcl_Interp* interp,
return;
}
- AdjustAxisPointers(this);
+ adjustAxes();
Tcl_SetStringObj(Tcl_GetObjResult(interp_), Tk_PathName(tkwin_), -1);
}
@@ -398,7 +396,7 @@ void Graph::configure()
// If the -inverted option changed, we need to readjust the pointers
// to the axes and recompute the their scales.
if (flags & RESET_AXES)
- AdjustAxisPointers(this);
+ adjustAxes();
// Free the pixmap if we're not buffering the display of elements anymore.
if ((!ops->backingStore) && (cache_ != None)) {
@@ -737,23 +735,6 @@ void Graph::eventuallyRedraw()
}
}
-static void AdjustAxisPointers(Graph* graphPtr)
-{
- GraphOptions* ops = (GraphOptions*)graphPtr->ops_;
- if (ops->inverted) {
- ops->leftMargin.axes = graphPtr->axisChain_[0];
- ops->bottomMargin.axes = graphPtr->axisChain_[1];
- ops->rightMargin.axes = graphPtr->axisChain_[2];
- ops->topMargin.axes = graphPtr->axisChain_[3];
- }
- else {
- ops->leftMargin.axes = graphPtr->axisChain_[1];
- ops->bottomMargin.axes = graphPtr->axisChain_[0];
- ops->rightMargin.axes = graphPtr->axisChain_[3];
- ops->topMargin.axes = graphPtr->axisChain_[2];
- }
-}
-
void Graph::extents(Region2d* regionPtr)
{
GraphOptions* ops = (GraphOptions*)ops_;
@@ -1174,6 +1155,24 @@ ClientData Graph::axisTag(const char *tagName)
return Tcl_GetHashKey(&axes_.tagTable, hPtr);
}
+void Graph::adjustAxes()
+{
+ GraphOptions* ops = (GraphOptions*)ops_;
+
+ if (ops->inverted) {
+ ops->leftMargin.axes = axisChain_[0];
+ ops->bottomMargin.axes = axisChain_[1];
+ ops->rightMargin.axes = axisChain_[2];
+ ops->topMargin.axes = axisChain_[3];
+ }
+ else {
+ ops->leftMargin.axes = axisChain_[1];
+ ops->bottomMargin.axes = axisChain_[0];
+ ops->rightMargin.axes = axisChain_[3];
+ ops->topMargin.axes = axisChain_[2];
+ }
+}
+
void Graph::resetAxes()
{
GraphOptions* gops = (GraphOptions*)ops_;