Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
vite
Commits
2a729774
Commit
2a729774
authored
16 years ago
by
Pascal Noisette
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
7a159b0a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/src/render_svg.cpp
+3
-3
3 additions, 3 deletions
interface/src/render_svg.cpp
interface/src/render_svg.hpp
+4
-4
4 additions, 4 deletions
interface/src/render_svg.hpp
with
7 additions
and
7 deletions
interface/src/render_svg.cpp
+
3
−
3
View file @
2a729774
...
...
@@ -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\t
rect:hover
\n\t\t\t
{
\n\t\t\t\t
fill:#8fbbd0;
\n\t\t\t
}
\n\t
</style>
\n\t
<desc>Rectangles</desc>
\n
"
;
afficher
();
print
();
}
void
Svg
::
end
(){
...
...
This diff is collapsed.
Click to expand it.
interface/src/render_svg.hpp
+
4
−
4
View file @
2a729774
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment