From a82a4b710fef5dbb9cbe650b57c0e23a153ceec3 Mon Sep 17 00:00:00 2001 From: MakhnovGA Date: Sat, 22 Apr 2023 12:53:01 +0300 Subject: [PATCH] =?UTF-8?q?code:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20SVG=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20?= =?UTF-8?q?=D0=B8=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=B4=20=D0=B4=D0=BE=20=D0=B8=D0=BD=D0=B4=D0=B8?= =?UTF-8?q?=D0=B2=D0=B8=D0=B4=D1=83=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- histogram.cpp | 4 ++-- lab_01.cbp | 4 ++++ lab_01.depend | 19 +++++++++++++++-- lab_01.layout | 27 ++++++++++++++---------- main.cpp | 3 ++- svg.cpp | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ svg.h | 7 +++++++ unittest.layout | 16 +++++++------- 8 files changed, 112 insertions(+), 24 deletions(-) create mode 100644 svg.cpp create mode 100644 svg.h diff --git a/histogram.cpp b/histogram.cpp index 959e2b0..ad6bb59 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -36,7 +36,7 @@ vector make_histogramm(vectornumbers, size_t bin_count){ if (!found) bins[bin_count - 1]++; } - int max_count = bins[0]; + /*int max_count = bins[0]; for (size_t i = 0; i < bin_count; i++) { if (bins[i] > max_count) max_count = bins[i]; @@ -47,6 +47,6 @@ vector make_histogramm(vectornumbers, size_t bin_count){ size_t height = 76 * (static_cast(count) / max_count); bins[i] = height; } - } + }*/ return bins; } diff --git a/lab_01.cbp b/lab_01.cbp index 48c62a6..6fb5853 100644 --- a/lab_01.cbp +++ b/lab_01.cbp @@ -40,6 +40,10 @@