[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gEDA-dev: Sense of world coordinates



Hi all,

In the process of going through my patches in detail, I've re-visited an
issue I came across - that of world-coordinates having a different sense
of up/down to screen coords.

I'm inclined to fix this so that top is top, bottom is bottom - even if
it requires re-work in places which make incorrect assumptions in this
respect.

Could anyone comment on these my findings:


Sense of world-coordinates up/down for world_get_..._bounds()
-------------------------------------------------------------

                    CVS HEAD    After patch
                    --------    -----------
o_arc_basic.c     # Correct     Ok
o_box_basic.c     # INCORRECT   Fixed
o_bus_basic.c     # INCORRECT   Fixed
o_circle_basic.c  # INCORRECT   Fixed
o_complex_basic.c # INCORRECT   INCORRECT - Now fixed with new patch
o_line_basic.c    # INCORRECT   Fixed
o_net_basic.c     # INCORRECT   Fixed
o_picture.c       # INCORRECT   Fixed
o_pin_basic.c     # INCORRECT   Fixed
o_text_basic.c    # (Wrapper)   (Wrapper)

(INCORRECT means that top is returned to be the numerically lower value)


**** libgeda implications ****

Will mess up f_image_write()  - ?

Will mess up f_print_stream() - which seems to assume bottom > top

Will mess up o_complex_add()  - Adding a warning for missing symbol

Will mess up o_pin_update_whichend() - ?


**** gschem implications ****

a_zoom_extents()       - Can drop a fabs() after its bottom and top
                         subtraction is swaped.

g_get_object_bounds()  - Should now have the correct order... are
                         there any dependants on the old order?

o_arc_draw()           |
o_box_draw()           |
o_picture_draw()       - Does the visible() function work 
                         with the ordering changed?

o_attrib_add_attrib()  |
o_buffer_paste_start() - May need to change to use the left-bottom
                         corner properly (explicitly) now



**** it seems that visible() checks different permutations of 
     the bounding box's left, right, top, bottom etc..
     
     in some cases, the same left or right coordinate is passed
     (debugging marked as vis2 and vis3) I'm not sure this
     is correct.

     Once we've sorted out the sense of our bounding-boxes, the visible
     checking function ought to be able to perform one test only.
     
     I think visible() - in m_basic.c needs some love!



Regards,

Peter C


-- 
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
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev