Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
28 строки
771 B
C++
28 строки
771 B
C++
#ifndef SVG_H
|
|
#define SVG_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
|
|
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;
|
|
const size_t BLOCK_WIDTH = 10;
|
|
|
|
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 show_histogram_svg(std::ostream& out, const std::vector<size_t>& bins);
|
|
}
|
|
|
|
#endif
|