Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
vite
Commits
143a51ff
Commit
143a51ff
authored
Mar 05, 2009
by
Pascal Noisette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
message_ns::message dans l'export
parent
34712093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
src/interface/render_svg.cpp
src/interface/render_svg.cpp
+28
-2
tests/interface/makefile
tests/interface/makefile
+2
-2
No files found.
src/interface/render_svg.cpp
View file @
143a51ff
#include "render_svg.hpp"
#include "../message/message_ns.hpp"
using
namespace
std
;
void
Svg
::
init
(
const
char
*
path
){
_svg_file
.
open
(
path
,
std
::
ofstream
::
out
|
std
::
ofstream
::
trunc
);
if
(
_svg_file
.
is_open
()
==
false
){
std
::
cerr
<<
"unable to open file"
;
#ifdef TEST_SVG_MODE
std
::
cerr
<<
"unable to open file"
;
#else
// message_ns::message << "unable to open file " << message_ns::ende;
#endif
}
#ifndef TEST_SVG_MODE
//message_ns::message << "openning " << message_ns::endi;
#endif
#ifdef TEST_SVG_MODE
std
::
cout
<<
"openning "
<<
path
<<
endl
;
#else
//message_ns::message << "openning " << message_ns::endi;
#endif
_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
"
...
...
@@ -34,4 +51,13 @@ void Svg::end(){
_svg_file
.
write
(
_buffer
.
str
().
c_str
(),
_buffer
.
str
().
size
());
_buffer
.
flush
();
_svg_file
.
close
();
#ifdef TEST_SVG_MODE
std
::
cout
<<
"output written"
<<
endl
;
#else
//message_ns::message << "output written" << message_ns::endi;
#endif
}
tests/interface/makefile
View file @
143a51ff
test_svg.o
:
test_svg.cpp
render_svg.o
:
../../src/interface/render_svg.cpp ../../src/interface/render_svg.hpp
g++
-g
-c
-Wall
../../src/interface/render_svg.cpp
-o
render_svg.o
g++
-
DTEST_SVG_MODE
-
g
-c
-Wall
../../src/interface/render_svg.cpp
-o
render_svg.o
test_svg
:
render_svg.o test_svg.o
g++
-g
-o
test_svg render_svg.o test_svg.o
\ No newline at end of file
g++
-DTEST_SVG_MODE
-g
-o
test_svg render_svg.o test_svg.o
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment