mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
lots more color work, closer and closer to being ready for ... being taken apart again
This commit is contained in:
parent
e1c6f3bf6c
commit
624a86c39d
8 changed files with 136 additions and 116 deletions
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
#include <cmath>
|
||||
#include <stdint.h>
|
||||
#include <cfloat>
|
||||
|
|
@ -236,6 +237,26 @@ HSV::HSV (Color c)
|
|||
color_to_hsva (c, h, s, v, a);
|
||||
}
|
||||
|
||||
HSV::HSV (const std::string& str)
|
||||
{
|
||||
stringstream ss (str);
|
||||
ss >> h;
|
||||
ss >> s;
|
||||
ss >> v;
|
||||
ss >> a;
|
||||
}
|
||||
|
||||
string
|
||||
HSV::to_string () const
|
||||
{
|
||||
stringstream ss;
|
||||
ss << h << ' ';
|
||||
ss << s << ' ';
|
||||
ss << v << ' ';
|
||||
ss << a;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
bool
|
||||
HSV::is_gray () const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue