[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: branch: master updated (1.1.2.20070818-205-gc356556)
The branch, master has been updated
via c356556b29a991ec1f40b6be01e332fdfd663dac (commit)
from 532aa7129dafe872d0993fed52d0dcba92e78399 (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 | 10 ----------
gschem/src/g_hook.c | 2 +-
gschem/src/o_arc.c | 17 -----------------
gschem/src/o_attrib.c | 8 ++++----
gschem/src/o_basic.c | 13 +++++++++++--
gschem/src/o_box.c | 20 --------------------
gschem/src/o_bus.c | 12 ------------
gschem/src/o_circle.c | 19 -------------------
gschem/src/o_complex.c | 12 ------------
gschem/src/o_delete.c | 21 +++++++++++----------
gschem/src/o_grips.c | 24 ++++++++++++------------
gschem/src/o_line.c | 16 ----------------
gschem/src/o_net.c | 12 ------------
gschem/src/o_picture.c | 26 +-------------------------
gschem/src/o_pin.c | 12 ------------
gschem/src/o_text.c | 16 ++--------------
gschem/src/x_attribedit.c | 2 +-
gschem/src/x_autonumber.c | 6 +++---
gschem/src/x_multiattrib.c | 6 +++---
19 files changed, 49 insertions(+), 205 deletions(-)
=================
Commit Messages
=================
commit c356556b29a991ec1f40b6be01e332fdfd663dac
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Dec 29 00:48:09 2007 +0000
gschem: Fix erase drawing of objects
Code which used o_..._erase() was not causing invalidations of the dirty
screen regions. Refactored to the code to use o_erase_single() instead,
and deleted the then unused o_..._erase() functions.
:100644 100644 4f22de4... e98c420... M gschem/include/prototype.h
:100644 100644 64a90ce... 80957fd... M gschem/src/g_hook.c
:100644 100644 3fc6ee4... 8bbc682... M gschem/src/o_arc.c
:100644 100644 4dba4cb... ab1dd2c... M gschem/src/o_attrib.c
:100644 100644 16cde6b... 67e00a1... M gschem/src/o_basic.c
:100644 100644 7b96b83... 712c37d... M gschem/src/o_box.c
:100644 100644 8090004... 0fb48a3... M gschem/src/o_bus.c
:100644 100644 0a87db4... 996af59... M gschem/src/o_circle.c
:100644 100644 96575e0... 55c4c13... M gschem/src/o_complex.c
:100644 100644 d1046bc... 1030f08... M gschem/src/o_delete.c
:100644 100644 7edefa8... 0482e0c... M gschem/src/o_grips.c
:100644 100644 567fdf6... 82c5f75... M gschem/src/o_line.c
:100644 100644 25d8ec3... 7adca6b... M gschem/src/o_net.c
:100644 100644 a4829f1... 0de08fc... M gschem/src/o_picture.c
:100644 100644 b9516c5... f76cefa... M gschem/src/o_pin.c
:100644 100644 4ec45ad... ba7464a... M gschem/src/o_text.c
:100644 100644 91ba130... 1c162fd... M gschem/src/x_attribedit.c
:100644 100644 7509fbb... c02d35d... M gschem/src/x_autonumber.c
:100644 100644 1f48ccf... d8cd0ea... M gschem/src/x_multiattrib.c
=========
Changes
=========
commit c356556b29a991ec1f40b6be01e332fdfd663dac
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Sat Dec 29 00:48:09 2007 +0000
gschem: Fix erase drawing of objects
Code which used o_..._erase() was not causing invalidations of the dirty
screen regions. Refactored to the code to use o_erase_single() instead,
and deleted the then unused o_..._erase() functions.
diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 4f22de4..e98c420 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -451,7 +451,6 @@ void o_arc_draw_dotted(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap
void o_arc_draw_dashed(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x, gint y, gint radius, gint angle1, gint angle2, gint arc_width, gint length, gint space);
void o_arc_draw_center(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x, gint y, gint radius, gint angle1, gint angle2, gint arc_width, gint length, gint space);
void o_arc_draw_phantom(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x, gint y, gint radius, gint angle1, gint angle2, gint arc_width, gint length, gint space);
-void o_arc_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_arc_eraserubber(GSCHEM_TOPLEVEL *w_current);
void o_arc_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_arc_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -495,7 +494,6 @@ void o_box_fill_hollow(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint
void o_box_fill_fill(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint width, gint height, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2);
void o_box_fill_hatch(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint width, gint height, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2);
void o_box_fill_mesh(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint width, gint height, gint fill_width, gint angle1, gint pitch1, gint angle2, gint pitch2);
-void o_box_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_box_eraserubber(GSCHEM_TOPLEVEL *w_current);
void o_box_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_box_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -514,7 +512,6 @@ void o_buffer_init(void);
void o_buffer_free(GSCHEM_TOPLEVEL *w_current);
/* o_bus.c */
void o_bus_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_bus_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_bus_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_bus_draw_xor_single(GSCHEM_TOPLEVEL *w_current, int dx, int dy, int whichone, OBJECT *o_current);
void o_bus_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -527,7 +524,6 @@ void o_circle_fill_hollow(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gi
void o_circle_fill_fill(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint radius, gint width, gint angle1, gint pitch1, gint angle2, gint pitch2);
void o_circle_fill_hatch(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint radius, gint width, gint angle1, gint pitch1, gint angle2, gint pitch2);
void o_circle_fill_mesh(GdkDrawable *w, GdkGC *gc, GdkColor *color, gint x, gint y, gint radius, gint width, gint angle1, gint pitch1, gint angle2, gint pitch2);
-void o_circle_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_circle_eraserubber(GSCHEM_TOPLEVEL *w_current);
void o_circle_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_circle_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -538,7 +534,6 @@ void o_circle_draw_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_circle_erase_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
/* o_complex.c */
void o_complex_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_complex_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_complex_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *complex);
void o_complex_start(GSCHEM_TOPLEVEL *w_current, int screen_x, int screen_y);
void o_complex_place_changed_run_hook(GSCHEM_TOPLEVEL *w_current);
@@ -606,7 +601,6 @@ void o_line_draw_dotted(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle ca
void o_line_draw_dashed(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
void o_line_draw_center(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
void o_line_draw_phantom(GdkWindow *w, GdkGC *gc, GdkColor *color, GdkCapStyle cap, gint x1, gint y1, gint x2, gint y2, gint line_width, gint length, gint space);
-void o_line_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_line_eraserubber(GSCHEM_TOPLEVEL *w_current);
void o_line_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_line_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -641,7 +635,6 @@ void o_move_end_rubberband(GSCHEM_TOPLEVEL *w_current, int world_diff_x, int wor
void o_move_stretch_rubberband(GSCHEM_TOPLEVEL *w_current);
/* o_net.c */
void o_net_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_net_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_net_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_net_draw_xor_single(GSCHEM_TOPLEVEL *w_current, int dx, int dy, int whichone, OBJECT *o_current);
void o_net_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -659,7 +652,6 @@ void o_picture_rubberbox(GSCHEM_TOPLEVEL *w_current, int x, int y);
void o_picture_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_picture_draw_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_picture_erase_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_picture_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_picture_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_picture_exchange(GSCHEM_TOPLEVEL *w_current, GdkPixbuf *pixbuf, const gchar *filename);
void picture_change_filename_dialog (GSCHEM_TOPLEVEL *w_current);
@@ -667,7 +659,6 @@ void o_picture_set_pixbuf(GSCHEM_TOPLEVEL *w_current, GdkPixbuf *pixbuf, char *f
/* o_pin.c */
void o_pin_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_pin_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_pin_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_pin_start(GSCHEM_TOPLEVEL *w_current, int x, int y);
void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y);
@@ -692,7 +683,6 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, char *string, int len);
void o_text_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_text_draw_rectangle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_text_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
-void o_text_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current);
void o_text_draw_xor(GSCHEM_TOPLEVEL *w_current, int dx, int dy, OBJECT *o_current);
void o_text_start(GSCHEM_TOPLEVEL *w_current, int screen_x, int screen_y);
void o_text_end(GSCHEM_TOPLEVEL *w_current);
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index 64a90ce..80957fd 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -363,7 +363,7 @@ SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_colorname,
object = (OBJECT *) attribute->attribute->object;
if (object &&
object->text) {
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
if (x != -1) {
object->text->x = x;
}
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 3fc6ee4..8bbc682 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -803,23 +803,6 @@ void o_arc_draw_phantom(GdkWindow *w, GdkGC *gc,
}
-/*! \brief Erase arc described by OBJECT.
- * \par Function Description
- * This function erases the arc described in the <B>OBJECT</B> structure
- * pointed by <B>o_current</B>.
- *
- * It makes a call to the #o_box_draw() function after setting the
- * special color. Therefo re an arc is drawn with the background color
- * over the previous one.
- */
-void o_arc_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_arc_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 4dba4cb..ab1dd2c 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -115,7 +115,7 @@ void o_attrib_toggle_visibility(GSCHEM_TOPLEVEL *w_current, GList *list)
/* only erase if we are not showing hidden text */
if (!toplevel->show_hidden_text) {
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
}
object->visibility = INVISIBLE;
@@ -130,7 +130,7 @@ void o_attrib_toggle_visibility(GSCHEM_TOPLEVEL *w_current, GList *list)
/* if we are in the special show hidden mode, then erase text first */
/* to get rid of the little I */
if (toplevel->show_hidden_text) {
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
}
object->visibility = VISIBLE;
@@ -177,7 +177,7 @@ void o_attrib_toggle_show_name_value(GSCHEM_TOPLEVEL *w_current,
}
if (object->type == OBJ_TEXT) {
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
object->show_name_value = new_show_name_value;
o_text_recreate(toplevel, object);
o_text_draw(w_current, object);
@@ -296,7 +296,7 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
o_selection_add( toplevel->page_current->selection_list,
toplevel->page_current->object_tail );
- o_text_erase(w_current, toplevel->page_current->object_tail);
+ o_erase_single(w_current, toplevel->page_current->object_tail);
o_text_draw(w_current, toplevel->page_current->object_tail);
/* handle slot= attribute, it's a special case */
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 16cde6b..67e00a1 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -252,10 +252,19 @@ void o_erase_selected(GSCHEM_TOPLEVEL *w_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
+/*! \brief Erase a given OBJECT
+ *
* \par Function Description
+ * This function erases the passed OBJECT, <B>object</B>.
*
+ * It makes a call to object's draw function after having set a
+ * color override to the background color. The object is drawn in
+ * the background color, causing it to dissapear.
+ *
+ * \bug No redrawing is done of occluded objects, including the grid.
+ *
+ * \param [in] w_current The GSCHEM_TOPLEVEL object.
+ * \param [in] o_current Circle OBJECT to erase.
*/
void o_erase_single(GSCHEM_TOPLEVEL *w_current, OBJECT *object)
{
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index 7b96b83..712c37d 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -803,26 +803,6 @@ void o_box_fill_mesh(GdkDrawable *w, GdkGC *gc, GdkColor *color,
}
-/*! \brief Erase a box described by OBJECT.
- * \par Function Description
- * This function erases a box, described in a <B>OBJECT</B> structure pointed
- * by <B>o_current</B>.
- *
- * It makes a call to the function #o_box_draw() after setting the special
- * color. Therefore a box is drawn with background color over the previous
- * one.
- *
- * \param [in] w_current The GSCHEM_TOPLEVEL object.
- * \param [in] o_current Box OBJECT to erase.
- */
-void o_box_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_box_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
-
/*! \todo Finish function documentation!!!
* \brief
* \par Function Description
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 8090004..0fb48a3 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -108,18 +108,6 @@ void o_bus_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void o_bus_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_bus_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 0a87db4..996af59 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -497,25 +497,6 @@ void o_circle_fill_mesh(GdkDrawable *w, GdkGC *gc, GdkColor *color,
}
-/*! \brief Erase a circle described by OBJECT
- * \par Function Description
- * This function erases a circle described in a #OBJECT structure
- * pointed by <B>o_current</B>.
- *
- * It makes a call to the function #o_circle_draw() after setting the
- * special color. Therefore a circle is drawn with background color over
- * the previous one.
- *
- * \param [in] w_current The GSCHEM_TOPLEVEL object.
- * \param [in] o_current Circle OBJECT to erase.
- */
-void o_circle_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_circle_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 96575e0..55c4c13 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -51,18 +51,6 @@ void o_complex_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void o_complex_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_complex_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index d1046bc..1030f08 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -42,7 +42,8 @@ void o_delete_net(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
GList *other_objects = NULL;
o_cue_undraw(w_current, obj);
- o_net_erase(w_current, obj);
+
+ o_erase_single(w_current, obj);
o_line_erase_grips(w_current, obj);
other_objects = s_conn_return_others(other_objects, obj);
@@ -68,7 +69,7 @@ void o_delete_bus(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
GList *other_objects = NULL;
o_cue_undraw(w_current, obj);
- o_bus_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_line_erase_grips(w_current, obj);
other_objects = s_conn_return_others(other_objects, obj);
@@ -95,7 +96,7 @@ static void o_delete_pin(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
GList *other_objects = NULL;
o_cue_undraw(w_current, obj);
- o_pin_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_line_erase_grips(w_current, obj);
other_objects = s_conn_return_others(other_objects, obj);
@@ -121,7 +122,7 @@ void o_delete_complex(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
GList *other_objects = NULL;
o_cue_undraw_complex(w_current, obj);
- o_complex_erase(w_current, obj);
+ o_erase_single(w_current, obj);
other_objects = s_conn_return_complex_others(other_objects, obj);
@@ -141,7 +142,7 @@ void o_delete_complex(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
static void o_delete_line(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_line_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_line_erase_grips(w_current, obj);
s_delete(toplevel, obj);
@@ -157,7 +158,7 @@ static void o_delete_line(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
static void o_delete_box(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_box_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_box_erase_grips(w_current, obj);
s_delete(toplevel, obj);
@@ -174,7 +175,7 @@ static void o_delete_box(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
static void o_delete_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_picture_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_picture_erase_grips(w_current, obj);
s_delete(toplevel, obj);
@@ -190,7 +191,7 @@ static void o_delete_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
static void o_delete_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_circle_erase(w_current, obj);
+ o_erase_single(w_current, obj);
o_circle_erase_grips(w_current, obj);
s_delete(toplevel, obj);
@@ -207,7 +208,7 @@ static void o_delete_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
void o_delete_text(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_text_erase(w_current, obj);
+ o_erase_single(w_current, obj);
s_delete(toplevel, obj);
toplevel->page_current->object_tail =
@@ -222,7 +223,7 @@ void o_delete_text(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
static void o_delete_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *obj)
{
TOPLEVEL *toplevel = w_current->toplevel;
- o_arc_erase(w_current, obj);
+ o_erase_single(w_current, obj);
s_delete(toplevel, obj);
toplevel->page_current->object_tail =
diff --git a/gschem/src/o_grips.c b/gschem/src/o_grips.c
index 7edefa8..0482e0c 100644
--- a/gschem/src/o_grips.c
+++ b/gschem/src/o_grips.c
@@ -535,7 +535,7 @@ int o_grips_start(GSCHEM_TOPLEVEL *w_current, int x, int y)
WORLDtoSCREEN( toplevel, object->line->x[!whichone], object->line->y[!whichone],
&w_current->start_x, &w_current->start_y );
- o_net_erase(w_current, object);
+ o_erase_single(w_current, object);
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color) );
gdk_draw_line(w_current->backingstore, w_current->xor_gc,
@@ -556,7 +556,7 @@ int o_grips_start(GSCHEM_TOPLEVEL *w_current, int x, int y)
WORLDtoSCREEN( toplevel, object->line->x[!whichone], object->line->y[!whichone],
&w_current->start_x, &w_current->start_y );
- o_pin_erase(w_current, object);
+ o_erase_single(w_current, object);
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color) );
gdk_draw_line(w_current->backingstore, w_current->xor_gc,
@@ -574,7 +574,7 @@ int o_grips_start(GSCHEM_TOPLEVEL *w_current, int x, int y)
WORLDtoSCREEN( toplevel, object->line->x[!whichone], object->line->y[!whichone],
&w_current->start_x, &w_current->start_y );
- o_bus_erase(w_current, object);
+ o_erase_single(w_current, object);
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color) );
gdk_draw_line(w_current->backingstore, w_current->xor_gc,
@@ -631,7 +631,7 @@ void o_grips_start_arc(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
w_current->last_drawb_mode = -1;
/* erase the arc before */
- o_arc_erase(w_current, o_current);
+ o_erase_single(w_current, o_current);
/* describe the arc with GSCHEM_TOPLEVEL variables */
/* center */
@@ -675,7 +675,7 @@ void o_grips_start_box(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
w_current->last_drawb_mode = -1;
/* erase the box before */
- o_box_erase(w_current, o_current);
+ o_erase_single(w_current, o_current);
/* (last_x,last_y) is the selected corner */
/* (start_x, start_y) is the opposite corner */
@@ -742,7 +742,7 @@ void o_grips_start_picture(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
w_current->last_drawb_mode = -1;
/* erase the picture before */
- o_picture_erase(w_current, o_current);
+ o_erase_single(w_current, o_current);
w_current->current_pixbuf = o_current->picture->original_picture;
w_current->pixbuf_filename = o_current->picture->filename;
w_current->pixbuf_wh_ratio = o_current->picture->ratio;
@@ -812,7 +812,7 @@ void o_grips_start_circle(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
w_current->last_drawb_mode = -1;
/* erase the circle before */
- o_circle_erase(w_current, o_current);
+ o_erase_single(w_current, o_current);
/* describe the circle with GSCHEM_TOPLEVEL variables */
/* (start_x, start_y) is the center of the circle */
@@ -856,7 +856,7 @@ void o_grips_start_line(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
w_current->last_drawb_mode = -1;
/* erase the line before */
- o_line_erase(w_current, o_current);
+ o_erase_single(w_current, o_current);
/* describe the line with GSCHEM_TOPLEVEL variables */
WORLDtoSCREEN( toplevel, o_current->line->x[whichone], o_current->line->y[whichone],
@@ -1130,7 +1130,7 @@ void o_grips_end(GSCHEM_TOPLEVEL *w_current)
y = snap_grid(toplevel, y);
o_cue_undraw(w_current, object);
- o_net_erase(w_current, object);
+ o_erase_single(w_current, object);
/* erase xor line */
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color));
@@ -1155,7 +1155,7 @@ void o_grips_end(GSCHEM_TOPLEVEL *w_current)
/* add bus rippers if necessary */
if (o_net_add_busrippers(w_current, object, connected_objects)) {
- o_net_erase(w_current, object);
+ o_erase_single(w_current, object);
/*o_line_erase_grips(w_current, object); */
if (toplevel->net_style == THICK ) {
@@ -1236,7 +1236,7 @@ void o_grips_end(GSCHEM_TOPLEVEL *w_current)
y = snap_grid(toplevel, y);
o_cue_undraw(w_current, object);
- o_pin_erase(w_current, object);
+ o_erase_single(w_current, object);
/* erase xor line */
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color));
@@ -1294,7 +1294,7 @@ void o_grips_end(GSCHEM_TOPLEVEL *w_current)
y = snap_grid(toplevel, y);
o_cue_undraw(w_current, object);
- o_bus_erase(w_current, object);
+ o_erase_single(w_current, object);
/* erase xor line */
gdk_gc_set_foreground(w_current->xor_gc,
x_get_darkcolor(w_current->select_color));
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index 567fdf6..82c5f75 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -727,22 +727,6 @@ void o_line_draw_phantom(GdkWindow *w, GdkGC *gc, GdkColor *color,
}
}
-/*! \brief Erase line object.
- * \par Function Description
- * This function erases the line object described by <B>*o_current</B>.
- *
- * It draws the line over the sheet with the background color.
- *
- * \param [in] w_current The GSCHEM_ TOPLEVEL object.
- * \param [in] o_current Line OBJECT to erase.
- */
-void o_line_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_line_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation
* \brief
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 25d8ec3..7adca6b 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -145,18 +145,6 @@ void o_net_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void o_net_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_net_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index a4829f1..0de08fc 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -549,30 +549,6 @@ void o_picture_erase_grips(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
-/*! \brief Erase a picture described by OBJECT.
- * \par Function Description
- * This function erases a picture, described in a <B>OBJECT</B> structure
- * pointed by <B>o_current</B>.
- *
- * It makes a call to the function #o_picture_draw() after setting
- * the special color. Therefore a picture is drawn with background color
- * over the previous one.
- *
- * \param [in] w_current The GSCHEM_TOPLEVEL object.
- * \param [in] o_current Picture OBJECT to erase.
- */
-void o_picture_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
-#if DEBUG
- printf("o_picture_erase called\n");
-#endif
- gdk_gc_set_foreground(w_current->gc,
- x_get_color(toplevel->background_color));
- toplevel->override_color = toplevel->background_color;
- o_picture_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \brief Draw a picture described by OBJECT with translation
* \par Function Description
@@ -652,7 +628,7 @@ void o_picture_exchange (GSCHEM_TOPLEVEL *w_current, GdkPixbuf *pixbuf,
/* It's selected. Then change picture if it's a picture */
if (object->type == OBJ_PICTURE) {
/* Erase previous picture */
- o_picture_erase(w_current, object);
+ o_erase_single(w_current, object);
/* Change picture attributes */
if (object->picture->original_picture != NULL) {
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index b9516c5..f76cefa 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -108,18 +108,6 @@ void o_pin_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void o_pin_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_pin_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index 4ec45ad..ba7464a 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -223,18 +223,6 @@ void o_text_draw(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
}
}
-/*! \todo Finish function documentation!!!
- * \brief
- * \par Function Description
- *
- */
-void o_text_erase(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
-{
- TOPLEVEL *toplevel = w_current->toplevel;
- toplevel->override_color = toplevel->background_color;
- o_text_draw(w_current, o_current);
- toplevel->override_color = -1;
-}
/*! \todo Finish function documentation!!!
* \brief
@@ -479,7 +467,7 @@ void o_text_edit_end(GSCHEM_TOPLEVEL *w_current, char *string, int len, int text
/* and we should pass it here with a function parameter (?) */
object->saved_color = w_current->edit_color;
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
o_text_recreate(toplevel, object);
o_text_draw(w_current, object);
@@ -514,7 +502,7 @@ void o_text_change(GSCHEM_TOPLEVEL *w_current, OBJECT *object, char *string,
}
/* erase old object */
- o_text_erase(w_current, object);
+ o_erase_single(w_current, object);
/* second change the real object */
if (object->text->string) {
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index 91ba130..1c162fd 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -244,7 +244,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, GSCHEM_TOPLEVEL *w_current)
world_y = snap_grid(toplevel, world_y);
new->text->x = world_x;
new->text->y = world_y;
- o_text_erase(w_current, new);
+ o_erase_single(w_current, new);
o_text_recreate(toplevel, new);
o_text_draw(w_current, new);
toplevel->page_current->CHANGED = 1;
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 7509fbb..c02d35d 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -572,7 +572,7 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
autotext->current_searchtext);
/* redraw the text */
- o_text_erase(autotext->w_current, o_current);
+ o_erase_single(autotext->w_current, o_current);
o_text_recreate(autotext->w_current->toplevel, o_current);
o_text_draw(autotext->w_current, o_current);
@@ -616,7 +616,7 @@ void autonumber_apply_new_text(AUTONUMBER_TEXT * autotext, OBJECT *o_current,
g_free(slot_str);
g_free(o_slot->text->string);
o_slot->text->string = g_strdup_printf("slot=%d",slot);
- o_text_erase(autotext->w_current, o_slot);
+ o_erase_single(autotext->w_current, o_slot);
o_text_recreate(autotext->w_current->toplevel, o_slot);
o_text_draw(autotext->w_current, o_slot);
}
@@ -635,7 +635,7 @@ void autonumber_apply_new_text(AUTONUMBER_TEXT * autotext, OBJECT *o_current,
o_current->text->string = g_strdup_printf("%s%d", autotext->current_searchtext,
number);
/* redraw the text */
- o_text_erase(autotext->w_current, o_current);
+ o_erase_single(autotext->w_current, o_current);
o_text_recreate(autotext->w_current->toplevel, o_current);
o_text_draw(autotext->w_current, o_current);
autotext->w_current->toplevel->page_current->CHANGED = 1;
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index 1f48ccf..d8cd0ea 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -817,7 +817,7 @@ static void multiattrib_callback_toggled_visible(GtkCellRendererToggle *cell_ren
COLUMN_ATTRIBUTE, &o_attrib,
-1);
g_assert (o_attrib->type == OBJ_TEXT);
- o_text_erase (w_current, o_attrib);
+ o_erase_single (w_current, o_attrib);
visibility = o_attrib->visibility == VISIBLE ? INVISIBLE : VISIBLE;
@@ -859,7 +859,7 @@ static void multiattrib_callback_toggled_show_name(GtkCellRendererToggle *cell_r
COLUMN_ATTRIBUTE, &o_attrib,
-1);
g_assert (o_attrib->type == OBJ_TEXT);
- o_text_erase (w_current, o_attrib);
+ o_erase_single (w_current, o_attrib);
switch (o_attrib->show_name_value) {
case SHOW_NAME_VALUE: new_snv = SHOW_VALUE; break;
@@ -908,7 +908,7 @@ static void multiattrib_callback_toggled_show_value(GtkCellRendererToggle *cell_
COLUMN_ATTRIBUTE, &o_attrib,
-1);
g_assert (o_attrib->type == OBJ_TEXT);
- o_text_erase (w_current, o_attrib);
+ o_erase_single (w_current, o_attrib);
switch (o_attrib->show_name_value) {
case SHOW_NAME_VALUE: new_snv = SHOW_NAME; break;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs