Add seleciton/brightening/highlighting to images.

This commit is contained in:
Jeff Young 2019-07-10 01:14:28 +01:00
parent 13d61e4b2b
commit cd1a1a67fb
2 changed files with 11 additions and 1 deletions

View File

@ -1413,6 +1413,17 @@ void SCH_PAINTER::draw( SCH_BITMAP *aBitmap, int aLayer )
m_gal->DrawBitmap( *aBitmap->GetImage() ); m_gal->DrawBitmap( *aBitmap->GetImage() );
if( aBitmap->IsSelected() || aBitmap->IsBrightened() || aBitmap->IsBrightened() )
{
COLOR4D color = getRenderColor( aBitmap, LAYER_NOTES, false );
m_gal->SetStrokeColor( color );
m_gal->SetIsStroke( true );
m_gal->SetIsFill( false );
m_gal->SetLineWidth ( 12.0 );
m_gal->DrawRectangle( VECTOR2D( -aBitmap->GetSize().x / 2.0, -aBitmap->GetSize().y / 2.0 ),
VECTOR2D( aBitmap->GetSize().x / 2.0, aBitmap->GetSize().y / 2.0 ) );
}
m_gal->Restore(); m_gal->Restore();
} }

View File

@ -1241,7 +1241,6 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
case SCH_BITMAP_T: case SCH_BITMAP_T:
{ {
// JEY TODO: selected image doesn't have any highlighting....
SCH_BITMAP* bitmap = (SCH_BITMAP*) item; SCH_BITMAP* bitmap = (SCH_BITMAP*) item;
DIALOG_IMAGE_EDITOR dlg( m_frame, bitmap->GetImage() ); DIALOG_IMAGE_EDITOR dlg( m_frame, bitmap->GetImage() );