code: добавление параметров по умоланию для гистограммы
Этот коммит содержится в:
4
svg.cpp
4
svg.cpp
@@ -40,7 +40,7 @@ void show_histogram_svg(const std::vector<size_t>& bins){
|
||||
svg_end();
|
||||
}
|
||||
|
||||
void svg_rect(double x, double y, double width, double height){
|
||||
std::cout << "<rect x='" << x << "' y='" << y << "' width='" << width << "' height='" << height << "' stroke='red' fill='#ffeeee' />";
|
||||
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='" << stroke << "' fill='" << fill << "' />";
|
||||
}
|
||||
|
||||
|
||||
2
svg.h
2
svg.h
@@ -7,6 +7,6 @@ void svg_begin(double width, double height);
|
||||
void svg_end();
|
||||
void show_histogram_svg(const std::vector<size_t>& bins);
|
||||
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
|
||||
|
||||
Ссылка в новой задаче
Block a user