Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
f7d85691
Commit
f7d85691
authored
Jun 24, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added conversion from EDA_COLOR_T to COLOR4D.
parent
26f6e259
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
color4d.cpp
common/gal/color4d.cpp
+9
-0
color4d.h
include/gal/color4d.h
+10
-0
No files found.
common/gal/color4d.cpp
View file @
f7d85691
...
...
@@ -28,6 +28,15 @@
using
namespace
KiGfx
;
COLOR4D
::
COLOR4D
(
EDA_COLOR_T
aColor
)
{
r
=
g_ColorRefs
[
aColor
].
m_Red
;
g
=
g_ColorRefs
[
aColor
].
m_Green
;
b
=
g_ColorRefs
[
aColor
].
m_Blue
;
a
=
1.0
;
}
const
bool
COLOR4D
::
operator
==
(
const
COLOR4D
&
aColor
)
{
return
a
==
aColor
.
a
&&
r
==
aColor
.
r
&&
g
==
aColor
.
g
&&
b
==
aColor
.
b
;
...
...
include/gal/color4d.h
View file @
f7d85691
...
...
@@ -27,6 +27,8 @@
#ifndef COLOR4D_H_
#define COLOR4D_H_
#include <colors.h>
namespace
KiGfx
{
/**
...
...
@@ -55,6 +57,14 @@ public:
{
}
/**
* @brief Constructor
*
* @param aColor is one of KiCad's palette colors.
* @see EDA_COLOR_T
*/
COLOR4D
(
EDA_COLOR_T
aColor
);
/**
* Function Highlight
* Makes the color brighter by a given factor.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment