Сравнить коммиты

..

2 Коммитов

Автор SHA1 Сообщение Дата
ShinkarenkoVA 9a486dec4b build: формат svg
1 год назад
ShinkarenkoVA 0e944a2c39 build: заголовочный файл
1 год назад

@ -0,0 +1,33 @@
#include <iostream>
#include <conio.h>
#include <vector>
#include <stdlib.h>
#include "svg.h"
#include "text.h"
using namespace std;
void
svg_begin(double width, double height) {
cout << "<?xml version='1.0' encoding='UTF-8'?>\n";
cout << "<svg ";
cout << "width='" << width << "' ";
cout << "height='" << height << "' ";
cout << "viewBox='0 0 " << width << " " << height << "' ";
cout << "xmlns='http://www.w3.org/2000/svg'>\n";
}
void
svg_end() {
cout << "</svg>\n";
}
void
show_histogram_svg(const vector<size_t>& bins) {
svg_begin(400, 300);
svg_text(20, 20, to_string(bins[0]));
svg_end();
}
void svg_text(double left, double baseline, string text){
cout << "text x='" << left << "' y='" << baseline << "'>text</text>";
}

@ -0,0 +1,8 @@
#ifndef SVG_H_INCLUDED
#define SVG_H_INCLUDED
#include <vector>
void
show_histogram_svg(const std::vector<size_t>& bins);
#endif // SVG_H_INCLUDED
Загрузка…
Отмена
Сохранить