From cd1a1a67fb63a66e0f70609466402f72da8c2f45 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 10 Jul 2019 01:14:28 +0100 Subject: [PATCH] Add seleciton/brightening/highlighting to images. --- eeschema/sch_painter.cpp | 11 +++++++++++ eeschema/tools/sch_edit_tool.cpp | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 0a96c41673..1f1d0e3e83 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1413,6 +1413,17 @@ void SCH_PAINTER::draw( SCH_BITMAP *aBitmap, int aLayer ) 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(); } diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 98c96e9e86..da4e5fd707 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -1241,7 +1241,6 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) case SCH_BITMAP_T: { - // JEY TODO: selected image doesn't have any highlighting.... SCH_BITMAP* bitmap = (SCH_BITMAP*) item; DIALOG_IMAGE_EDITOR dlg( m_frame, bitmap->GetImage() );