[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (658ad94902bb8055d0b858b7001f72bdb2ce8733)



The branch, master has been updated
       via  658ad94902bb8055d0b858b7001f72bdb2ce8733 (commit)
       via  8da6c60efc2c86dd8e15adc5619d127649d95e65 (commit)
      from  87c5f270c5d6c9d7ab1f5dac60e82b730f5d0870 (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 |   28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)


=================
 Commit Messages
=================

commit 658ad94902bb8055d0b858b7001f72bdb2ce8733
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Change PrintAssembly() to use a layer side parameter
    
    Drops the "swap_ident" parameter in favour of a more explicit "side"
    parameter. Also drops the side_group parameter, as we can easily
    determine that from the requested side to draw.

:100644 100644 652fe86... 5a9bb1b... M	src/draw.c

commit 8da6c60efc2c86dd8e15adc5619d127649d95e65
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Change DrawSilk() to use a layer side parameter, not SWAP_IDENT

:100644 100644 1cbc98b... 652fe86... M	src/draw.c

=========
 Changes
=========

commit 658ad94902bb8055d0b858b7001f72bdb2ce8733
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Change PrintAssembly() to use a layer side parameter
    
    Drops the "swap_ident" parameter in favour of a more explicit "side"
    parameter. Also drops the side_group parameter, as we can easily
    determine that from the requested side to draw.

diff --git a/src/draw.c b/src/draw.c
index 652fe86..5a9bb1b 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -309,9 +309,9 @@ rat_callback (const BoxType * b, void *cl)
  */
 
 static void
-PrintAssembly (const BoxType * drawn_area, int side_group, int swap_ident)
+PrintAssembly (int side, const BoxType * drawn_area)
 {
-  int side = swap_ident ? SOLDER_LAYER : COMPONENT_LAYER;
+  int side_group = GetLayerGroupNumberByNumber (max_copper_layer + side);
 
   gui->set_draw_faded (Output.fgGC, 1);
   DrawLayerGroup (side_group, drawn_area);
@@ -491,10 +491,10 @@ DrawEverything (BoxTypePtr drawn_area)
 
   doing_assy = true;
   if (gui->set_layer ("topassembly", SL (ASSY, TOP), 0))
-    PrintAssembly (drawn_area, component, 0);
+    PrintAssembly (COMPONENT_LAYER, drawn_area);
 
   if (gui->set_layer ("bottomassembly", SL (ASSY, BOTTOM), 0))
-    PrintAssembly (drawn_area, solder, 1);
+    PrintAssembly (SOLDER_LAYER, drawn_area);
   doing_assy = false;
 
   if (gui->set_layer ("fab", SL (FAB, 0), 0))

commit 8da6c60efc2c86dd8e15adc5619d127649d95e65
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Change DrawSilk() to use a layer side parameter, not SWAP_IDENT

diff --git a/src/draw.c b/src/draw.c
index 1cbc98b..652fe86 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -104,7 +104,7 @@ static void ClearPad (PadTypePtr, bool);
 static void DrawHole (PinTypePtr);
 static void DrawMask (int side, BoxType *);
 static void DrawRats (BoxType *);
-static void DrawSilk (int, int, const BoxType *);
+static void DrawSilk (int side, const BoxType *);
 static int via_callback (const BoxType * b, void *cl);
 static int pin_callback (const BoxType * b, void *cl);
 static int pad_callback (const BoxType * b, void *cl);
@@ -311,7 +311,7 @@ rat_callback (const BoxType * b, void *cl)
 static void
 PrintAssembly (const BoxType * drawn_area, int side_group, int swap_ident)
 {
-  int save_swap = SWAP_IDENT;
+  int side = swap_ident ? SOLDER_LAYER : COMPONENT_LAYER;
 
   gui->set_draw_faded (Output.fgGC, 1);
   DrawLayerGroup (side_group, drawn_area);
@@ -319,11 +319,7 @@ PrintAssembly (const BoxType * drawn_area, int side_group, int swap_ident)
   gui->set_draw_faded (Output.fgGC, 0);
 
   /* draw package */
-  SWAP_IDENT = swap_ident;
-  DrawSilk (swap_ident,
-	    swap_ident ? solder_silk_layer : component_silk_layer,
-	    drawn_area);
-  SWAP_IDENT = save_swap;
+  DrawSilk (side, drawn_area);
 }
 
 /* ---------------------------------------------------------------------------
@@ -437,11 +433,12 @@ DrawEverything (BoxTypePtr drawn_area)
   if (gui->set_layer ("soldermask", SL (MASK, BOTTOM), 0))
     DrawMask (SOLDER_LAYER, drawn_area);
 
-  /* Draw top silkscreen */
   if (gui->set_layer ("topsilk", SL (SILK, TOP), 0))
-    DrawSilk (0, component_silk_layer, drawn_area);
+    DrawSilk (COMPONENT_LAYER, drawn_area);
+
   if (gui->set_layer ("bottomsilk", SL (SILK, BOTTOM), 0))
-    DrawSilk (1, solder_silk_layer, drawn_area);
+    DrawSilk (SOLDER_LAYER, drawn_area);
+
   if (gui->gui)
     {
       /* Draw element Marks */
@@ -639,9 +636,8 @@ clearPad_callback (const BoxType * b, void *cl)
  */
 
 static void
-DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
+DrawSilk (int side, const BoxType * drawn_area)
 {
-  int side = new_swap ? SOLDER_LAYER : COMPONENT_LAYER;
 #if 0
   /* This code is used when you want to mask silk to avoid exposed
      pins and pads.  We decided it was a bad idea to do this
@@ -653,7 +649,7 @@ DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
     {
       gui->use_mask (HID_MASK_BEFORE);
 #endif
-      DrawLayer (LAYER_PTR (layer), drawn_area);
+      DrawLayer (LAYER_PTR (max_copper_layer + side), drawn_area);
       /* draw package */
       r_search (PCB->Data->element_tree, drawn_area, NULL, element_callback, &side);
       r_search (PCB->Data->name_tree[NAME_INDEX (PCB)], drawn_area, NULL, name_callback, &side);




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs