[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: a_pan.c
User: pcjc2
Date: 07/02/11 20:53:32
Modified: . Tag: noscreen a_pan.c i_callbacks.c o_buffer.c
o_complex.c o_copy.c o_move.c x_attribedit.c
x_dialog.c x_event.c
Log:
Add manual grid-snapping after calls to SCREENtoWORLD() where grid
snapping would be required. In preparation for removing grid snap from
SCREENtoWORLD().
Revision Changes Path
No revision
No revision
1.21.6.1 +2 -0 eda/geda/gaf/gschem/src/a_pan.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: a_pan.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/a_pan.c,v
retrieving revision 1.21
retrieving revision 1.21.6.1
diff -u -b -r1.21 -r1.21.6.1
--- a_pan.c 14 Jul 2006 02:23:54 -0000 1.21
+++ a_pan.c 12 Feb 2007 01:53:32 -0000 1.21.6.1
@@ -111,6 +111,8 @@
SCREENtoWORLD(w_current,
w_current->start_x, w_current->start_y,
&start_x, &start_y);
+ start_x = snap_grid(w_current, start_x);
+ start_y = snap_grid(w_current, start_y);
}
/* calculate the new visible area; adding 0.5 to round */
1.70.2.4 +6 -0 eda/geda/gaf/gschem/src/i_callbacks.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: i_callbacks.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_callbacks.c,v
retrieving revision 1.70.2.3
retrieving revision 1.70.2.4
diff -u -b -r1.70.2.3 -r1.70.2.4
--- i_callbacks.c 27 Dec 2006 19:56:42 -0000 1.70.2.3
+++ i_callbacks.c 12 Feb 2007 01:53:32 -0000 1.70.2.4
@@ -898,6 +898,9 @@
/* Allow o_rotate_90_world to redraw the objects */
w_current->DONT_REDRAW = 0;
SCREENtoWORLD( w_current, mouse_x, mouse_y, &w_x, &w_y );
+ w_x = snap_grid(w_current, w_x);
+ w_y = snap_grid(w_current, w_y);
+
o_rotate_90_world(w_current, object_list, w_x, w_y);
}
@@ -943,6 +946,9 @@
i_callback_edit_mirror_hotkey, _("Mirror"));
SCREENtoWORLD( w_current, mouse_x, mouse_y, &w_x, &w_y );
+ w_x = snap_grid(w_current, w_x);
+ w_y = snap_grid(w_current, w_y);
+
o_mirror_world(w_current,
object_list,
w_x, w_y);
1.8.6.2 +7 -0 eda/geda/gaf/gschem/src/o_buffer.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_buffer.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_buffer.c,v
retrieving revision 1.8.6.1
retrieving revision 1.8.6.2
diff -u -b -r1.8.6.1 -r1.8.6.2
--- o_buffer.c 27 Dec 2006 17:37:56 -0000 1.8.6.1
+++ o_buffer.c 12 Feb 2007 01:53:32 -0000 1.8.6.2
@@ -135,6 +135,9 @@
/* now translate selection to current position */
SCREENtoWORLD(w_current, screen_x, screen_y, &x, &y);
+ x = snap_grid(w_current, x);
+ y = snap_grid(w_current, y);
+
w_current->ADDING_SEL = 1;
o_complex_world_translate(w_current, x, y, object_buffer[buf_num]);
w_current->ADDING_SEL = 0;
@@ -184,6 +187,10 @@
SCREENtoWORLD(w_current, screen_x, screen_y, &w_x, &w_y);
SCREENtoWORLD(w_current, w_current->start_x, w_current->start_y,
&w_start_x, &w_start_y);
+ w_x = snap_grid(w_current, w_x);
+ w_y = snap_grid(w_current, w_y);
+ w_start_x = snap_grid(w_current, w_start_x);
+ w_start_y = snap_grid(w_current, w_start_y);
#if DEBUG
printf("%d %d\n", w_x - w_start_x, w_y - w_start_y);
1.28.6.5 +0 -3 eda/geda/gaf/gschem/src/o_complex.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_complex.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_complex.c,v
retrieving revision 1.28.6.4
retrieving revision 1.28.6.5
diff -u -b -r1.28.6.4 -r1.28.6.5
--- o_complex.c 27 Dec 2006 19:56:42 -0000 1.28.6.4
+++ o_complex.c 12 Feb 2007 01:53:32 -0000 1.28.6.5
@@ -253,11 +253,8 @@
diff_y = w_current->last_y - w_current->start_y;
SCREENtoWORLD(w_current, screen_x, screen_y, &x, &y);
-
-#if 0
x = snap_grid(w_current, x);
y = snap_grid(w_current, y);
-#endif
#if DEBUG
printf("place_basename: %s\n",internal_basename);
1.26.6.2 +4 -0 eda/geda/gaf/gschem/src/o_copy.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_copy.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_copy.c,v
retrieving revision 1.26.6.1
retrieving revision 1.26.6.2
diff -u -b -r1.26.6.1 -r1.26.6.2
--- o_copy.c 27 Dec 2006 17:37:56 -0000 1.26.6.1
+++ o_copy.c 12 Feb 2007 01:53:32 -0000 1.26.6.2
@@ -103,6 +103,10 @@
w_current->start_y,
&sx,
&sy);
+ lx = snap_grid(w_current,lx);
+ ly = snap_grid(w_current,ly);
+ sx = snap_grid(w_current,sx);
+ sy = snap_grid(w_current,sy);
diff_x = lx - sx;
diff_y = ly - sy;
1.29.6.3 +4 -0 eda/geda/gaf/gschem/src/o_move.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_move.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_move.c,v
retrieving revision 1.29.6.2
retrieving revision 1.29.6.3
diff -u -b -r1.29.6.2 -r1.29.6.3
--- o_move.c 27 Dec 2006 20:18:18 -0000 1.29.6.2
+++ o_move.c 12 Feb 2007 01:53:32 -0000 1.29.6.3
@@ -191,6 +191,10 @@
&lx, &ly);
SCREENtoWORLD(w_current, w_current->start_x, w_current->start_y,
&sx, &sy);
+ lx = snap_grid(w_current, lx);
+ ly = snap_grid(w_current, ly);
+ sx = snap_grid(w_current, sx);
+ sy = snap_grid(w_current, sy);
diff_x = lx - sx;
diff_y = ly - sy;
1.5.6.3 +2 -0 eda/geda/gaf/gschem/src/x_attribedit.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_attribedit.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_attribedit.c,v
retrieving revision 1.5.6.2
retrieving revision 1.5.6.3
diff -u -b -r1.5.6.2 -r1.5.6.3
--- x_attribedit.c 11 Feb 2007 23:58:57 -0000 1.5.6.2
+++ x_attribedit.c 12 Feb 2007 01:53:32 -0000 1.5.6.3
@@ -230,6 +230,8 @@
#endif
if (invocation_flag == FROM_HOTKEY) {
SCREENtoWORLD(w_current, mouse_x, mouse_y, &world_x, &world_y);
+ world_x = snap_grid(w_current, world_x);
+ world_y = snap_grid(w_current, world_y);
new->text->x = world_x;
new->text->y = world_y;
o_text_erase(w_current, new);
1.68.2.3 +3 -0 eda/geda/gaf/gschem/src/x_dialog.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_dialog.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
retrieving revision 1.68.2.2
retrieving revision 1.68.2.3
diff -u -b -r1.68.2.2 -r1.68.2.3
--- x_dialog.c 11 Feb 2007 23:58:57 -0000 1.68.2.2
+++ x_dialog.c 12 Feb 2007 01:53:32 -0000 1.68.2.3
@@ -1996,6 +1996,9 @@
g_free(string);
SCREENtoWORLD(w_current, x, y, &world_x, &world_y);
+ /* TODO: Do we want to snap the coordinate display? */
+ world_x = snap_grid(w_current, world_x);
+ world_y = snap_grid(w_current, world_y);
string = g_strdup_printf("(%d, %d)", world_x, world_y);
gtk_label_set_text(GTK_LABEL(w_current->coord_world), string );
1.41.6.5 +4 -0 eda/geda/gaf/gschem/src/x_event.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: x_event.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_event.c,v
retrieving revision 1.41.6.4
retrieving revision 1.41.6.5
diff -u -b -r1.41.6.4 -r1.41.6.5
--- x_event.c 12 Feb 2007 01:51:34 -0000 1.41.6.4
+++ x_event.c 12 Feb 2007 01:53:32 -0000 1.41.6.5
@@ -436,6 +436,8 @@
(int) event->x,
(int) event->y,
&w_x, &w_y );
+ w_x = snap_grid(w_current, w_x);
+ w_y = snap_grid(w_current, w_y);
o_rotate_90_world(
w_current,
@@ -456,6 +458,8 @@
o_mirror_world(w_current,
w_current->page_current->selection_list,
w_x, w_y);
+ w_x = snap_grid(w_current, w_x);
+ w_y = snap_grid(w_current, w_y);
w_current->inside_action = 0;
i_set_state(w_current, SELECT);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs