On 01/10/2011 11:25 AM, Stefan wrote: > Using tgi.h in my recent project i came across the problem > of how to save a bitmap generated with tgi.h to disk. > Of course this should be done in a proper way, which means not by saving > the memory area containing the bitmap data directly, which would be > system dependent. The only idea i have is using tgi_getpixel and > saving the bitmap pixel by pixel? > Is there a better way? > > Monte Carlos > Probably not. If the speed is too slow you could extend the existing driver to copy and area of pixels to some buffer. Every driver has a CONTROL: entry point where you can implement your own extensions to the tgi driver. #define tgi_copy(dst, x, y, w, h) tgi_ioctl(0, dst, x, y, w, h) tgi_copy(void *dst, int x, int y, int w, int h); Or something like this. If this gets popular then Uz might implement this in the tgi driver as a new command mode. I have also had similar needs. Mainly to use screen 0 as a background for static data and screen 1 for dynamic data. When you run animation a Lynx may not have the power to render the background over and over again. Some function to copy and area from screen 0 to screen 1 would be nice. tgi_copydrawpage(x, y, w, h); This would copy an area from drawpage to viewpage. -- Regards, Karri ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Mon Jan 10 11:21:48 2011
This archive was generated by hypermail 2.1.8 : 2011-01-10 11:21:51 CET