diff --git a/ARM64/Debug/marks.svg b/ARM64/Debug/marks.svg new file mode 100644 index 0000000..56afc53 --- /dev/null +++ b/ARM64/Debug/marks.svg @@ -0,0 +1,5 @@ + + +2 + + diff --git a/ARM64/Debug/marks.txt b/ARM64/Debug/marks.txt new file mode 100644 index 0000000..2cdb9aa --- /dev/null +++ b/ARM64/Debug/marks.txt @@ -0,0 +1,3 @@ +10 +3 3 4 4 4 4 4 5 5 5 +3 diff --git a/ProgUit Lab1/ProgUit Lab1.cpp b/ProgUit Lab1/ProgUit Lab1.cpp index fdf94be..b632428 100644 --- a/ProgUit Lab1/ProgUit Lab1.cpp +++ b/ProgUit Lab1/ProgUit Lab1.cpp @@ -54,7 +54,7 @@ int main() // Функция main auto in = input_data(); // Ввод структуры auto bins = make_histogram(in.numbers, in.bin_count); // Распределние по корзинам - show_histogram_text(bins, in.bin_count); // Вывод графика + show_histogram_svg(bins); // Вывод графика diff --git a/ProgUit Lab1/text.cpp b/ProgUit Lab1/text.cpp index 9de464b..de37dc6 100644 --- a/ProgUit Lab1/text.cpp +++ b/ProgUit Lab1/text.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "text.h" #include "histogram.h" @@ -8,6 +9,43 @@ using namespace std; +void +svg_begin(double width, double height) { + cout << "\n"; + cout << "\n"; +} + +void +svg_end() { + cout << "\n"; +} + +void +svg_text(double left, double baseline, string text) { + cout << "" << text << "" << endl; +} + +void svg_rect(double x, double y, double width, double height) { + cout << "" << endl; +} + +void +show_histogram_svg(const vector bins) { + svg_begin(400, 300); + svg_text(20, 35, to_string(bins[0])); + svg_rect(50, 0, bins[0] * 10, 30); + svg_end(); + +} + + + + + void show_histogram_text(const vector bins, const size_t bin_count) { // diff --git a/ProgUit Lab1/text.h b/ProgUit Lab1/text.h index 117c632..3d4fb01 100644 --- a/ProgUit Lab1/text.h +++ b/ProgUit Lab1/text.h @@ -6,5 +6,7 @@ #include void show_histogram_text(std::vector bins, size_t bin_count); +void show_histogram_svg(const std::vector bins); + #endif // TEXT_H_INCLUDED