At Fri, 5 Jan 2007 02:46:53 +0000 (UTC), Luke Crook wrote: > > The lispbuilder-sdl API seems to have stabilized. I'm still trying to come up > with decent names for several of the functions in 'draw-primitives.lisp'. I'm > also trying to decide if these functions should take POINTS or separate x/y > coordiates as input parameters. i.e. I'm trying to figure out the API's of > least surprise. For example: > > - When you see a DRAW-LINE function, do you expect to pass it (p1 p2), or (x1 > y1 x2 y2) ? > - Would you expect DRAW-BOX to accept a RECTANGLE, (p1 p2) or (x1 y2 x2 y2) > - Should DRAW-POINT take p1, should DRAW-PIXEL take x/y? > - Should ADD-VERTEX take p1 or x/y?
If you make coords compound, you'd have to provide the compound operations -- sum, scale, min, max, etc etc. Now, i think compound makes more sense, in general. OTOH, choosing a certain compound format is going to shovel that down everybody`s throats, so it has to be designed carefully. For the code i use, i have choosed a type (cons fixnum fixnum) as the compound representation. If you wish i might send you the code... > - Luke regards, Samium Gromoff _______________________________________________ application-builder mailing list [email protected] http://www.lispniks.com/mailman/listinfo/application-builder
