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 "
job.h
"
27
#include <optional>
28
#include <
math/vector3.h
>
29
30
// Defined in wingdi.h
31
#ifdef TRANSPARENT
32
#undef TRANSPARENT
33
#endif
34
35
#ifdef OPAQUE
36
#undef OPAQUE
37
#endif
38
39
class
KICOMMON_API
JOB_PCB_RENDER
:
public
JOB
40
{
41
public
:
42
enum class
FORMAT
43
{
44
PNG
,
45
JPEG
46
};
47
48
static
std::map<JOB_PCB_RENDER::FORMAT, wxString>& GetFormatNameMap();
49
50
public
:
51
JOB_PCB_RENDER
();
52
wxString
GetDefaultDescription
()
const override
;
53
wxString
GetSettingsDialogTitle
()
const override
;
54
55
wxString
m_filename
;
56
57
// Do not rename enum values as they are used for CLI args
58
enum class
QUALITY
59
{
60
BASIC
,
61
HIGH
,
62
USER
,
63
JOB_SETTINGS
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_appearancePreset
;
89
bool
m_useBoardStackupColors
=
true
;
90
SIDE
m_side
=
SIDE::TOP
;
91
double
m_zoom
= 1.0;
92
bool
m_perspective
=
false
;
93
VECTOR3D
m_rotation
;
94
VECTOR3D
m_pan
;
95
VECTOR3D
m_pivot
;
96
bool
m_proceduralTextures
=
false
;
97
bool
m_floor
=
false
;
98
bool
m_antiAlias
=
true
;
99
bool
m_postProcess
=
false
;
100
VECTOR3D
m_lightTopIntensity
;
101
VECTOR3D
m_lightBottomIntensity
;
102
VECTOR3D
m_lightCameraIntensity
;
103
VECTOR3D
m_lightSideIntensity
=
VECTOR3D
( 0.5, 0.5, 0.5 );
104
int
m_lightSideElevation
= 60;
105
};
106
107
#endif
JOB_PCB_RENDER
Definition
job_pcb_render.h:40
JOB_PCB_RENDER::m_pan
VECTOR3D m_pan
Definition
job_pcb_render.h:94
JOB_PCB_RENDER::m_lightBottomIntensity
VECTOR3D m_lightBottomIntensity
Definition
job_pcb_render.h:101
JOB_PCB_RENDER::m_lightTopIntensity
VECTOR3D m_lightTopIntensity
Definition
job_pcb_render.h:100
JOB_PCB_RENDER::SIDE
SIDE
Definition
job_pcb_render.h:74
JOB_PCB_RENDER::SIDE::BACK
@ BACK
Definition
job_pcb_render.h:80
JOB_PCB_RENDER::SIDE::BOTTOM
@ BOTTOM
Definition
job_pcb_render.h:76
JOB_PCB_RENDER::SIDE::RIGHT
@ RIGHT
Definition
job_pcb_render.h:78
JOB_PCB_RENDER::SIDE::TOP
@ TOP
Definition
job_pcb_render.h:75
JOB_PCB_RENDER::SIDE::LEFT
@ LEFT
Definition
job_pcb_render.h:77
JOB_PCB_RENDER::SIDE::FRONT
@ FRONT
Definition
job_pcb_render.h:79
JOB_PCB_RENDER::m_width
int m_width
Definition
job_pcb_render.h:86
JOB_PCB_RENDER::m_side
SIDE m_side
Definition
job_pcb_render.h:90
JOB_PCB_RENDER::m_bgStyle
BG_STYLE m_bgStyle
Definition
job_pcb_render.h:85
JOB_PCB_RENDER::m_perspective
bool m_perspective
Definition
job_pcb_render.h:92
JOB_PCB_RENDER::m_lightSideElevation
int m_lightSideElevation
Definition
job_pcb_render.h:104
JOB_PCB_RENDER::m_lightCameraIntensity
VECTOR3D m_lightCameraIntensity
Definition
job_pcb_render.h:102
JOB_PCB_RENDER::BG_STYLE
BG_STYLE
Definition
job_pcb_render.h:67
JOB_PCB_RENDER::BG_STYLE::DEFAULT
@ DEFAULT
Definition
job_pcb_render.h:68
JOB_PCB_RENDER::BG_STYLE::TRANSPARENT
@ TRANSPARENT
Definition
job_pcb_render.h:69
JOB_PCB_RENDER::BG_STYLE::OPAQUE
@ OPAQUE
Definition
job_pcb_render.h:70
JOB_PCB_RENDER::m_floor
bool m_floor
Definition
job_pcb_render.h:97
JOB_PCB_RENDER::m_rotation
VECTOR3D m_rotation
Definition
job_pcb_render.h:93
JOB_PCB_RENDER::m_zoom
double m_zoom
Definition
job_pcb_render.h:91
JOB_PCB_RENDER::m_proceduralTextures
bool m_proceduralTextures
Definition
job_pcb_render.h:96
JOB_PCB_RENDER::m_quality
QUALITY m_quality
Definition
job_pcb_render.h:84
JOB_PCB_RENDER::QUALITY
QUALITY
Definition
job_pcb_render.h:59
JOB_PCB_RENDER::QUALITY::USER
@ USER
Definition
job_pcb_render.h:62
JOB_PCB_RENDER::QUALITY::HIGH
@ HIGH
Definition
job_pcb_render.h:61
JOB_PCB_RENDER::QUALITY::BASIC
@ BASIC
Definition
job_pcb_render.h:60
JOB_PCB_RENDER::QUALITY::JOB_SETTINGS
@ JOB_SETTINGS
Definition
job_pcb_render.h:63
JOB_PCB_RENDER::m_format
FORMAT m_format
Definition
job_pcb_render.h:83
JOB_PCB_RENDER::m_filename
wxString m_filename
Definition
job_pcb_render.h:55
JOB_PCB_RENDER::m_height
int m_height
Definition
job_pcb_render.h:87
JOB_PCB_RENDER::m_useBoardStackupColors
bool m_useBoardStackupColors
Definition
job_pcb_render.h:89
JOB_PCB_RENDER::m_pivot
VECTOR3D m_pivot
Definition
job_pcb_render.h:95
JOB_PCB_RENDER::JOB_PCB_RENDER
JOB_PCB_RENDER()
Definition
job_pcb_render.cpp:83
JOB_PCB_RENDER::m_lightSideIntensity
VECTOR3D m_lightSideIntensity
Definition
job_pcb_render.h:103
JOB_PCB_RENDER::m_antiAlias
bool m_antiAlias
Definition
job_pcb_render.h:98
JOB_PCB_RENDER::m_appearancePreset
std::string m_appearancePreset
Definition
job_pcb_render.h:88
JOB_PCB_RENDER::FORMAT
FORMAT
Definition
job_pcb_render.h:43
JOB_PCB_RENDER::FORMAT::PNG
@ PNG
Definition
job_pcb_render.h:44
JOB_PCB_RENDER::FORMAT::JPEG
@ JPEG
Definition
job_pcb_render.h:45
JOB_PCB_RENDER::m_postProcess
bool m_postProcess
Definition
job_pcb_render.h:99
JOB::JOB
JOB(const std::string &aType, bool aOutputIsDirectory)
Definition
job.cpp:26
JOB::GetDefaultDescription
virtual wxString GetDefaultDescription() const
Definition
job.cpp:74
JOB::GetSettingsDialogTitle
virtual wxString GetSettingsDialogTitle() const
Definition
job.cpp:80
job.h
kicommon.h
KICOMMON_API
#define KICOMMON_API
Definition
kicommon.h:28
vector3.h
VECTOR3D
VECTOR3< double > VECTOR3D
Definition
vector3.h:230
src
common
jobs
job_pcb_render.h
Generated on Sun Sep 21 2025 01:05:21 for KiCad PCB EDA Suite by
1.13.2