Fixes for rotated footprint text.

This commit is contained in:
Jeff Young 2022-01-10 15:30:19 +00:00
parent e811a39881
commit 73a2984963
3 changed files with 13 additions and 5 deletions

View File

@ -214,10 +214,12 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint,
textItem = text;
penWidth = textItem->GetEffectiveTextPenWidth() * m_biuTo3Dunits;
KIFONT::FONT* font = textItem->GetDrawFont();
KIFONT::FONT* font = textItem->GetDrawFont();
TEXT_ATTRIBUTES attrs = textItem->GetAttributes();
font->Draw( &callback_gal, textItem->GetShownText(), textItem->GetTextPos(),
textItem->GetAttributes() );
attrs.m_Angle = textItem->GetDrawRotation();
font->Draw( &callback_gal, textItem->GetShownText(), textItem->GetTextPos(), attrs );
}
}

View File

@ -847,7 +847,10 @@ std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( ) const
shape->AddShape( triShape );
} );
font->Draw( &callback_gal, GetShownText(), GetTextPos(), GetAttributes() );
TEXT_ATTRIBUTES attrs = GetAttributes();
attrs.m_Angle = GetDrawRotation();
font->Draw( &callback_gal, GetShownText(), GetTextPos(), attrs );
return shape;
}

View File

@ -486,7 +486,10 @@ void FP_TEXT::TransformTextShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerB
aCornerBuffer.Append( point.x, point.y );
} );
font->Draw( &callback_gal, GetShownText(), GetTextPos(), GetAttributes() );
TEXT_ATTRIBUTES attrs = GetAttributes();
attrs.m_Angle = GetDrawRotation();
font->Draw( &callback_gal, GetShownText(), GetTextPos(), attrs );
}