KiCad PCB EDA Suite
Loading...
Searching...
No Matches
job_pcb_render.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) 2022 Mark Roszko <[email protected]>
5 * Copyright (C) 2024 Alex Shvartzkop <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef JOB_PCB_RENDER_H
23#define JOB_PCB_RENDER_H
24
25#include <kicommon.h>
26#include <wx/string.h>
27#include "job.h"
28#include <optional>
29#include <math/vector3.h>
30
31// Defined in wingdi.h
32#ifdef TRANSPARENT
33#undef TRANSPARENT
34#endif
35
36#ifdef OPAQUE
37#undef OPAQUE
38#endif
39
41{
42public:
43 enum class FORMAT
44 {
45 PNG,
46 JPEG
47 };
48
49 static std::map<JOB_PCB_RENDER::FORMAT, wxString>& GetFormatNameMap();
50
51public:
53 wxString GetDefaultDescription() const override;
54 wxString GetSettingsDialogTitle() const override;
55
56 wxString m_filename;
57
58 // Do not rename enum values as they are used for CLI args
59 enum class QUALITY
60 {
61 BASIC,
62 HIGH,
63 USER
64 };
65
66 enum class BG_STYLE
67 {
68 DEFAULT,
69 TRANSPARENT,
70 OPAQUE
71 };
72
73 enum class SIDE
74 {
75 TOP,
76 BOTTOM,
77 LEFT,
78 RIGHT,
79 FRONT,
80 BACK
81 };
82
83 FORMAT m_format = FORMAT::PNG;
84 QUALITY m_quality = QUALITY::BASIC;
85 BG_STYLE m_bgStyle = BG_STYLE::DEFAULT;
86 int m_width = 0;
87 int m_height = 0;
88 std::string m_colorPreset;
89 SIDE m_side = SIDE::TOP;
90 double m_zoom = 1.0;
91 bool m_perspective = false;
95 bool m_floor = false;
99 VECTOR3D m_lightSideIntensity = VECTOR3D( 0.5, 0.5, 0.5 );
100 int m_lightSideElevation = 60;
101};
102
103#endif
VECTOR3D m_lightBottomIntensity
VECTOR3D m_lightTopIntensity
VECTOR3D m_lightCameraIntensity
VECTOR3D m_rotation
wxString m_filename
VECTOR3D m_pivot
std::string m_colorPreset
An simple container class that lets us dispatch output jobs to kifaces.
Definition: job.h:182
virtual wxString GetDefaultDescription() const
Definition: job.cpp:74
virtual wxString GetSettingsDialogTitle() const
Definition: job.cpp:80
@ USER
The main config directory (e.g. ~/.config/kicad/)
#define KICOMMON_API
Definition: kicommon.h:28
VECTOR3< double > VECTOR3D
Definition: vector3.h:230