summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r--generic/tkCanvText.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 22b6dea..4f446ec 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -1277,12 +1277,9 @@ RotateText(
double angleRad) /* Amount by which item is to be rotated. */
{
TextItem *textPtr = (TextItem *) itemPtr;
- double s = sin(angleRad), c = cos(angleRad);
- double x = textPtr->x - originX;
- double y = textPtr->y - originY;
- textPtr->x = originX + x * c - y * s;
- textPtr->y = originY + x * s + y * c;
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &textPtr->x, &textPtr->y);
ComputeTextBbox(canvas, textPtr);
}