update visualizer-related documentation
This commit is contained in:
@@ -241,6 +241,16 @@ bool Configuration::read(const std::string &config_path)
|
||||
boundsCheck(result.size(), size_type(2), size_type(2));
|
||||
return result;
|
||||
}));
|
||||
p.add("visualizer_color", option_parser::worker([this](std::string &&v) {
|
||||
boost::sregex_token_iterator i(v.begin(), v.end(), boost::regex("\\w+")), j;
|
||||
for (; i != j; ++i)
|
||||
{
|
||||
auto color = stringToColor(*i);
|
||||
visualizer_colors.push_back(color);
|
||||
}
|
||||
}, [this] {
|
||||
visualizer_colors = { NC::Color::Blue, NC::Color::Cyan, NC::Color::Green, NC::Color::Yellow, NC::Color::Magenta, NC::Color::Red };
|
||||
}));
|
||||
p.add("system_encoding", assign_default<std::string>(
|
||||
system_encoding, "", [](std::string &&enc) {
|
||||
# ifdef HAVE_LANGINFO_H
|
||||
@@ -624,16 +634,6 @@ bool Configuration::read(const std::string &config_path)
|
||||
p.add("active_column_color", assign_default(
|
||||
active_column_color, NC::Color::Red
|
||||
));
|
||||
p.add("visualizer_colors", option_parser::worker([this](std::string &&v) {
|
||||
boost::sregex_token_iterator i(v.begin(), v.end(), boost::regex("\\w+")), j;
|
||||
for (; i != j; ++i)
|
||||
{
|
||||
auto color = stringToColor(*i);
|
||||
visualizer_colors.push_back(color);
|
||||
}
|
||||
}, [this] {
|
||||
visualizer_colors = { NC::Color::Blue, NC::Color::Cyan, NC::Color::Green, NC::Color::Yellow, NC::Color::Red };
|
||||
}));
|
||||
p.add("window_border_color", assign_default(
|
||||
window_border, NC::Border::Green
|
||||
));
|
||||
|
||||
@@ -246,7 +246,7 @@ void Visualizer::DrawSoundEllipseStereo(int16_t *buf_left, int16_t *buf_right, s
|
||||
|
||||
// The arguments to the toColor function roughly follow a circle equation where
|
||||
// the center is not centered around (0,0). For example (x - w)^2 + (y-h)+2 = r^2
|
||||
// centers the circle around the point (w,h) Because fonts are not all the same
|
||||
// centers the circle around the point (w,h). Because fonts are not all the same
|
||||
// size, this will not always generate a perfect circle.
|
||||
w << toColor(pow((x - width)*1, 2) + pow((y - ((long)height)) * 2,2), scaledRadius)
|
||||
<< NC::XY(x, y)
|
||||
|
||||
Reference in New Issue
Block a user