[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.1.2.20070818-45-g7e04d19)
The branch, master has been updated
via 7e04d192b78dc0821efda3326e6ec676db424472 (commit)
via 32dbd8536c17bcce9fbd9436fbb4c7efa32ee546 (commit)
via 08ac872c975a587cf4125c6468c79c453661ee8f (commit)
via c66d009979f49bd7ac8ba0641a6974be9e6a82d5 (commit)
from 0529c40c453c6f1a958acc87a85974c7a3f871b1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gschem/include/prototype.h | 5 +--
gschem/src/o_basic.c | 2 +-
gschem/src/o_complex.c | 83 ++++-------------------------------------
gschem/src/o_misc.c | 9 +---
gschem/src/o_text.c | 5 +--
libgeda/include/prototype.h | 4 +-
libgeda/src/o_complex_basic.c | 31 +++++++--------
libgeda/src/o_text_basic.c | 9 ++--
8 files changed, 34 insertions(+), 114 deletions(-)
=================
Commit Messages
=================
commit 7e04d192b78dc0821efda3326e6ec676db424472
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Sep 8 00:17:05 2007 +0100
Remove o_complex_translate{2,_selection,_display_selection}()
o_complex_translate{_selection,_display_selection}() were unused,
o_complex_translate2() simply wrapped o_complex_translate_display().
:100644 100644 a17d6aa... 60bc669... M gschem/include/prototype.h
:100644 100644 9a79f93... 87802ee... M gschem/src/o_basic.c
:100644 100644 4dfc750... b0d5559... M gschem/src/o_complex.c
commit 32dbd8536c17bcce9fbd9436fbb4c7efa32ee546
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Sep 8 00:17:03 2007 +0100
Removed unnecessary angle parameter to o_complex_rotate_world(), fix bug.
Fix rotation code to support angles other than 90 degrees. All current
users actually pass 90 degrees so this bug had no visible effect.
:100644 100644 ef1261b... a17d6aa... M gschem/include/prototype.h
:100644 100644 146d496... 4dfc750... M gschem/src/o_complex.c
:100644 100644 628f676... fdfad7b... M gschem/src/o_misc.c
commit 08ac872c975a587cf4125c6468c79c453661ee8f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Sep 7 23:58:51 2007 +0100
Removed unused angle parameter to o_complex_rotate_lowlevel().
:100644 100644 15d600a... 146d496... M gschem/src/o_complex.c
:100644 100644 892ec5e... 835290f... M libgeda/include/prototype.h
:100644 100644 15c2ac4... a7729c9... M libgeda/src/o_complex_basic.c
commit c66d009979f49bd7ac8ba0641a6974be9e6a82d5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Sep 7 23:57:38 2007 +0100
Removed unused angle parameter to o_text_rotate_world().
From an old unmerged patch by Patrick Bernaud.
:100644 100644 7a1a835... 15d600a... M gschem/src/o_complex.c
:100644 100644 b9c8afa... 628f676... M gschem/src/o_misc.c
:100644 100644 239b43f... 40aa72a... M gschem/src/o_text.c
:100644 100644 b857ade... 892ec5e... M libgeda/include/prototype.h
:100644 100644 2d88854... 15c2ac4... M libgeda/src/o_complex_basic.c
:100644 100644 268357f... 6199e52... M libgeda/src/o_text_basic.c
=========
Changes
=========
commit 7e04d192b78dc0821efda3326e6ec676db424472
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Sep 8 00:17:05 2007 +0100
Remove o_complex_translate{2,_selection,_display_selection}()
o_complex_translate{_selection,_display_selection}() were unused,
o_complex_translate2() simply wrapped o_complex_translate_display().
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index a17d6aa..60bc669 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -551,10 +551,7 @@ void o_complex_translate_display_object_glist(TOPLEVEL *w_current,
int x1, int y1,
GList *object_list);
void o_complex_translate_display(TOPLEVEL *w_current, int x1, int y1, OBJECT *complex);
-void o_complex_translate_display_selection(TOPLEVEL *w_current, int x1, int y1, GList *head);
-void o_complex_translate2(TOPLEVEL *w_current, int dx, int dy, OBJECT *object);
void o_complex_translate_all(TOPLEVEL *w_current, int offset);
-void o_complex_translate_selection(TOPLEVEL *w_current, int dx, int dy, GList *head);
void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery, int angle, OBJECT *object);
int o_complex_mirror_world(TOPLEVEL *w_current, int centerx, int centery, OBJECT *object);
/* o_copy.c */
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 9a79f93..87802ee 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -581,7 +581,7 @@ void o_drawbounding(TOPLEVEL *w_current, OBJECT *o_list, GList *o_glist,
* so that all lists can be moved ...
*/
if (o_list) {
- o_complex_translate2(w_current, diff_x, diff_y, o_list);
+ o_complex_translate_display(w_current, diff_x, diff_y, o_list);
} else if (o_glist) {
o_complex_translate_display_object_glist(w_current,
diff_x, diff_y, o_glist);
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 4dfc750..b0d5559 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -556,47 +556,6 @@ o_complex_translate_display(TOPLEVEL *w_current,
* \brief
* \par Function Description
*
- */
-void o_complex_translate_display_selection(TOPLEVEL *w_current,
- int x1, int y1, GList *head)
-{
- GList *s_current = head;
- OBJECT *o_current;
-
- while (s_current != NULL) {
-
- o_current = (OBJECT *) s_current->data;
-
- if (!o_current) {
- fprintf(stderr, _("Got NULL in o_complex_translate_display_selection\n"));
- exit(-1);
- }
- o_complex_translate_display_single_object (w_current, x1, y1, o_current);
- s_current = s_current->next;
- }
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- * \note
- * experimental
- */
-void o_complex_translate2(TOPLEVEL *w_current, int dx, int dy, OBJECT *object)
-{
- if (object == NULL) {
- printf("cmt2 NO!\n");
- return;
- }
-
- o_complex_translate_display(w_current, dx, dy, object);
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
* \note
* don't know if this belongs yet
*/
@@ -676,22 +635,6 @@ void o_complex_translate_all(TOPLEVEL *w_current, int offset)
* \par Function Description
*
*/
-void o_complex_translate_selection(TOPLEVEL *w_current, int dx, int dy,
- GList *head)
-{
- if (head == NULL) {
- printf(_("Got NULL in o_complex_translate_selection!\n"));
- return;
- }
-
- o_complex_translate_display_selection(w_current, dx, dy, head);
-}
-
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery,
int angle, OBJECT *object)
{
commit 32dbd8536c17bcce9fbd9436fbb4c7efa32ee546
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Sep 8 00:17:03 2007 +0100
Removed unnecessary angle parameter to o_complex_rotate_world(), fix bug.
Fix rotation code to support angles other than 90 degrees. All current
users actually pass 90 degrees so this bug had no visible effect.
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index ef1261b..a17d6aa 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -555,7 +555,7 @@ void o_complex_translate_display_selection(TOPLEVEL *w_current, int x1, int y1,
void o_complex_translate2(TOPLEVEL *w_current, int dx, int dy, OBJECT *object);
void o_complex_translate_all(TOPLEVEL *w_current, int offset);
void o_complex_translate_selection(TOPLEVEL *w_current, int dx, int dy, GList *head);
-void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery, int angle, int angle_change, OBJECT *object);
+void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery, int angle, OBJECT *object);
int o_complex_mirror_world(TOPLEVEL *w_current, int centerx, int centery, OBJECT *object);
/* o_copy.c */
void o_copy_start(TOPLEVEL *w_current, int x, int y);
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 146d496..4dfc750 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -210,7 +210,6 @@ void o_complex_place_rotate(TOPLEVEL *w_current)
GList *ptr;
int x_local = -1;
int y_local = -1;
- int new_angle;
ptr = w_current->page_current->complex_place_list;
while(ptr) {
@@ -239,9 +238,7 @@ void o_complex_place_rotate(TOPLEVEL *w_current)
break;
case(OBJ_COMPLEX):
- new_angle = (o_current->complex->angle + 90) % 360;
- o_complex_rotate_world(w_current, x_local, y_local,
- new_angle, 90, o_current);
+ o_complex_rotate_world(w_current, x_local, y_local, 90, o_current);
break;
}
@@ -696,7 +693,7 @@ void o_complex_translate_selection(TOPLEVEL *w_current, int dx, int dy,
*
*/
void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery,
- int angle, int angle_change, OBJECT *object)
+ int angle, OBJECT *object)
{
int x, y;
int newx, newy;
@@ -704,7 +701,7 @@ void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery,
x = object->complex->x + (-centerx);
y = object->complex->y + (-centery);
- rotate_point_90(x, y, 90, &newx, &newy);
+ rotate_point_90(x, y, angle, &newx, &newy);
x = newx + (centerx);
y = newy + (centery);
@@ -712,14 +709,14 @@ void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery,
o_complex_world_translate_toplevel(w_current,
-object->complex->x,
-object->complex->y, object);
- o_complex_rotate_lowlevel(w_current, 0, 0, angle_change, object);
+ o_complex_rotate_lowlevel(w_current, 0, 0, angle, object);
object->complex->x = 0;
object->complex->y = 0;
o_complex_world_translate_toplevel(w_current, x, y, object);
- object->complex->angle = angle;
+ object->complex->angle = ( object->complex->angle + angle ) % 360;
#if DEBUG
printf("setting final rotated angle to: %d\n\n", object->angle);
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index 628f676..fdfad7b 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -208,7 +208,6 @@ void o_rotate_90_world(TOPLEVEL *w_current, GList *list,
{
OBJECT *object;
GList *s_current;
- int new_angle;
GList *other_objects=NULL;
GList *connected_objects=NULL;
OBJECT *o_current=NULL;
@@ -350,9 +349,7 @@ void o_rotate_90_world(TOPLEVEL *w_current, GList *list,
/* do the rotate */
/*w_current->ADDING_SEL=1; NEWSEL: needed? */
- new_angle = (object->complex->angle + 90) % 360;
- o_complex_rotate_world(w_current, centerx, centery,
- new_angle, 90, object);
+ o_complex_rotate_world(w_current, centerx, centery, 90, object);
/*w_current->ADDING_SEL = 0; NEWSEL: needed? */
s_conn_update_complex(w_current, object->complex->prim_objs);
if (!w_current->DONT_REDRAW) {
commit 08ac872c975a587cf4125c6468c79c453661ee8f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Sep 7 23:58:51 2007 +0100
Removed unused angle parameter to o_complex_rotate_lowlevel().
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 15d600a..146d496 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -712,8 +712,7 @@ void o_complex_rotate_world(TOPLEVEL *w_current, int centerx, int centery,
o_complex_world_translate_toplevel(w_current,
-object->complex->x,
-object->complex->y, object);
- o_complex_rotate_lowlevel(w_current,
- 0, 0, angle, angle_change, object);
+ o_complex_rotate_lowlevel(w_current, 0, 0, angle_change, object);
object->complex->x = 0;
object->complex->y = 0;
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 892ec5e..835290f 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -304,7 +304,7 @@ void o_complex_unset_color(OBJECT *complex);
void o_complex_unset_color_single(OBJECT *o_current);
void o_complex_set_saved_color_only(OBJECT *complex, int color);
OBJECT *o_complex_return_nth_pin(OBJECT *o_list, int counter);
-void o_complex_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, int angle_change, OBJECT *object);
+void o_complex_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
void o_complex_mirror_lowlevel(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
OBJECT *o_complex_return_pin_object(OBJECT *object, char *pin);
int o_complex_count_pins(OBJECT *object);
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 15c2ac4..a7729c9 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -604,7 +604,7 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
o_complex_mirror_lowlevel(toplevel, x, y, new_node);
}
- o_complex_rotate_lowlevel(toplevel, x, y, angle, angle, new_node);
+ o_complex_rotate_lowlevel(toplevel, x, y, angle, new_node);
o_complex_world_translate(toplevel, x, y, prim_objs);
if (!toplevel->ADDING_SEL) {
@@ -1317,15 +1317,14 @@ OBJECT *o_complex_return_nth_pin(OBJECT *o_list, int counter)
*/
/* pass in top level object */
void o_complex_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx,
- int world_centery,
- int angle,
- int angle_change,
- OBJECT *object)
+ int world_centery,
+ int angle,
+ OBJECT *object)
{
OBJECT *o_current=NULL;
#if DEBUG
- printf("------- a %d ac %d\n", angle, angle_change);
+ printf("------- a %d\n", angle);
#endif
g_return_if_fail(object != NULL);
@@ -1340,44 +1339,44 @@ void o_complex_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx,
while ( o_current != NULL ) {
switch(o_current->type) {
case(OBJ_LINE):
- o_line_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_line_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_NET):
- o_net_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_net_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_BUS):
- o_bus_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_bus_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_BOX):
- o_box_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_box_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_PICTURE):
- o_picture_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_picture_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_CIRCLE):
- o_circle_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_circle_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_PIN):
- o_pin_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_pin_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_ARC):
- o_arc_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_arc_rotate_world(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_COMPLEX):
case(OBJ_PLACEHOLDER):
- o_complex_rotate_lowlevel(toplevel, 0, 0, angle, angle_change, o_current);
+ o_complex_rotate_lowlevel(toplevel, 0, 0, angle, o_current);
break;
case(OBJ_TEXT):
- o_text_rotate_world(toplevel, 0, 0, angle_change, o_current);
+ o_text_rotate_world(toplevel, 0, 0, angle, o_current);
break;
}
commit c66d009979f49bd7ac8ba0641a6974be9e6a82d5
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Sep 7 23:57:38 2007 +0100
Removed unused angle parameter to o_text_rotate_world().
From an old unmerged patch by Patrick Bernaud.
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 7a1a835..15d600a 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -235,9 +235,7 @@ void o_complex_place_rotate(TOPLEVEL *w_current)
switch(o_current->type) {
case(OBJ_TEXT):
- new_angle = (o_current->text->angle + 90) % 360;
- o_text_rotate_world(w_current, x_local, y_local,
- new_angle, 90, o_current);
+ o_text_rotate_world(w_current, x_local, y_local, 90, o_current);
break;
case(OBJ_COMPLEX):
@@ -267,7 +265,7 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
OBJECT *o_start;
OBJECT *o_temp;
char *buffer;
- int temp, new_angle, i;
+ int temp, i;
GList *connected_objects=NULL;
const CLibSymbol *sym;
@@ -368,11 +366,7 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
case(OBJ_TEXT):
temp = w_current->complex_rotate / 90;
for (i = 0; i < temp; i++) {
- new_angle = (o_temp->
- text->angle + 90) % 360;
- o_text_rotate_world(w_current,
- x, y,
- new_angle, 90, o_temp);
+ o_text_rotate_world(w_current, x, y, 90, o_temp);
}
break;
}
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index b9c8afa..628f676 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -447,9 +447,7 @@ void o_rotate_90_world(TOPLEVEL *w_current, GList *list,
o_text_erase(w_current, object);
}
- new_angle = (object->text->angle + 90) % 360;
- o_text_rotate_world(w_current, centerx, centery,
- new_angle, 90, object);
+ o_text_rotate_world(w_current, centerx, centery, 90, object);
if (!w_current->DONT_REDRAW) {
o_text_draw(w_current, object);
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 239b43f..40aa72a 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -603,7 +603,6 @@ void o_text_place_rotate(TOPLEVEL *w_current)
OBJECT *o_current;
int x_local = -1;
int y_local = -1;
- int new_angle;
o_current = w_current->page_current->attrib_place_head->next;
while(o_current) {
@@ -626,9 +625,7 @@ void o_text_place_rotate(TOPLEVEL *w_current)
switch(o_current->type) {
case(OBJ_TEXT):
- new_angle = (o_current->text->angle + 90) % 360;
- o_text_rotate_world(w_current, x_local, y_local,
- new_angle, 90, o_current);
+ o_text_rotate_world(w_current, x_local, y_local, 90, o_current);
break;
}
o_current = o_current->next;
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index b857ade..892ec5e 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -439,7 +439,7 @@ void o_text_print_text_height_full(FILE *fp, char *string, int size);
void o_text_print_text_string(FILE *fp, char *string, int unicode_count, gunichar *unicode_table);
void o_text_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current, int origin_x, int origin_y, int unicode_count, gunichar *unicode_table);
void o_text_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
-void o_text_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, int angle_change, OBJECT *object);
+void o_text_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
void o_text_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
/* s_attrib.c */
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 2d88854..15c2ac4 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -1377,7 +1377,7 @@ void o_complex_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx,
break;
case(OBJ_TEXT):
- o_text_rotate_world(toplevel, 0, 0, angle, angle_change, o_current);
+ o_text_rotate_world(toplevel, 0, 0, angle_change, o_current);
break;
}
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 268357f..6199e52 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -1788,8 +1788,8 @@ void o_text_rotate_lowlevel(TOPLEVEL *toplevel, int world_centerx,
*
*/
void o_text_rotate_world(TOPLEVEL *toplevel,
- int world_centerx, int world_centery,
- int angle, int angle_change, OBJECT *object)
+ int world_centerx, int world_centery,
+ int angle, OBJECT *object)
{
int newx, newy;
int origx, origy;
@@ -1798,18 +1798,17 @@ void o_text_rotate_world(TOPLEVEL *toplevel,
origx = object->text->x;
origy = object->text->y;
- object->text->angle = ( object->text->angle + angle_change ) % 360;
+ object->text->angle = ( object->text->angle + angle ) % 360;
#if DEBUG
printf("rotating text angle: %d\n", angle);
- printf("rotating text angle_change: %d\n", angle_change);
printf("final text angle: %d\n", object->text->angle);
#endif
x = origx + (-world_centerx);
y = origy + (-world_centery);
- rotate_point_90(x, y, angle_change, &newx, &newy);
+ rotate_point_90(x, y, angle, &newx, &newy);
x = newx + (world_centerx);
y = newy + (world_centery);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs