forked from AuroraMiddleware/gtk
More fixes to the rotation code. It really works well now. Now we need to
More fixes to the rotation code. It really works well now. Now we need to fix the "clipping when rotating" problem if it is a real issue. Mark
This commit is contained in:
parent
8194b3483b
commit
276ec82df5
@ -1,7 +1,7 @@
|
||||
1999-07-20 Mark Crichton <crichton@gimp.org>
|
||||
|
||||
* src/gdk-pixbuf.c (gdk_pixbuf_rotate): Added translation to recenter
|
||||
the pixbuf. Unfortunately, it doesn't work right yet.
|
||||
* src/gdk-pixbuf.c (gdk_pixbuf_rotate): Fixed rotation. Now a bbox
|
||||
calculation needs to be done.
|
||||
|
||||
1999-07-18 Larry Ewing <lewing@gimp.org>
|
||||
|
||||
|
@ -100,10 +100,17 @@ gdk_pixbuf_rotate (GdkPixBuf *pixbuf, gdouble angle)
|
||||
rot[3] = cos(rad);
|
||||
rot[4] = rot[5] = 0;
|
||||
|
||||
trans[0] = trans[3] = 1;
|
||||
trans[1] = trans[2] = 0;
|
||||
trans[4] = -(double)w / 2.0;
|
||||
trans[5] = -(double)h / 2.0;
|
||||
|
||||
art_affine_multiply(rot, trans, rot);
|
||||
|
||||
trans[0] = trans[3] = 1;
|
||||
trans[1] = trans[2] = 0;
|
||||
trans[4] = (double)w / 2.0;
|
||||
trans[5] = 0;
|
||||
trans[5] = (double)h / 2.0;
|
||||
|
||||
art_affine_multiply(affine, rot, trans);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user