Re: simple rotation support for gdk-pixbuf



On 20 Jun 2004 10:27:48 +0200, Sven Neumann <sven gimp org> wrote:
> > typedef enum {
> >       GDK_PIXBUF_ANGLE_0   =   0,
> >       GDK_PIXBUF_ANGLE_90  =  90,
> >       GDK_PIXBUF_ANGLE_180 = 180,
> >       GDK_PIXBUF_ANGLE_270 = 270
> > } GdkPixbufAngle;
> 
> What about
> 
>   typedef enum
>   {
>     GDK_PIXBUF_ROTATE_NONE       =   0,
>     GDK_PIXBUF_ROTATE_LEFT       =  90,
>     GDK_PIXBUF_ROTATE_UPSIDEDOWN = 180, (???)
>     GDK_PIXBUF_ROTATE_RIGHT      = 270
>   } GdkPixbufRotation;
> 
> 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.

Another (not very serious) possibility would be:

  typedef enum
  {
    GDK_PIXBUF_ROTATE_NONE,
    GDK_PIXBUF_ROTATE_15MINUTES,
    GDK_PIXBUF_ROTATE_30MINUTES,
    GDK_PIXBUF_ROTATE_45MINUTES
  } GdkPixbufRotation;

which I think is unambigious.

John



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