You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(4) |
Mar
(5) |
Apr
|
May
(5) |
Jun
(30) |
Jul
(2) |
Aug
(18) |
Sep
(14) |
Oct
(7) |
Nov
(21) |
Dec
(44) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(63) |
Feb
(94) |
Mar
(54) |
Apr
(39) |
May
(34) |
Jun
(25) |
Jul
(10) |
Aug
(33) |
Sep
(16) |
Oct
(62) |
Nov
(12) |
Dec
(2) |
| 2005 |
Jan
(71) |
Feb
(8) |
Mar
(50) |
Apr
|
May
(2) |
Jun
(12) |
Jul
(19) |
Aug
(8) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(8) |
| 2006 |
Jan
(10) |
Feb
(1) |
Mar
(301) |
Apr
(232) |
May
(26) |
Jun
(20) |
Jul
(26) |
Aug
(79) |
Sep
(92) |
Oct
(174) |
Nov
(17) |
Dec
(93) |
| 2007 |
Jan
(27) |
Feb
(179) |
Mar
(37) |
Apr
(81) |
May
(20) |
Jun
(5) |
Jul
|
Aug
(40) |
Sep
(68) |
Oct
(8) |
Nov
(47) |
Dec
(34) |
| 2008 |
Jan
(154) |
Feb
(15) |
Mar
(5) |
Apr
(21) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
(6) |
Sep
(8) |
Oct
(9) |
Nov
(35) |
Dec
(50) |
| 2009 |
Jan
(8) |
Feb
(10) |
Mar
(6) |
Apr
(9) |
May
(7) |
Jun
(40) |
Jul
(7) |
Aug
(5) |
Sep
(2) |
Oct
(16) |
Nov
(42) |
Dec
(5) |
| 2010 |
Jan
(3) |
Feb
(15) |
Mar
(32) |
Apr
(18) |
May
(6) |
Jun
(9) |
Jul
|
Aug
(11) |
Sep
(16) |
Oct
|
Nov
(4) |
Dec
(35) |
| 2011 |
Jan
(24) |
Feb
(6) |
Mar
(27) |
Apr
(119) |
May
(72) |
Jun
(20) |
Jul
(31) |
Aug
(88) |
Sep
(86) |
Oct
(14) |
Nov
(11) |
Dec
(30) |
| 2012 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gi...@gp...> - 2011-04-30 12:44:47
|
The branch, master has been updated
via f69572aeddb7babf7e04936463c95888dc1954e5 (commit)
from f3afdbb4f57233b593d2723f7c4581a233750aa5 (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/parse_y.y | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit f69572aeddb7babf7e04936463c95888dc1954e5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
parse.y: Convert an open-coded loop to use ALLPOLYGON_LOOP
:100644 100644 d0f31aa... ad8cb44... M src/parse_y.y
=========
Changes
=========
commit f69572aeddb7babf7e04936463c95888dc1954e5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
parse.y: Convert an open-coded loop to use ALLPOLYGON_LOOP
diff --git a/src/parse_y.y b/src/parse_y.y
index d0f31aa..ad8cb44 100644
--- a/src/parse_y.y
+++ b/src/parse_y.y
@@ -171,7 +171,6 @@ parsepcb
pcbdata
pcbnetlist
{
- int i, j;
PCBTypePtr pcb_save = PCB;
if (layer_group_string == NULL)
@@ -186,9 +185,11 @@ parsepcb
* we didn't know the layer grouping before.
*/
PCB = yyPCB;
- for (i = 0; i < yyData->LayerN+2; i++)
- for (j = 0; j < yyData->Layer[i].PolygonN; j++)
- InitClip (yyData, &yyData->Layer[i], &yyData->Layer[i].Polygon[j]);
+ ALLPOLYGON_LOOP (yyData);
+ {
+ InitClip (yyData, layer, polygon);
+ }
+ ENDALL_LOOP;
PCB = pcb_save;
}
|
|
From: <gi...@gp...> - 2011-04-30 12:44:29
|
The branch, master has been updated
discards 0974ee574ae018c1e83889ea934b3434e9d9c62a (commit)
via f3afdbb4f57233b593d2723f7c4581a233750aa5 (commit)
from 0974ee574ae018c1e83889ea934b3434e9d9c62a (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/gui-pinout-preview.c | 14 --------------
1 files changed, 0 insertions(+), 14 deletions(-)
=================
Commit Messages
=================
commit f3afdbb4f57233b593d2723f7c4581a233750aa5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused code from pinout_set_data
:100644 100644 2a205fa... 46806da... M src/hid/gtk/gui-pinout-preview.c
=========
Changes
=========
commit f3afdbb4f57233b593d2723f7c4581a233750aa5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove unused code from pinout_set_data
diff --git a/src/hid/gtk/gui-pinout-preview.c b/src/hid/gtk/gui-pinout-preview.c
index 2a205fa..46806da 100644
--- a/src/hid/gtk/gui-pinout-preview.c
+++ b/src/hid/gtk/gui-pinout-preview.c
@@ -75,8 +75,6 @@ pinout_zoom_fit (GhidPinoutPreview * pinout, gint zoom)
static void
pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
{
- gint tx, ty, x_min = 0, y_min = 0;
-
if (element == NULL)
{
FreeElementMemory (&pinout->element);
@@ -94,24 +92,12 @@ pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
CopyElementLowLevel (NULL, &pinout->element, element, FALSE, 0, 0);
PIN_LOOP (&pinout->element);
{
- tx = abs (pinout->element.Pin[0].X - pin->X);
- ty = abs (pinout->element.Pin[0].Y - pin->Y);
- if (x_min == 0 || (tx != 0 && tx < x_min))
- x_min = tx;
- if (y_min == 0 || (ty != 0 && ty < y_min))
- y_min = ty;
SET_FLAG (DISPLAYNAMEFLAG, pin);
}
END_LOOP;
PAD_LOOP (&pinout->element);
{
- tx = abs (pinout->element.Pad[0].Point1.X - pad->Point1.X);
- ty = abs (pinout->element.Pad[0].Point1.Y - pad->Point1.Y);
- if (x_min == 0 || (tx != 0 && tx < x_min))
- x_min = tx;
- if (y_min == 0 || (ty != 0 && ty < y_min))
- y_min = ty;
SET_FLAG (DISPLAYNAMEFLAG, pad);
}
END_LOOP;
|
|
From: <gi...@gp...> - 2011-04-30 12:42:27
|
The branch, master has been updated
via 0974ee574ae018c1e83889ea934b3434e9d9c62a (commit)
via 965580eaa524b10b57cde5659c5fc502085b2268 (commit)
from e983c9691d2ee634fb8e97c6654f2cd7ba8c595c (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/draw.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit 965580eaa524b10b57cde5659c5fc502085b2268
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Tidy up DrawEMark
Changes are aimed to simplify the delta of a future patch relating
to object storage. Moves indexed addressing of object structures to
fewer places.
:100644 100644 9ebcba6... 5409249... M src/draw.c
=========
Changes
=========
commit 965580eaa524b10b57cde5659c5fc502085b2268
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
draw.c: Tidy up DrawEMark
Changes are aimed to simplify the delta of a future patch relating
to object storage. Moves indexed addressing of object structures to
fewer places.
diff --git a/src/draw.c b/src/draw.c
index 9ebcba6..5409249 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -774,10 +774,17 @@ DrawEMark (ElementTypePtr e, LocationType X, LocationType Y,
if (!PCB->InvisibleObjectsOn && invisible)
return;
- if (e->PinN && mark_size > e->Pin[0].Thickness / 2)
- mark_size = e->Pin[0].Thickness / 2;
- if (e->PadN && mark_size > e->Pad[0].Thickness / 2)
- mark_size = e->Pad[0].Thickness / 2;
+ if (e->PinN)
+ {
+ PinType *pin0 = &e->Pin[0];
+ mark_size = MIN (mark_size, pin0->Thickness / 2);
+ }
+
+ if (e->PadN)
+ {
+ PadType *pad0 = &e->Pad[0];
+ mark_size = MIN (mark_size, pad0->Thickness / 2);
+ }
gui->set_color (Output.fgGC,
invisible ? PCB->InvisibleMarkColor : PCB->ElementColor);
|
|
From: <gi...@gp...> - 2011-04-30 12:21:36
|
The branch, master has been updated
via e983c9691d2ee634fb8e97c6654f2cd7ba8c595c (commit)
from 4ca6a1a838f4b4439647f7ebfda2e67a7e44e0b3 (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/autoroute.c | 4 ----
src/crosshair.c | 4 ----
src/edif.y | 1 -
src/global.h | 1 +
src/mtspace.c | 1 -
src/polygon1.c | 3 ---
6 files changed, 1 insertions(+), 13 deletions(-)
=================
Commit Messages
=================
commit e983c9691d2ee634fb8e97c6654f2cd7ba8c595c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Include glib.h from global.h
To avoid compiler warnings, remove the now duplicated (or unecessary)
#define ABS definitions from various files.
There has been a build-time dependance on GLib since the toporouter was
added. Lets start to make use of it where it is useful.
:100644 100644 c17a8fe... b58600f... M src/autoroute.c
:100644 100644 2abe960... c2551ec... M src/crosshair.c
:100644 100644 da33c9b... cb31d9a... M src/edif.y
:100644 100644 a036ee5... cb2b92d... M src/global.h
:100644 100644 9d593e8... 40f5413... M src/mtspace.c
:100644 100644 0a3a2b5... 1dba74c... M src/polygon1.c
=========
Changes
=========
commit e983c9691d2ee634fb8e97c6654f2cd7ba8c595c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Include glib.h from global.h
To avoid compiler warnings, remove the now duplicated (or unecessary)
#define ABS definitions from various files.
There has been a build-time dependance on GLib since the toporouter was
added. Lets start to make use of it where it is useful.
diff --git a/src/autoroute.c b/src/autoroute.c
index c17a8fe..b58600f 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -159,10 +159,6 @@ static hidGC ar_gc = 0;
CONFLICT_LEVEL(rb)==LO_CONFLICT ? \
AutoRouteParameters.LastConflictPenalty : 1) * (rb)->pass)
-#if !defined(ABS)
-#define ABS(x) (((x)<0)?-(x):(x))
-#endif
-
#define _NORTH 1
#define _EAST 2
#define _SOUTH 4
diff --git a/src/crosshair.c b/src/crosshair.c
index 2abe960..c2551ec 100644
--- a/src/crosshair.c
+++ b/src/crosshair.c
@@ -56,10 +56,6 @@
RCSID ("$Id$");
-#if !defined(ABS)
-#define ABS(x) (((x)<0)?-(x):(x))
-#endif
-
typedef struct
{
int x, y;
diff --git a/src/edif.y b/src/edif.y
index da33c9b..cb31d9a 100644
--- a/src/edif.y
+++ b/src/edif.y
@@ -38,7 +38,6 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
#define IDENT_LENGTH 255
#define Malloc(s) malloc(s)
#define Free(p) free(p)
-#define ABS(v) ((v) < 0 ? -(v) : (v))
#define Getc(s) getc(s)
#define Ungetc(c) ungetc(c,Input)
diff --git a/src/global.h b/src/global.h
index a036ee5..cb2b92d 100644
--- a/src/global.h
+++ b/src/global.h
@@ -50,6 +50,7 @@
#include <ctype.h>
#include <sys/types.h>
#include <stdbool.h>
+#include <glib.h>
/* Forward declarations for structures the HIDs need. */
typedef struct BoxType BoxType, *BoxTypePtr;
diff --git a/src/mtspace.c b/src/mtspace.c
index 9d593e8..40f5413 100644
--- a/src/mtspace.c
+++ b/src/mtspace.c
@@ -55,7 +55,6 @@
#include <dmalloc.h>
#endif
-#define ABS(x) ((x) < 0 ? -(x) : (x))
RCSID ("$Id$");
/* mtspace data structures are built on r-trees. */
diff --git a/src/polygon1.c b/src/polygon1.c
index 0a3a2b5..1dba74c 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -54,9 +54,6 @@
#define EPSILON (1E-8)
#define IsZero(a, b) (fabs((a) - (b)) < EPSILON)
-#ifndef ABS
-#define ABS(x) ((x) < 0 ? -(x) : (x))
-#endif
/*********************************************************************/
/* L o n g V e c t o r S t u f f */
|
|
From: <gi...@gp...> - 2011-04-30 12:19:36
|
The branch, master has been updated
via 4ca6a1a838f4b4439647f7ebfda2e67a7e44e0b3 (commit)
via e7d89b690575f1373505797bf60e3a3face27b63 (commit)
via a4bf3f0eebb5c438acf31388ed6bf2135b84addd (commit)
via 47e58b25ac92749a07489ec05c971fa9b60a35f7 (commit)
from e323e4636ef7b7239003a41ba305221bc6d9bab1 (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.h | 33 ++++++++++++++++++++++++++-
src/hid/common/hidnogui.c | 24 +++++++++++++++++++-
src/hid/gtk/gtkhid-gdk.c | 23 +++++++++++++++++++
src/hid/gtk/gtkhid-main.c | 4 +++
src/hid/gtk/gui.h | 3 ++
src/hid/lesstif/main.c | 52 +++++++++++++++++++++++++++++++++++++++++++-
6 files changed, 134 insertions(+), 5 deletions(-)
=================
Commit Messages
=================
commit 4ca6a1a838f4b4439647f7ebfda2e67a7e44e0b3
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/lesstif: Hook up debug drawing APIs
:100644 100644 cfb65be... 3922fc4... M src/hid/lesstif/main.c
commit e7d89b690575f1373505797bf60e3a3face27b63
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Hook up debug drawing APIs
:100644 100644 a47803e... 45f1e96... M src/hid/gtk/gtkhid-gdk.c
:100644 100644 f5e2717... ac961db... M src/hid/gtk/gtkhid-main.c
:100644 100644 6cdeff2... d52d088... M src/hid/gtk/gui.h
commit a4bf3f0eebb5c438acf31388ed6bf2135b84addd
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add HID apis to handle live debug drawing from the core
It is envisaved that this API should ONLY be used for debugging, not
presenting a user-interface. In general, the GUIs may have their own
special requirements for drawing the board, and this API is not meant
to allow the core to augment or present user-visible drawing. This is
reflected in the API naming.
Request permission for debug drawing
HID *ddraw = gui->request_debug_draw (void);
Returns a HID pointer which should be used rather than the global
gui-> for making drawing calls. If the return value is NULL, then
permission has been denied, and the debug drawing must not continue.
Flush pending drawing to the screen
void ddraw->flush_debug_draw (void);
May be implemented as a NOOP if the GUI has chosen to send the debug
drawing directly to the screen.
When finished, the user must inform the GUI to clean up resources:
ddraw->finish_debug_draw (void);
Any remaining rendering will be flushed to the screen.
:100644 100644 2b9ca40... 820760e... M src/hid.h
:100644 100644 c146fd2... f9d5949... M src/hid/common/hidnogui.c
commit 47e58b25ac92749a07489ec05c971fa9b60a35f7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/lesstif: Ensure crosshair and mark updates go to the screen
The "pixmap" global might be pointing at one of the backing pixmaps
when we are called.
Does not fix any known bug, just in preparation for another patch
relating to debug drawing which may leave pixmap pointing to the
backing store.
:100644 100644 6a42706... cfb65be... M src/hid/lesstif/main.c
=========
Changes
=========
commit 4ca6a1a838f4b4439647f7ebfda2e67a7e44e0b3
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/lesstif: Hook up debug drawing APIs
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index cfb65be..3922fc4 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -3870,6 +3870,38 @@ lesstif_progress (int so_far, int total, const char *message)
return 0;
}
+static HID *
+lesstif_request_debug_draw (void)
+{
+ /* Send drawing to the backing pixmap */
+ pixmap = main_pixmap;
+ return &lesstif_hid;
+}
+
+static void
+lesstif_flush_debug_draw (void)
+{
+ /* Copy the backing pixmap to the display and redraw any attached objects */
+ XSetFunction (display, my_gc, GXcopy);
+ XCopyArea (display, main_pixmap, window, my_gc, 0, 0, view_width,
+ view_height, 0, 0);
+ pixmap = window;
+ if (crosshair_on)
+ {
+ DrawAttached ();
+ DrawMark ();
+ }
+ pixmap = main_pixmap;
+}
+
+static void
+lesstif_finish_debug_draw (void)
+{
+ lesstif_flush_debug_draw ();
+ /* No special tear down requirements
+ */
+}
+
#include "dolists.h"
void
@@ -3933,6 +3965,10 @@ hid_lesstif_init ()
lesstif_hid.progress = lesstif_progress;
lesstif_hid.edit_attributes = lesstif_attributes_dialog;
+ lesstif_hid.request_debug_draw = lesstif_request_debug_draw;
+ lesstif_hid.flush_debug_draw = lesstif_flush_debug_draw;
+ lesstif_hid.finish_debug_draw = lesstif_finish_debug_draw;
+
hid_register_hid (&lesstif_hid);
#include "lesstif_lists.h"
}
commit e7d89b690575f1373505797bf60e3a3face27b63
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Hook up debug drawing APIs
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index a47803e..45f1e96 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -1299,3 +1299,26 @@ ghid_render_pixmap (int cx, int cy, double zoom, int width, int height, int dept
return pixmap;
}
+
+HID *
+ghid_request_debug_draw (void)
+{
+ /* No special setup requirements, drawing goes into
+ * the backing pixmap. */
+ return &ghid_hid;
+}
+
+void
+ghid_flush_debug_draw (void)
+{
+ ghid_screen_update ();
+ gdk_flush ();
+}
+
+void
+ghid_finish_debug_draw (void)
+{
+ ghid_flush_debug_draw ();
+ /* No special tear down requirements
+ */
+}
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index f5e2717..ac961db 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -2157,6 +2157,10 @@ hid_gtk_init ()
ghid_hid.drc_gui = &ghid_drc_gui,
ghid_hid.edit_attributes = ghid_attributes;
+ ghid_hid.request_debug_draw = ghid_request_debug_draw;
+ ghid_hid.flush_debug_draw = ghid_flush_debug_draw;
+ ghid_hid.finish_debug_draw = ghid_finish_debug_draw;
+
hid_register_hid (&ghid_hid);
#include "gtk_lists.h"
}
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 6cdeff2..d52d088 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -499,6 +499,9 @@ gboolean ghid_drawing_area_expose_cb (GtkWidget *, GdkEventExpose *,
gboolean ghid_pinout_preview_expose (GtkWidget * widget, GdkEventExpose * ev);
GdkPixmap *ghid_render_pixmap (int cx, int cy, double zoom,
int width, int height, int depth);
+HID *ghid_request_debug_draw (void);
+void ghid_flush_debug_draw (void);
+void ghid_finish_debug_draw (void);
/* gtkhid-main.c */
void ghid_pan_fixup (void);
commit a4bf3f0eebb5c438acf31388ed6bf2135b84addd
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Add HID apis to handle live debug drawing from the core
It is envisaved that this API should ONLY be used for debugging, not
presenting a user-interface. In general, the GUIs may have their own
special requirements for drawing the board, and this API is not meant
to allow the core to augment or present user-visible drawing. This is
reflected in the API naming.
Request permission for debug drawing
HID *ddraw = gui->request_debug_draw (void);
Returns a HID pointer which should be used rather than the global
gui-> for making drawing calls. If the return value is NULL, then
permission has been denied, and the debug drawing must not continue.
Flush pending drawing to the screen
void ddraw->flush_debug_draw (void);
May be implemented as a NOOP if the GUI has chosen to send the debug
drawing directly to the screen.
When finished, the user must inform the GUI to clean up resources:
ddraw->finish_debug_draw (void);
Any remaining rendering will be flushed to the screen.
diff --git a/src/hid.h b/src/hid.h
index 2b9ca40..820760e 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -230,9 +230,10 @@ typedef enum
int (*throw_drc_dialog) (void);
} HID_DRC_GUI;
+ typedef struct hid_st HID;
/* This is the main HID structure. */
- typedef struct
+ struct hid_st
{
/* The size of this structure. We use this as a compatibility
check; a HID built with a different hid.h than we're expecting
@@ -543,7 +544,35 @@ typedef enum
void (*edit_attributes) (char *owner, AttributeListType *attrlist_);
- } HID;
+ /* Debug drawing support. These APIs must be implemented (non NULL),
+ * but they do not have to be functional. request_debug_draw can
+ * return NULL to indicate debug drawing is not permitted.
+ *
+ * Debug drawing is not gauranteed to be re-entrant.
+ * The caller must not nest requests for debug drawing.
+ */
+
+ /* Request permission for debug drawing
+ *
+ * Returns a HID pointer which should be used rather than the global
+ * gui-> for making drawing calls. If the return value is NULL, then
+ * permission has been denied, and the drawing must not continue.
+ */
+ HID *(*request_debug_draw) (void);
+
+ /* Flush pending drawing to the screen
+ *
+ * May be implemented as a NOOP if the GUI has chosen to send the
+ * debug drawing directly to the screen.
+ */
+ void (*flush_debug_draw) (void);
+
+ /* When finished, the user must inform the GUI to clean up resources
+ *
+ * Any remaining rendering will be flushed to the screen.
+ */
+ void (*finish_debug_draw) (void);
+ };
/* Call this as soon as possible from main(). No other HID calls are
valid until this is called. */
diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index c146fd2..f9d5949 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -427,6 +427,22 @@ nogui_progress (int so_far, int total, const char *message)
return 0;
}
+static HID *
+nogui_request_debug_draw (void)
+{
+ return NULL;
+}
+
+static void
+nogui_flush_debug_draw (void)
+{
+}
+
+static void
+nogui_finish_debug_draw (void)
+{
+}
+
HID hid_nogui = {
sizeof (HID),
"nogui",
@@ -484,7 +500,10 @@ HID hid_nogui = {
nogui_beep,
nogui_progress,
0 /* nogui_drc_gui */ ,
- 0 /* edit_attributes */
+ 0 /* edit_attributes */,
+ nogui_request_debug_draw,
+ nogui_flush_debug_draw,
+ nogui_finish_debug_draw,
};
#define AD(x) if (!d->x) d->x = s->x
@@ -545,4 +564,7 @@ apply_default_hid (HID * d, HID * s)
AD (progress);
AD (drc_gui);
AD (edit_attributes);
+ AD (request_debug_draw);
+ AD (flush_debug_draw);
+ AD (finish_debug_draw);
}
commit 47e58b25ac92749a07489ec05c971fa9b60a35f7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/lesstif: Ensure crosshair and mark updates go to the screen
The "pixmap" global might be pointing at one of the backing pixmaps
when we are called.
Does not fix any known bug, just in preparation for another patch
relating to debug drawing which may leave pixmap pointing to the
backing store.
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 6a42706..cfb65be 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -2903,6 +2903,7 @@ static void
lesstif_notify_crosshair_change (bool changes_complete)
{
static int invalidate_depth = 0;
+ Pixmap save_pixmap;
if (changes_complete)
invalidate_depth --;
@@ -2920,7 +2921,12 @@ lesstif_notify_crosshair_change (bool changes_complete)
}
if (invalidate_depth == 0 && crosshair_on)
- DrawAttached ();
+ {
+ save_pixmap = pixmap;
+ pixmap = window;
+ DrawAttached ();
+ pixmap = save_pixmap;
+ }
if (!changes_complete)
invalidate_depth ++;
@@ -2930,6 +2936,7 @@ static void
lesstif_notify_mark_change (bool changes_complete)
{
static int invalidate_depth = 0;
+ Pixmap save_pixmap;
if (changes_complete)
invalidate_depth --;
@@ -2947,7 +2954,12 @@ lesstif_notify_mark_change (bool changes_complete)
}
if (invalidate_depth == 0 && crosshair_on)
- DrawMark ();
+ {
+ save_pixmap = pixmap;
+ pixmap = window;
+ DrawMark ();
+ pixmap = save_pixmap;
+ }
if (!changes_complete)
invalidate_depth ++;
|
|
From: <gi...@gp...> - 2011-04-29 18:35:38
|
The branch, master has been updated
discards 1086f06bb2a604ec0535e872dd050f06ec5d1a5d (commit)
via e323e4636ef7b7239003a41ba305221bc6d9bab1 (commit)
from 1086f06bb2a604ec0535e872dd050f06ec5d1a5d (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 | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit e323e4636ef7b7239003a41ba305221bc6d9bab1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Invalidate the damaged region, not the whole view
:100644 100644 27d62c6... a47803e... M src/hid/gtk/gtkhid-gdk.c
=========
Changes
=========
commit e323e4636ef7b7239003a41ba305221bc6d9bab1
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Invalidate the damaged region, not the whole view
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 27d62c6..a47803e 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -34,6 +34,8 @@ typedef struct render_priv {
GdkGC *mask_gc;
GdkGC *u_gc;
GdkGC *grid_gc;
+ bool clip;
+ GdkRectangle clip_rect;
int attached_invalidate_depth;
int mark_invalidate_depth;
} render_priv;
@@ -119,6 +121,18 @@ ghid_make_gc (void)
}
static void
+set_clip (render_priv *priv, GdkGC *gc)
+{
+ if (gc == NULL)
+ return;
+
+ if (priv->clip)
+ gdk_gc_set_clip_rectangle (gc, &priv->clip_rect);
+ else
+ gdk_gc_set_clip_mask (gc, NULL);
+}
+
+static void
ghid_draw_grid (void)
{
static GdkPoint *points = 0;
@@ -143,6 +157,8 @@ ghid_draw_grid (void)
priv->grid_gc = gdk_gc_new (gport->drawable);
gdk_gc_set_function (priv->grid_gc, GDK_XOR);
gdk_gc_set_foreground (priv->grid_gc, &gport->grid_color);
+ gdk_gc_set_clip_origin (priv->grid_gc, 0, 0);
+ set_clip (priv, priv->grid_gc);
}
x1 = GRIDFIT_X (SIDE_X (gport->view_x0), PCB->Grid);
y1 = GRIDFIT_Y (SIDE_Y (gport->view_y0), PCB->Grid);
@@ -283,6 +299,8 @@ ghid_use_mask (int use_it)
if (!priv->mask_gc)
{
priv->mask_gc = gdk_gc_new (gport->drawable);
+ gdk_gc_set_clip_origin (priv->mask_gc, 0, 0);
+ set_clip (priv, priv->mask_gc);
}
color.pixel = 1;
gdk_gc_set_foreground (priv->mask_gc, &color);
@@ -495,13 +513,14 @@ use_gc (hidGC gc)
ghid_set_line_width (gc, gc->width);
ghid_set_line_cap (gc, (EndCapStyle)gc->cap);
ghid_set_draw_xor (gc, gc->xor_mask);
+ gdk_gc_set_clip_origin (gc->gc, 0, 0);
}
if (gc->mask_seq != mask_seq)
{
if (mask_seq)
gdk_gc_set_clip_mask (gc->gc, gport->mask);
else
- gdk_gc_set_clip_mask (gc->gc, NULL);
+ set_clip (priv, gc->gc);
gc->mask_seq = mask_seq;
}
priv->u_gc = WHICH_GC (gc);
@@ -693,15 +712,8 @@ ghid_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
x1, y1, x2 - x1 + 1, y2 - y1 + 1);
}
-void
-ghid_invalidate_lr (int left, int right, int top, int bottom)
-{
- ghid_invalidate_all ();
-}
-
-
-void
-ghid_invalidate_all ()
+static void
+redraw_region (GdkRectangle *rect)
{
int eleft, eright, etop, ebottom;
BoxType region;
@@ -710,10 +722,33 @@ ghid_invalidate_all ()
if (!gport->pixmap)
return;
- 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));
+ if (rect != NULL)
+ {
+ priv->clip_rect = *rect;
+ priv->clip = true;
+ }
+ else
+ {
+ priv->clip_rect.x = 0;
+ priv->clip_rect.y = 0;
+ priv->clip_rect.width = gport->width;
+ priv->clip_rect.height = gport->height;
+ priv->clip = false;
+ }
+
+ set_clip (priv, priv->bg_gc);
+ set_clip (priv, priv->offlimits_gc);
+ set_clip (priv, priv->mask_gc);
+ set_clip (priv, priv->grid_gc);
+
+ region.X1 = MIN(Px(priv->clip_rect.x),
+ Px(priv->clip_rect.x + priv->clip_rect.width + 1));
+ region.Y1 = MIN(Py(priv->clip_rect.y),
+ Py(priv->clip_rect.y + priv->clip_rect.height + 1));
+ region.X2 = MAX(Px(priv->clip_rect.x),
+ Px(priv->clip_rect.x + priv->clip_rect.width + 1));
+ region.Y2 = MAX(Py(priv->clip_rect.y),
+ Py(priv->clip_rect.y + priv->clip_rect.height + 1));
eleft = Vx (0);
eright = Vx (PCB->MaxWidth);
@@ -734,28 +769,28 @@ ghid_invalidate_all ()
if (eleft > 0)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, 0, 0, eleft, gport->height);
+ 1, 0, 0, eleft, gport->height);
else
eleft = 0;
if (eright < gport->width)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eright, 0, gport->width - eright, gport->height);
+ 1, eright, 0, gport->width - eright, gport->height);
else
eright = gport->width;
if (etop > 0)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eleft, 0, eright - eleft + 1, etop);
+ 1, eleft, 0, eright - eleft + 1, etop);
else
etop = 0;
if (ebottom < gport->height)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eleft, ebottom, eright - eleft + 1,
- gport->height - ebottom);
+ 1, eleft, ebottom, eright - eleft + 1,
+ gport->height - ebottom);
else
ebottom = gport->height;
gdk_draw_rectangle (gport->drawable, priv->bg_gc, 1,
- eleft, etop, eright - eleft + 1, ebottom - etop + 1);
+ eleft, etop, eright - eleft + 1, ebottom - etop + 1);
ghid_draw_bg_image();
@@ -770,11 +805,44 @@ ghid_invalidate_all ()
if (priv->mark_invalidate_depth == 0)
DrawMark ();
+ priv->clip = false;
+}
+
+void
+ghid_invalidate_lr (int left, int right, int top, int bottom)
+{
+ int dleft, dright, dtop, dbottom;
+ int minx, maxx, miny, maxy;
+ GdkRectangle rect;
+
+ dleft = Vx ((double) left);
+ dright = Vy ((double) right);
+ dtop = Vx ((double) top);
+ dbottom = Vy ((double) bottom);
+
+ minx = MIN (dleft, dright);
+ maxx = MAX (dleft, dright);
+ miny = MIN (dtop, dbottom);
+ maxy = MAX (dtop, dbottom);
+
+ rect.x = minx;
+ rect.y = miny;
+ rect.width = maxx - minx;
+ rect.height = maxy - miny;
+
+ redraw_region (&rect);
ghid_screen_update ();
}
void
+ghid_invalidate_all ()
+{
+ redraw_region (NULL);
+ ghid_screen_update ();
+}
+
+void
ghid_notify_crosshair_change (bool changes_complete)
{
render_priv *priv = gport->render_priv;
@@ -949,6 +1017,7 @@ draw_crosshair (GdkGC *xor_gc, gint x, gint y)
static void
show_crosshair (gboolean paint_new_location)
{
+ render_priv *priv = gport->render_priv;
gint x, y;
static gint x_prev = -1, y_prev = -1;
static gboolean draw_markers, draw_markers_prev = FALSE;
@@ -963,6 +1032,8 @@ show_crosshair (gboolean paint_new_location)
xor_gc = gdk_gc_new (ghid_port.drawing_area->window);
gdk_gc_copy (xor_gc, ghid_port.drawing_area->style->white_gc);
gdk_gc_set_function (xor_gc, GDK_XOR);
+ gdk_gc_set_clip_origin (xor_gc, 0, 0);
+ set_clip (priv, xor_gc);
/* FIXME: when CrossColor changed from config */
ghid_map_color_string (Settings.CrossColor, &cross_color);
}
@@ -1035,9 +1106,11 @@ ghid_drawing_area_configure_hook (GHidPort *port)
{
priv->bg_gc = gdk_gc_new (port->drawable);
gdk_gc_set_foreground (priv->bg_gc, &port->bg_color);
+ gdk_gc_set_clip_origin (priv->bg_gc, 0, 0);
priv->offlimits_gc = gdk_gc_new (port->drawable);
gdk_gc_set_foreground (priv->offlimits_gc, &port->offlimits_color);
+ gdk_gc_set_clip_origin (priv->offlimits_gc, 0, 0);
done_once = 1;
}
|
|
From: <gi...@gp...> - 2011-04-29 18:35:06
|
The branch, master has been updated
via 1086f06bb2a604ec0535e872dd050f06ec5d1a5d (commit)
from c5d1634862a57d2a1d61f6f00edcb034d75a4eac (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 | 112 +++++++++++++++++++++++++++++++++++++--------
1 files changed, 92 insertions(+), 20 deletions(-)
=================
Commit Messages
=================
commit 1086f06bb2a604ec0535e872dd050f06ec5d1a5d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Invalidate the damaged region, not the whole view
:100644 100644 27d62c6... aca24b6... M src/hid/gtk/gtkhid-gdk.c
=========
Changes
=========
commit 1086f06bb2a604ec0535e872dd050f06ec5d1a5d
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Invalidate the damaged region, not the whole view
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 27d62c6..aca24b6 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -34,6 +34,8 @@ typedef struct render_priv {
GdkGC *mask_gc;
GdkGC *u_gc;
GdkGC *grid_gc;
+ bool clip;
+ GdkRectangle clip_rect;
int attached_invalidate_depth;
int mark_invalidate_depth;
} render_priv;
@@ -119,6 +121,18 @@ ghid_make_gc (void)
}
static void
+set_clip (render_priv *priv, GdkGC *gc)
+{
+ if (gc == NULL)
+ return;
+
+ if (priv->clip)
+ gdk_gc_set_clip_rectangle (gc, &priv->clip_rect);
+ else
+ gdk_gc_set_clip_mask (gc, NULL);
+}
+
+static void
ghid_draw_grid (void)
{
static GdkPoint *points = 0;
@@ -143,6 +157,8 @@ ghid_draw_grid (void)
priv->grid_gc = gdk_gc_new (gport->drawable);
gdk_gc_set_function (priv->grid_gc, GDK_XOR);
gdk_gc_set_foreground (priv->grid_gc, &gport->grid_color);
+ gdk_gc_set_clip_origin (priv->grid_gc, 0, 0);
+ set_clip (priv, priv->grid_gc);
}
x1 = GRIDFIT_X (SIDE_X (gport->view_x0), PCB->Grid);
y1 = GRIDFIT_Y (SIDE_Y (gport->view_y0), PCB->Grid);
@@ -283,6 +299,8 @@ ghid_use_mask (int use_it)
if (!priv->mask_gc)
{
priv->mask_gc = gdk_gc_new (gport->drawable);
+ gdk_gc_set_clip_origin (priv->mask_gc, 0, 0);
+ set_clip (priv, priv->mask_gc);
}
color.pixel = 1;
gdk_gc_set_foreground (priv->mask_gc, &color);
@@ -495,13 +513,14 @@ use_gc (hidGC gc)
ghid_set_line_width (gc, gc->width);
ghid_set_line_cap (gc, (EndCapStyle)gc->cap);
ghid_set_draw_xor (gc, gc->xor_mask);
+ gdk_gc_set_clip_origin (gc->gc, 0, 0);
}
if (gc->mask_seq != mask_seq)
{
if (mask_seq)
gdk_gc_set_clip_mask (gc->gc, gport->mask);
else
- gdk_gc_set_clip_mask (gc->gc, NULL);
+ set_clip (priv, gc->gc);
gc->mask_seq = mask_seq;
}
priv->u_gc = WHICH_GC (gc);
@@ -693,15 +712,7 @@ ghid_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
x1, y1, x2 - x1 + 1, y2 - y1 + 1);
}
-void
-ghid_invalidate_lr (int left, int right, int top, int bottom)
-{
- ghid_invalidate_all ();
-}
-
-
-void
-ghid_invalidate_all ()
+void redraw_region (GdkRectangle *rect)
{
int eleft, eright, etop, ebottom;
BoxType region;
@@ -710,10 +721,33 @@ ghid_invalidate_all ()
if (!gport->pixmap)
return;
- 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));
+ if (rect != NULL)
+ {
+ priv->clip_rect = *rect;
+ priv->clip = true;
+ }
+ else
+ {
+ priv->clip_rect.x = 0;
+ priv->clip_rect.y = 0;
+ priv->clip_rect.width = gport->width;
+ priv->clip_rect.height = gport->height;
+ priv->clip = false;
+ }
+
+ set_clip (priv, priv->bg_gc);
+ set_clip (priv, priv->offlimits_gc);
+ set_clip (priv, priv->mask_gc);
+ set_clip (priv, priv->grid_gc);
+
+ region.X1 = MIN(Px(priv->clip_rect.x),
+ Px(priv->clip_rect.x + priv->clip_rect.width + 1));
+ region.Y1 = MIN(Py(priv->clip_rect.y),
+ Py(priv->clip_rect.y + priv->clip_rect.height + 1));
+ region.X2 = MAX(Px(priv->clip_rect.x),
+ Px(priv->clip_rect.x + priv->clip_rect.width + 1));
+ region.Y2 = MAX(Py(priv->clip_rect.y),
+ Py(priv->clip_rect.y + priv->clip_rect.height + 1));
eleft = Vx (0);
eright = Vx (PCB->MaxWidth);
@@ -734,28 +768,28 @@ ghid_invalidate_all ()
if (eleft > 0)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, 0, 0, eleft, gport->height);
+ 1, 0, 0, eleft, gport->height);
else
eleft = 0;
if (eright < gport->width)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eright, 0, gport->width - eright, gport->height);
+ 1, eright, 0, gport->width - eright, gport->height);
else
eright = gport->width;
if (etop > 0)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eleft, 0, eright - eleft + 1, etop);
+ 1, eleft, 0, eright - eleft + 1, etop);
else
etop = 0;
if (ebottom < gport->height)
gdk_draw_rectangle (gport->drawable, priv->offlimits_gc,
- 1, eleft, ebottom, eright - eleft + 1,
- gport->height - ebottom);
+ 1, eleft, ebottom, eright - eleft + 1,
+ gport->height - ebottom);
else
ebottom = gport->height;
gdk_draw_rectangle (gport->drawable, priv->bg_gc, 1,
- eleft, etop, eright - eleft + 1, ebottom - etop + 1);
+ eleft, etop, eright - eleft + 1, ebottom - etop + 1);
ghid_draw_bg_image();
@@ -770,11 +804,44 @@ ghid_invalidate_all ()
if (priv->mark_invalidate_depth == 0)
DrawMark ();
+ priv->clip = false;
+}
+
+void
+ghid_invalidate_lr (int left, int right, int top, int bottom)
+{
+ int dleft, dright, dtop, dbottom;
+ int minx, maxx, miny, maxy;
+ GdkRectangle rect;
+
+ dleft = Vx ((double) left);
+ dright = Vy ((double) right);
+ dtop = Vx ((double) top);
+ dbottom = Vy ((double) bottom);
+
+ minx = MIN (dleft, dright);
+ maxx = MAX (dleft, dright);
+ miny = MIN (dtop, dbottom);
+ maxy = MAX (dtop, dbottom);
+
+ rect.x = minx;
+ rect.y = miny;
+ rect.width = maxx - minx;
+ rect.height = maxy - miny;
+
+ redraw_region (&rect);
ghid_screen_update ();
}
void
+ghid_invalidate_all ()
+{
+ redraw_region (NULL);
+ ghid_screen_update ();
+}
+
+void
ghid_notify_crosshair_change (bool changes_complete)
{
render_priv *priv = gport->render_priv;
@@ -949,6 +1016,7 @@ draw_crosshair (GdkGC *xor_gc, gint x, gint y)
static void
show_crosshair (gboolean paint_new_location)
{
+ render_priv *priv = gport->render_priv;
gint x, y;
static gint x_prev = -1, y_prev = -1;
static gboolean draw_markers, draw_markers_prev = FALSE;
@@ -963,6 +1031,8 @@ show_crosshair (gboolean paint_new_location)
xor_gc = gdk_gc_new (ghid_port.drawing_area->window);
gdk_gc_copy (xor_gc, ghid_port.drawing_area->style->white_gc);
gdk_gc_set_function (xor_gc, GDK_XOR);
+ gdk_gc_set_clip_origin (xor_gc, 0, 0);
+ set_clip (priv, xor_gc);
/* FIXME: when CrossColor changed from config */
ghid_map_color_string (Settings.CrossColor, &cross_color);
}
@@ -1035,9 +1105,11 @@ ghid_drawing_area_configure_hook (GHidPort *port)
{
priv->bg_gc = gdk_gc_new (port->drawable);
gdk_gc_set_foreground (priv->bg_gc, &port->bg_color);
+ gdk_gc_set_clip_origin (priv->bg_gc, 0, 0);
priv->offlimits_gc = gdk_gc_new (port->drawable);
gdk_gc_set_foreground (priv->offlimits_gc, &port->offlimits_color);
+ gdk_gc_set_clip_origin (priv->offlimits_gc, 0, 0);
done_once = 1;
}
|
|
From: <gi...@gp...> - 2011-04-29 14:28:10
|
The branch, master has been updated
via c5d1634862a57d2a1d61f6f00edcb034d75a4eac (commit)
from be49c65ee38c824140e1c567c7fd6bb405e78bc0 (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/print.c | 119 ++++++++++++++++++++++++++++++++---------------------------
1 files changed, 65 insertions(+), 54 deletions(-)
=================
Commit Messages
=================
commit c5d1634862a57d2a1d61f6f00edcb034d75a4eac
Author: Andrew Poelstra <as...@sf...>
Commit: Peter Clifton <pc...@ca...>
Subject: PCB / Physical unit macros patch 2: print.c
This patch works correctly (i.e., no change in output)
for my test file; about 6800 lines of postscript. The
only differences were in the timestamps, which naturally
were slightly different.
I also confirmed visually that the before and after
printouts look the same :)
Rebased to git HEAD by Peter Clifton <pc...@ca...>
:100644 100644 36fc71e... 1e3abc0... M src/print.c
=========
Changes
=========
commit c5d1634862a57d2a1d61f6f00edcb034d75a4eac
Author: Andrew Poelstra <as...@sf...>
Commit: Peter Clifton <pc...@ca...>
Subject: PCB / Physical unit macros patch 2: print.c
This patch works correctly (i.e., no change in output)
for my test file; about 6800 lines of postscript. The
only differences were in the timestamps, which naturally
were slightly different.
I also confirmed visually that the before and after
printouts look the same :)
Rebased to git HEAD by Peter Clifton <pc...@ca...>
diff --git a/src/print.c b/src/print.c
index 36fc71e..1e3abc0 100644
--- a/src/print.c
+++ b/src/print.c
@@ -72,9 +72,10 @@ RCSID ("$Id$");
* prints a FAB drawing.
*/
-#define TEXT_SIZE 150
-#define TEXT_LINE 15000
-#define FAB_LINE_W 800
+#define TEXT_SIZE MIL_TO_COORD(150)
+#define TEXT_LINE MIL_TO_COORD(150)
+#define DRILL_MARK_SIZE MIL_TO_COORD(16)
+#define FAB_LINE_W MIL_TO_COORD(8)
static void
fab_line (hidGC gc, int x1, int y1, int x2, int y2)
@@ -103,24 +104,23 @@ text_at (hidGC gc, int x, int y, int align, char *fmt, ...)
va_end (a);
t.Direction = 0;
t.TextString = tmp;
- t.Scale = TEXT_SIZE;
+ t.Scale = COORD_TO_MIL(TEXT_SIZE); /* pcnt of 100mil base height */
t.Flags = NoFlags ();
t.X = x;
t.Y = y;
for (i = 0; tmp[i]; i++)
w +=
(font->Symbol[(int) tmp[i]].Width + font->Symbol[(int) tmp[i]].Delta);
- w = w * TEXT_SIZE / 100;
+ w = w * t.Scale / 100;
t.X -= w * (align & 3) / 2;
if (t.X < 0)
t.X = 0;
DrawTextLowLevel (&t, 0);
if (align & 8)
fab_line (gc, t.X,
- t.Y +
- font->MaxHeight * TEXT_SIZE /
- 100 + 1000, t.X + w,
- t.Y + font->MaxHeight * TEXT_SIZE / 100 + 1000);
+ t.Y + font->MaxHeight * t.Scale / 100 + MIL_TO_COORD(10),
+ t.X + w,
+ t.Y + font->MaxHeight * t.Scale / 100 + MIL_TO_COORD(10));
}
/* Y, +, X, circle, square */
@@ -129,7 +129,7 @@ drill_sym (hidGC gc, int idx, int x, int y)
{
int type = idx % 5;
int size = idx / 5;
- int s2 = (size + 1) * 1600;
+ int s2 = (size + 1) * DRILL_MARK_SIZE;
int i;
switch (type)
{
@@ -138,19 +138,23 @@ drill_sym (hidGC gc, int idx, int x, int y)
fab_line (gc, x, y, x + s2 * 13 / 15, y - s2 / 2);
fab_line (gc, x, y, x - s2 * 13 / 15, y - s2 / 2);
for (i = 1; i <= size; i++)
- fab_circle (gc, x, y, i * 1600);
+ fab_circle (gc, x, y, i * DRILL_MARK_SIZE);
break;
case 1: /* + */
;
fab_line (gc, x, y - s2, x, y + s2);
fab_line (gc, x - s2, y, x + s2, y);
for (i = 1; i <= size; i++)
- {
- fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
- }
+ {
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ }
break;
case 2: /* X */ ;
fab_line (gc, x - s2 * 3 / 4, y - s2 * 3 / 4, x + s2 * 3 / 4,
@@ -158,25 +162,33 @@ drill_sym (hidGC gc, int idx, int x, int y)
fab_line (gc, x - s2 * 3 / 4, y + s2 * 3 / 4, x + s2 * 3 / 4,
y - s2 * 3 / 4);
for (i = 1; i <= size; i++)
- {
- fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
- }
+ {
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ }
break;
case 3: /* circle */ ;
for (i = 0; i <= size; i++)
- fab_circle (gc, x, y, (i + 1) * 1600 - 800);
+ fab_circle (gc, x, y, (i + 1) * DRILL_MARK_SIZE - DRILL_MARK_SIZE / 2);
break;
case 4: /* square */
for (i = 1; i <= size + 1; i++)
- {
- fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
- }
+ {
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x - i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ fab_line (gc, x + i * DRILL_MARK_SIZE, y - i * DRILL_MARK_SIZE,
+ x + i * DRILL_MARK_SIZE, y + i * DRILL_MARK_SIZE);
+ }
break;
}
}
@@ -217,7 +229,7 @@ PrintFab (hidGC gc)
char utcTime[64];
tmp_pin.Flags = NoFlags ();
AllDrills = GetDrillInfo (PCB->Data);
- RoundDrillInfo (AllDrills, 100);
+ RoundDrillInfo (AllDrills, MIL_TO_COORD(1));
yoff = -TEXT_LINE;
/* count how many drill description lines will be needed */
@@ -250,9 +262,9 @@ PrintFab (hidGC gc)
drill->Pin[i]->Y);
if (plated_sym != -1)
{
- drill_sym (gc, plated_sym, 100 * TEXT_SIZE, yoff + 100 * TEXT_SIZE / 4);
- text_at (gc, 135000, yoff, 200, "YES");
- text_at (gc, 98000, yoff, 200, "%d",
+ drill_sym (gc, plated_sym, TEXT_SIZE, yoff + TEXT_SIZE / 4);
+ text_at (gc, MIL_TO_COORD(1350), yoff, MIL_TO_COORD(2), "YES");
+ text_at (gc, MIL_TO_COORD(980), yoff, MIL_TO_COORD(2), "%d",
drill->PinCount + drill->ViaCount - drill->UnplatedCount);
if (unplated_sym != -1)
@@ -260,27 +272,26 @@ PrintFab (hidGC gc)
}
if (unplated_sym != -1)
{
- drill_sym (gc, unplated_sym, 100 * TEXT_SIZE,
- yoff + 100 * TEXT_SIZE / 4);
- text_at (gc, 140000, yoff, 200, "NO");
- text_at (gc, 98000, yoff, 200, "%d", drill->UnplatedCount);
+ drill_sym (gc, unplated_sym, TEXT_SIZE, yoff + TEXT_SIZE / 4);
+ text_at (gc, MIL_TO_COORD(1400), yoff, MIL_TO_COORD(2), "NO");
+ text_at (gc, MIL_TO_COORD(980), yoff, MIL_TO_COORD(2), "%d", drill->UnplatedCount);
}
gui->set_color (gc, PCB->ElementColor);
- text_at (gc, 45000, yoff, 200, "%0.3f",
- drill->DrillSize / 100000. + 0.0004);
+ text_at (gc, MIL_TO_COORD(450), yoff, MIL_TO_COORD(2), "%0.3f",
+ COORD_TO_INCH(drill->DrillSize) + 0.0004);
if (plated_sym != -1 && unplated_sym != -1)
- text_at (gc, 45000, yoff + TEXT_LINE, 200, "%0.3f",
- drill->DrillSize / 100000. + 0.0004);
+ text_at (gc, MIL_TO_COORD(450), yoff + TEXT_LINE, MIL_TO_COORD(2), "%0.3f",
+ COORD_TO_INCH(drill->DrillSize) + 0.0004);
yoff -= TEXT_LINE;
total_drills += drill->PinCount;
total_drills += drill->ViaCount;
}
gui->set_color (gc, PCB->ElementColor);
- text_at (gc, 0, yoff, 900, "Symbol");
- text_at (gc, 41000, yoff, 900, "Diam. (Inch)");
- text_at (gc, 95000, yoff, 900, "Count");
- text_at (gc, 130000, yoff, 900, "Plated?");
+ text_at (gc, 0, yoff, MIL_TO_COORD(9), "Symbol");
+ text_at (gc, MIL_TO_COORD(410), yoff, MIL_TO_COORD(9), "Diam. (Inch)");
+ text_at (gc, MIL_TO_COORD(950), yoff, MIL_TO_COORD(9), "Count");
+ text_at (gc, MIL_TO_COORD(1300), yoff, MIL_TO_COORD(9), "Plated?");
yoff -= TEXT_LINE;
text_at (gc, 0, yoff, 0,
"There are %d different drill sizes used in this layout, %d holes total",
@@ -306,7 +317,7 @@ PrintFab (hidGC gc)
}
if (i == max_copper_layer)
{
- gui->set_line_width (gc, 1000);
+ gui->set_line_width (gc, MIL_TO_COORD(10));
gui->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
gui->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
gui->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth,
@@ -315,10 +326,10 @@ PrintFab (hidGC gc)
PCB->MaxHeight);
/*FPrintOutline (); */
gui->set_line_width (gc, FAB_LINE_W);
- text_at (gc, 200000, yoff, 0,
+ text_at (gc, MIL_TO_COORD(2000), yoff, 0,
"Maximum Dimensions: %f mils wide, %f mils high",
COORD_TO_MIL(PCB->MaxWidth), COORD_TO_MIL(PCB->MaxHeight));
- text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
+ text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + MIL_TO_COORD(20), 1,
"Board outline is the centerline of this %f mil"
" rectangle - 0,0 to %f,%f mils",
COORD_TO_MIL(FAB_LINE_W), COORD_TO_MIL(PCB->MaxWidth), COORD_TO_MIL(PCB->MaxHeight));
@@ -326,7 +337,7 @@ PrintFab (hidGC gc)
else
{
LayerTypePtr layer = LAYER_PTR (i);
- gui->set_line_width (gc, 1000);
+ gui->set_line_width (gc, MIL_TO_COORD(10));
LINE_LOOP (layer);
{
gui->draw_line (gc, line->Point1.X, line->Point1.Y,
@@ -345,14 +356,14 @@ PrintFab (hidGC gc)
}
END_LOOP;
gui->set_line_width (gc, FAB_LINE_W);
- text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
+ text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + MIL_TO_COORD(20), 1,
"Board outline is the centerline of this path");
}
yoff -= TEXT_LINE;
- text_at (gc, 200000, yoff, 0, "Date: %s", utcTime);
+ text_at (gc, MIL_TO_COORD(2000), yoff, 0, "Date: %s", utcTime);
yoff -= TEXT_LINE;
- text_at (gc, 200000, yoff, 0, "Author: %s", pcb_author ());
+ text_at (gc, MIL_TO_COORD(2000), yoff, 0, "Author: %s", pcb_author ());
yoff -= TEXT_LINE;
- text_at (gc, 200000, yoff, 0,
+ text_at (gc, MIL_TO_COORD(2000), yoff, 0,
"Title: %s - Fabrication Drawing", UNKNOWN (PCB->Name));
}
|
|
From: <gi...@gp...> - 2011-04-28 17:34:32
|
The branch, master has been updated
discards 227782e65dc83dbbb4d7dee901a0f255aff31456 (commit)
via be49c65ee38c824140e1c567c7fd6bb405e78bc0 (commit)
from 227782e65dc83dbbb4d7dee901a0f255aff31456 (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/autoroute.c | 25 -------------------------
1 files changed, 0 insertions(+), 25 deletions(-)
=================
Commit Messages
=================
commit be49c65ee38c824140e1c567c7fd6bb405e78bc0
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
autoroute.c: Remove a couple of completely unused debug routines
:100644 100644 3810abd... c17a8fe... M src/autoroute.c
=========
Changes
=========
commit be49c65ee38c824140e1c567c7fd6bb405e78bc0
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
autoroute.c: Remove a couple of completely unused debug routines
diff --git a/src/autoroute.c b/src/autoroute.c
index 3810abd..c17a8fe 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -1456,14 +1456,6 @@ bloat_routebox (routebox_t * rb)
#ifdef ROUTE_DEBUG /* only for debugging expansion areas */
-void
-fillbox (const BoxType * b)
-{
- LayerTypePtr SLayer = LAYER_PTR (0);
- gui->set_color (ar_gc, SLayer->Color);
- gui->fill_rect (ar_gc, b->X1, b->Y1, b->X2, b->Y2);
-}
-
/* makes a line on the solder layer silk surrounding the box */
void
showbox (BoxType b, Dimension thickness, int group)
@@ -3977,23 +3969,6 @@ show_sources (routebox_t * rb)
END_LOOP;
}
-int
-__show_tree (const BoxType * b, void *cl)
-{
- int eo = (int) cl;
- routebox_t *rb = (routebox_t *) b;
- if (eo < 0 || eo == rb->flags.is_odd)
- fillbox (b);
- return 1;
-}
-
-static void
-show_tree (rtree_t * tree, int even_odd)
-{
- r_search (tree, NULL, NULL, __show_tree, (void *) even_odd);
- gui->use_mask (HID_FLUSH_DRAW_Q);
-}
-
#endif
static int
|
|
From: <gi...@gp...> - 2011-04-28 17:34:08
|
The branch, master has been updated
via 227782e65dc83dbbb4d7dee901a0f255aff31456 (commit)
from 9c19c1ad417e36080e6c96ec1ac34d0b60a2951a (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
=========
=================
Commit Messages
=================
=========
Changes
=========
|
|
From: <gi...@gp...> - 2011-04-28 14:08:33
|
The branch, master has been updated
via 9c19c1ad417e36080e6c96ec1ac34d0b60a2951a (commit)
from c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74 (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/global.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit 9c19c1ad417e36080e6c96ec1ac34d0b60a2951a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
global.h: Remove unused OutputType members Width and Height
:100644 100644 c82def6... a036ee5... M src/global.h
=========
Changes
=========
commit 9c19c1ad417e36080e6c96ec1ac34d0b60a2951a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
global.h: Remove unused OutputType members Width and Height
diff --git a/src/global.h b/src/global.h
index c82def6..a036ee5 100644
--- a/src/global.h
+++ b/src/global.h
@@ -173,9 +173,6 @@ typedef struct /* holds information about output window */
hidGC bgGC, /* background and foreground; */
fgGC, /* changed from some routines */
pmGC; /* depth 1 pixmap GC to store clip */
-
- int Width, /* sizes of output window (porthole) */
- Height;
}
OutputType, *OutputTypePtr;
|
|
From: <gi...@gp...> - 2011-04-28 14:07:37
|
The branch, master has been updated
via c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74 (commit)
via 9875699171ce99d317525d532ea548d3ed288e95 (commit)
from bb5f9fa099e1ee2f3f54a57491dd543db3446799 (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/action.c | 8 ++++++--
src/hid/gtk/gui-pinout-preview.c | 10 ++--------
2 files changed, 8 insertions(+), 10 deletions(-)
=================
Commit Messages
=================
commit c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Fixup usage of the never initialised, obsolete, Output.{Width,Height}
For the stroke handling case (relating to zooming) it isn't clear what is
correct, but for now, substitute PCB->MaxWidth and PCB->MaxHeight.
This may still leave stroke based zooming broken, but it was CERTAINLY
broken before.
:100644 100644 c03042e... ed087c1... M src/action.c
commit 9875699171ce99d317525d532ea548d3ed288e95
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove dead code (due to bitrot) from pinout_zoom_fit() function
The code tried to compare against the uninitialised, unused Output.Width
and Output.Height. Assuming these were initialised to zero by the compiler,
the conditional would always cause the function to return FALSE.
Remove the conditional, and drop the boolean return value from this
function, short-cutting the caller to the utilised code-path.
This removes the (long broken) feature where by the natural size
(in pixels) of the pinout preview would be reduced if it was greater than
3/4 of the viewport size (in pixels) of the active PCB.
:100644 100644 6cd8069... 2a205fa... M src/hid/gtk/gui-pinout-preview.c
=========
Changes
=========
commit c3eb26ad40042b9b21d5eb97a2537f36d8d1aa74
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Fixup usage of the never initialised, obsolete, Output.{Width,Height}
For the stroke handling case (relating to zooming) it isn't clear what is
correct, but for now, substitute PCB->MaxWidth and PCB->MaxHeight.
This may still leave stroke based zooming broken, but it was CERTAINLY
broken before.
diff --git a/src/action.c b/src/action.c
index c03042e..ed087c1 100644
--- a/src/action.c
+++ b/src/action.c
@@ -549,14 +549,18 @@ FinishStroke (void)
LocationType x = (StrokeBox.X1 + StrokeBox.X2) / 2;
LocationType y = (StrokeBox.Y1 + StrokeBox.Y2) / 2;
int z;
+ /* XXX: PCB->MaxWidth and PCB->MaxHeight may be the wrong
+ * divisors below. The old code WAS broken, but this
+ * replacement has not been tested for correctness.
+ */
z =
1 +
- log (fabs (StrokeBox.X2 - StrokeBox.X1) / Output.Width) /
+ log (fabs (StrokeBox.X2 - StrokeBox.X1) / PCB->MaxWidth) /
log (2.0);
z =
MAX (z,
1 +
- log (fabs (StrokeBox.Y2 - StrokeBox.Y1) / Output.Height) /
+ log (fabs (StrokeBox.Y2 - StrokeBox.Y1) / PCB->MaxHeight) /
log (2.0));
SetZoom (z);
commit 9875699171ce99d317525d532ea548d3ed288e95
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid/gtk: Remove dead code (due to bitrot) from pinout_zoom_fit() function
The code tried to compare against the uninitialised, unused Output.Width
and Output.Height. Assuming these were initialised to zero by the compiler,
the conditional would always cause the function to return FALSE.
Remove the conditional, and drop the boolean return value from this
function, short-cutting the caller to the utilised code-path.
This removes the (long broken) feature where by the natural size
(in pixels) of the pinout preview would be reduced if it was greater than
3/4 of the viewport size (in pixels) of the active PCB.
diff --git a/src/hid/gtk/gui-pinout-preview.c b/src/hid/gtk/gui-pinout-preview.c
index 6cd8069..2a205fa 100644
--- a/src/hid/gtk/gui-pinout-preview.c
+++ b/src/hid/gtk/gui-pinout-preview.c
@@ -52,7 +52,7 @@
RCSID ("$Id$");
-static gboolean
+static void
pinout_zoom_fit (GhidPinoutPreview * pinout, gint zoom)
{
pinout->zoom = zoom;
@@ -69,11 +69,6 @@ pinout_zoom_fit (GhidPinoutPreview * pinout, gint zoom)
pinout->h_pixels = (gint) (pinout->scale *
(pinout->element.BoundingBox.Y2 -
pinout->element.BoundingBox.Y1));
-
- if (pinout->w_pixels > 3 * Output.Width / 4 ||
- pinout->h_pixels > 3 * Output.Height / 4)
- return FALSE;
- return TRUE;
}
@@ -128,8 +123,7 @@ pinout_set_data (GhidPinoutPreview * pinout, ElementType * element)
Settings.PinoutOffsetY -
pinout->element.BoundingBox.Y1);
- if (!pinout_zoom_fit (pinout, 2))
- pinout_zoom_fit (pinout, 3);
+ pinout_zoom_fit (pinout, 3);
ELEMENTLINE_LOOP (&pinout->element);
{
|
|
From: <gi...@gp...> - 2011-04-28 13:48:28
|
The branch, master has been updated
via bb5f9fa099e1ee2f3f54a57491dd543db3446799 (commit)
from c1914b61192714f3630c830c13041fad9f7ad666 (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/global.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit bb5f9fa099e1ee2f3f54a57491dd543db3446799
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused old{Obj,Line,Box}State members from the OutputType structure
:100644 100644 bd605ad... c82def6... M src/global.h
=========
Changes
=========
commit bb5f9fa099e1ee2f3f54a57491dd543db3446799
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused old{Obj,Line,Box}State members from the OutputType structure
diff --git a/src/global.h b/src/global.h
index bd605ad..c82def6 100644
--- a/src/global.h
+++ b/src/global.h
@@ -176,8 +176,6 @@ typedef struct /* holds information about output window */
int Width, /* sizes of output window (porthole) */
Height;
- int oldObjState, /* Helpers for GetLocation */
- oldLineState, oldBoxState;
}
OutputType, *OutputTypePtr;
|
|
From: <gi...@gp...> - 2011-04-28 13:42:13
|
The branch, master has been updated
via c1914b61192714f3630c830c13041fad9f7ad666 (commit)
via 6ef503ec9e8da4d06ab29a5045ecf889f7174b68 (commit)
from 79448ffea7b8b5a5dbaa31a98d19dd4b4603d501 (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/autoroute.c | 32 ++++++++++++++++----------------
src/draw.c | 6 ------
src/main.c | 4 ----
3 files changed, 16 insertions(+), 26 deletions(-)
=================
Commit Messages
=================
commit c1914b61192714f3630c830c13041fad9f7ad666
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
main.c: Remove setup of global graphics contexts which are never used
draw.c stashes these ones creates its own. Drop the unused ones, and
drop the stashing in draw.c
:100644 100644 a31bdbd... 9ebcba6... M src/draw.c
:100644 100644 ad5ee94... b147a5c... M src/main.c
commit 6ef503ec9e8da4d06ab29a5045ecf889f7174b68
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
autoroute.c: Use the autoroute graphics context, not Output.fgGC
I'm aiming to confine Output.* graphics contexts to draw.c for now.
:100644 100644 40b3cda... 3810abd... M src/autoroute.c
=========
Changes
=========
commit c1914b61192714f3630c830c13041fad9f7ad666
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
main.c: Remove setup of global graphics contexts which are never used
draw.c stashes these ones creates its own. Drop the unused ones, and
drop the stashing in draw.c
diff --git a/src/draw.c b/src/draw.c
index a31bdbd..9ebcba6 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1727,9 +1727,6 @@ void
hid_expose_callback (HID * hid, BoxType * region, void *item)
{
HID *old_gui = gui;
- hidGC savebg = Output.bgGC;
- hidGC savefg = Output.fgGC;
- hidGC savepm = Output.pmGC;
gui = hid;
Output.fgGC = gui->make_gc ();
@@ -1752,7 +1749,4 @@ hid_expose_callback (HID * hid, BoxType * region, void *item)
gui->destroy_gc (Output.bgGC);
gui->destroy_gc (Output.pmGC);
gui = old_gui;
- Output.fgGC = savefg;
- Output.bgGC = savebg;
- Output.pmGC = savepm;
}
diff --git a/src/main.c b/src/main.c
index ad5ee94..b147a5c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -977,10 +977,6 @@ main (int argc, char *argv[])
if (show_copyright)
copyright ();
- Output.bgGC = gui->make_gc ();
- Output.fgGC = gui->make_gc ();
- Output.pmGC = gui->make_gc ();
-
settings_post_process ();
commit 6ef503ec9e8da4d06ab29a5045ecf889f7174b68
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
autoroute.c: Use the autoroute graphics context, not Output.fgGC
I'm aiming to confine Output.* graphics contexts to draw.c for now.
diff --git a/src/autoroute.c b/src/autoroute.c
index 40b3cda..3810abd 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -1460,8 +1460,8 @@ void
fillbox (const BoxType * b)
{
LayerTypePtr SLayer = LAYER_PTR (0);
- gui->set_color (Output.fgGC, SLayer->Color);
- gui->fill_rect (Output.fgGC, b->X1, b->Y1, b->X2, b->Y2);
+ gui->set_color (ar_gc, SLayer->Color);
+ gui->fill_rect (ar_gc, b->X1, b->Y1, b->X2, b->Y2);
}
/* makes a line on the solder layer silk surrounding the box */
@@ -1476,14 +1476,14 @@ showbox (BoxType b, Dimension thickness, int group)
return;
- gui->set_line_width (Output.fgGC, thickness);
- gui->set_line_cap (Output.fgGC, Trace_Cap);
- gui->set_color (Output.fgGC, SLayer->Color);
+ gui->set_line_width (ar_gc, thickness);
+ gui->set_line_cap (ar_gc, Trace_Cap);
+ gui->set_color (ar_gc, SLayer->Color);
- gui->draw_line (Output.fgGC, b.X1, b.Y1, b.X2, b.Y1);
- gui->draw_line (Output.fgGC, b.X1, b.Y2, b.X2, b.Y2);
- gui->draw_line (Output.fgGC, b.X1, b.Y1, b.X1, b.Y2);
- gui->draw_line (Output.fgGC, b.X2, b.Y1, b.X2, b.Y2);
+ gui->draw_line (ar_gc, b.X1, b.Y1, b.X2, b.Y1);
+ gui->draw_line (ar_gc, b.X1, b.Y2, b.X2, b.Y2);
+ gui->draw_line (ar_gc, b.X1, b.Y1, b.X1, b.Y2);
+ gui->draw_line (ar_gc, b.X2, b.Y1, b.X2, b.Y2);
gui->use_mask (HID_FLUSH_DRAW_Q);
#if 1
@@ -1529,23 +1529,23 @@ showedge (edge_t * e)
{
BoxType *b = (BoxType *) e->rb;
- gui->set_line_cap (Output.fgGC, Trace_Cap);
- gui->set_line_width (Output.fgGC, 1);
- gui->set_color (Output.fgGC, Settings.MaskColor);
+ gui->set_line_cap (ar_gc, Trace_Cap);
+ gui->set_line_width (ar_gc, 1);
+ gui->set_color (ar_gc, Settings.MaskColor);
switch (e->expand_dir)
{
case NORTH:
- gui->draw_line (Output.fgGC, b->X1, b->Y1, b->X2, b->Y1);
+ gui->draw_line (ar_gc, b->X1, b->Y1, b->X2, b->Y1);
break;
case SOUTH:
- gui->draw_line (Output.fgGC, b->X1, b->Y2, b->X2, b->Y2);
+ gui->draw_line (ar_gc, b->X1, b->Y2, b->X2, b->Y2);
break;
case WEST:
- gui->draw_line (Output.fgGC, b->X1, b->Y1, b->X1, b->Y2);
+ gui->draw_line (ar_gc, b->X1, b->Y1, b->X1, b->Y2);
break;
case EAST:
- gui->draw_line (Output.fgGC, b->X2, b->Y1, b->X2, b->Y2);
+ gui->draw_line (ar_gc, b->X2, b->Y1, b->X2, b->Y2);
break;
default:
break;
|
|
From: <gi...@gp...> - 2011-04-28 01:32:39
|
The branch, master has been updated
via 79448ffea7b8b5a5dbaa31a98d19dd4b4603d501 (commit)
from b722d1d3ef7519d74a4a73272de7d30fbaf14462 (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/data.c | 10 ----------
src/data.h | 2 --
2 files changed, 0 insertions(+), 12 deletions(-)
=================
Commit Messages
=================
commit 79448ffea7b8b5a5dbaa31a98d19dd4b4603d501
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused global variable Zoom_Multiplier
Along with a following commented series of numbers which git log
suggests was originally related to pre-defined zoom ratios.
:100644 100644 3cf6231... ebd9b29... M src/data.c
:100644 100644 22eea0c... bf8e421... M src/data.h
=========
Changes
=========
commit 79448ffea7b8b5a5dbaa31a98d19dd4b4603d501
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused global variable Zoom_Multiplier
Along with a following commented series of numbers which git log
suggests was originally related to pre-defined zoom ratios.
diff --git a/src/data.c b/src/data.c
index 3cf6231..ebd9b29 100644
--- a/src/data.c
+++ b/src/data.c
@@ -58,13 +58,3 @@ LibraryType Library; /* the library */
bool Bumped; /* if the undo serial number has changed */
int addedLines;
-
-double Zoom_Multiplier = 0.01;
-
-/* { 1.5625, 2.2097, 3.125, 4.4194, 6.25, 8.8388,
- 12.5, 17.6777, 25, 35.3553, 50, 70.7106, 100,
- 141.421, 200, 282.848, 400, 565.685, 800, 1131.37,
- 1600, 2262.74, 3200, 4525.48, 6400 };
-*/
-
-
diff --git a/src/data.h b/src/data.h
index 22eea0c..bf8e421 100644
--- a/src/data.h
+++ b/src/data.h
@@ -59,8 +59,6 @@ extern LibraryType Library;
/*extern DeviceInfoType PrintingDevice[];*/
-extern double Zoom_Multiplier;
-
extern char *Progname;
extern char *InputTranslations;
|
|
From: <gi...@gp...> - 2011-04-28 01:28:56
|
The branch, master has been updated
via b722d1d3ef7519d74a4a73272de7d30fbaf14462 (commit)
from d5d41afc5a3b080a801577fc19434434c13d012b (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/macro.h | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit b722d1d3ef7519d74a4a73272de7d30fbaf14462
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
macro.h: Remove unused (obsolete) conversion macro TO_PCB
:100644 100644 625d639... 1fb6584... M src/macro.h
=========
Changes
=========
commit b722d1d3ef7519d74a4a73272de7d30fbaf14462
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
macro.h: Remove unused (obsolete) conversion macro TO_PCB
diff --git a/src/macro.h b/src/macro.h
index 625d639..1fb6584 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -50,10 +50,6 @@
#define TO_SCREEN_SIGN_X(x) (SWAP_IDENT ? SWAP_SIGN_X(x) : (x))
#define TO_SCREEN_SIGN_Y(y) (SWAP_IDENT ? SWAP_SIGN_Y(y) : (y))
-#ifndef TO_PCB
-#define TO_PCB(x) ((LocationType)((x)/Zoom_Multiplier))
-#endif
-
/* ---------------------------------------------------------------------------
* misc macros, some might already be defined by <limits.h>
*/
|
|
From: <gi...@gp...> - 2011-04-28 01:28:08
|
The branch, master has been updated
via d5d41afc5a3b080a801577fc19434434c13d012b (commit)
from 7f070cde37c28a4b543059a3666a84019f3b84bd (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/action.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
=================
Commit Messages
=================
commit d5d41afc5a3b080a801577fc19434434c13d012b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
action.c: Replace use of obsolete conversion macro TO_PCB with a constant.
This changes the location tolerance in NotifyLine()'s call to
LookupConnection() from what previously evaluated to 100 internal units,
to a constant of one internal unit.
This is consistent with other similar calls to LookupConnection(),
where it appears that a wide search area is not desired, so the smallest
possible value is passed.
:100644 100644 967a95f... c03042e... M src/action.c
=========
Changes
=========
commit d5d41afc5a3b080a801577fc19434434c13d012b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
action.c: Replace use of obsolete conversion macro TO_PCB with a constant.
This changes the location tolerance in NotifyLine()'s call to
LookupConnection() from what previously evaluated to 100 internal units,
to a constant of one internal unit.
This is consistent with other similar calls to LookupConnection(),
where it appears that a wide search area is not desired, so the smallest
possible value is passed.
diff --git a/src/action.c b/src/action.c
index 967a95f..c03042e 100644
--- a/src/action.c
+++ b/src/action.c
@@ -891,7 +891,7 @@ NotifyLine (void)
type = SearchScreen (Crosshair.X, Crosshair.Y,
PIN_TYPE | PAD_TYPE | VIA_TYPE, &ptr1, &ptr2,
&ptr3);
- LookupConnection (Crosshair.X, Crosshair.Y, true, TO_PCB (1),
+ LookupConnection (Crosshair.X, Crosshair.Y, true, 1,
FOUNDFLAG);
}
if (type == PIN_TYPE || type == VIA_TYPE)
|
|
From: <gi...@gp...> - 2011-04-28 01:17:58
|
The branch, master has been updated
via 7f070cde37c28a4b543059a3666a84019f3b84bd (commit)
via c4a1338b4ad10400c0d86011617f4632991ea1bf (commit)
from ec803f59850f204a9743e2b24efc591500f2eebc (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/data.c | 2 --
src/data.h | 2 --
src/file.c | 3 ---
src/macro.h | 3 ---
4 files changed, 0 insertions(+), 10 deletions(-)
=================
Commit Messages
=================
commit 7f070cde37c28a4b543059a3666a84019f3b84bd
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused variables Xorig and Yorig
:100644 100644 7a8f575... 3cf6231... M src/data.c
:100644 100644 6e70fd3... 22eea0c... M src/data.h
:100644 100644 8a52614... 4c40162... M src/file.c
commit c4a1338b4ad10400c0d86011617f4632991ea1bf
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
macro.h: Remove unused, obsolete conversion macros TO_PCB_X and TO_PCB_Y
:100644 100644 6dcd0d1... 625d639... M src/macro.h
=========
Changes
=========
commit 7f070cde37c28a4b543059a3666a84019f3b84bd
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused variables Xorig and Yorig
diff --git a/src/data.c b/src/data.c
index 7a8f575..3cf6231 100644
--- a/src/data.c
+++ b/src/data.c
@@ -57,8 +57,6 @@ BufferType Buffers[MAX_BUFFER]; /* my buffers */
LibraryType Library; /* the library */
bool Bumped; /* if the undo serial number has changed */
-LocationType Xorig, Yorig; /* origin offset for drawing in pixmap */
-
int addedLines;
double Zoom_Multiplier = 0.01;
diff --git a/src/data.h b/src/data.h
index 6e70fd3..22eea0c 100644
--- a/src/data.h
+++ b/src/data.h
@@ -59,8 +59,6 @@ extern LibraryType Library;
/*extern DeviceInfoType PrintingDevice[];*/
-extern LocationType Xorig, Yorig;
-
extern double Zoom_Multiplier;
extern char *Progname;
diff --git a/src/file.c b/src/file.c
index 8a52614..4c40162 100644
--- a/src/file.c
+++ b/src/file.c
@@ -376,9 +376,6 @@ LoadPCB (char *Filename)
Crosshair.Y =
MAX (0, MIN (PCB->CursorY, (LocationType) PCB->MaxHeight));
- Xorig = Crosshair.X - TO_PCB (Output.Width / 2);
- Yorig = Crosshair.Y - TO_PCB (Output.Height / 2);
-
/* update cursor confinement and output area (scrollbars) */
ChangePCBSize (PCB->MaxWidth, PCB->MaxHeight);
commit c4a1338b4ad10400c0d86011617f4632991ea1bf
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
macro.h: Remove unused, obsolete conversion macros TO_PCB_X and TO_PCB_Y
diff --git a/src/macro.h b/src/macro.h
index 6dcd0d1..625d639 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -53,9 +53,6 @@
#ifndef TO_PCB
#define TO_PCB(x) ((LocationType)((x)/Zoom_Multiplier))
#endif
-#define TO_PCB_X(x) TO_PCB(x) + Xorig
-#define TO_PCB_Y(y) (SWAP_IDENT ? \
- PCB->MaxHeight - TO_PCB(y) - Yorig : TO_PCB(y) + Yorig)
/* ---------------------------------------------------------------------------
* misc macros, some might already be defined by <limits.h>
|
|
From: <gi...@gp...> - 2011-04-28 01:15:11
|
The branch, master has been updated
via ec803f59850f204a9743e2b24efc591500f2eebc (commit)
from 33b29abb66fb6d620a5902e77448c1fbf787c8b7 (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/action.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit ec803f59850f204a9743e2b24efc591500f2eebc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
action.c: Partially fix up some stroke handling bugs
1. Stroke event coordinates are already in PCB units, drop bogus conversions
2. Fix incorrect variable name
:100644 100644 53dde28... 967a95f... M src/action.c
=========
Changes
=========
commit ec803f59850f204a9743e2b24efc591500f2eebc
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
action.c: Partially fix up some stroke handling bugs
1. Stroke event coordinates are already in PCB units, drop bogus conversions
2. Fix incorrect variable name
diff --git a/src/action.c b/src/action.c
index 53dde28..967a95f 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2141,9 +2141,9 @@ EventMoveCrosshair (int ev_x, int ev_y)
#ifdef HAVE_LIBSTROKE
if (mid_stroke)
{
- StrokeBox.X2 = TO_PCB_X (ev_x);
- StrokeBox.Y2 = TO_PCB_Y (ev_y);
- stroke_record (Event->x, ev_y);
+ StrokeBox.X2 = ev_x;
+ StrokeBox.Y2 = ev_y;
+ stroke_record (ev_x, ev_y);
return;
}
#endif /* HAVE_LIBSTROKE */
|
|
From: <gi...@gp...> - 2011-04-28 01:10:24
|
The branch, master has been updated
via 33b29abb66fb6d620a5902e77448c1fbf787c8b7 (commit)
from 8f43b3b2b7a207edf02d27140f5145930b19559e (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/file.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 33b29abb66fb6d620a5902e77448c1fbf787c8b7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
file.c: Write out correct cursor location in the PCB file
:100644 100644 6363bf4... 8a52614... M src/file.c
=========
Changes
=========
commit 33b29abb66fb6d620a5902e77448c1fbf787c8b7
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
file.c: Write out correct cursor location in the PCB file
diff --git a/src/file.c b/src/file.c
index 6363bf4..8a52614 100644
--- a/src/file.c
+++ b/src/file.c
@@ -534,8 +534,8 @@ WritePCBDataHeader (FILE * FP)
fprintf (FP, "Grid[%s %i %i %i]\n",
c_dtostr (PCB->Grid), (int) PCB->GridOffsetX,
(int) PCB->GridOffsetY, (int) Settings.DrawGrid);
- fprintf (FP, "Cursor[%i %i %s]\n", (int) TO_PCB_X (Output.Width / 2),
- (int) TO_PCB_Y (Output.Height / 2), c_dtostr (PCB->Zoom));
+ fprintf (FP, "Cursor[%i %i %s]\n",
+ Crosshair.X, Crosshair.Y, c_dtostr (PCB->Zoom));
fprintf (FP, "PolyArea[%s]\n", c_dtostr (PCB->IsleArea));
fprintf (FP, "Thermal[%s]\n", c_dtostr (PCB->ThermScale));
fprintf (FP, "DRC[%i %i %i %i %i %i]\n", PCB->Bloat, PCB->Shrink,
|
|
From: <gi...@gp...> - 2011-04-28 00:53:12
|
The branch, master has been updated
via 8f43b3b2b7a207edf02d27140f5145930b19559e (commit)
from d62eb769b4bb6f185460a35c89595184727402fa (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/data.c | 5 -----
src/data.h | 2 --
2 files changed, 0 insertions(+), 7 deletions(-)
=================
Commit Messages
=================
commit 8f43b3b2b7a207edf02d27140f5145930b19559e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
data.c: Remove unused globals theScreen, clipBox, vxl, vxh, vyl, vyh
:100644 100644 73e53f2... 7a8f575... M src/data.c
:100644 100644 8dc674a... 6e70fd3... M src/data.h
=========
Changes
=========
commit 8f43b3b2b7a207edf02d27140f5145930b19559e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
data.c: Remove unused globals theScreen, clipBox, vxl, vxh, vyl, vyh
diff --git a/src/data.c b/src/data.c
index 73e53f2..7a8f575 100644
--- a/src/data.c
+++ b/src/data.c
@@ -61,11 +61,6 @@ LocationType Xorig, Yorig; /* origin offset for drawing in pixmap */
int addedLines;
-LocationType vxl, vxh, vyl, vyh; /* visible pcb coordinates */
-
-BoxType theScreen; /* box of screen in pcb coordinates */
-BoxType clipBox; /* box for clipping of drawing */
-
double Zoom_Multiplier = 0.01;
/* { 1.5625, 2.2097, 3.125, 4.4194, 6.25, 8.8388,
diff --git a/src/data.h b/src/data.h
index 8dc674a..6e70fd3 100644
--- a/src/data.h
+++ b/src/data.h
@@ -61,8 +61,6 @@ extern LibraryType Library;
extern LocationType Xorig, Yorig;
-extern BoxType theScreen, clipBox;
-
extern double Zoom_Multiplier;
extern char *Progname;
|
|
From: <gi...@gp...> - 2011-04-28 00:45:39
|
The branch, master has been updated
via d62eb769b4bb6f185460a35c89595184727402fa (commit)
from 90410b8451d7d77ce21d37bab79071d488b80997 (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/draw.c | 2 +-
src/print.c | 136 +++++++++++++++++++++++++++++-----------------------------
src/print.h | 2 +-
3 files changed, 70 insertions(+), 70 deletions(-)
=================
Commit Messages
=================
commit d62eb769b4bb6f185460a35c89595184727402fa
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
print.c: Pass an explicit graphics context to PrintFab() and friends
This is a step towards being able to move the active graphics contexts
out of the global scope.
:100644 100644 c041195... a31bdbd... M src/draw.c
:100644 100644 286888d... 36fc71e... M src/print.c
:100644 100644 8744ce0... cf8689f... M src/print.h
=========
Changes
=========
commit d62eb769b4bb6f185460a35c89595184727402fa
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
print.c: Pass an explicit graphics context to PrintFab() and friends
This is a step towards being able to move the active graphics contexts
out of the global scope.
diff --git a/src/draw.c b/src/draw.c
index c041195..a31bdbd 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -763,7 +763,7 @@ DrawEverything (BoxTypePtr drawn_area)
doing_assy = false;
if (gui->set_layer ("fab", SL (FAB, 0), 0))
- PrintFab ();
+ PrintFab (Output.fgGC);
}
static void
diff --git a/src/print.c b/src/print.c
index 286888d..36fc71e 100644
--- a/src/print.c
+++ b/src/print.c
@@ -77,21 +77,21 @@ RCSID ("$Id$");
#define FAB_LINE_W 800
static void
-fab_line (int x1, int y1, int x2, int y2)
+fab_line (hidGC gc, int x1, int y1, int x2, int y2)
{
- gui->draw_line (Output.fgGC, x1, y1, x2, y2);
+ gui->draw_line (gc, x1, y1, x2, y2);
}
static void
-fab_circle (int x, int y, int r)
+fab_circle (hidGC gc, int x, int y, int r)
{
- gui->draw_arc (Output.fgGC, x, y, r, r, 0, 180);
- gui->draw_arc (Output.fgGC, x, y, r, r, 180, 180);
+ gui->draw_arc (gc, x, y, r, r, 0, 180);
+ gui->draw_arc (gc, x, y, r, r, 180, 180);
}
/* align is 0=left, 1=center, 2=right, add 8 for underline */
static void
-text_at (int x, int y, int align, char *fmt, ...)
+text_at (hidGC gc, int x, int y, int align, char *fmt, ...)
{
char tmp[512];
int w = 0, i;
@@ -116,16 +116,16 @@ text_at (int x, int y, int align, char *fmt, ...)
t.X = 0;
DrawTextLowLevel (&t, 0);
if (align & 8)
- fab_line (t.X,
- t.Y +
- font->MaxHeight * TEXT_SIZE /
- 100 + 1000, t.X + w,
- t.Y + font->MaxHeight * TEXT_SIZE / 100 + 1000);
+ fab_line (gc, t.X,
+ t.Y +
+ font->MaxHeight * TEXT_SIZE /
+ 100 + 1000, t.X + w,
+ t.Y + font->MaxHeight * TEXT_SIZE / 100 + 1000);
}
/* Y, +, X, circle, square */
static void
-drill_sym (int idx, int x, int y)
+drill_sym (hidGC gc, int idx, int x, int y)
{
int type = idx % 5;
int size = idx / 5;
@@ -134,48 +134,48 @@ drill_sym (int idx, int x, int y)
switch (type)
{
case 0: /* Y */ ;
- fab_line (x, y, x, y + s2);
- fab_line (x, y, x + s2 * 13 / 15, y - s2 / 2);
- fab_line (x, y, x - s2 * 13 / 15, y - s2 / 2);
+ fab_line (gc, x, y, x, y + s2);
+ fab_line (gc, x, y, x + s2 * 13 / 15, y - s2 / 2);
+ fab_line (gc, x, y, x - s2 * 13 / 15, y - s2 / 2);
for (i = 1; i <= size; i++)
- fab_circle (x, y, i * 1600);
+ fab_circle (gc, x, y, i * 1600);
break;
case 1: /* + */
;
- fab_line (x, y - s2, x, y + s2);
- fab_line (x - s2, y, x + s2, y);
+ fab_line (gc, x, y - s2, x, y + s2);
+ fab_line (gc, x - s2, y, x + s2, y);
for (i = 1; i <= size; i++)
{
- fab_line (x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
}
break;
case 2: /* X */ ;
- fab_line (x - s2 * 3 / 4, y - s2 * 3 / 4, x + s2 * 3 / 4,
+ fab_line (gc, x - s2 * 3 / 4, y - s2 * 3 / 4, x + s2 * 3 / 4,
y + s2 * 3 / 4);
- fab_line (x - s2 * 3 / 4, y + s2 * 3 / 4, x + s2 * 3 / 4,
+ fab_line (gc, x - s2 * 3 / 4, y + s2 * 3 / 4, x + s2 * 3 / 4,
y - s2 * 3 / 4);
for (i = 1; i <= size; i++)
{
- fab_line (x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
}
break;
case 3: /* circle */ ;
for (i = 0; i <= size; i++)
- fab_circle (x, y, (i + 1) * 1600 - 800);
+ fab_circle (gc, x, y, (i + 1) * 1600 - 800);
break;
case 4: /* square */
for (i = 1; i <= size + 1; i++)
{
- fab_line (x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
- fab_line (x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
- fab_line (x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
- fab_line (x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x + i * 1600, y - i * 1600);
+ fab_line (gc, x - i * 1600, y - i * 1600, x - i * 1600, y + i * 1600);
+ fab_line (gc, x - i * 1600, y + i * 1600, x + i * 1600, y + i * 1600);
+ fab_line (gc, x + i * 1600, y - i * 1600, x + i * 1600, y + i * 1600);
}
break;
}
@@ -208,7 +208,7 @@ PrintFab_overhang (void)
}
void
-PrintFab (void)
+PrintFab (hidGC gc)
{
PinType tmp_pin;
DrillInfoTypePtr AllDrills;
@@ -233,7 +233,7 @@ PrintFab (void)
yoff -= (4 - ds) * TEXT_LINE;
}
- gui->set_line_width (Output.fgGC, FAB_LINE_W);
+ gui->set_line_width (gc, FAB_LINE_W);
for (n = AllDrills->DrillN - 1; n >= 0; n--)
{
@@ -243,16 +243,16 @@ PrintFab (void)
plated_sym = --ds;
if (drill->UnplatedCount)
unplated_sym = --ds;
- gui->set_color (Output.fgGC, PCB->PinColor);
+ gui->set_color (gc, PCB->PinColor);
for (i = 0; i < drill->PinN; i++)
- drill_sym (TEST_FLAG (HOLEFLAG, drill->Pin[i]) ?
+ drill_sym (gc, TEST_FLAG (HOLEFLAG, drill->Pin[i]) ?
unplated_sym : plated_sym, drill->Pin[i]->X,
drill->Pin[i]->Y);
if (plated_sym != -1)
{
- drill_sym (plated_sym, 100 * TEXT_SIZE, yoff + 100 * TEXT_SIZE / 4);
- text_at (135000, yoff, 200, "YES");
- text_at (98000, yoff, 200, "%d",
+ drill_sym (gc, plated_sym, 100 * TEXT_SIZE, yoff + 100 * TEXT_SIZE / 4);
+ text_at (gc, 135000, yoff, 200, "YES");
+ text_at (gc, 98000, yoff, 200, "%d",
drill->PinCount + drill->ViaCount - drill->UnplatedCount);
if (unplated_sym != -1)
@@ -260,29 +260,29 @@ PrintFab (void)
}
if (unplated_sym != -1)
{
- drill_sym (unplated_sym, 100 * TEXT_SIZE,
+ drill_sym (gc, unplated_sym, 100 * TEXT_SIZE,
yoff + 100 * TEXT_SIZE / 4);
- text_at (140000, yoff, 200, "NO");
- text_at (98000, yoff, 200, "%d", drill->UnplatedCount);
+ text_at (gc, 140000, yoff, 200, "NO");
+ text_at (gc, 98000, yoff, 200, "%d", drill->UnplatedCount);
}
- gui->set_color (Output.fgGC, PCB->ElementColor);
- text_at (45000, yoff, 200, "%0.3f",
+ gui->set_color (gc, PCB->ElementColor);
+ text_at (gc, 45000, yoff, 200, "%0.3f",
drill->DrillSize / 100000. + 0.0004);
if (plated_sym != -1 && unplated_sym != -1)
- text_at (45000, yoff + TEXT_LINE, 200, "%0.3f",
+ text_at (gc, 45000, yoff + TEXT_LINE, 200, "%0.3f",
drill->DrillSize / 100000. + 0.0004);
yoff -= TEXT_LINE;
total_drills += drill->PinCount;
total_drills += drill->ViaCount;
}
- gui->set_color (Output.fgGC, PCB->ElementColor);
- text_at (0, yoff, 900, "Symbol");
- text_at (41000, yoff, 900, "Diam. (Inch)");
- text_at (95000, yoff, 900, "Count");
- text_at (130000, yoff, 900, "Plated?");
+ gui->set_color (gc, PCB->ElementColor);
+ text_at (gc, 0, yoff, 900, "Symbol");
+ text_at (gc, 41000, yoff, 900, "Diam. (Inch)");
+ text_at (gc, 95000, yoff, 900, "Count");
+ text_at (gc, 130000, yoff, 900, "Plated?");
yoff -= TEXT_LINE;
- text_at (0, yoff, 0,
+ text_at (gc, 0, yoff, 0,
"There are %d different drill sizes used in this layout, %d holes total",
AllDrills->DrillN, total_drills);
/* Create a portable timestamp. */
@@ -306,19 +306,19 @@ PrintFab (void)
}
if (i == max_copper_layer)
{
- gui->set_line_width (Output.fgGC, 1000);
- gui->draw_line (Output.fgGC, 0, 0, PCB->MaxWidth, 0);
- gui->draw_line (Output.fgGC, 0, 0, 0, PCB->MaxHeight);
- gui->draw_line (Output.fgGC, PCB->MaxWidth, 0, PCB->MaxWidth,
+ gui->set_line_width (gc, 1000);
+ gui->draw_line (gc, 0, 0, PCB->MaxWidth, 0);
+ gui->draw_line (gc, 0, 0, 0, PCB->MaxHeight);
+ gui->draw_line (gc, PCB->MaxWidth, 0, PCB->MaxWidth,
PCB->MaxHeight);
- gui->draw_line (Output.fgGC, 0, PCB->MaxHeight, PCB->MaxWidth,
+ gui->draw_line (gc, 0, PCB->MaxHeight, PCB->MaxWidth,
PCB->MaxHeight);
/*FPrintOutline (); */
- gui->set_line_width (Output.fgGC, FAB_LINE_W);
- text_at (200000, yoff, 0,
+ gui->set_line_width (gc, FAB_LINE_W);
+ text_at (gc, 200000, yoff, 0,
"Maximum Dimensions: %f mils wide, %f mils high",
COORD_TO_MIL(PCB->MaxWidth), COORD_TO_MIL(PCB->MaxHeight));
- text_at (PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
+ text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
"Board outline is the centerline of this %f mil"
" rectangle - 0,0 to %f,%f mils",
COORD_TO_MIL(FAB_LINE_W), COORD_TO_MIL(PCB->MaxWidth), COORD_TO_MIL(PCB->MaxHeight));
@@ -326,16 +326,16 @@ PrintFab (void)
else
{
LayerTypePtr layer = LAYER_PTR (i);
- gui->set_line_width (Output.fgGC, 1000);
+ gui->set_line_width (gc, 1000);
LINE_LOOP (layer);
{
- gui->draw_line (Output.fgGC, line->Point1.X, line->Point1.Y,
+ gui->draw_line (gc, line->Point1.X, line->Point1.Y,
line->Point2.X, line->Point2.Y);
}
END_LOOP;
ARC_LOOP (layer);
{
- gui->draw_arc (Output.fgGC, arc->X, arc->Y, arc->Width,
+ gui->draw_arc (gc, arc->X, arc->Y, arc->Width,
arc->Height, arc->StartAngle, arc->Delta);
}
END_LOOP;
@@ -344,15 +344,15 @@ PrintFab (void)
DrawTextLowLevel (text, 0);
}
END_LOOP;
- gui->set_line_width (Output.fgGC, FAB_LINE_W);
- text_at (PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
+ gui->set_line_width (gc, FAB_LINE_W);
+ text_at (gc, PCB->MaxWidth / 2, PCB->MaxHeight + 2000, 1,
"Board outline is the centerline of this path");
}
yoff -= TEXT_LINE;
- text_at (200000, yoff, 0, "Date: %s", utcTime);
+ text_at (gc, 200000, yoff, 0, "Date: %s", utcTime);
yoff -= TEXT_LINE;
- text_at (200000, yoff, 0, "Author: %s", pcb_author ());
+ text_at (gc, 200000, yoff, 0, "Author: %s", pcb_author ());
yoff -= TEXT_LINE;
- text_at (200000, yoff, 0,
+ text_at (gc, 200000, yoff, 0,
"Title: %s - Fabrication Drawing", UNKNOWN (PCB->Name));
}
diff --git a/src/print.h b/src/print.h
index 8744ce0..cf8689f 100644
--- a/src/print.h
+++ b/src/print.h
@@ -36,6 +36,6 @@
#include "global.h"
int PrintFab_overhang(void);
-void PrintFab (void);
+void PrintFab (hidGC gc);
#endif
|
|
From: <gi...@gp...> - 2011-04-28 00:30:07
|
The branch, master has been updated
via 90410b8451d7d77ce21d37bab79071d488b80997 (commit)
from bf1870a4bc3befb04ae9ac179397a3fc378f3f42 (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/global.h | 3 +--
src/main.c | 1 -
2 files changed, 1 insertions(+), 3 deletions(-)
=================
Commit Messages
=================
commit 90410b8451d7d77ce21d37bab79071d488b80997
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused Output.GridGC variable
:100644 100644 f6620c9... bd605ad... M src/global.h
:100644 100644 ab9a614... ad5ee94... M src/main.c
=========
Changes
=========
commit 90410b8451d7d77ce21d37bab79071d488b80997
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
Remove unused Output.GridGC variable
diff --git a/src/global.h b/src/global.h
index f6620c9..bd605ad 100644
--- a/src/global.h
+++ b/src/global.h
@@ -172,8 +172,7 @@ typedef struct /* holds information about output window */
{
hidGC bgGC, /* background and foreground; */
fgGC, /* changed from some routines */
- pmGC, /* depth 1 pixmap GC to store clip */
- GridGC; /* for the grid */
+ pmGC; /* depth 1 pixmap GC to store clip */
int Width, /* sizes of output window (porthole) */
Height;
diff --git a/src/main.c b/src/main.c
index ab9a614..ad5ee94 100644
--- a/src/main.c
+++ b/src/main.c
@@ -980,7 +980,6 @@ main (int argc, char *argv[])
Output.bgGC = gui->make_gc ();
Output.fgGC = gui->make_gc ();
Output.pmGC = gui->make_gc ();
- Output.GridGC = gui->make_gc ();
settings_post_process ();
|
|
From: <gi...@gp...> - 2011-04-28 00:29:11
|
The branch, master has been updated
via bf1870a4bc3befb04ae9ac179397a3fc378f3f42 (commit)
from cd7298e09a6cb783977dae23fc1d5b6e1fc697b2 (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/rtree.c | 56 --------------------------------------------------------
1 files changed, 0 insertions(+), 56 deletions(-)
=================
Commit Messages
=================
commit bf1870a4bc3befb04ae9ac179397a3fc378f3f42
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
rtree.c: Remove old X11 based debug drawing code
The core doesn't do drawing any more.. and can't assume that the
GUI's graphics contexts are actually X11 or GDK graphics context,
so this code can't work any more - remove it.
:100644 100644 e2ef1ee... 83ec41c... M src/rtree.c
=========
Changes
=========
commit bf1870a4bc3befb04ae9ac179397a3fc378f3f42
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
rtree.c: Remove old X11 based debug drawing code
The core doesn't do drawing any more.. and can't assume that the
GUI's graphics contexts are actually X11 or GDK graphics context,
so this code can't work any more - remove it.
diff --git a/src/rtree.c b/src/rtree.c
index e2ef1ee..83ec41c 100644
--- a/src/rtree.c
+++ b/src/rtree.c
@@ -45,12 +45,6 @@
#include <assert.h>
#include <setjmp.h>
-/* #define DRAWBOX */
-
-#ifdef DRAWBOX
-#include "clip.h"
-#include "data.h"
-#endif
#include "mymem.h"
#include "rtree.h"
@@ -243,41 +237,9 @@ __r_dump_tree (struct rtree_node *node, int depth)
{
printf ("p=0x%p node X(%d, %d) Y(%d, %d)\n", (void *) node,
node->box.X1, node->box.X2, node->box.Y1, node->box.Y2);
-#ifdef DRAWBOX
- gdk_gc_set_line_attributes (Output.fgGC, 4,
- GDK_LINE_SOLID, GDK_CAP_ROUND,
- GDK_JOIN_ROUND);
-
- if (depth < max_copper_layer + 1)
- gdk_gc_set_foreground (Output.fgGC, (LAYER_PTR (depth)->Color));
- else
- gdk_gc_set_foreground (Output.fgGC, PCB->WarnColor);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X1, node->box.Y1, node->box.X2, node->box.Y1);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X2, node->box.Y1, node->box.X2, node->box.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X2, node->box.Y2, node->box.X1, node->box.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X1, node->box.Y2, node->box.X1, node->box.Y1);
-#endif
}
else
{
-#ifdef DRAWBOX
- gdk_gc_set_line_attributes (Output.fgGC, 2,
- GDK_LINE_SOLID, GDK_CAP_ROUND,
- GDK_JOIN_ROUND);
- gdk_gc_set_foreground (Output.fgGC, PCB->MaskColor);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X1, node->box.Y1, node->box.X2, node->box.Y1);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X2, node->box.Y1, node->box.X2, node->box.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X2, node->box.Y2, node->box.X1, node->box.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->box.X1, node->box.Y2, node->box.X1, node->box.Y1);
-#endif
printf ("p=0x%p leaf manage(%02x) X(%d, %d) Y(%d, %d)\n", (void *) node,
node->flags.manage, node->box.X1, node->box.X2, node->box.Y1,
node->box.Y2);
@@ -291,24 +253,6 @@ __r_dump_tree (struct rtree_node *node, int depth)
(double) (node->u.rects[j].bounds.Y2 -
node->u.rects[j].bounds.Y1);
count++;
-#ifdef DRAWBOX
- gdk_gc_set_line_attributes (Output.fgGC, 1,
- GDK_LINE_SOLID, GDK_CAP_ROUND,
- GDK_JOIN_ROUND);
- gdk_gc_set_foreground (Output.fgGC, PCB->ViaSelectedColor);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->u.rects[j].bounds.X1, node->u.rects[j].bounds.Y1,
- node->u.rects[j].bounds.X2, node->u.rects[j].bounds.Y1);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->u.rects[j].bounds.X2, node->u.rects[j].bounds.Y1,
- node->u.rects[j].bounds.X2, node->u.rects[j].bounds.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->u.rects[j].bounds.X2, node->u.rects[j].bounds.Y2,
- node->u.rects[j].bounds.X1, node->u.rects[j].bounds.Y2);
- XDrawCLine (Output.top_window->window, Output.fgGC,
- node->u.rects[j].bounds.X1, node->u.rects[j].bounds.Y2,
- node->u.rects[j].bounds.X1, node->u.rects[j].bounds.Y1);
-#endif
for (i = 0; i < depth + 1; i++)
printf (" ");
printf ("entry 0x%p X(%d, %d) Y(%d, %d)\n",
|
|
From: <gi...@gp...> - 2011-04-28 00:14:47
|
The branch, master has been updated
via cd7298e09a6cb783977dae23fc1d5b6e1fc697b2 (commit)
via 9639f2466142c7589292d2e03f1f942c99b58eac (commit)
from 162021537969b2e3d7752f1a803baf48e3af4cc5 (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/batch/batch.c | 6 ------
src/hid/common/extents.c | 6 ------
src/hid/common/hidnogui.c | 2 +-
src/hid/gerber/gerber.c | 8 --------
src/hid/gtk/gtkhid-gdk.c | 6 ------
src/hid/gtk/gtkhid-main.c | 1 -
src/hid/gtk/gui.h | 1 -
src/hid/lesstif/main.c | 7 -------
src/hid/png/png.c | 8 --------
src/hid/ps/eps.c | 8 --------
10 files changed, 1 insertions(+), 52 deletions(-)
=================
Commit Messages
=================
commit cd7298e09a6cb783977dae23fc1d5b6e1fc697b2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
HIDs: Remove NOOP set_draw_faded implementations
:100644 100644 a32e89b... 3ccca3a... M src/hid/batch/batch.c
:100644 100644 37ff538... 2de34ac... M src/hid/common/extents.c
:100644 100644 29eeafa... b6d7585... M src/hid/gerber/gerber.c
:100644 100644 8c3af43... 27d62c6... M src/hid/gtk/gtkhid-gdk.c
:100644 100644 8d5e3d2... f5e2717... M src/hid/gtk/gtkhid-main.c
:100644 100644 1d5757f... 6cdeff2... M src/hid/gtk/gui.h
:100644 100644 554bbae... 6a42706... M src/hid/lesstif/main.c
:100644 100644 e47c641... 26f15b7... M src/hid/png/png.c
:100644 100644 0aca27e... e17f8a3... M src/hid/ps/eps.c
commit 9639f2466142c7589292d2e03f1f942c99b58eac
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid: Provided non-CRASH default implementation of HID->set_draw_faded
There is no point in various HIDs providing their own NOOP implementation
:100644 100644 cc7d2fc... c146fd2... M src/hid/common/hidnogui.c
=========
Changes
=========
commit cd7298e09a6cb783977dae23fc1d5b6e1fc697b2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
HIDs: Remove NOOP set_draw_faded implementations
diff --git a/src/hid/batch/batch.c b/src/hid/batch/batch.c
index a32e89b..3ccca3a 100644
--- a/src/hid/batch/batch.c
+++ b/src/hid/batch/batch.c
@@ -208,11 +208,6 @@ batch_set_draw_xor (hidGC gc, int xor_set)
}
static void
-batch_set_draw_faded (hidGC gc, int faded)
-{
-}
-
-static void
batch_draw_line (hidGC gc, int x1, int y1, int x2, int y2)
{
}
@@ -359,7 +354,6 @@ hid_batch_init ()
batch_hid.set_line_cap = batch_set_line_cap;
batch_hid.set_line_width = batch_set_line_width;
batch_hid.set_draw_xor = batch_set_draw_xor;
- batch_hid.set_draw_faded = batch_set_draw_faded;
batch_hid.draw_line = batch_draw_line;
batch_hid.draw_arc = batch_draw_arc;
batch_hid.draw_rect = batch_draw_rect;
diff --git a/src/hid/common/extents.c b/src/hid/common/extents.c
index 37ff538..2de34ac 100644
--- a/src/hid/common/extents.c
+++ b/src/hid/common/extents.c
@@ -100,11 +100,6 @@ extents_set_draw_xor (hidGC gc, int xor_)
{
}
-static void
-extents_set_draw_faded (hidGC gc, int faded)
-{
-}
-
#define PEX(x,w) if (box.X1 > (x)-(w)) box.X1 = (x)-(w); \
if (box.X2 < (x)+(w)) box.X2 = (x)+(w)
#define PEY(y,w) if (box.Y1 > (y)-(w)) box.Y1 = (y)-(w); \
@@ -191,7 +186,6 @@ hid_extents_init (void)
extents_hid.set_line_cap = extents_set_line_cap;
extents_hid.set_line_width = extents_set_line_width;
extents_hid.set_draw_xor = extents_set_draw_xor;
- extents_hid.set_draw_faded = extents_set_draw_faded;
extents_hid.draw_line = extents_draw_line;
extents_hid.draw_arc = extents_draw_arc;
extents_hid.draw_rect = extents_draw_rect;
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index 29eeafa..b6d7585 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -55,7 +55,6 @@ static void gerber_set_color (hidGC gc, const char *name);
static void gerber_set_line_cap (hidGC gc, EndCapStyle style);
static void gerber_set_line_width (hidGC gc, int width);
static void gerber_set_draw_xor (hidGC gc, int _xor);
-static void gerber_set_draw_faded (hidGC gc, int faded);
static void gerber_draw_line (hidGC gc, int x1, int y1, int x2, int y2);
static void gerber_draw_arc (hidGC gc, int cx, int cy, int width, int height, int start_angle, int delta_angle);
static void gerber_draw_rect (hidGC gc, int x1, int y1, int x2, int y2);
@@ -802,12 +801,6 @@ gerber_set_draw_xor (hidGC gc, int xor_)
}
static void
-gerber_set_draw_faded (hidGC gc, int faded)
-{
- ;
-}
-
-static void
use_gc (hidGC gc, int radius)
{
int c;
@@ -1186,7 +1179,6 @@ hid_gerber_init ()
gerber_hid.set_line_cap = gerber_set_line_cap;
gerber_hid.set_line_width = gerber_set_line_width;
gerber_hid.set_draw_xor = gerber_set_draw_xor;
- gerber_hid.set_draw_faded = gerber_set_draw_faded;
gerber_hid.draw_line = gerber_draw_line;
gerber_hid.draw_arc = gerber_draw_arc;
gerber_hid.draw_rect = gerber_draw_rect;
diff --git a/src/hid/gtk/gtkhid-gdk.c b/src/hid/gtk/gtkhid-gdk.c
index 8c3af43..27d62c6 100644
--- a/src/hid/gtk/gtkhid-gdk.c
+++ b/src/hid/gtk/gtkhid-gdk.c
@@ -475,12 +475,6 @@ ghid_set_draw_xor (hidGC gc, int xor_mask)
ghid_set_color (gc, gc->colorname);
}
-void
-ghid_set_draw_faded (hidGC gc, int faded)
-{
- printf ("ghid_set_draw_faded(%p,%d) -- not implemented\n", gc, faded);
-}
-
static int
use_gc (hidGC gc)
{
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 8d5e3d2..f5e2717 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -2123,7 +2123,6 @@ hid_gtk_init ()
ghid_hid.set_line_cap = ghid_set_line_cap;
ghid_hid.set_line_width = ghid_set_line_width;
ghid_hid.set_draw_xor = ghid_set_draw_xor;
- ghid_hid.set_draw_faded = ghid_set_draw_faded;
ghid_hid.draw_line = ghid_draw_line;
ghid_hid.draw_arc = ghid_draw_arc;
ghid_hid.draw_rect = ghid_draw_rect;
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 1d5757f..6cdeff2 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -479,7 +479,6 @@ void ghid_set_color (hidGC gc, const char *name);
void ghid_set_line_cap (hidGC gc, EndCapStyle style);
void ghid_set_line_width (hidGC gc, int width);
void ghid_set_draw_xor (hidGC gc, int _xor);
-void ghid_set_draw_faded (hidGC gc, int faded);
void ghid_draw_line (hidGC gc, int x1, int y1, int x2, int y2);
void ghid_draw_arc (hidGC gc, int cx, int cy, int xradius, int yradius,
int start_angle, int delta_angle);
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 554bbae..6a42706 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -3237,12 +3237,6 @@ lesstif_set_draw_xor (hidGC gc, int xor_set)
gc->xor_set = xor_set;
}
-static void
-lesstif_set_draw_faded (hidGC gc, int faded)
-{
- /* We don't use this */
-}
-
#define ISORT(a,b) if (a>b) { a^=b; b^=a; a^=b; }
static void
@@ -3894,7 +3888,6 @@ hid_lesstif_init ()
lesstif_hid.set_line_cap = lesstif_set_line_cap;
lesstif_hid.set_line_width = lesstif_set_line_width;
lesstif_hid.set_draw_xor = lesstif_set_draw_xor;
- lesstif_hid.set_draw_faded = lesstif_set_draw_faded;
lesstif_hid.draw_line = lesstif_draw_line;
lesstif_hid.draw_arc = lesstif_draw_arc;
lesstif_hid.draw_rect = lesstif_draw_rect;
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index e47c641..26f15b7 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -96,7 +96,6 @@ typedef struct hid_gc_struct
EndCapStyle cap;
int width;
unsigned char r, g, b;
- int faded;
color_struct *color;
gdImagePtr brush;
int is_erase;
@@ -1177,12 +1176,6 @@ png_set_draw_xor (hidGC gc, int xor_)
}
static void
-png_set_draw_faded (hidGC gc, int faded)
-{
- gc->faded = faded;
-}
-
-static void
use_gc (hidGC gc)
{
int need_brush = 0;
@@ -1542,7 +1535,6 @@ hid_png_init ()
png_hid.set_line_cap = png_set_line_cap;
png_hid.set_line_width = png_set_line_width;
png_hid.set_draw_xor = png_set_draw_xor;
- png_hid.set_draw_faded = png_set_draw_faded;
png_hid.draw_line = png_draw_line;
png_hid.draw_arc = png_draw_arc;
png_hid.draw_rect = png_draw_rect;
diff --git a/src/hid/ps/eps.c b/src/hid/ps/eps.c
index 0aca27e..e17f8a3 100644
--- a/src/hid/ps/eps.c
+++ b/src/hid/ps/eps.c
@@ -42,7 +42,6 @@ static void eps_set_color (hidGC gc, const char *name);
static void eps_set_line_cap (hidGC gc, EndCapStyle style);
static void eps_set_line_width (hidGC gc, int width);
static void eps_set_draw_xor (hidGC gc, int _xor);
-static void eps_set_draw_faded (hidGC gc, int faded);
static void eps_draw_rect (hidGC gc, int x1, int y1, int x2, int y2);
static void eps_draw_line (hidGC gc, int x1, int y1, int x2, int y2);
static void eps_draw_arc (hidGC gc, int cx, int cy, int width, int height, int start_angle, int delta_angle);
@@ -486,12 +485,6 @@ eps_set_draw_xor (hidGC gc, int xor_)
}
static void
-eps_set_draw_faded (hidGC gc, int faded)
-{
- ;
-}
-
-static void
use_gc (hidGC gc)
{
if (linewidth != gc->width)
@@ -654,7 +647,6 @@ hid_eps_init ()
eps_hid.set_line_cap = eps_set_line_cap;
eps_hid.set_line_width = eps_set_line_width;
eps_hid.set_draw_xor = eps_set_draw_xor;
- eps_hid.set_draw_faded = eps_set_draw_faded;
eps_hid.draw_line = eps_draw_line;
eps_hid.draw_arc = eps_draw_arc;
eps_hid.draw_rect = eps_draw_rect;
commit 9639f2466142c7589292d2e03f1f942c99b58eac
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
hid: Provided non-CRASH default implementation of HID->set_draw_faded
There is no point in various HIDs providing their own NOOP implementation
diff --git a/src/hid/common/hidnogui.c b/src/hid/common/hidnogui.c
index cc7d2fc..c146fd2 100644
--- a/src/hid/common/hidnogui.c
+++ b/src/hid/common/hidnogui.c
@@ -112,7 +112,6 @@ nogui_set_draw_xor (hidGC gc, int xor_)
static void
nogui_set_draw_faded (hidGC gc, int faded)
{
- CRASH;
}
static void
@@ -510,6 +509,7 @@ apply_default_hid (HID * d, HID * s)
AD (set_line_cap);
AD (set_line_width);
AD (set_draw_xor);
+ AD (set_draw_faded);
AD (draw_line);
AD (draw_arc);
AD (fill_circle);
|