diff options
Diffstat (limited to 'generic/tkCanvWind.c')
-rw-r--r-- | generic/tkCanvWind.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 8c44a6c..9f38932 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -943,12 +943,9 @@ RotateWinItem( double angleRad) /* Amount by which item is to be rotated. */ { WindowItem *winItemPtr = (WindowItem *) itemPtr; - double s = sin(angleRad), c = cos(angleRad); - double x = winItemPtr->x - originX; - double y = winItemPtr->y - originY; - winItemPtr->x = originX + x * c - y * s; - winItemPtr->y = originY + x * s + y * c; + TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad), + &winItemPtr->x, &winItemPtr->y); ComputeWindowBbox(canvas, winItemPtr); } |