← Back to team overview

kicad-developers team mailing list archive

[PATCH] Remove outdated check on endAngle to fix GerbView arc draw direction

 

Hi all,

Quick fix for an arc drawing path that still had some wrong logic in it.

-Jon
From 318991f7202e42af73367be7f3ba4bf872efd4ce Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Sun, 10 Dec 2017 13:35:00 -0500
Subject: [PATCH] Remove outdated check on endAngle to fix arc draw direction

Fixes: lp:1737420
* https://bugs.launchpad.net/kicad/+bug/1737420
---
 gerbview/gerbview_painter.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gerbview/gerbview_painter.cpp b/gerbview/gerbview_painter.cpp
index 72a7559ce..7ac870ff5 100644
--- a/gerbview/gerbview_painter.cpp
+++ b/gerbview/gerbview_painter.cpp
@@ -300,7 +300,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
         // GAL fills in direction of increasing angle, so we have to convert
         // the angle from the -PI to PI domain of atan2() to ensure that
         // the arc goes in the right direction
-        if( ( startAngle > endAngle ) && ( endAngle < 0 ) )
+        if( startAngle > endAngle )
             endAngle += (2 * M_PI);
 
         // 360-degree arcs are stored in the file with start equal to end
-- 
2.14.1


Follow ups