Replace larger text bboxes now that we're not using them for knockouts.
This commit is contained in:
parent
c71cf21e2f
commit
570978fa7f
|
@ -565,13 +565,10 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
|||
// bounding box will be moved later according to the actual text options
|
||||
VECTOR2I textsize = VECTOR2I( extents.x, extents.y );
|
||||
VECTOR2I pos = drawPos;
|
||||
int fudgeFactor = extents.y * 0.17;
|
||||
|
||||
if( font->IsStroke() )
|
||||
{
|
||||
int fudgeFactor = extents.y * 0.17;
|
||||
textsize.y += fudgeFactor;
|
||||
pos.y += fudgeFactor / 2;
|
||||
}
|
||||
|
||||
if( IsMultilineAllowed() && aLine > 0 && aLine < (int) strings.GetCount() )
|
||||
pos.y -= KiROUND( aLine * font->GetInterline( fontSize.y ) );
|
||||
|
@ -629,6 +626,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
|||
switch( GetVertJustify() )
|
||||
{
|
||||
case GR_TEXT_V_ALIGN_TOP:
|
||||
bbox.Offset( 0, -fudgeFactor );
|
||||
break;
|
||||
|
||||
case GR_TEXT_V_ALIGN_CENTER:
|
||||
|
@ -637,6 +635,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
|
|||
|
||||
case GR_TEXT_V_ALIGN_BOTTOM:
|
||||
bbox.SetY( bbox.GetY() - bbox.GetHeight() );
|
||||
bbox.Offset( 0, fudgeFactor );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -429,7 +429,7 @@ VECTOR2I FONT::StringBoundaryLimits( const wxString& aText, const VECTOR2I& aSiz
|
|||
if( IsStroke() )
|
||||
{
|
||||
// Inflate by a bit more than thickness/2 to catch diacriticals, descenders, etc.
|
||||
boundingBox.Inflate( KiROUND( aThickness * 1.25 ) );
|
||||
boundingBox.Inflate( KiROUND( aThickness * 1.5 ) );
|
||||
}
|
||||
else if( IsOutline() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue