Hi.
I just wanted to see how many empeg developers are subscribed currently. I would like to discuss a few ideas, and I don't think the UEBBS is the right place to do so. OK, what I am thinking about is a set of libraries to help develop programs for the empeg. My main objectives are: Graphics, Sound and serial/USB/network communication. For a start, I will try and concentrate on the graphics part. So here is what I think the library should provide, and I would really appreciate some feedback on this. The preliminary specs I state below are for a C++ library (with overloaded functions), but I intend to provide a pure C version as well, probably using a C++ wrapper around a C lib.
The first goal is to provide a few simple commands to access the display. I think the following functionality should do for most (if not all) applications on the empeg (except for applications that want/need virtual 3D): Basic display device handling: - open display / initialise - close display - turn on/off display - clear the display queue Basic page handling - create virtual page - free virtual page - add virtual page to the display queue - display virtual page now - dump virtual page to file (or memory area) - load file (or memory area) to virtual page Basic drawing commands - clear virtual page - select current page for drawing - plot(page,color,x,y) plot(color,x,y) (plots to current page) plot(x,y) (plots in current colour) - line(page,color,x1,y1,x2,y2) line(color,x1,y1,x2,y2) line(x1,y1,x2,y2) (well, you get the picture) draws a line from (x1,y1) to (x2,y2) - circle([[...],fillcolor],x,y,r) draw a (filled) circle - triangle([[...],fillcolor],x1,y1,x2,y2,x3,y3) draw a (filled) triangle with the given edges - stamp(x,y,*bitmap) output a bitmap with a lower (or maybe upper) left corner of (x,y) - grab(x1,y1,x2,y2,*bitmap) grab a fraction of the display and store it in bitmap Text functions - setfont(*font) (set the font to use) - loadfont(FILE) (load a font from a file) - text([[...],*font]x,y,*text) print *text using *font with a lower (upper) left corner of (x,y), supporting line breaks Scrolling support - create big virtual page (xsize,ysize) (all above commands apply to a big page as well) - display big virtual page (page,xoffset,yoffset) - merge big page to page (normal_page,x,y,xsize,ysize,big_page,xoffset,yoffset) inserts an xsize*ysize sized fragment of big_page, starting at (xoffset,yoffset) into normal_page at (x,y) I intend to add higher level later, but I think this should be a good starting point. What do you guys think? Did I miss something, should I leave out something (why)? I will do a better spec later this week, but would like to get some feedback first. Don't hold back, I can stand (constructive) criticism.
cu, sven