summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvBmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvBmap.c')
-rw-r--r--generic/tkCanvBmap.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c
index 948379d..34c74f3 100644
--- a/generic/tkCanvBmap.c
+++ b/generic/tkCanvBmap.c
@@ -817,16 +817,9 @@ RotateBitmap(
double angleRad)
{
BitmapItem *bmapPtr = (BitmapItem *) itemPtr;
- double x, y, nx, ny;
- double s = sin(angleRad);
- double c = cos(angleRad);
-
- x = bmapPtr->x - originX;
- y = bmapPtr->y - originY;
- nx = x * c - y * s;
- ny = x * s + y * c;
- bmapPtr->x = nx + originX;
- bmapPtr->y = ny + originY;
+
+ TkRotatePoint(originX, originY, sin(angleRad), cos(angleRad),
+ &bmapPtr->x, &bmapPtr->y);
ComputeBitmapBbox(canvas, bmapPtr);
}