From f71d3fe7b65426cbde50c641d8309d32615da048 Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Mon, 14 Mar 2016 20:51:28 -0400 Subject: [PATCH] Allow value and reference text to be rotated by 90, 180, and 270 degrees. --- pcbnew/class_text_mod.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index e5a2b8b5a3..3eb691bbf3 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -328,9 +328,11 @@ double TEXTE_MODULE::GetDrawRotation() const if( module ) rotation += module->GetOrientation(); - // Keep angle between -90 .. 90 deg. Otherwise the text is not easy to read - while( rotation > 900 ) - rotation -= 1800; + NORMALIZE_ANGLE_POS( rotation ); + + // For angle = 0 .. 360 deg + while( rotation > 2700 ) + rotation -= 3600; while( rotation < -900 ) rotation += 1800;