Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2a729774 authored by Pascal Noisette's avatar Pascal Noisette
Browse files

No commit message

No commit message
parent 7a159b0a
Branches
Tags
No related merge requests found
......@@ -10,11 +10,11 @@ void Svg::rectangle(){
<<"' y='" << _y
<<"' fill='rgb("<<_r<<","<<_g<<","<<_b
<<")'/>";
afficher();
print();
}
void Svg::afficher(){
void Svg::print(){
if (_buffer.str().size()>BUFFER_SIZE){
_svg_file.write(_buffer.str().c_str(), _buffer.str().size());
......@@ -32,7 +32,7 @@ void Svg::init(const char *path){
std::cerr<<"unable to open file";
}
_buffer << "<?xml version='1.0' encoding='utf-8' standalone='no'?>\n<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>\n<svg xmlns='http://www.w3.org/2000/svg' x='0' y='0' width='1280' height='728' id='svg2'>\n\t<style type='text/css' id='stylecss' >\n\t\trect:hover\n\t\t\t{\n\t\t\t\tfill:#8fbbd0;\n\t\t\t}\n\t</style>\n\t<desc>Rectangles</desc>\n";
afficher();
print();
}
void Svg::end(){
......
......@@ -7,8 +7,8 @@
#include <sstream>
#include <fstream>
#define BUFFER_SIZE 2048
#define LEVEL 110
#define BUFFER_SIZE 2048 //character number stored before flush the _buffer
#define LEVEL 110 //distance between two containers
typedef unsigned long Element_count ;
typedef double Element_pos;
......@@ -23,8 +23,8 @@ private:
std::ofstream _svg_file;
unsigned int _r,_g,_b;
unsigned long _x,_y,_w,_h;
void afficher();
void rectangle();
void print();
inline void rectangle();
public:
/*!
* \brief SVG header buiding
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment