diff options
author | fvogel <fvogelnew1@free.fr> | 2020-04-21 06:57:35 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-04-21 06:57:35 (GMT) |
commit | 5ed4790f7555c57fa47e3467c819aa111c632978 (patch) | |
tree | 0f2c2cfb671f204b1b6e8d3d2ab8b137394528c3 /win/tkWinFont.c | |
parent | 981e941cbfec9cdea31b3bde6666e9a5afc6ea85 (diff) | |
download | tk-5ed4790f7555c57fa47e3467c819aa111c632978.zip tk-5ed4790f7555c57fa47e3467c819aa111c632978.tar.gz tk-5ed4790f7555c57fa47e3467c819aa111c632978.tar.bz2 |
Apply a third patch from Christopher Chavez.
Diffstat (limited to 'win/tkWinFont.c')
-rw-r--r-- | win/tkWinFont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 39abda4..91f8f14 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -1402,7 +1402,6 @@ TkpDrawCharsInContext( rangeLength, x+widthUntilStart, y); } -/* UNTESTED */ void TkpDrawAngledCharsInContext( Display *display, /* Display on which to draw. */ @@ -1426,11 +1425,12 @@ TkpDrawAngledCharsInContext( double angle) /* What angle to put text at, in degrees. */ { int widthUntilStart; + double sinA = sin(angle * PI/180.0), cosA = cos(angle * PI/180.0); (void) numBytes; /*unused*/ Tk_MeasureChars(tkfont, source, rangeStart, -1, 0, &widthUntilStart); TkDrawAngledChars(display, drawable, gc, tkfont, source + rangeStart, - rangeLength, x+widthUntilStart, y, angle); + rangeLength, x+cosA*widthUntilStart, y-sinA*widthUntilStart, angle); } /* |