From e28ead71b6b83e08d03f2bc486b8ffbe04898bfc Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 28 Feb 2014 18:46:18 +0100 Subject: [PATCH] 3D viewer: fix mirroring issue for texts in flipped footprints. --- pcbnew/board_items_to_polygon_shape_transform.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index aea31b9ca7..4cf371eedb 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -187,9 +187,13 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( { TEXTE_MODULE *textmod = texts[ii]; s_textWidth = textmod->GetThickness() + ( 2 * aInflateValue ); + wxSize size = textmod->GetSize(); + + if( textmod->IsMirrored() ) + NEGATE( size.x ); + DrawGraphicText( NULL, NULL, textmod->GetTextPosition(), BLACK, - textmod->GetText(), textmod->GetDrawRotation(), - textmod->GetSize(), + textmod->GetText(), textmod->GetDrawRotation(), size, textmod->GetHorizJustify(), textmod->GetVertJustify(), textmod->GetThickness(), textmod->IsItalic(), true, addTextSegmToPoly );