[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_basic.c
User: cnieves
Date: 06/10/21 17:14:42
Modified: . Tag: glist_dev o_basic.c
Log:
libgeda/gschem: Rename o_recalc to o_recalc_object_list.
libgeda: make o_recalc_object_list to call a new function
o_recalc_single_object, for each object in the list.
Revision Changes Path
No revision
No revision
1.14.2.1 +26 -12 eda/geda/gaf/libgeda/src/o_basic.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_basic.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/o_basic.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -b -r1.14 -r1.14.2.1
--- o_basic.c 5 Jul 2006 03:13:38 -0000 1.14
+++ o_basic.c 21 Oct 2006 21:14:42 -0000 1.14.2.1
@@ -87,24 +87,18 @@
}
}
-/*! \brief Recalculate position of all objects.
+/*! \brief Recalculate position of the given object.
* \par Function Description
- * This function will take a list of objects and recalculate their
- * positions on the screen.
+ * This function will take an object and recalculate its
+ * position on the screen.
*
* \param [in] w_current The TOPLEVEL object.
- * \param [in,out] object_list OBJECT list to recalculate.
+ * \param [in,out] o_current OBJECT to recalculate.
*
*/
-void o_recalc(TOPLEVEL *w_current, OBJECT *object_list)
+void o_recalc_single_object(TOPLEVEL *w_current, OBJECT *o_current)
{
- OBJECT *o_current;
-
- if (object_list == NULL)
- return;
-
- o_current = object_list;
- while (o_current != NULL) {
+ if (o_current != NULL) {
switch(o_current->type) {
case(OBJ_LINE):
@@ -144,11 +138,31 @@
o_arc_recalc(w_current, o_current);
break;
}
+ }
+}
+
+/*! \brief Recalculate position of a list of objects.
+ * \par Function Description
+ * This function will take a list of objects and recalculate their
+ * positions on the screen.
+ *
+ * \param [in] w_current The TOPLEVEL object.
+ * \param [in,out] object_list OBJECT list to recalculate.
+ *
+ */
+void
+o_recalc_object_list(TOPLEVEL *w_current, OBJECT *object_list)
+{
+ OBJECT *o_current;
+ o_current = object_list;
+ while (o_current != NULL) {
+ o_recalc_single_object(w_current, o_current);
o_current = o_current->next;
}
}
+
/*! \brief Set an #OBJECT's line options.
* \par Function Description
* This function allows a line's end, type, width, length and space to be set.
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs