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

gEDA-cvs: pcb.git: branch: master updated (8ac8d6c6403bd8f322eb146ebe129718cc989a0d)



The branch, master has been updated
       via  8ac8d6c6403bd8f322eb146ebe129718cc989a0d (commit)
      from  7b590a617db3ca3ed69965b544f1468f82c39dfe (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-gdk.c |   11 +++++++++++
 src/hid/gtk/gtkhid-gl.c  |   12 ++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)


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

commit 8ac8d6c6403bd8f322eb146ebe129718cc989a0d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Don't render of soldermask outside board area

:100644 100644 c04f975... bf05b6b... M	src/hid/gtk/gtkhid-gdk.c
:100644 100644 23fa8c6... 8c1e8a2... M	src/hid/gtk/gtkhid-gl.c

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

commit 8ac8d6c6403bd8f322eb146ebe129718cc989a0d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    hid/gtk: Don't render of soldermask outside board area

diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index c04f975..bf05b6b 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -741,6 +741,11 @@ redraw_region (GdkRectangle *rect)
   region.Y2 = MAX(Py(priv->clip_rect.y),
                   Py(priv->clip_rect.y + priv->clip_rect.height + 1));
 
+  region.X1 = MAX (0, MIN (PCB->MaxWidth,  region.X1));
+  region.X2 = MAX (0, MIN (PCB->MaxWidth,  region.X2));
+  region.Y1 = MAX (0, MIN (PCB->MaxHeight, region.Y1));
+  region.Y2 = MAX (0, MIN (PCB->MaxHeight, region.Y2));
+
   eleft = Vx (0);
   eright = Vx (PCB->MaxWidth);
   etop = Vy (0);
@@ -1295,6 +1300,12 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
   region.Y1 = MIN(Py(0), Py(gport->height + 1));
   region.X2 = MAX(Px(0), Px(gport->width + 1));
   region.Y2 = MAX(Py(0), Py(gport->height + 1));
+
+  region.X1 = MAX (0, MIN (PCB->MaxWidth,  region.X1));
+  region.X2 = MAX (0, MIN (PCB->MaxWidth,  region.X2));
+  region.Y1 = MAX (0, MIN (PCB->MaxHeight, region.Y1));
+  region.Y2 = MAX (0, MIN (PCB->MaxHeight, region.Y2));
+
   hid_expose_callback (&ghid_hid, &region, NULL);
 
   gport->drawable = save_drawable;
diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 23fa8c6..8c1e8a2 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -961,6 +961,11 @@ ghid_drawing_area_expose_cb (GtkWidget *widget,
   region.Y1 = MIN (Py (ev->area.y), Py (ev->area.y + ev->area.height + 1));
   region.Y2 = MAX (Py (ev->area.y), Py (ev->area.y + ev->area.height + 1));
 
+  region.X1 = MAX (0, MIN (PCB->MaxWidth,  region.X1));
+  region.X2 = MAX (0, MIN (PCB->MaxWidth,  region.X2));
+  region.Y1 = MAX (0, MIN (PCB->MaxHeight, region.Y1));
+  region.Y2 = MAX (0, MIN (PCB->MaxHeight, region.Y2));
+
   glColor3f (port->bg_color.red / 65535.,
              port->bg_color.green / 65535.,
              port->bg_color.blue / 65535.);
@@ -1209,10 +1214,17 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
                              -gport->view_x0,
                 ghid_flip_y ? gport->view_y0 - PCB->MaxHeight :
                              -gport->view_y0, 0);
+
   region.X1 = MIN(Px(0), Px(gport->width + 1));
   region.Y1 = MIN(Py(0), Py(gport->height + 1));
   region.X2 = MAX(Px(0), Px(gport->width + 1));
   region.Y2 = MAX(Py(0), Py(gport->height + 1));
+
+  region.X1 = MAX (0, MIN (PCB->MaxWidth,  region.X1));
+  region.X2 = MAX (0, MIN (PCB->MaxWidth,  region.X2));
+  region.Y1 = MAX (0, MIN (PCB->MaxHeight, region.Y1));
+  region.Y2 = MAX (0, MIN (PCB->MaxHeight, region.Y2));
+
   hid_expose_callback (&ghid_hid, &region, NULL);
   hidgl_flush_triangles (&buffer);
   glPopMatrix ();




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