KiCad PCB EDA Suite
label_manager.h
Go to the documentation of this file.
1 #ifndef __LABEL_MANAGER_H
2 #define __LABEL_MANAGER_H
3 
5 #include <gal/color4d.h>
6 #include <math/vector2d.h>
7 #include <math/box2.h>
8 
10 {
11 public:
12  struct LABEL
13  {
15  std::string m_msg;
18  };
19 
20  LABEL_MANAGER( KIGFX::GAL* aGal );
21  ~LABEL_MANAGER( );
22 
23  void Add( VECTOR2I target, std::string msg, COLOR4D color );
24  void Add( const SHAPE_LINE_CHAIN& aL, COLOR4D color );
25  void Redraw( KIGFX::VIEW_OVERLAY* aOvl );
26 
27 private:
28 
30  VECTOR2I boxMtv( BOX2I b1, BOX2I b2 );
31  void recalculate();
32 
34  int m_textSize = 100000;
35  std::vector<LABEL> m_labels;
36 };
37 
38 #endif
int color
Definition: DXF_plotter.cpp:57
void Add(VECTOR2I target, std::string msg, COLOR4D color)
void Redraw(KIGFX::VIEW_OVERLAY *aOvl)
VECTOR2I nearestBoxCorner(BOX2I b, VECTOR2I p)
LABEL_MANAGER(KIGFX::GAL *aGal)
VECTOR2I boxMtv(BOX2I b1, BOX2I b2)
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
KIGFX::GAL * m_gal
Definition: label_manager.h:33
std::vector< LABEL > m_labels
Definition: label_manager.h:35
Abstract interface for drawing on a 2D-surface.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103