[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (7416c85d9f3c575d01298446960569840e7deef5)
The branch, master has been updated
via 7416c85d9f3c575d01298446960569840e7deef5 (commit)
from 8da23b1d43a9cd39b0921785b1146f269213a6d8 (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/png/png.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
=================
Commit Messages
=================
commit 7416c85d9f3c575d01298446960569840e7deef5
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Check for empty layers in photo mode
Now that the default stackup is for six layer boards, the PNG
photo mode output needs to check to see if the user has used the inner
layers, and automatically adapt - so that a two layer board *looks* like
a two-layer board.
:100644 100644 fe7046e... 86631a7... M src/hid/png/png.c
=========
Changes
=========
commit 7416c85d9f3c575d01298446960569840e7deef5
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Check for empty layers in photo mode
Now that the default stackup is for six layer boards, the PNG
photo mode output needs to check to see if the user has used the inner
layers, and automatically adapt - so that a two layer board *looks* like
a two-layer board.
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index fe7046e..86631a7 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -129,6 +129,7 @@ static gdImagePtr photo_copper[MAX_LAYER+2];
static gdImagePtr photo_silk, photo_mask, photo_drill, *photo_im;
static gdImagePtr photo_outline;
static int photo_groups[MAX_LAYER+2], photo_ngroups;
+static int photo_has_inners;
static int doing_outline, have_outline;
@@ -397,12 +398,28 @@ png_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
{
int i, n=0;
SET_FLAG (SHOWMASKFLAG, PCB);
+ photo_has_inners = 0;
if (comp_layer < solder_layer)
for (i = comp_layer; i <= solder_layer; i++)
- photo_groups[n++] = i;
+ {
+ photo_groups[n++] = i;
+ if (i != comp_layer && i != solder_layer
+ && ! IsLayerGroupEmpty (i))
+ photo_has_inners = 1;
+ }
else
for (i = comp_layer; i >= solder_layer; i--)
- photo_groups[n++] = i;
+ {
+ photo_groups[n++] = i;
+ if (i != comp_layer && i != solder_layer
+ && ! IsLayerGroupEmpty (i))
+ photo_has_inners = 1;
+ }
+ if (!photo_has_inners)
+ {
+ photo_groups[1] = photo_groups[n - 1];
+ n = 2;
+ }
photo_ngroups = n;
if (photo_flip)
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs