Hi, In the few hours I have spare, I've been tinkering with removing cached screen coordinates again, this time against the glist-dev branch.
So far I've not benchmarked against the old version, as I'm not fully complete in removing all the superfluous calls to ..._recalc (now only needed when an object is changed in the world system). There is a lot of code reduction (mostly similar / duplicate code), and many of the ...get_..._bounds routines are now re-written to be alike across all objects (leading to more duplicated code which can potentially be reduced further). The complex bounds functions are interesting. I found that to be clean I needed to re-write many of them to consider the concept of returning without having found a bound, e.g. invisible text, object heads etc.. I wasn't comfortable with the previous practise of setting a large integer and working from that point. If I'm not mistaken, (world_)get_object_list_bounds and world_get_complex_bounds are equivalent, so after converting get_object_list_bounds to work in world coordinates, I was able to remove world_get_complex_bounds. I'll try using this gschem for a while to see if any bugs remain. I had initial difficulties after noting that screen coords and world coords are opposite in the up/down sense, and some bounds testing code needed inverting. FYI, here are the diffstats' [EMAIL PROTECTED]:~/gedasrc$ diffstat glist_dev.noscreen.libgeda.diff include/prototype.h | 48 +-------- include/struct.h | 46 ++++---- src/f_image.c | 8 - src/f_print.c | 8 - src/o_arc_basic.c | 122 +---------------------- src/o_basic.c | 56 +++------- src/o_box_basic.c | 193 +++---------------------------------- src/o_bus_basic.c | 247 +++++------------------------------------------- src/o_circle_basic.c | 205 ++-------------------------------------- src/o_complex_basic.c | 256 ++++++++++++++++++-------------------------------- src/o_line_basic.c | 151 ++++++----------------------- src/o_net_basic.c | 215 +++++------------------------------------ src/o_picture.c | 67 ++----------- src/o_pin_basic.c | 207 ++++++---------------------------------- src/o_text_basic.c | 73 ++++---------- src/s_basic.c | 14 -- src/s_tile.c | 2 17 files changed, 358 insertions(+), 1560 deletions(-) [EMAIL PROTECTED]:~/gedasrc$ diffstat glist_dev.noscreen.gschem.diff include/prototype.h | 24 +-- src/a_pan.c | 5 src/a_zoom.c | 14 +- src/g_hook.c | 19 +- src/i_callbacks.c | 25 ++- src/o_arc.c | 49 +++---- src/o_attrib.c | 6 src/o_basic.c | 171 +++++++++++++++----------- src/o_box.c | 137 ++++++++++----------- src/o_buffer.c | 20 --- src/o_bus.c | 20 +-- src/o_circle.c | 56 ++++---- src/o_complex.c | 120 ++++++++---------- src/o_find.c | 28 ++-- src/o_grips.c | 331 ++++++++++++++++++++++++++-------------------------- src/o_line.c | 56 +++++--- src/o_misc.c | 52 +++----- src/o_move.c | 24 +-- src/o_net.c | 48 ++++--- src/o_picture.c | 146 +++++++++------------- src/o_pin.c | 10 - src/o_select.c | 20 +-- src/o_text.c | 44 ++---- src/x_dialog.c | 12 + src/x_event.c | 32 +++-- src/x_grid.c | 1 src/x_window.c | 4 27 files changed, 748 insertions(+), 726 deletions(-) Let me know if you want me to send the diffs so far. (256k) Whilst some of this is obviously only applicable in one shot, there are probably some changes which can be be split out usefully, like the updated bounds checking routines. PS.. haven't forgotten generic DBus integration in PCB, nor the xgsch2pcb DBus version.. I just needed a change of scenery. Regards, -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
