summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-06-11 20:56:15 (GMT)
committerjoye <joye>2014-06-11 20:56:15 (GMT)
commit69f046a58e124ca00486f54f6c725f0738efabb1 (patch)
treea806d0c7776721c0940703cb8b5865e07e0e328f /src
parentf3cd249d5c6bf054c866a9a2542501750e75c851 (diff)
downloadblt-69f046a58e124ca00486f54f6c725f0738efabb1.zip
blt-69f046a58e124ca00486f54f6c725f0738efabb1.tar.gz
blt-69f046a58e124ca00486f54f6c725f0738efabb1.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrPSOutput.C3
-rw-r--r--src/bltGrText.C14
2 files changed, 15 insertions, 2 deletions
diff --git a/src/bltGrPSOutput.C b/src/bltGrPSOutput.C
index 9ff60e9..84df667 100644
--- a/src/bltGrPSOutput.C
+++ b/src/bltGrPSOutput.C
@@ -831,7 +831,6 @@ void PostScript::prolog()
" dup type /stringtype eq\n"
" gsave\n"
" 1 -1 scale\n"
-"% 0 spacing neg moveto\n"
" { show } { glyphshow }\n"
" ifelse\n"
" grestore\n"
@@ -887,7 +886,7 @@ void PostScript::prolog()
" % display it.\n"
" strings {\n"
" dup cstringwidth pop\n"
-" justify neg mul 0 moveto\n"
+" justify neg mul height 2 div moveto\n"
" cstringshow\n"
" 0 spacing translate\n"
" } forall\n"
diff --git a/src/bltGrText.C b/src/bltGrText.C
index ee7bfe1..10e0cdc 100644
--- a/src/bltGrText.C
+++ b/src/bltGrText.C
@@ -144,6 +144,16 @@ void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y)
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;
@@ -153,6 +163,7 @@ void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y)
case TK_ANCHOR_SW: xx = 0; yy = 2; break;
case TK_ANCHOR_W: xx = 0; yy = 1; break;
case TK_ANCHOR_CENTER: xx = 1; yy = 1; break;
+ */
}
const char* justify =NULL;
@@ -162,6 +173,9 @@ void TextStyle::printText(PostScript* psPtr, const char *text, int x, int y)
case TK_JUSTIFY_RIGHT: justify = "1"; break;
}
+ cerr << text << ' ' << '(' << x << ',' << y << ')' << ' '
+ << '(' << xx << ',' << yy << ')' << ' ' << justify << endl;
+
Tk_FontMetrics fm;
Tk_GetFontMetrics(ops->font, &fm);