summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-11-22 18:08:51 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-11-22 18:08:51 (GMT)
commit08d210474dcf15c239160ca885bd7799ac618787 (patch)
treea79e10925b1fe14d042ef56ea012b2e1e56407de /library
parent76c04ee36744e2a988a33f9d8ccb9d3b7e2359c2 (diff)
downloadtk-08d210474dcf15c239160ca885bd7799ac618787.zip
tk-08d210474dcf15c239160ca885bd7799ac618787.tar.gz
tk-08d210474dcf15c239160ca885bd7799ac618787.tar.bz2
TIP#119 implementation. [Patch 1611359]
Diffstat (limited to 'library')
-rw-r--r--library/prolog.ps12
1 files changed, 7 insertions, 5 deletions
diff --git a/library/prolog.ps b/library/prolog.ps
index 9c76878..a82c3d2 100644
--- a/library/prolog.ps
+++ b/library/prolog.ps
@@ -3,7 +3,7 @@
% This is a standard prolog for Postscript generated by Tk's canvas
% widget.
-% RCS: @(#) $Id: prolog.ps,v 1.3 1999/02/04 20:59:48 stanton Exp $
+% RCS: @(#) $Id: prolog.ps,v 1.4 2008/11/22 18:08:51 dkf Exp $
% The definitions below just define all of the variables used in
% any of the procedures here. This is needed for obscure reasons
@@ -189,11 +189,12 @@ systemdict /ISOLatin1Encoding known not {
} if
} bind def
-% x y strings spacing xoffset yoffset justify stipple DrawText --
+% angle x y strings spacing xoffset yoffset justify stipple DrawText --
% This procedure does all of the real work of drawing text. The
% color and font must already have been set by the caller, and the
% following arguments must be on the stack:
%
+% angle - Angle through which to rotate text, in degrees.
% x, y - Coordinates at which to draw text.
% strings - An array of strings, one for each line of the text item,
% in order from top to bottom.
@@ -235,11 +236,12 @@ systemdict /ISOLatin1Encoding known not {
exch pop exch sub /height exch def pop
newpath
- % Translate coordinates first so that the origin is at the upper-left
- % corner of the text's bounding box. Remember that x and y for
- % positioning are still on the stack.
+ % Translate and rotatecoordinates first so that the origin is at the
+ % upper-left corner of the text's bounding box. Remember that angle, x and
+ % y for positioning are still on the stack.
translate
+ rotate
lineLength xoffset mul
strings length 1 sub spacing mul height add yoffset mul translate