Re: Rotating pixmap



Havoc Pennington <hp redhat com> wrote:

Marco Quezada <mquezada nlxcorp com> writes:

I have a defined a draing area inside which I display a small icon (an
arrow). The icon is a pixmap which gets loaded with
gdk_pixmap_create_from_xpm_d and such. The XPM of the arrow shows the
arrow pointing to the right. I would like to show the arrow rotating
like a compass. Is it possible to rotate the pixmap when drawing it onto
the drawing area?


No. (That is, GTK provides no way. You can write your own code, but
it's not trivial.)

For such a simple figure, I would say you should draw it as a sequence of
lines, not as a pixmap.



Or you could do the good old computer game thing and create ~12 pixmaps,
all of the arrow in various directions, then draw the one you want.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]