Fix erroneous conversion between wxColor and COLOR4D

This commit is contained in:
jean-pierre charras 2017-02-23 14:30:43 +01:00
parent cf70aa925c
commit 1f345052cd
1 changed files with 5 additions and 4 deletions

View File

@ -96,6 +96,7 @@ COLOR4D::COLOR4D( EDA_COLOR_T aColor )
auto search = mix_cache.find( std::pair< uint32_t, uint32_t >( myPackedColor, auto search = mix_cache.find( std::pair< uint32_t, uint32_t >( myPackedColor,
aPackedColor ) ); aPackedColor ) );
COLOR4D candidate = COLOR4D::BLACK; COLOR4D candidate = COLOR4D::BLACK;
if( search != mix_cache.end() ) if( search != mix_cache.end() )
candidate.FromU32( search->second ); candidate.FromU32( search->second );
@ -164,10 +165,10 @@ COLOR4D::COLOR4D( EDA_COLOR_T aColor )
{ {
wxColour c; wxColour c;
c.SetRGB( aPackedColor ); c.SetRGB( aPackedColor );
r = c.Red(); r = c.Red() / 255.0;
g = c.Green(); g = c.Green() / 255.0;
b = c.Blue(); b = c.Blue() / 255.0;
a = c.Alpha(); a = c.Alpha() / 255.0;
} }