KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_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 PCB_DIFF_CANVAS_CONTEXT_H
13#define PCB_DIFF_CANVAS_CONTEXT_H
14
16#include <gal/color4d.h>
17#include <kiid.h>
18#include <pcb_painter.h>
19
20#include <map>
21#include <memory>
22#include <vector>
23
24
25class BOARD;
26class FOOTPRINT;
28
29namespace KIGFX
30{
31class GAL;
32class PAINTER;
33class VIEW_ITEM;
34}
35
36
37namespace KICAD_DIFF
38{
39
40std::vector<KIGFX::VIEW_ITEM*> CollectBoardDiffContextItems( BOARD& aBoard );
41std::vector<KIGFX::VIEW_ITEM*> CollectFootprintDiffContextItems( FOOTPRINT& aFootprint );
42
43void ConfigurePcbDiffContextRenderSettings( KIGFX::PCB_RENDER_SETTINGS& aSettings,
44 const KIGFX::COLOR4D& aColor );
45
46std::unique_ptr<KIGFX::PAINTER> MakePcbDiffContextPainter( KIGFX::GAL* aGal, const KIGFX::COLOR4D& aColor,
47 std::map<KIID, KIGFX::COLOR4D> aOverrides = {} );
48
49void ConfigurePcbDiffCanvasContext( WIDGET_DIFF_CANVAS& aCanvas, BOARD* aReference, BOARD* aComparison,
50 const KIGFX::COLOR4D& aColor, const std::map<KIID, KIGFX::COLOR4D>& aOverrides = {},
51 const std::vector<KIGFX::VIEW_ITEM*>& aExtraItems = {},
52 const std::map<KIID, KICAD_DIFF::CATEGORY>& aCategories = {} );
53
54} // namespace KICAD_DIFF
55
56#endif // PCB_DIFF_CANVAS_CONTEXT_H
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:320
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
GAL-backed canvas for visualizing a KICAD_DIFF::DIFF_SCENE.
std::vector< KIGFX::VIEW_ITEM * > CollectBoardDiffContextItems(BOARD &aBoard)
void ConfigurePcbDiffCanvasContext(WIDGET_DIFF_CANVAS &aCanvas, BOARD *aReference, BOARD *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)
std::unique_ptr< KIGFX::PAINTER > MakePcbDiffContextPainter(KIGFX::GAL *aGal, const KIGFX::COLOR4D &aColor, std::map< KIID, KIGFX::COLOR4D > aOverrides)
void ConfigurePcbDiffContextRenderSettings(KIGFX::PCB_RENDER_SETTINGS &aSettings, const KIGFX::COLOR4D &aColor)
std::vector< KIGFX::VIEW_ITEM * > CollectFootprintDiffContextItems(FOOTPRINT &aFootprint)
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:29