7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

EEschema, export to clipboard: fix in correct drawings:

Fix incorrect symbol body color
fix broken arcs.
This commit is contained in:
jean-pierre charras 2024-11-22 12:52:24 +01:00
parent 61e5b10031
commit 49fffd94d4
2 changed files with 14 additions and 2 deletions

View File

@ -601,7 +601,19 @@ void LIB_SYMBOL::Print( const SCH_RENDER_SETTINGS* aSettings, int aUnit, int aBo
if( shape.GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR )
aForceNoFill = true;
// Ensure the color of shape is from LAYER_DEVICE if not specified.
COLOR4D init_color = shape.GetStroke().GetColor();
STROKE_PARAMS prms = shape.GetStroke();
if( init_color == COLOR4D::UNSPECIFIED )
{
COLOR4D color = aSettings->GetLayerColor( LAYER_DEVICE );
prms.SetColor( color );
shape.SetStroke( prms );
}
shape.Print( aSettings, aUnit, aBodyStyle, aOffset, aForceNoFill, aDimmed );
prms.SetColor( init_color );
shape.SetStroke( prms );
}
else
{

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2004-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -393,7 +393,7 @@ void SCH_SHAPE::Print( const SCH_RENDER_SETTINGS* aSettings, int aUnit, int aBod
EDA_ANGLE arc_angle = ( t1 - t2 ).Normalize180();
bool transformed2 = ( arc_angle > ANGLE_0 ) && ( arc_angle < ANGLE_180 );
if( transformed == transformed2 )
if( transformed != transformed2 )
std::swap( start, end );
}
}