From e28c2321bce7448cc02638acc71dc712c9f322b9 Mon Sep 17 00:00:00 2001 From: VinogradovMA Date: Thu, 1 May 2025 01:59:19 +0300 Subject: [PATCH] code:svg_output_rectangle[5] --- svg.cpp | 4 ++++ svg.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/svg.cpp b/svg.cpp index 332868a..607a0f7 100644 --- a/svg.cpp +++ b/svg.cpp @@ -15,8 +15,12 @@ void svg_end() { void show_histogram_svg(const std::vector& bins) { svg_begin(400, 300); svg_text(20, 20, std::to_string(bins[0])); + svg_rect(50, 0, bins[0] * 10, 30); svg_end(); } void svg_text(double left, double baseline, std::string text) { std::cout << "" << text<<""; } +void svg_rect(double x, double y, double width, double height){ + std::cout << ""; +} diff --git a/svg.h b/svg.h index 0fc0c1c..38d0e26 100644 --- a/svg.h +++ b/svg.h @@ -7,5 +7,5 @@ void svg_begin(double width, double height); void svg_end(); void show_histogram_svg(const std::vector& bins); void svg_text(double left, double baseline, std::string text); - +void svg_rect(double x, double y, double width, double height); #endif // SVG_H_INCLUDED