Mail Archives: geda-user/2012/07/16/06:00:58.1
From: Russ Dill <Russ DOT Dill AT gmail DOT com>
If this attribute is set, then the layer is drawn on the
layer specified by the attribute. For instance, toppaste
will cause the layer to be merged with the toppaste
layer during printing.
Signed-off-by: Russ Dill <Russ DOT Dill AT gmail DOT com>
---
src/draw.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/draw.c b/src/draw.c
index cc6b954..e094b79 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -612,6 +612,29 @@ PrintAssembly (int side, const BoxType * drawn_area)
}
/* ---------------------------------------------------------------------------
+ * Merge drawing layer
+ */
+
+void
+DrawMerge (const char *name, const BoxType *screen)
+{
+ int i;
+ if (gui->gui)
+ return;
+
+ for (i = 0; i < max_copper_layer; i++)
+ {
+ const char *attrib;
+ LayerType *l = LAYER_ON_STACK (i);
+ attrib = AttributeGet (l, "PCB::merge");
+ if (attrib && !strcmp (attrib, name))
+ {
+ DrawLayer (l, screen);
+ }
+ }
+}
+
+/* ---------------------------------------------------------------------------
* initializes some identifiers for a new zoom factor and redraws whole screen
*/
static void
@@ -701,24 +724,28 @@ DrawEverything (const BoxType *drawn_area)
if (gui->set_layer ("componentmask", SL (MASK, TOP), 0))
{
DrawMask (COMPONENT_LAYER, drawn_area);
+ DrawMerge ("componentmask", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("soldermask", SL (MASK, BOTTOM), 0))
{
DrawMask (SOLDER_LAYER, drawn_area);
+ DrawMerge ("soldermask", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("topsilk", SL (SILK, TOP), 0))
{
DrawSilk (COMPONENT_LAYER, drawn_area);
+ DrawMerge ("topsilk", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("bottomsilk", SL (SILK, BOTTOM), 0))
{
DrawSilk (SOLDER_LAYER, drawn_area);
+ DrawMerge ("bottomsilk", drawn_area);
gui->end_layer ();
}
@@ -740,6 +767,7 @@ DrawEverything (const BoxType *drawn_area)
if (gui->set_layer ("toppaste", SL (PASTE, TOP), paste_empty))
{
DrawPaste (COMPONENT_LAYER, drawn_area);
+ DrawMerge ("toppaste", drawn_area);
gui->end_layer ();
}
@@ -747,24 +775,28 @@ DrawEverything (const BoxType *drawn_area)
if (gui->set_layer ("bottompaste", SL (PASTE, BOTTOM), paste_empty))
{
DrawPaste (SOLDER_LAYER, drawn_area);
+ DrawMerge ("bottompaste", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("topassembly", SL (ASSY, TOP), 0))
{
PrintAssembly (COMPONENT_LAYER, drawn_area);
+ DrawMerge ("topassembly", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("bottomassembly", SL (ASSY, BOTTOM), 0))
{
PrintAssembly (SOLDER_LAYER, drawn_area);
+ DrawMerge ("bottomassembly", drawn_area);
gui->end_layer ();
}
if (gui->set_layer ("fab", SL (FAB, 0), 0))
{
PrintFab (Output.fgGC);
+ DrawMerge ("fab", drawn_area);
gui->end_layer ();
}
}
--
1.7.10.4
- Raw text -