Re: simple rotation support for gdk-pixbuf



--- John Cupitt <jcupitt gmail com> wrote: > 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.

In what sense? And why would one want to rotate by 1/4th, 1/2th and 3/4th of a
degree anyways? ;-)

Why is it unreasonable to expect people to know how many degrees there are in a full
circle *IF* they are writing programs? There isn't even a single graphics program
that I'm aware of that balks from saying '90 degrees' and '180 degrees' and thats
stuff that is targeted at end users. 

> 
> John



	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself http://uk.messenger.yahoo.com



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