Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

27 строки
942 B
C++

#ifndef SVG_H
#define SVG_H
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
const size_t IMAGE_WIDTH = 400;
const size_t IMAGE_HEIGHT = 300;
const size_t TEXT_LEFT = 20;
const size_t TEXT_BASELINE = 20;
const size_t TEXT_WIDTH = 50;
const size_t BIN_HEIGHT = 30;
namespace svg {
void begin(std::ostream& out, double width, double height);
void end(std::ostream& out);
void text(std::ostream& out, double left, double baseline, const std::string& text);
void rect(std::ostream& out, double x, double y, double width, double height,
const std::string& stroke = "black", const std::string& fill = "#dddddd");
void line(std::ostream& out, double x1, double y1, double x2, double y2,
const std::string& stroke, int dash_length, int gap_length);
void show_histogram_svg(std::ofstream& out, const std::vector<size_t>& bins, int dash_length, int gap_length);
}
#endif