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

gEDA-cvs: pcb.git: branch: master updated (10d0e70387511945f58e7c4a1635b59528dc216c)



The branch, master has been updated
       via  10d0e70387511945f58e7c4a1635b59528dc216c (commit)
      from  9bad11053dbc145b468fb11d1a605112b40b719a (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/gtk/gtkhid-gl.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)


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

commit 10d0e70387511945f58e7c4a1635b59528dc216c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK/GL: Draw pretty translucent polygons in thindraw-poly mode
    
    Eventually we need some way to configure this.. it might be nice in
    non-thindraw mode too. If people want thin-draw to gain extra speed,
    rather than have it actually slower (due to fill + outline), then a
    way to turn it off would also be useful.

:100644 100644 a93c607... 4999005... M	src/hid/gtk/gtkhid-gl.c

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

commit 10d0e70387511945f58e7c4a1635b59528dc216c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    GTK/GL: Draw pretty translucent polygons in thindraw-poly mode
    
    Eventually we need some way to configure this.. it might be nice in
    non-thindraw mode too. If people want thin-draw to gain extra speed,
    rather than have it actually slower (due to fill + outline), then a
    way to turn it off would also be useful.

diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index a93c607..4999005 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -573,6 +573,15 @@ ghid_fill_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
 }
 
 void
+ghid_thindraw_pcb_polygon (hidGC gc, PolygonType *poly, const BoxType *clip_box)
+{
+  common_thindraw_pcb_polygon (gc, poly, clip_box);
+  ghid_set_alpha_mult (gc, 0.25);
+  ghid_fill_pcb_polygon (gc, poly, clip_box);
+  ghid_set_alpha_mult (gc, 1.0);
+}
+
+void
 ghid_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
 {
   USE_GC (gc);
@@ -802,6 +811,7 @@ ghid_init_renderer (int *argc, char ***argv, GHidPort *port)
   /* Setup HID function pointers specific to the GL renderer*/
   ghid_hid.end_layer = ghid_end_layer;
   ghid_hid.fill_pcb_polygon = ghid_fill_pcb_polygon;
+  ghid_hid.thindraw_pcb_polygon = ghid_thindraw_pcb_polygon;
 }
 
 void




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