code: добавление параметров по умоланию для гистограммы

main
Ivan (BeloziorovIA) 3 недель назад
Родитель b387a89f6d
Сommit 8837728910

@ -40,7 +40,7 @@ void show_histogram_svg(const std::vector<size_t>& bins){
svg_end(); svg_end();
} }
void svg_rect(double x, double y, double width, double height){ void svg_rect(double x, double y, double width, double height, std::string stroke, std::string fill){
std::cout << "<rect x='" << x << "' y='" << y << "' width='" << width << "' height='" << height << "' stroke='red' fill='#ffeeee' />"; std::cout << "<rect x='" << x << "' y='" << y << "' width='" << width << "' height='" << height << "' stroke='" << stroke << "' fill='" << fill << "' />";
} }

@ -7,6 +7,6 @@ void svg_begin(double width, double height);
void svg_end(); void svg_end();
void show_histogram_svg(const std::vector<size_t>& bins); void show_histogram_svg(const std::vector<size_t>& bins);
void svg_text(double left, double baseline, std::string text); void svg_text(double left, double baseline, std::string text);
void svg_rect(double x, double y, double width, double height); void svg_rect(double x, double y, double width, double height, std::string stroke = "black", std::string fill = "black");
#endif // SVG_H_INCLUDED #endif // SVG_H_INCLUDED

Загрузка…
Отмена
Сохранить