Ian McInerney
920120864f
Fix initialization of COLOR4D statics
Just declaring as static const would give an initialization order
fiasco since they were being used to initialize other statics.
6 years ago
Seth Hillbrand
4a52062a54
GAL: Make high-contrast meld into background
This mixes the de-emphasized layers into the background color rather
than merely a black color. This also keeps some of the original layer
color.
Fixes: lp:1831316
* https://bugs.launchpad.net/kicad/+bug/1831316
6 years ago
Jeff Young
7553cc2651
Clean up some dangling legacy odds and ends.
7 years ago
Seth Hillbrand
7b3ef1b7ed
colors: Add HSL conversion and tune colors
When adding colors to length tuner, we depend on the window background
color, which can be set by the user, resulting in an unreadable text.
This uses the HSL conversion to detect which shade it should use for the
coloring.
Also adds test cases for round-trip HSL and HSV conversion
Fixes: lp:1814530
* https://bugs.launchpad.net/kicad/+bug/1814530
7 years ago
John Beard
4c355c32d3
Fix rounding in COLOR4D::ToColour
Due to the implicit floor of the cast from double to unsigned char,
there was a small rounding error in COLOUR4D's WX conversion function.
This fixes the failing tests.
Also make the cast to unsigned char explicit.
7 years ago
Jon Evans
0564d3456b
Preserve color scheme when switching to legacy (Fixes lp:1670669)
Instead of modifying the colors when switching to legacy canvas,
they will now be preserved and only returned as the "legacy" colors.
8 years ago
jean-pierre charras
5aeb6129ca
Fix a bug in KIGFX::COLOR4D ctor: . The alpha channel (opacity) was set to 0. this is a mistake. It is now set to 1.0
Fixes lp:1718389
8 years ago
jean-pierre charras
ed66496242
Fix an issue (created by commit 16cb6a6ca0) when converting a color4D to a legacy color
Fixes: lp:1704724
https://bugs.launchpad.net/kicad/+bug/1704724
8 years ago
jean-pierre charras
16cb6a6ca0
color4d: fix incorrect conversion from rgb to HSV when r = g = b.
8 years ago
Jon Evans
8cd1df0524
Add output stream operator for COLOR4D
9 years ago
John Beard
e67882f0a3
Add WithAlpha method to COLOR4D
This is useful for taking a "base" color and making derived colours with
the given alpha, but the same RGB value.
9 years ago
Maciej Suminski
0dc88bb4cf
Changed COLOR4D defines to static consts
9 years ago
Jon Evans
a52250a91e
Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
9 years ago
jean-pierre charras
24f516f6ae
Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc.
11 years ago
Maciej Suminski
3827f495ca
Ratsnest color is saved in RENDER_SETTINGS. Temporary ratsnest is drawn using a brightened color.
12 years ago
Maciej Suminski
0ac3e1fbf2
Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
12 years ago
Maciej Suminski
22045b61ea
Converted tabs to spaces. Removed trailing whitespaces.
12 years ago
tomasz.wlostowski@cern.ch
c3759d870c
COLOR4D: added Saturate(), FromHSV(), ToHSV() methods.
Used in highlighting/routing code.
12 years ago
Maciej Suminski
7d4aed1099
Fixed COLOR4D( EDA_COLOR_T aColor ) and added asserts.
12 years ago
Maciej Suminski
f193e389ec
Moved highlighted flag from VIEW_ITEM to EDA_ITEM. Added brightened and selected flag to EDA_ITEM.
12 years ago
Maciej Suminski
861ea0592e
Different approach to coloring netname labels.
12 years ago
Maciej Suminski
6c3534bd35
Dynamic color setting for netnames.
12 years ago
Maciej Suminski
81c674387e
Added convertsion from wxColour to COLOR4D.
13 years ago
Maciej Suminski
f7d85691c2
Added conversion from EDA_COLOR_T to COLOR4D.
13 years ago
Maciej Suminski
ad4bf38e7a
Added class COLOR4D that contains color representation with 4 components (RGBA) (for future usage in GAL)
13 years ago