Split EDA_DRAW_MODE_T to its own header

This commit is contained in:
Marek Roszko 2020-10-15 19:10:12 -04:00
parent a2c3bdec0d
commit ed968ebd2c
4 changed files with 38 additions and 13 deletions

View File

@ -28,6 +28,7 @@
#include <memory>
#include <vector>
#include <plot_mode.h>
#include <eda_rect.h>
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

View File

@ -35,7 +35,7 @@
#include <eda_item.h>
#include <class_board.h>
#include <eda_draw_frame.h>
#include <eda_text.h> // EDA_DRAW_MODE_T
#include <plot_mode.h>
#include <lib_id.h>
#include <pcb_display_options.h>
#include <pcb_draw_panel_gal.h>
@ -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.
*/

30
include/plot_mode.h Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#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

View File

@ -37,6 +37,7 @@
#include <math/box2.h>
#include <gr_text.h>
#include <page_info.h>
#include <plot_mode.h>
#include <gal/color4d.h>
#include <eda_item.h> // FILL_TYPE
#include <render_settings.h>