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

gEDA-cvs: pcb.git: branch: master updated (1a7b45893e69bddff69a7d1238127a91987a51d1)



The branch, master has been updated
       via  1a7b45893e69bddff69a7d1238127a91987a51d1 (commit)
      from  a6414f42162017e5962f25370e584e9164cf2949 (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 |   75 +++++++++++++++++++++++++----------------------------------
 1 files changed, 32 insertions(+), 43 deletions(-)


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

commit 1a7b45893e69bddff69a7d1238127a91987a51d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Fold DrawHole into its only caller, hole_callback

:100644 100644 09e183e... 7e8690f... M	src/draw.c

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

commit 1a7b45893e69bddff69a7d1238127a91987a51d1
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: Fold DrawHole into its only caller, hole_callback

diff --git a/src/draw.c b/src/draw.c
index 09e183e..7e8690f 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -97,7 +97,6 @@ static void AddPart (void *);
 static void SetPVColor (PinTypePtr, int);
 static void DrawEMark (ElementTypePtr, LocationType, LocationType, bool);
 static void ClearPad (PadTypePtr, bool);
-static void DrawHole (PinTypePtr);
 static void DrawMask (int side, BoxType *);
 static void DrawPaste (int side, BoxType *);
 static void DrawRats (BoxType *);
@@ -231,14 +230,42 @@ EMark_callback (const BoxType * b, void *cl)
 static int
 hole_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinTypePtr pv = (PinTypePtr) b;
   int plated = cl ? *(int *) cl : -1;
 
-  if ((plated == 0 && !TEST_FLAG (HOLEFLAG, pin)) ||
-      (plated == 1 &&  TEST_FLAG (HOLEFLAG, pin)))
+  if ((plated == 0 && !TEST_FLAG (HOLEFLAG, pv)) ||
+      (plated == 1 &&  TEST_FLAG (HOLEFLAG, pv)))
     return 1;
 
-  DrawHole ((PinTypePtr) b);
+  if (TEST_FLAG (THINDRAWFLAG, PCB))
+    {
+      if (!TEST_FLAG (HOLEFLAG, pv))
+        {
+          gui->set_line_cap (Output.fgGC, Round_Cap);
+          gui->set_line_width (Output.fgGC, 0);
+          gui->draw_arc (Output.fgGC,
+                         pv->X, pv->Y, pv->DrillingHole / 2,
+                         pv->DrillingHole / 2, 0, 360);
+        }
+    }
+  else
+    gui->fill_circle (Output.bgGC, pv->X, pv->Y, pv->DrillingHole / 2);
+
+  if (TEST_FLAG (HOLEFLAG, pv))
+    {
+      if (TEST_FLAG (WARNFLAG, pv))
+        gui->set_color (Output.fgGC, PCB->WarnColor);
+      else if (TEST_FLAG (SELECTEDFLAG, pv))
+        gui->set_color (Output.fgGC, PCB->ViaSelectedColor);
+      else
+        gui->set_color (Output.fgGC, Settings.BlackColor);
+
+      gui->set_line_cap (Output.fgGC, Round_Cap);
+      gui->set_line_width (Output.fgGC, 0);
+      gui->draw_arc (Output.fgGC,
+                     pv->X, pv->Y, pv->DrillingHole / 2,
+                     pv->DrillingHole / 2, 0, 360);
+    }
   return 1;
 }
 
@@ -796,44 +823,6 @@ DrawPinOrViaLowLevel (PinTypePtr pv, bool drawHole)
     gui->fill_pcb_pv (Output.fgGC, Output.bgGC, pv, drawHole, false);
 }
 
-/**************************************************************
- * draw pin/via hole
- */
-static void
-DrawHole (PinTypePtr Ptr)
-{
-  if (TEST_FLAG (THINDRAWFLAG, PCB))
-    {
-      if (!TEST_FLAG (HOLEFLAG, Ptr))
-	{
-	  gui->set_line_cap (Output.fgGC, Round_Cap);
-	  gui->set_line_width (Output.fgGC, 0);
-	  gui->draw_arc (Output.fgGC,
-			 Ptr->X, Ptr->Y, Ptr->DrillingHole / 2,
-			 Ptr->DrillingHole / 2, 0, 360);
-	}
-    }
-  else
-    {
-      gui->fill_circle (Output.bgGC, Ptr->X, Ptr->Y, Ptr->DrillingHole / 2);
-    }
-  if (TEST_FLAG (HOLEFLAG, Ptr))
-    {
-      if (TEST_FLAG (WARNFLAG, Ptr))
-	gui->set_color (Output.fgGC, PCB->WarnColor);
-      else if (TEST_FLAG (SELECTEDFLAG, Ptr))
-	gui->set_color (Output.fgGC, PCB->ViaSelectedColor);
-      else
-	gui->set_color (Output.fgGC, Settings.BlackColor);
-
-      gui->set_line_cap (Output.fgGC, Round_Cap);
-      gui->set_line_width (Output.fgGC, 0);
-      gui->draw_arc (Output.fgGC,
-		     Ptr->X, Ptr->Y, Ptr->DrillingHole / 2,
-		     Ptr->DrillingHole / 2, 0, 360);
-    }
-}
-
 /* ---------------------------------------------------------------------------
  * lowlevel drawing routine for pin and via names
  */




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