diff options
author | joye <joye> | 2014-04-17 16:40:55 (GMT) |
---|---|---|
committer | joye <joye> | 2014-04-17 16:40:55 (GMT) |
commit | b6a17c50c2b0722cec7c63876ac28f3f66e47293 (patch) | |
tree | 60d38de31ef86f1e121e9f4d80ebaa11e4cbe88c /src/bltGrAxisOp.C | |
parent | 01c8fc31a7589f12277f87d4d76a2a7e9e1f6a1a (diff) | |
download | blt-b6a17c50c2b0722cec7c63876ac28f3f66e47293.zip blt-b6a17c50c2b0722cec7c63876ac28f3f66e47293.tar.gz blt-b6a17c50c2b0722cec7c63876ac28f3f66e47293.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrAxisOp.C')
-rw-r--r-- | src/bltGrAxisOp.C | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/src/bltGrAxisOp.C b/src/bltGrAxisOp.C index 75adf84..2ff33f5 100644 --- a/src/bltGrAxisOp.C +++ b/src/bltGrAxisOp.C @@ -687,94 +687,6 @@ Point2d Blt_InvMap2D(Graph* graphPtr, double x, double y, Axis2d *axesPtr) return point; } -void Blt_DrawAxisLimits(Graph* graphPtr, Drawable drawable) -{ - Tcl_HashSearch cursor; - for (Tcl_HashEntry* hPtr=Tcl_FirstHashEntry(&graphPtr->axes_.table, &cursor); - hPtr; hPtr = Tcl_NextHashEntry(&cursor)) { - Axis *axisPtr = (Axis*)Tcl_GetHashValue(hPtr); - AxisOptions* ops = (AxisOptions*)axisPtr->ops(); - - if ((axisPtr->flags & DELETE_PENDING) || (!ops->limitsFormat)) - continue; - axisPtr->drawLimits(drawable); - } -} - -void Blt_AxisLimitsToPostScript(Graph* graphPtr, Blt_Ps ps) -{ - GraphOptions* gops = (GraphOptions*)graphPtr->ops_; - Tcl_HashEntry *hPtr; - Tcl_HashSearch cursor; - double vMin, hMin, vMax, hMax; - char string[200]; - -#define SPACING 8 - vMin = vMax = graphPtr->left_ + gops->xPad + 2; - hMin = hMax = graphPtr->bottom_ - gops->yPad - 2; /* Offsets */ - for (hPtr = Tcl_FirstHashEntry(&graphPtr->axes_.table, &cursor); - hPtr != NULL; hPtr = Tcl_NextHashEntry(&cursor)) { - const char *minFmt, *maxFmt; - unsigned int textWidth, textHeight; - - Axis *axisPtr = (Axis*)Tcl_GetHashValue(hPtr); - AxisOptions* ops = (AxisOptions*)axisPtr->ops(); - - if (axisPtr->flags & DELETE_PENDING) - continue; - - if (!ops->limitsFormat) - continue; - - minFmt = maxFmt = ops->limitsFormat; - if (*maxFmt != '\0') { - sprintf_s(string, 200, maxFmt, axisPtr->axisRange_.max); - Blt_GetTextExtents(ops->tickFont, 0, string, -1, &textWidth, - &textHeight); - if ((textWidth > 0) && (textHeight > 0)) { - if (axisPtr->classId() == CID_AXIS_X) { - ops->limitsTextStyle.angle = 90.0; - ops->limitsTextStyle.anchor = TK_ANCHOR_SE; - - Blt_Ps_DrawText(ps, string, &ops->limitsTextStyle, - (double)graphPtr->right_, hMax); - hMax -= (textWidth + SPACING); - } - else { - ops->limitsTextStyle.angle = 0.0; - ops->limitsTextStyle.anchor = TK_ANCHOR_NW; - - Blt_Ps_DrawText(ps, string, &ops->limitsTextStyle, - vMax, (double)graphPtr->top_); - vMax += (textWidth + SPACING); - } - } - } - if (*minFmt != '\0') { - sprintf_s(string, 200, minFmt, axisPtr->axisRange_.min); - Blt_GetTextExtents(ops->tickFont, 0, string, -1, &textWidth, - &textHeight); - if ((textWidth > 0) && (textHeight > 0)) { - ops->limitsTextStyle.anchor = TK_ANCHOR_SW; - if (axisPtr->classId() == CID_AXIS_X) { - ops->limitsTextStyle.angle = 90.0; - - Blt_Ps_DrawText(ps, string, &ops->limitsTextStyle, - (double)graphPtr->left_, hMin); - hMin -= (textWidth + SPACING); - } - else { - ops->limitsTextStyle.angle = 0.0; - - Blt_Ps_DrawText(ps, string, &ops->limitsTextStyle, - vMin, (double)graphPtr->bottom_); - vMin += (textWidth + SPACING); - } - } - } - } -} - void Blt_DrawGrids(Graph* graphPtr, Drawable drawable) { GraphOptions* gops = (GraphOptions*)graphPtr->ops_; |