From ed968ebd2ce2f9bfc285b442d84b8139646e07a4 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Thu, 15 Oct 2020 19:10:12 -0400 Subject: [PATCH] Split EDA_DRAW_MODE_T to its own header --- include/eda_text.h | 8 +------- include/pcb_base_frame.h | 12 ++++++------ include/plot_mode.h | 30 ++++++++++++++++++++++++++++++ include/plotter.h | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 include/plot_mode.h diff --git a/include/eda_text.h b/include/eda_text.h index 38efd9686e..cfa21a3acd 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -28,6 +28,7 @@ #include #include +#include #include class OUTPUTFORMATTER; @@ -66,13 +67,6 @@ enum EDA_TEXT_VJUSTIFY_T { }; -/* Options to draw items with thickness ( segments, arcs, circles, texts...) */ -enum EDA_DRAW_MODE_T { - FILLED = true, // normal mode: solid segments - SKETCH = false // sketch mode: draw segments outlines only -}; - - /** * This is the "default-of-the-default" hardcoded text size; individual * application define their own default policy starting with this diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index a41f3d6393..4b69a5cfa4 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -35,7 +35,7 @@ #include #include #include -#include // EDA_DRAW_MODE_T +#include #include #include #include @@ -140,14 +140,14 @@ public: const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override { /* "Zoom to Fit" calls this with "aIncludeAllVisible" as true. Since that - * feature always ignored the page and border, this function returns a bbox - * without them as well when passed true. This technically is not all things + * feature always ignored the page and border, this function returns a bbox + * without them as well when passed true. This technically is not all things * visible, but it keeps behavior consistent. - * - * When passed false, this function returns a bbox of just the board edge. + * + * When passed false, this function returns a bbox of just the board edge. * This allows things like fabrication text or anything else outside the board * edge to be ignored, and just zooms up to the board itself. - * + * * Calling "GetBoardBoundingBox(true)" when edge cuts are turned off will return bbox of * entire page and border, so we make sure to do "GetBoardBoundingBox(false)" instead. */ diff --git a/include/plot_mode.h b/include/plot_mode.h new file mode 100644 index 0000000000..6fb08e6da3 --- /dev/null +++ b/include/plot_mode.h @@ -0,0 +1,30 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef PLOT_MODE_H +#define PLOT_MODE_H + +/* Options to draw items with thickness ( segments, arcs, circles, texts...) */ +enum EDA_DRAW_MODE_T +{ + SKETCH = 0, // sketch mode: draw segments outlines only + FILLED = 1 // normal mode: solid segments +}; + +#endif \ No newline at end of file diff --git a/include/plotter.h b/include/plotter.h index b4c53db8fd..85eeb18385 100644 --- a/include/plotter.h +++ b/include/plotter.h @@ -37,6 +37,7 @@ #include #include #include +#include #include #include // FILL_TYPE #include