diff options
author | joye <joye> | 2014-09-26 16:58:41 (GMT) |
---|---|---|
committer | joye <joye> | 2014-09-26 16:58:41 (GMT) |
commit | 13a99fe8a7c3d97b911931e04e08bc32fddf2e44 (patch) | |
tree | d97e9a5589cf25b0fc75fdb22c271aab9b069161 /src | |
parent | 3fee4b82108b39335b300a3e86b097d72505f555 (diff) | |
download | blt-13a99fe8a7c3d97b911931e04e08bc32fddf2e44.zip blt-13a99fe8a7c3d97b911931e04e08bc32fddf2e44.tar.gz blt-13a99fe8a7c3d97b911931e04e08bc32fddf2e44.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrPSOutput.C | 7 | ||||
-rw-r--r-- | src/bltGrPSOutput.h | 2 | ||||
-rw-r--r-- | src/bltGraph.C | 10 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index 0800ba5..0a44aa1 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -88,11 +88,16 @@ void PSOutput::printSegments(Segment2d* segments, int nSegments) } } -void PSOutput::computeBBox(int width, int height, float pica) +void PSOutput::computeBBox(int width, int height) { Postscript* setupPtr = graphPtr_->postscript_; PostscriptOptions* pops = (PostscriptOptions*)setupPtr->ops_; + // scale from points to pica + float pica = 25.4 / 72 * + WidthOfScreen(Tk_Screen(graphPtr_->tkwin_)) / + WidthMMOfScreen(Tk_Screen(graphPtr_->tkwin_)); + int hBorder = 2*pops->xPad/pica; int vBorder = 2*pops->yPad/pica; int hSize = !pops->landscape ? width : height; diff --git a/src/bltGrPSOutput.h b/src/bltGrPSOutput.h index f769a62..c54e771 100644 --- a/src/bltGrPSOutput.h +++ b/src/bltGrPSOutput.h @@ -79,7 +79,7 @@ namespace Blt { void setDashes(Dashes*); int preamble(const char*); - void computeBBox(int, int, float); + void computeBBox(int, int); const char* getValue(int*); void append(const char*); void format(const char*, ...); diff --git a/src/bltGraph.C b/src/bltGraph.C index 4fbc00a..fc0bc86 100644 --- a/src/bltGraph.C +++ b/src/bltGraph.C @@ -373,15 +373,7 @@ int Graph::print(const char* ident, PSOutput* psPtr) else if (height_ < 2) height_ = Tk_ReqHeight(tkwin_); - // scale from points to pica - float pica = 25.4 / 72 * - WidthOfScreen(Tk_Screen(tkwin_)) / - WidthMMOfScreen(Tk_Screen(tkwin_)); - - width_ /= pica; - height_ /= pica; - - psPtr->computeBBox(width_, height_, pica); + psPtr->computeBBox(width_, height_); flags |= RESET; // Turn on PostScript measurements when computing the graph's layout. |