diff options
author | joye <joye> | 2014-06-13 21:20:01 (GMT) |
---|---|---|
committer | joye <joye> | 2014-06-13 21:20:01 (GMT) |
commit | 4a8a61cafdadefd581f7c8815f8d196da00e5752 (patch) | |
tree | e5249d1802d11fec9172e80062c2cdec0ea6c3f1 /src | |
parent | d1babaaa20a8c24a55deeb3e551d0dbcbce836d5 (diff) | |
download | blt-4a8a61cafdadefd581f7c8815f8d196da00e5752.zip blt-4a8a61cafdadefd581f7c8815f8d196da00e5752.tar.gz blt-4a8a61cafdadefd581f7c8815f8d196da00e5752.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/bltGrPSOutput.C | 30 | ||||
-rw-r--r-- | src/bltGrText.C | 27 |
2 files changed, 0 insertions, 57 deletions
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C index acf1ea6..68cd2ab 100644 --- a/src/bltGrPSOutput.C +++ b/src/bltGrPSOutput.C @@ -899,36 +899,6 @@ void PostScript::prolog() " grestore\n" "} bind def \n" "\n" -"/EndText {\n" -" %Stack :\n" -" grestore\n" -"} def\n" -"\n" -"/BeginText {\n" -" %Stack : w h theta centerX centerY\n" -" gsave\n" -" % Translate the origin to the center of bounding box and rotate\n" -" translate neg rotate\n" -" % Translate back to the origin of the text region\n" -" -0.5 mul exch -0.5 mul exch translate\n" -"} def\n" -"\n" -"/DrawAdjText {\n" -" %Stack : str strWidth x y\n" -" moveto % Go to the text position\n" -" exch dup dup 4 2 roll\n" -" % Adjust character widths to get desired overall string width\n" -" % adjust X = (desired width - real width)/#chars\n" -" stringwidth pop sub exch\n" -" length div\n" -" 0 3 -1 roll\n" -" % Flip back the scale so that the string is not drawn in reverse\n" -" gsave\n" -" 1 -1 scale\n" -" ashow\n" -" grestore\n" -"} def\n" -"\n" "/DrawBitmap {\n" " % Stack: ?bgColorProc? boolean centerX centerY width height theta imageStr\n" " gsave\n" diff --git a/src/bltGrText.C b/src/bltGrText.C index 5b610a2..e80e7ca 100644 --- a/src/bltGrText.C +++ b/src/bltGrText.C @@ -147,21 +147,9 @@ void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y) psPtr->setFont(ops->font); psPtr->setForeground(ops->color); -#if 1 int xx =0; int yy =0; switch (ops->anchor) { - /* - case TK_ANCHOR_NW: xx = 0; yy = 2; break; - case TK_ANCHOR_N: xx = 1; yy = 2; break; - case TK_ANCHOR_NE: xx = 2; yy = 2; break; - case TK_ANCHOR_E: xx = 2; yy = 1; break; - case TK_ANCHOR_SE: xx = 2; yy = 0; break; - case TK_ANCHOR_S: xx = 1; yy = 0; break; - case TK_ANCHOR_SW: xx = 0; yy = 0; break; - case TK_ANCHOR_W: xx = 0; yy = 1; break; - case TK_ANCHOR_CENTER: xx = 1; yy = 1; break; - */ case TK_ANCHOR_NW: xx = 0; yy = 0; break; case TK_ANCHOR_N: xx = 1; yy = 0; break; case TK_ANCHOR_NE: xx = 2; yy = 0; break; @@ -190,21 +178,6 @@ void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y) Tcl_ResetResult(graphPtr_->interp_); psPtr->format("] %d %g %g %s DrawText\n", fm.linespace, xx/-2.0, yy/-2.0, justify); -#endif - -#if 0 - double w2, h2; - graphPtr_->getBoundingBox(w1, h1, ops->angle, &w2, &h2, NULL); - - Point2d rr = graphPtr_->anchorPoint(x, y, w2, h2, ops->anchor); - rr.x += w2*.5; - rr.y += h2*.5; - - int width = Tk_TextWidth(ops->font, text, strlen(text)); - psPtr->format("%d %d %g %g %g BeginText\n", w1, h1, ops->angle, rr.x, rr.y); - psPtr->format("(%s) %d %g %g DrawAdjText\n",text, width, 0. , h1*.5); - psPtr->append("EndText\n"); -#endif // psPtr->printText(text, x, y); } |