From: Mojca M. <moj...@gm...> - 2006-05-08 17:45:00
|
Hello, In color.c I noticed the following code: if (gppsfile) =09draw_inside_color_smooth_box_postscript(out); else =09draw_inside_color_smooth_box_bitmap(out); I need my own version of drawing "smooth_box" (the terminal supports vector graphic format, so drawing a whole lot of rectangles of single color is extremely inefficient). Should I say if (gppsfile) =09draw_inside_color_smooth_box_postscript(out); else if(term->name =3D=3D "my terminal") MY_TERMINAL_draw_inside_color_smooth_box(); else ... or is there a better (more consistent) solution? I hate touching the code outside my own (new) terminal, but in this case I probably can't avoid it. draw_inside_color_smooth_box_postscript could be rewritten as well to produce smooth shading instead of 1000 single-color boxes (smooth liear shading with a stitching function). I know exactly what has to be done, but I would need some thinking to implement it properly. If someone knows PostScript language better than I do, I'm ready to describe the procedure more precisely. (A better and more efficient code can be produced using a new approach.) Many plot on http://gnuplot.sourceforge.net/demo_4.1/pm3d.html could be drawn more efficiently if I knew in advance that I'm able to draw an NxM image as opposed to drawing NxM rectangles. Even the 4th and the 5th example could be simplified considerably, but the examples 6-12 are obvious examples of such inefficient graphic, which could be stored as a bitmap image. At which places in the source should (colud?) this be improved? Thanks a lot, Mojca |