40 std::shared_ptr<const void> aOwner )
42 if( !aBefore && !aAfter )
51 std::map<KIID, KIGFX::COLOR4D> overrides;
55 overrides[element.item->m_Uuid] = theme.
ForKind( element.kind );
56 const_cast<EDA_ITEM*
>( element.item )->SetBrightened();
59 std::vector<KIGFX::VIEW_ITEM*> items;
64 items.push_back( &item );
70 items.push_back(
const_cast<EDA_ITEM*
>( element.item ) );
85 auto symbol = aSide.find( aName );
86 return symbol != aSide.end() ? symbol->second->Flatten() :
nullptr;
89 auto pair = std::make_shared<std::pair<std::unique_ptr<LIB_SYMBOL>, std::unique_ptr<LIB_SYMBOL>>>(
90 flatten( aBefore ), flatten( aAfter ) );
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
A base class for most all the KiCad significant classes used in schematics and boards.
std::map< wxString, const LIB_SYMBOL * > SYMBOL_MAP
Library content is a map of (canonical_name -> LIB_SYMBOL*).
Define a library symbol object.
LIB_ITEMS_CONTAINER & GetDrawItems()
Return a reference to the draw item list.
Base class for any item which can be embedded within the SCHEMATIC container class,...
void ConfigureSymDiffCanvasContext(WIDGET_DIFF_CANVAS &aCanvas, LIB_SYMBOL *aBefore, LIB_SYMBOL *aAfter, std::shared_ptr< const void > aOwner)
Draw aBefore and aAfter, which aOwner keeps alive for as long as the canvas shows them.
std::vector< LIB_ELEMENT > DiffSymbolElements(const LIB_SYMBOL *aBefore, const LIB_SYMBOL *aAfter)
Compares the elements of two library symbols.
std::unique_ptr< KIGFX::PAINTER > MakeSchDiffContextPainter(KIGFX::GAL *aGal, SCHEMATIC *aSchematic, const KIGFX::COLOR4D &aColor, std::map< KIID, KIGFX::COLOR4D > aOverrides)
void ShowSymbolPair(WIDGET_DIFF_CANVAS &aCanvas, const SYM_LIB_DIFFER::SYMBOL_MAP &aBefore, const SYM_LIB_DIFFER::SYMBOL_MAP &aAfter, const wxString &aName)
Draw the symbol aName as it is in aBefore and aAfter.
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
Diff colors with defaults for light backgrounds.
KIGFX::COLOR4D reference
Default color for source-document context geometry.
const KIGFX::COLOR4D & ForKind(KICAD_DIFF::CHANGE_KIND aKind) const
Color of an added, removed or modified element.
One changed element of a library item, such as a pin, pad, field or graphic.