[Pal-devel] API suggestion [was Re: Installation problem]

Tomi Neste flatlander at yellow-hut.com
Thu Jul 12 13:34:19 UTC 2007


<matthieu.villeneuve at free.fr> kirjoitti Thu, 12 Jul 2007 09:19:31 +0300:

> As I understand it, specifying a non-null angle causes the image
> to be centered around POSITION instead of being aligned on its top-left
> corner, and it would seem more consistent to me if alignment was
> specified by other parameters. Moreover, I tend to prefer keyword
> parameters, as they allow more flexible and readable calls.
> What would you think of the following interface?
>
>   (draw-image image position
>               &key (angle 0.0) (scale 1.0)
>                    (halign :left) (valign :top))
>
That is a good idea and I think I'll implement it right away :) Going  
through the api of draw-* functions has been on the top of my todo list  
for a while, I hate some of the inconsistencies in there and you are right  
about the &optional parameters also. They kinda creeped in when I kept  
adding functionality.

> I'm afraid I know close to nothing about OpenGL so I can't offer a patch,
> but if you see another way for me to contribute to PAL, please juste let
> me know.
>

I consider most of the OpenGL part to be finished by now, it is mostly  
debugging, fixing the api and writing tutorials that is needed, so help  
and opinions in those areas is always welcome. Of course writing tutorials  
at this point can be a bit hard...



More information about the pal-devel mailing list