KiCad PCB EDA Suite
Loading...
Searching...
No Matches
constraint_overlay.h File Reference
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <vector>
#include <eda_item.h>
#include <kiid.h>
#include <layer_ids.h>
#include <math/box2.h>
#include <math/vector2d.h>
#include <geometry/seg.h>
#include <gal/color4d.h>
#include <tools/view_overlay_holder.h>
#include <constraints/board_constraint_adapter.h>

Go to the source code of this file.

Classes

struct  CONSTRAINT_BADGE
 An on-canvas constraint badge. More...
 
class  CONSTRAINT_BADGE_ITEM
 Draws the constraint type-glyph badges at a constant on-screen size, like the edit handles. More...
 
class  CONSTRAINT_OVERLAY
 

Namespaces

namespace  KIGFX
 The Cairo implementation of the graphics abstraction layer.
 

Enumerations

enum class  OVERLAY_MODE { HOVER , ALWAYS }
 Draws the geometric-constraint diagnostics tint onto a GAL overlay (issue #2329): every constrained shape is outlined in a colour reflecting its state – under-constrained (amber), fully constrained (green), over-constrained or referencing a deleted item (red). More...
 

Enumeration Type Documentation

◆ OVERLAY_MODE

enum class OVERLAY_MODE
strong

Draws the geometric-constraint diagnostics tint onto a GAL overlay (issue #2329): every constrained shape is outlined in a colour reflecting its state – under-constrained (amber), fully constrained (green), over-constrained or referencing a deleted item (red).

The constraint objects themselves carry no geometry, so this overlay is the only way to see them on the canvas. Call Update() whenever the board changes; Clear() hides it. How much of the constraint overlay is shown. ALWAYS draws every constraint (the classic toggle); HOVER draws only the constraints of the hovered shape, or nothing when none is hovered.

Enumerator
HOVER 
ALWAYS 

Definition at line 133 of file constraint_overlay.h.