[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA-dev: Switch all drawing variables into the world coordinatesystem
Hi all,
the magnetic net mode uncovered some integer arithmetic errors whenever
the coordinates are changed between screen and world (e.g. with the
fix_x() function).
http://sourceforge.net/tracker/index.php?func=detail&aid=1928544&group_id=161080&atid=818426
Thus I'd like to change the screen related variables from the screen
coordinates to the world coordinates.
The affected variables are start_x, second_x, last_x, loc_x and maybe
some more.
To do this I'd change this with the following steps:
1. create a set of world variables in GSCHEM_TOPLEVEL:
start_x --> first_wx
last_x --> second_wx
second_x --> third_wx
The renaming is intentional, because the second_x causes confusions in
the net code whenever I read it.
2. add world coordinates to all screen events (mouse move, ...)
SCREENtoWORLD(toplevel, x,y, &wx, &wy);
wx = snap_grid(toplevel, wx);
wy = snap_grid(toplevel, wy);
3. subsequently switch each drawing mode (net, line, box, ...) to use
the world coordinates.
(the coordinates are only converted back to screen inside drawing
functions)
4. remove the old variables:
start_x, last_x, ...
5. remove fix_x, fix_y functions from libgeda.
Please let me know what you think about the changes.
Any suggestions and additions are welcome.
@Ales:
When do you plan to create a new release of gEDA?
Regards
Werner
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev