On Thu, 22 Aug 2013, Alexey I. Froloff escribió: > On Mon, Aug 19, 2013 at 12:03:47AM +0200, Rodolfo García Peñas (kix) wrote: > > The context argumetn is now not used, so can be removed. > If this is a part of a public API, you should raise the SONAME as > well...
Yes. I know, but these functions shouldn't by used, see the imgformat.h file: 23 * Functions to load and save RImage from/to file in a specific file format 24 * 25 * These functions are for WRaster library's internal use only, please use 26 * the RLoadImage function defined in 'wraster.h' 27 */ ... 63 #ifdef USE_JPEG 64 RImage *RLoadJPEG(RContext *context, const char *file); 65 #endif Carlos, the patches are not in the git yet, do you have comments/doubts? These patches are easy, the hard work is in my disk yet ;-) I am testing them. I will send these patches after some time, because I need be sure about their behaviour. Is a big change, I am splitting the RLoadImage(RContext, file) in two functions: - RLoadImage(file): Load the image, and render it if the RContext is not needed. - RDrawImage(RContext, RImage): Draw the image on the WScreen. This function depends on the WScreen. With this change, we can create items (Menu, Dock, Clip,...) that are screen independent. Then, we can draw them on the WScreen when needed. If the WScreen change (for example, with XRandR), we only need repaint them (using RDrawImage). The main problem is that XPM, PNG and JPEG uses RContext (the WScreen) to create the RImage. With this patch, JPEG doesn't need WScreen/RContext. For XPM and PNG I used a workaround. Finally, only one comment. IMO is important. Currently, we have wrlib/xpm.c and wrlib/nxpm.c. Both files manage XPM files, but xpm.c uses WScreen but nxpm.c doesn't need it. Two doubts: - Is possible remove xpm.c and work only with nxpm.c (Normalized XPM)? Probably not, but is a question... - Is possible remove nxpm.c? - Is possible rewrite xpm.c to avoid use RContext? Probably yes, because nxpm.c renders the image without RContext. - ... - Else, at least is possible merge xpm.c and nxpm.c in xpm.c About how to avoid use RContext in XPM and PNG images is very very very very welcome. The main idea is try to create the XPM and PNG images with only the filename. Cheers, kix > -- > Regards, -- > Sir Raorn. --- http://thousandsofhate.blogspot.com/ -- To unsubscribe, send mail to [email protected].
