Browse Source

Add seleciton/brightening/highlighting to images.

pull/15/head
Jeff Young 6 years ago
parent
commit
cd1a1a67fb
  1. 11
      eeschema/sch_painter.cpp
  2. 1
      eeschema/tools/sch_edit_tool.cpp

11
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();
}

1
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() );

Loading…
Cancel
Save