устранены ошибки с библиотекой
Этот коммит содержится в:
4
main.cpp
4
main.cpp
@@ -3,6 +3,7 @@
|
||||
#include "histogram.h"
|
||||
#include "text.h"
|
||||
#include "svg.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -38,7 +39,8 @@ input_data(istream& in, bool prompt) {
|
||||
int
|
||||
main()
|
||||
{
|
||||
auto in = input_data(cin);
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
auto in = input_data(cin, true);
|
||||
auto bins = make_histogram(in.numbers, in.bin_count);
|
||||
show_histogram_svg(bins);
|
||||
return 0;
|
||||
|
||||
4
svg.cpp
4
svg.cpp
@@ -30,7 +30,7 @@ void svg_rect(double x, double y, double width, double height, string stroke = "
|
||||
|
||||
|
||||
void
|
||||
show_histogram_svg(const vector<size_t>& bins, size_t user_block_width) {
|
||||
show_histogram_svg(const vector<size_t>& bins) {
|
||||
|
||||
const auto IMAGE_WIDTH = 400;
|
||||
const auto IMAGE_HEIGHT = 300;
|
||||
@@ -38,7 +38,7 @@ show_histogram_svg(const vector<size_t>& bins, size_t user_block_width) {
|
||||
const auto TEXT_BASELINE = 20;
|
||||
const auto TEXT_WIDTH = 50;
|
||||
const auto BIN_HEIGHT = 30;
|
||||
const auto BLOCK_WIDTH = user_block_width;
|
||||
const auto BLOCK_WIDTH = 15;
|
||||
|
||||
const size_t MAX_WIDTH = IMAGE_WIDTH - TEXT_WIDTH - 1;
|
||||
|
||||
|
||||
2
svg.h
2
svg.h
@@ -1,6 +1,6 @@
|
||||
#ifndef SVG_H_INCLUDED
|
||||
#define SVG_H_INCLUDED
|
||||
void
|
||||
show_histogram_svg(const std::vector<size_t>& bins, size_t user_block_width);
|
||||
show_histogram_svg(const std::vector<size_t>& bins);
|
||||
|
||||
#endif // SVG_H_INCLUDED
|
||||
|
||||
Ссылка в новой задаче
Block a user