KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_diff_canvas_context.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 */
11
12#ifndef SCH_DIFF_CANVAS_CONTEXT_H
13#define SCH_DIFF_CANVAS_CONTEXT_H
14
16#include <gal/color4d.h>
17#include <kiid.h>
18#include <sch_render_settings.h>
19
20#include <map>
21#include <memory>
22#include <set>
23#include <vector>
24
25
26class SCHEMATIC;
27class SCH_SCREEN;
29
30namespace KIGFX
31{
32class GAL;
33class PAINTER;
34class VIEW_ITEM;
35}
36
37
38namespace KICAD_DIFF
39{
40
41std::vector<KIGFX::VIEW_ITEM*> CollectSchematicDiffContextItems( SCHEMATIC& aSchematic, SCH_SCREEN* aScreen = nullptr );
42
43void ConfigureSchDiffContextRenderSettings( SCH_RENDER_SETTINGS& aSettings,
44 const KIGFX::COLOR4D& aColor );
45
46std::unique_ptr<KIGFX::PAINTER> MakeSchDiffContextPainter( KIGFX::GAL* aGal, SCHEMATIC* aSchematic,
47 const KIGFX::COLOR4D& aColor,
48 std::map<KIID, KIGFX::COLOR4D> aOverrides = {} );
49
50void ConfigureSchDiffCanvasContext( WIDGET_DIFF_CANVAS& aCanvas, SCHEMATIC* aReference, SCHEMATIC* aComparison,
51 const KIGFX::COLOR4D& aColor, const std::map<KIID, KIGFX::COLOR4D>& aOverrides = {},
52 const std::vector<KIGFX::VIEW_ITEM*>& aExtraItems = {},
53 const std::map<KIID, KICAD_DIFF::CATEGORY>& aCategories = {},
54 SCH_SCREEN* aReferenceScreen = nullptr, SCH_SCREEN* aComparisonScreen = nullptr );
55
56} // namespace KICAD_DIFF
57
58#endif // SCH_DIFF_CANVAS_CONTEXT_H
Abstract interface for drawing on a 2D-surface.
Contains all the knowledge about how to draw graphical object onto any particular output device.
Definition painter.h:55
An abstract base class for deriving all objects that can be added to a VIEW.
Definition view_item.h:82
Holds all the data relating to one schematic.
Definition schematic.h:90
GAL-backed canvas for visualizing a KICAD_DIFF::DIFF_SCENE.
void ConfigureSchDiffCanvasContext(WIDGET_DIFF_CANVAS &aCanvas, SCHEMATIC *aReference, SCHEMATIC *aComparison, const KIGFX::COLOR4D &aColor, const std::map< KIID, KIGFX::COLOR4D > &aOverrides, const std::vector< KIGFX::VIEW_ITEM * > &aExtraItems, const std::map< KIID, KICAD_DIFF::CATEGORY > &aCategories, SCH_SCREEN *aReferenceScreen, SCH_SCREEN *aComparisonScreen)
void ConfigureSchDiffContextRenderSettings(SCH_RENDER_SETTINGS &aSettings, const KIGFX::COLOR4D &aColor)
std::vector< KIGFX::VIEW_ITEM * > CollectSchematicDiffContextItems(SCHEMATIC &aSchematic, SCH_SCREEN *aScreen)
std::unique_ptr< KIGFX::PAINTER > MakeSchDiffContextPainter(KIGFX::GAL *aGal, SCHEMATIC *aSchematic, const KIGFX::COLOR4D &aColor, std::map< KIID, KIGFX::COLOR4D > aOverrides)
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:29