update visualizer-related documentation
This commit is contained in:
@@ -90,12 +90,14 @@
|
||||
## you need to compile ncmpcpp with fftw3 support.
|
||||
##
|
||||
#
|
||||
## Available values: spectrum, wave.
|
||||
## Available values: spectrum, wave, wave_filled, ellipse.
|
||||
##
|
||||
#visualizer_type = wave
|
||||
#
|
||||
#visualizer_look = ●▮
|
||||
#
|
||||
#visualizer_color = blue, cyan, green, yellow, magenta, red
|
||||
#
|
||||
##### system encoding #####
|
||||
##
|
||||
## ncmpcpp should detect your charset encoding
|
||||
@@ -503,8 +505,6 @@
|
||||
#
|
||||
#active_column_color = red
|
||||
#
|
||||
#visualizer_color = yellow
|
||||
#
|
||||
#window_border_color = green
|
||||
#
|
||||
#active_window_border = red
|
||||
|
||||
@@ -82,6 +82,9 @@ Defines default visualizer type (spectrum is available only if ncmpcpp was compi
|
||||
.B visualizer_look = STRING
|
||||
Defines visualizer's look (string has to be exactly 2 characters long: first one is for wave whereas second for frequency spectrum).
|
||||
.TP
|
||||
.B visualizer_color = COLORS
|
||||
Comma separated list of colors to be used in music visualization.
|
||||
.TP
|
||||
.B system_encoding = ENCODING
|
||||
If you use encoding other than utf8, set it in order to handle utf8 encoded strings properly.
|
||||
.TP
|
||||
@@ -361,9 +364,6 @@ Color of separators used in alternative user interface.
|
||||
.B active_column_color = COLOR
|
||||
Color of active column's highlight.
|
||||
.TP
|
||||
.B visualizer_color = COLOR
|
||||
Color of visualization.
|
||||
.TP
|
||||
.B active_window_border = COLOR
|
||||
Color of active window's border.
|
||||
.TP
|
||||
|
||||
@@ -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