KiCad PCB EDA Suite
Loading...
Searching...
No Matches
color_rgb.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) 2015-2016 Mario Luzeiro <[email protected]>
5 * Copyright (C) 2015-2020 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, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
29#ifndef COLOR_RGB_H
30#define COLOR_RGB_H
31
33
35{
36 unsigned char c[3];
37
38 struct
39 {
40 unsigned char r;
41 unsigned char g;
42 unsigned char b;
43 };
44
45 COLOR_RGB( const SFVEC3F& aColor );
46 COLOR_RGB() { r = 0; g = 0; b = 0; }
47 COLOR_RGB( unsigned char aR, unsigned char aG, unsigned char aB )
48 {
49 r = aR;
50 g = aG;
51 b = aB;
52 }
53};
54
55
56COLOR_RGB BlendColor( const COLOR_RGB& aC1, const COLOR_RGB& aC2 );
57COLOR_RGB BlendColor( const COLOR_RGB& aC1, const COLOR_RGB& aC2, const COLOR_RGB& aC3 );
58COLOR_RGB BlendColor( const COLOR_RGB& aC1, const COLOR_RGB& aC2, const COLOR_RGB& aC3,
59 const COLOR_RGB& aC4 );
60
61#endif // COLOR_RGB_H
COLOR_RGB BlendColor(const COLOR_RGB &aC1, const COLOR_RGB &aC2)
Definition: color_rgb.cpp:41
COLOR_RGB(unsigned char aR, unsigned char aG, unsigned char aB)
Definition: color_rgb.h:47
unsigned char g
Definition: color_rgb.h:41
unsigned char r
Definition: color_rgb.h:40
unsigned char c[3]
Definition: color_rgb.h:36
COLOR_RGB()
Definition: color_rgb.h:46
unsigned char b
Definition: color_rgb.h:42
glm::vec3 SFVEC3F
Definition: xv3d_types.h:44