KiCad PCB EDA Suite
Loading...
Searching...
No Matches
glyph.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 (C) 2021 Ola Rinta-Koski
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <wx/debug.h>
24
25#include <gal/gal.h>
26#include <math/box2.h>
27
28
29namespace KIFONT
30{
31
32
34{
35public:
36 virtual ~GLYPH()
37 {}
38
39 virtual bool IsOutline() const { return false; }
40 virtual bool IsStroke() const { return false; }
41
42 virtual BOX2D BoundingBox() = 0;
43
44 bool IsHover() const { return m_isHover; }
45 void SetIsHover( bool aIsHover ) { m_isHover = aIsHover; }
46
47private:
48 bool m_isHover = false;
49};
50
51} // namespace KIFONT
BOX2< VECTOR2D > BOX2D
Definition box2.h:915
virtual BOX2D BoundingBox()=0
virtual bool IsStroke() const
Definition glyph.h:40
virtual bool IsOutline() const
Definition glyph.h:39
void SetIsHover(bool aIsHover)
Definition glyph.h:45
bool IsHover() const
Definition glyph.h:44
virtual ~GLYPH()
Definition glyph.h:36
bool m_isHover
Definition glyph.h:48
#define GAL_API
Definition gal.h:27