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

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



The branch, master has been updated
       via  c2e0a8593ff4a04f96fa216282b5542d957203a7 (commit)
      from  5d39ef90df7568517bccefde13156ec794ee661e (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 |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)


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

commit c2e0a8593ff4a04f96fa216282b5542d957203a7
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: EraseRat() should just gather the affected area
    
    These were missed (or incorrectly converted) in the previous patch series
    which split gathering routines from drawing routines.
    
    Tidy up DrawRat() to be consistent with the new code in EraseRat()

:100644 100644 4a8de5f... 2273d76... M	src/draw.c

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

commit c2e0a8593ff4a04f96fa216282b5542d957203a7
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    draw.c: EraseRat() should just gather the affected area
    
    These were missed (or incorrectly converted) in the previous patch series
    which split gathering routines from drawing routines.
    
    Tidy up DrawRat() to be consistent with the new code in EraseRat()

diff --git a/src/draw.c b/src/draw.c
index 4a8de5f..2273d76 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1350,25 +1350,25 @@ DrawLine (LayerTypePtr Layer, LineTypePtr Line)
  * draws a ratline
  */
 void
-DrawRat (RatTypePtr Line)
+DrawRat (RatTypePtr Rat)
 {
   if (Settings.RatThickness < 20)
-    Line->Thickness = pixel_slop * Settings.RatThickness;
+    Rat->Thickness = pixel_slop * Settings.RatThickness;
   /* rats.c set VIAFLAG if this rat goes to a containing poly: draw a donut */
-  if (TEST_FLAG(VIAFLAG, Line))
+  if (TEST_FLAG(VIAFLAG, Rat))
     {
-      int w = Line->Thickness;
+      int w = Rat->Thickness;
 
       BoxType b;
 
-      b.X1 = Line->Point1.X - w * 2 - w / 2;
-      b.X2 = Line->Point1.X + w * 2 + w / 2;
-      b.Y1 = Line->Point1.Y - w * 2 - w / 2;
-      b.Y2 = Line->Point1.Y + w * 2 + w / 2;
-      AddPart(&b);
+      b.X1 = Rat->Point1.X - w * 2 - w / 2;
+      b.X2 = Rat->Point1.X + w * 2 + w / 2;
+      b.Y1 = Rat->Point1.Y - w * 2 - w / 2;
+      b.Y2 = Rat->Point1.Y + w * 2 + w / 2;
+      AddPart (&b);
     }
   else
-    DrawLine (NULL, (LineType *) Line);
+    DrawLine (NULL, (LineType *)Rat);
 }
 
 /* ---------------------------------------------------------------------------
@@ -1507,15 +1507,16 @@ EraseRat (RatTypePtr Rat)
     {
       int w = Rat->Thickness;
 
-      if (TEST_FLAG (THINDRAWFLAG, PCB))
-	gui->set_line_width (Output.fgGC, 0);
-      else
-	gui->set_line_width (Output.fgGC, w);
-      gui->draw_arc (Output.fgGC, Rat->Point1.X, Rat->Point1.Y,
-		     w * 2, w * 2, 0, 360);
+      BoxType b;
+
+      b.X1 = Rat->Point1.X - w * 2 - w / 2;
+      b.X2 = Rat->Point1.X + w * 2 + w / 2;
+      b.Y1 = Rat->Point1.Y - w * 2 - w / 2;
+      b.Y2 = Rat->Point1.Y + w * 2 + w / 2;
+      AddPart (&b);
     }
   else
-    _draw_line ((LineTypePtr) Rat);
+    EraseLine ((LineType *)Rat);
 }
 
 




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