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

gEDA-cvs: pcb.git: branch: master updated (71f29218994b8da19665bbb09f4e9d1213231047)



The branch, master has been updated
       via  71f29218994b8da19665bbb09f4e9d1213231047 (commit)
      from  dbcbb88e326ae882c51063733ad5e98a5ea48014 (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
=========

 src/hid/ps/ps.c |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)


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

commit 71f29218994b8da19665bbb09f4e9d1213231047
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/ps: Don't use diced polygons for postscript output
    
    This speeds up postscript output on boards with complex polygons.
    
    It has the added advantage for some postscript and pdf readers
    that there are no accidental gaps rendered between pieces of the
    diced polygon due to non-global anti-aliasing in their renderer.

:100644 100644 fdbf7ac... d7e0371... M	src/hid/ps/ps.c

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

commit 71f29218994b8da19665bbb09f4e9d1213231047
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/ps: Don't use diced polygons for postscript output
    
    This speeds up postscript output on boards with complex polygons.
    
    It has the added advantage for some postscript and pdf readers
    that there are no accidental gaps rendered between pieces of the
    diced polygon due to non-global anti-aliasing in their renderer.

diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index fdbf7ac..d7e0371 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -945,6 +945,35 @@ ps_fill_polygon (hidGC gc, int n_coords, int *x, int *y)
 }
 
 static void
+ps_fill_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
+{
+  /* Ignore clip_box, just draw everything */
+
+  VNODE *v;
+  PLINE *pl;
+  char *op;
+
+  use_gc (gc);
+
+  pl = poly->Clipped->contours;
+
+  do
+    {
+      v = pl->head.next;
+      op = "moveto";
+      do
+	{
+	  fprintf (f, "%d %d %s\n", v->point[0], v->point[1], op);
+	  op = "lineto";
+	}
+      while ((v = v->next) != pl->head.next);
+    }
+  while ((pl = pl->next) != NULL);
+
+  fprintf (f, "fill\n");
+}
+
+static void
 ps_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
 {
   use_gc (gc);
@@ -1175,7 +1204,7 @@ HID ps_hid = {
   ps_draw_rect,
   ps_fill_circle,
   ps_fill_polygon,
-  common_fill_pcb_polygon,
+  ps_fill_pcb_polygon,
   0 /* ps_thindraw_pcb_polygon */,
   ps_fill_rect,
   ps_calibrate,




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