[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.1-20081221-24-geed07fa)



The branch, master has been updated
       via  eed07fa8c85fbeda15e974f186a69f546506fb12 (commit)
       via  f583363e84d42001b0abb65bf828d013f120df63 (commit)
      from  9d2dea918ee72b474e11962adbd9ca6167162c14 (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/lib/gschem-colormap-lightbg |    2 +-
 libgeda/include/prototype_priv.h   |    2 +-
 libgeda/include/struct.h           |    2 ++
 libgeda/src/f_print.c              |    9 +++++++--
 libgeda/src/o_arc_basic.c          |   21 +++++----------------
 libgeda/src/o_box_basic.c          |   28 +++++++---------------------
 libgeda/src/o_bus_basic.c          |    4 +---
 libgeda/src/o_circle_basic.c       |    8 ++------
 libgeda/src/o_line_basic.c         |   20 +++++---------------
 libgeda/src/o_net_basic.c          |    4 +---
 libgeda/src/o_path_basic.c         |    3 +--
 libgeda/src/o_pin_basic.c          |    4 +---
 libgeda/src/o_text_basic.c         |    4 +---
 libgeda/src/s_cue.c                |    8 ++------
 14 files changed, 37 insertions(+), 82 deletions(-)


=================
 Commit Messages
=================

commit eed07fa8c85fbeda15e974f186a69f546506fb12
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Mon Dec 22 21:16:36 2008 +0000

    libgeda: Only output PostScript color commands if color changes.

:100644 100644 0bcb657... 8a36e21... M	libgeda/include/prototype_priv.h
:100644 100644 a906eda... ddfb00a... M	libgeda/include/struct.h
:100644 100644 236ac71... a4ff51d... M	libgeda/src/f_print.c
:100644 100644 0553b00... 2c6a8e6... M	libgeda/src/o_arc_basic.c
:100644 100644 d0334f7... 4ef8392... M	libgeda/src/o_box_basic.c
:100644 100644 b8efcb5... 7637f65... M	libgeda/src/o_bus_basic.c
:100644 100644 dccb69f... eb0c315... M	libgeda/src/o_circle_basic.c
:100644 100644 5a18c2d... 351eaa1... M	libgeda/src/o_line_basic.c
:100644 100644 8a88531... f01b0b5... M	libgeda/src/o_net_basic.c
:100644 100644 7952a48... 5b29223... M	libgeda/src/o_path_basic.c
:100644 100644 3e6b88c... 3ff8f86... M	libgeda/src/o_pin_basic.c
:100644 100644 082efd4... 10ae34f... M	libgeda/src/o_text_basic.c
:100644 100644 187d96f... d53536a... M	libgeda/src/s_cue.c

commit f583363e84d42001b0abb65bf828d013f120df63
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Mon Dec 22 21:16:35 2008 +0000

    gschem: Fix light background net color.
    
    Net color was incorrectly converted to #rrggbb.

:100644 100644 aa658c4... 7dce4f5... M	gschem/lib/gschem-colormap-lightbg

=========
 Changes
=========

commit eed07fa8c85fbeda15e974f186a69f546506fb12
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Mon Dec 22 21:16:36 2008 +0000

    libgeda: Only output PostScript color commands if color changes.

diff --git a/libgeda/include/prototype_priv.h b/libgeda/include/prototype_priv.h
index 0bcb657..8a36e21 100644
--- a/libgeda/include/prototype_priv.h
+++ b/libgeda/include/prototype_priv.h
@@ -3,7 +3,7 @@ gchar *o_save_objects(GList *object_list, gboolean save_attribs);
 
 /* f_print.c */
 void f_print_set_line_width(FILE *fp, int width);
-void f_print_set_color(FILE *fp, int color);
+void f_print_set_color(TOPLEVEL *toplevel, FILE *fp, int color);
 int f_print_header(TOPLEVEL *toplevel, FILE *fp, int paper_size_x, int paper_size_y, int eps);
 void f_print_footer(FILE *fp);
 void f_print_objects(TOPLEVEL *toplevel, FILE *fp, GList *obj_list, int start_x, int start_y, float scale, int unicode_count, gunichar *unicode_table);
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index a906eda..ddfb00a 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -459,6 +459,8 @@ struct st_toplevel {
 
   int override_color;			/* used in doing selections */
 
+  int last_ps_color;                    /* used in print code */
+
   int DONT_REDRAW;			/* misc flags */
   int ADDING_SEL;
 
diff --git a/libgeda/src/f_print.c b/libgeda/src/f_print.c
index 236ac71..a4ff51d 100644
--- a/libgeda/src/f_print.c
+++ b/libgeda/src/f_print.c
@@ -60,13 +60,16 @@ void f_print_set_line_width(FILE *fp, int width)
  *  This function converts the color number passed to a string
  *  and prints it to the postscript document provided.
  *
+ *  \param [in]     toplevel The current #TOPLEVEL structure.
  *  \param [in]     fp     The postscript document to print the color to.
  *  \param [in]     color  Integer color to convert and print.
  */
-void f_print_set_color(FILE *fp, int color) 
+void f_print_set_color(TOPLEVEL *toplevel, FILE *fp, int color) 
 {
   gchar *string;
 
+  if (!toplevel->print_color || (toplevel->last_ps_color == color)) return;
+
   string = s_color_ps_string(color);
 
   if (string) {
@@ -76,6 +79,8 @@ void f_print_set_color(FILE *fp, int color)
   }
 
   g_free (string);
+
+  toplevel->last_ps_color = color;
 }
 
 /*! \brief Prints the header to a postscript document.
@@ -586,7 +591,7 @@ int f_print_stream(TOPLEVEL *toplevel, FILE *fp)
   /* Now the output is defined in terms of mils */
   /* Draw a box with the background colour covering the whole page */
   if (toplevel->print_color) {
-    f_print_set_color(fp, toplevel->print_color_background);
+    f_print_set_color(toplevel, fp, toplevel->print_color_background);
     fprintf(fp,"%d %d 0 0 fbox\n",
 	    toplevel->paper_height,
 	    toplevel->paper_width);
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index 0553b00..2c6a8e6 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -732,9 +732,7 @@ void o_arc_print_solid(TOPLEVEL *toplevel, FILE *fp,
 		       int arc_width, int length, int space,
 		       int origin_x, int origin_y)
 {
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /* inverting angle2 if < 0 and changing angle1 accordingly */
   if (angle2 < 0) {
@@ -787,10 +785,7 @@ void o_arc_print_dotted(TOPLEVEL *toplevel, FILE *fp,
 {
   int da, d;
 
-
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /*! \note
    *  Depending on the radius of the arc, the <B>space</B> parameter is
@@ -874,9 +869,7 @@ void o_arc_print_dashed(TOPLEVEL *toplevel, FILE *fp,
 {
   int da, db, a1, a2, d;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   /*! \note
    *  Depending on the radius of the arc, the <B>space</B> (resp. <B>length</B>)
@@ -983,9 +976,7 @@ void o_arc_print_center(TOPLEVEL *toplevel, FILE *fp,
 {
   int da, db, a1, a2, d;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /*! \note
    *  Depending on the radius of the arc, the <B>space</B> (resp. <B>length</B>)
@@ -1115,9 +1106,7 @@ void o_arc_print_phantom(TOPLEVEL *toplevel, FILE *fp,
 {
   int da, db, a1, a2, d;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /*! \note
    *  Depending on the radius of the arc, the <B>space</B> (resp. <B>length</B>)
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index d0334f7..4ef8392 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -820,9 +820,7 @@ o_box_print_solid(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   x1 = x;
   y1 = y - height; /* move the origin to 0, 0*/
@@ -885,9 +883,7 @@ void o_box_print_dotted(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   x1 = x;
   y1 = y - height; /* move the origin to 0, 0*/
@@ -949,9 +945,7 @@ void o_box_print_dashed(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   
   x1 = x;
@@ -1014,9 +1008,7 @@ void o_box_print_center(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   x1 = x;
   y1 = y - height; /* move the origin to 0, 0*/
@@ -1078,9 +1070,7 @@ void o_box_print_phantom(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   x1 = x;
   y1 = y - height; /* move the origin to 0, 0*/
@@ -1150,9 +1140,7 @@ void o_box_print_filled(TOPLEVEL *toplevel, FILE *fp,
 {
   int x1, y1;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   x1 = x;
   y1 = y-height; /* move the origin to 0, 0*/
@@ -1264,9 +1252,7 @@ void o_box_print_hatch(TOPLEVEL *toplevel, FILE *fp,
   g_return_if_fail(toplevel != NULL);
   g_return_if_fail(fp != NULL);
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /* Avoid printing line widths too small */
   if (fill_width <= 1) fill_width = 2;
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index b8efcb5..7637f65 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -302,9 +302,7 @@ void o_bus_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
 
   cross = offset;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, o_current->color);
-  }
+  f_print_set_color(toplevel, fp, o_current->color);
 
   bus_width = 2;
   if (toplevel->bus_style == THICK) {
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index dccb69f..eb0c315 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -965,9 +965,7 @@ void o_circle_print_filled(TOPLEVEL *toplevel, FILE *fp,
 			   int angle2, int pitch2,
 			   int origin_x, int origin_y)
 {
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   fprintf(fp, "%d %d %d dot\n",
 	  x-origin_x, y-origin_y,
@@ -1075,9 +1073,7 @@ void o_circle_print_hatch(TOPLEVEL *toplevel, FILE *fp,
   g_return_if_fail(toplevel != NULL);
   g_return_if_fail(fp != NULL);
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
 
   /* Avoid printing line widths too small */
   if (fill_width <= 1) fill_width = 2;
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index 5a18c2d..351eaa1 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -635,9 +635,7 @@ void o_line_print_solid(TOPLEVEL *toplevel, FILE *fp,
 			int line_width, int length, int space,
 			int origin_x, int origin_y)
 {
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   fprintf(fp,"%d %d %d %d %d line\n",
 	  x1,y1,x2,y2, line_width);
@@ -682,9 +680,7 @@ void o_line_print_dotted(TOPLEVEL *toplevel, FILE *fp,
   double dx1, dy1;
   double xa, ya;
   
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   /* The dotted line command takes an array of dots so print out the
    * beginnings of the array 
@@ -765,9 +761,7 @@ void o_line_print_dashed(TOPLEVEL *toplevel, FILE *fp,
   double dx1, dy1, dx2, dy2;
   double xa, ya, xb, yb;
   
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   /* the dashed line function takes an array of start-finish pairs
    * output the beginnings of the array now
@@ -870,9 +864,7 @@ void o_line_print_center(TOPLEVEL *toplevel, FILE *fp,
   double dx1, dy1, dx2, dy2;
   double xa, ya, xb, yb;
   
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   fprintf(fp, "[");
 
@@ -1004,9 +996,7 @@ void o_line_print_phantom(TOPLEVEL *toplevel, FILE *fp,
   double dx1, dy1, dx2, dy2;
   double xa, ya, xb, yb;
   
-  if (toplevel->print_color) {
-    f_print_set_color(fp, color);
-  }
+  f_print_set_color(toplevel, fp, color);
   
   fprintf(fp,"[");
 
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 8a88531..f01b0b5 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -288,9 +288,7 @@ void o_net_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
 
   cross = offset;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, o_current->color);
-  }
+  f_print_set_color(toplevel, fp, o_current->color);
 
   net_width = 2;
   if (toplevel->net_style == THICK) {
diff --git a/libgeda/src/o_path_basic.c b/libgeda/src/o_path_basic.c
index 7952a48..5b29223 100644
--- a/libgeda/src/o_path_basic.c
+++ b/libgeda/src/o_path_basic.c
@@ -965,8 +965,7 @@ void o_path_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
     outl_func = o_path_print_solid;
   }
 
-  if (toplevel->print_color)
-    f_print_set_color (fp, o_current->color);
+  f_print_set_color (toplevel, fp, o_current->color);
 
   f_print_set_line_width (fp, line_width);
 
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index 3e6b88c..3ff8f86 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -298,9 +298,7 @@ void o_pin_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
     return;
   }
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, o_current->color);
-  }
+  f_print_set_color(toplevel, fp, o_current->color);
 
   x1 = o_current->line->x[0] - origin_x;
   y1 = o_current->line->y[0] - origin_y;
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 082efd4..10ae34f 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -1535,9 +1535,7 @@ void o_text_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
     return;
   }
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, o_current->color);
-  }
+  f_print_set_color(toplevel, fp, o_current->color);
 
 
   if (o_attrib_get_name_value(o_current->text->string, &name, &value)) {
diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index 187d96f..d53536a 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -46,9 +46,7 @@ void s_cue_postscript_fillbox(TOPLEVEL * toplevel, FILE * fp, int x,
   offset = CUE_BOX_SIZE;
   offset2 = offset*2;
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, toplevel->net_endpoint_color);
-  }
+  f_print_set_color(toplevel, fp, toplevel->net_endpoint_color);
 
   fprintf(fp, "%d %d %d %d fbox\n", 
 	   offset2, offset2, x-offset, y-offset);
@@ -70,9 +68,7 @@ void s_cue_postscript_fillcircle(TOPLEVEL * toplevel, FILE * fp,
     offset2 = CUE_CIRCLE_SMALL_SIZE;
   }
 
-  if (toplevel->print_color) {
-    f_print_set_color(fp, toplevel->junction_color);
-  }
+  f_print_set_color(toplevel, fp, toplevel->junction_color);
 
   fprintf(fp, "newpath\n");
   fprintf(fp, "%d %d\n", x, y);

commit f583363e84d42001b0abb65bf828d013f120df63
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Date:   Mon Dec 22 21:16:35 2008 +0000

    gschem: Fix light background net color.
    
    Net color was incorrectly converted to #rrggbb.

diff --git a/gschem/lib/gschem-colormap-lightbg b/gschem/lib/gschem-colormap-lightbg
index aa658c4..7dce4f5 100644
--- a/gschem/lib/gschem-colormap-lightbg
+++ b/gschem/lib/gschem-colormap-lightbg
@@ -19,7 +19,7 @@
    (pin                "#000000")
    (net-endpoint       "#ff0000")
    (graphic            "#008b00")
-   (net                "#00008b")
+   (net                "#0000ee")
    (attribute          "#000000")
    (logic-bubble       "#008b8b")
    (grid               "#7f7f7f")




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs