[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (af5d807733cbc9963699b9e103fbd77c9167feaf)
The branch, master has been updated
via af5d807733cbc9963699b9e103fbd77c9167feaf (commit)
via 10e902c7e7d5c8ec6465e36dda5be0203d9de19b (commit)
from 207ae38342197df946880fcbf9fdd35b9a89fa4e (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-main.c | 54 --------------------------------------
src/hid/gtk/gui-render-pixmap.c | 7 ++++-
src/hid/gtk/gui.h | 55 +++++++++++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+), 55 deletions(-)
=================
Commit Messages
=================
commit af5d807733cbc9963699b9e103fbd77c9167feaf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
GTK HID: Use clipping region when drawing DRC violation previews
Should speed up rendering quite a bit for non-trivial boards.
:100644 100644 525bde6... b24e6c9... M src/hid/gtk/gui-render-pixmap.c
commit 10e902c7e7d5c8ec6465e36dda5be0203d9de19b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
GTK HID: Move inline coordinate conversions from gtkhid-main.c to gui.h
This allows other source files easy access to the routines
Vx(), Vy(), Vz() and Px(), Py, Pz().
:100644 100644 abf0b3c... c27f857... M src/hid/gtk/gtkhid-main.c
:100644 100644 c94c2a3... 7a46672... M src/hid/gtk/gui.h
=========
Changes
=========
commit af5d807733cbc9963699b9e103fbd77c9167feaf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
GTK HID: Use clipping region when drawing DRC violation previews
Should speed up rendering quite a bit for non-trivial boards.
diff --git a/src/hid/gtk/gui-render-pixmap.c b/src/hid/gtk/gui-render-pixmap.c
index 525bde6..b24e6c9 100644
--- a/src/hid/gtk/gui-render-pixmap.c
+++ b/src/hid/gtk/gui-render-pixmap.c
@@ -49,6 +49,7 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
int save_left, save_top;
int save_width, save_height;
int save_view_width, save_view_height;
+ BoxType region;
save_drawable = gport->drawable;
save_zoom = gport->zoom;
@@ -79,7 +80,11 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
gdk_draw_rectangle (pixmap, gport->bg_gc, TRUE, 0, 0, width, height);
/* call the drawing routine */
- hid_expose_callback (&ghid_hid, NULL, NULL);
+ 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));
+ hid_expose_callback (&ghid_hid, ®ion, NULL);
gport->drawable = save_drawable;
gport->zoom = save_zoom;
commit 10e902c7e7d5c8ec6465e36dda5be0203d9de19b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
GTK HID: Move inline coordinate conversions from gtkhid-main.c to gui.h
This allows other source files easy access to the routines
Vx(), Vy(), Vz() and Px(), Py, Pz().
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index abf0b3c..c27f857 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -58,71 +58,17 @@ int ghid_flip_x = 0, ghid_flip_y = 0;
/* ------------------------------------------------------------ */
-/* Px converts view->pcb, Vx converts pcb->view */
-
-static inline int
-Vx (int x)
-{
- int rv;
- if (ghid_flip_x)
- rv = (PCB->MaxWidth - x - gport->view_x0) / gport->zoom + 0.5;
- else
- rv = (x - gport->view_x0) / gport->zoom + 0.5;
- return rv;
-}
-
static inline int
Vx2 (int x)
{
return (x - gport->view_x0) / gport->zoom + 0.5;
}
-
-static inline int
-Vy (int y)
-{
- int rv;
- if (ghid_flip_y)
- rv = (PCB->MaxHeight - y - gport->view_y0) / gport->zoom + 0.5;
- else
- rv = (y - gport->view_y0) / gport->zoom + 0.5;
- return rv;
-}
static inline int
Vy2 (int y)
{
return (y - gport->view_y0) / gport->zoom + 0.5;
}
-
-static inline int
-Vz (int z)
-{
- return z / gport->zoom + 0.5;
-}
-
-static inline int
-Px (int x)
-{
- int rv = x * gport->zoom + gport->view_x0;
- if (ghid_flip_x)
- rv = PCB->MaxWidth - (x * gport->zoom + gport->view_x0);
- return rv;
-}
-
-static inline int
-Py (int y)
-{
- int rv = y * gport->zoom + gport->view_y0;
- if (ghid_flip_y)
- rv = PCB->MaxHeight - (y * gport->zoom + gport->view_y0);
- return rv;
-}
-
-static inline int
-Pz (int z)
-{
- return (z * gport->zoom);
-}
/* ------------------------------------------------------------ */
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index c94c2a3..7a46672 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -539,4 +539,59 @@ extern GdkPixmap *XC_hand_source, *XC_hand_mask;
extern GdkPixmap *XC_lock_source, *XC_lock_mask;
extern GdkPixmap *XC_clock_source, *XC_clock_mask;
+
+/* Coordinate conversions */
+/* Px converts view->pcb, Vx converts pcb->view */
+static inline int
+Vx (int x)
+{
+ int rv;
+ if (ghid_flip_x)
+ rv = (PCB->MaxWidth - x - gport->view_x0) / gport->zoom + 0.5;
+ else
+ rv = (x - gport->view_x0) / gport->zoom + 0.5;
+ return rv;
+}
+
+static inline int
+Vy (int y)
+{
+ int rv;
+ if (ghid_flip_y)
+ rv = (PCB->MaxHeight - y - gport->view_y0) / gport->zoom + 0.5;
+ else
+ rv = (y - gport->view_y0) / gport->zoom + 0.5;
+ return rv;
+}
+
+static inline int
+Vz (int z)
+{
+ return z / gport->zoom + 0.5;
+}
+
+static inline int
+Px (int x)
+{
+ int rv = x * gport->zoom + gport->view_x0;
+ if (ghid_flip_x)
+ rv = PCB->MaxWidth - (x * gport->zoom + gport->view_x0);
+ return rv;
+}
+
+static inline int
+Py (int y)
+{
+ int rv = y * gport->zoom + gport->view_y0;
+ if (ghid_flip_y)
+ rv = PCB->MaxHeight - (y * gport->zoom + gport->view_y0);
+ return rv;
+}
+
+static inline int
+Pz (int z)
+{
+ return (z * gport->zoom);
+}
+
#endif /* __GHID_INCLUDED__ */
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs