Re: simple rotation support for gdk-pixbuf
- From: Matthias Clasen <mclasen redhat com>
- To: gtk-devel-list gnome org
- Subject: Re: simple rotation support for gdk-pixbuf
- Date: Sun, 20 Jun 2004 13:58:55 -0400
Am So, den 20.06.2004 schrieb muppet um 13:42:
> On Jun 20, 2004, at 7:53 AM, John Cupitt wrote:
>
> > On 20 Jun 2004 10:27:48 +0200, Sven Neumann <sven gimp org> wrote:
> >> or similar to avoid the problem of how to interpret the angles?
> >
> > Even that confuses me :-( does it mean the top of the image moving to
> > the right, or the bottom? Image processing textbooks always have
> > increasing angles meaning anticlockwise rotation (hope I've got that
> > the right way around), I'd say that was the safest model.
>
> given your own uncertainty, i think you proved the "don't use the
> numbers" argument.
>
> what about
>
> GDK_PIXBUF_ROTATE_NONE
> GDK_PIXBUF_ROTATE_CLOCKWISE
> GDK_PIXBUF_ROTATE_UPSIDEDOWN
> GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE
>
Yes, thats the alternative I would have proposed myself, although I it
has to be
GDK_PIXBUF_ROTATE_NONE
GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE
GDK_PIXBUF_ROTATE_UPSIDEDOWN
GDK_PIXBUF_ROTATE_CLOCKWISE
if you want to go with increasing numbers...
I also noted that both the api and the implementation of my _flip()
proposal become simpler if it is changed to
typedef enum {
GDK_PIXBUF_FLIP_HORIZONTAL,
GDK_PIXBUF_FLIP_VERTICAL
} GdkPixbufFlip;
GdkPixbuf *gdk_pixbuf_flip (const GdkPixbuf *src,
GdkPixbufFlip *flip)
One could consider adding
GDK_PIXBUF_FLIP_ASCENDING_DIAGONAL
GDK_PIXBUF_FLIP_DESCENDING_DIAGONAL
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]