[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (8301b4dbd5fec500c7e4ec59eba1a8a397e1d8e1)
The branch, master has been updated
via 8301b4dbd5fec500c7e4ec59eba1a8a397e1d8e1 (commit)
from d2288a4491f5f6b592cd5a57835e178c08e72e10 (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 | 8 ++++++++
src/hid/gtk/gtkhid-gl.c | 8 ++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
=================
Commit Messages
=================
commit 8301b4dbd5fec500c7e4ec59eba1a8a397e1d8e1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Fix pinout preview rendering for back-side elements
NB: There are still some bugs, in that when the board view is flipped,
this doesn't currently trigger a repaint of any preview widgets which
are open. They will refresh with the updated coordinate system when
they are next repainted. (Which might requre a resize of the window on
a compositing window manager).
Ideally we would track the correct view with the preview widget, but for
now this is a simple fix.
:100644 100644 963b5d4... 9f4250d... M src/hid/gtk/gtkhid-gdk.c
:100644 100644 069380e... d372f8a... M src/hid/gtk/gtkhid-gl.c
=========
Changes
=========
commit 8301b4dbd5fec500c7e4ec59eba1a8a397e1d8e1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
hid/gtk: Fix pinout preview rendering for back-side elements
NB: There are still some bugs, in that when the board view is flipped,
this doesn't currently trigger a repaint of any preview widgets which
are open. They will refresh with the updated coordinate system when
they are next repainted. (Which might requre a resize of the window on
a compositing window manager).
Ideally we would track the correct view with the preview widget, but for
now this is a simple fix.
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 963b5d4..9f4250d 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -1128,6 +1128,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
GtkAllocation allocation;
view_data save_view;
int save_width, save_height;
+ Coord save_max_width;
+ Coord save_max_height;
double xz, yz;
render_priv *priv = gport->render_priv;
@@ -1137,6 +1139,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
save_view = gport->view;
save_width = gport->width;
save_height = gport->height;
+ save_max_width = PCB->MaxWidth;
+ save_max_height = PCB->MaxHeight;
gtk_widget_get_allocation (widget, &allocation);
xz = (double) pinout->x_max / allocation.width;
@@ -1153,6 +1157,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
gport->view.height = allocation.height * gport->view.coord_per_px;
gport->view.x0 = (pinout->x_max - gport->view.width) / 2;
gport->view.y0 = (pinout->y_max - gport->view.height) / 2;
+ PCB->MaxWidth = pinout->x_max;
+ PCB->MaxHeight = pinout->y_max;
/* clear background */
gdk_draw_rectangle (window, priv->bg_gc, TRUE,
@@ -1165,6 +1171,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
gport->view = save_view;
gport->width = save_width;
gport->height = save_height;
+ PCB->MaxWidth = save_max_width;
+ PCB->MaxHeight = save_max_height;
return FALSE;
}
diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 069380e..d372f8a 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -992,11 +992,15 @@ ghid_pinout_preview_expose (GtkWidget *widget,
GtkAllocation allocation;
view_data save_view;
int save_width, save_height;
+ Coord save_max_width;
+ Coord save_max_height;
double xz, yz;
save_view = gport->view;
save_width = gport->width;
save_height = gport->height;
+ save_max_width = PCB->MaxWidth;
+ save_max_height = PCB->MaxHeight;
/* Setup zoom factor for drawing routines */
@@ -1014,6 +1018,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
gport->view.height = allocation.height * gport->view.coord_per_px;
gport->view.x0 = (pinout->x_max - gport->view.width) / 2;
gport->view.y0 = (pinout->y_max - gport->view.height) / 2;
+ PCB->MaxWidth = pinout->x_max;
+ PCB->MaxHeight = pinout->y_max;
/* make GL-context "current" */
if (!gdk_gl_drawable_gl_begin (pGlDrawable, pGlContext)) {
@@ -1076,6 +1082,8 @@ ghid_pinout_preview_expose (GtkWidget *widget,
gport->view = save_view;
gport->width = save_width;
gport->height = save_height;
+ PCB->MaxWidth = save_max_width;
+ PCB->MaxHeight = save_max_height;
return FALSE;
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs