Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
94c8183f
Commit
94c8183f
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
new PGF output format contributed by Sebastian Eiser
parent
454d5ac6
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Common/CreateFile.cpp
+13
-2
13 additions, 2 deletions
Common/CreateFile.cpp
Graphics/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Graphics/CMakeLists.txt
Graphics/gl2pgf.cpp
+685
-0
685 additions, 0 deletions
Graphics/gl2pgf.cpp
Graphics/gl2pgf.h
+15
-0
15 additions, 0 deletions
Graphics/gl2pgf.h
with
714 additions
and
2 deletions
Common/CreateFile.cpp
+
13
−
2
View file @
94c8183f
...
...
@@ -6,7 +6,6 @@
#include
"GmshConfig.h"
#include
"GmshMessage.h"
#include
"GModel.h"
#include
"PView.h"
#include
"GmshDefines.h"
#include
"StringUtils.h"
#include
"Context.h"
...
...
@@ -27,6 +26,7 @@
#include
"gl2png.h"
#include
"gl2ppm.h"
#include
"gl2yuv.h"
#include
"gl2pgf.h"
#endif
int
GetFileFormatFromExtension
(
const
std
::
string
&
ext
)
...
...
@@ -61,6 +61,7 @@ int GetFileFormatFromExtension(const std::string &ext)
else
if
(
ext
==
".mpg"
)
return
FORMAT_MPEG
;
else
if
(
ext
==
".mpeg"
)
return
FORMAT_MPEG
;
else
if
(
ext
==
".png"
)
return
FORMAT_PNG
;
else
if
(
ext
==
".pgf"
)
return
FORMAT_PGF
;
else
if
(
ext
==
".ps"
)
return
FORMAT_PS
;
else
if
(
ext
==
".eps"
)
return
FORMAT_EPS
;
else
if
(
ext
==
".pdf"
)
return
FORMAT_PDF
;
...
...
@@ -112,6 +113,7 @@ std::string GetDefaultFileName(int format)
case
FORMAT_JPEG
:
name
+=
".jpg"
;
break
;
case
FORMAT_MPEG
:
name
+=
".mpg"
;
break
;
case
FORMAT_PNG
:
name
+=
".png"
;
break
;
case
FORMAT_PGF
:
name
+=
".todo"
;
break
;
case
FORMAT_PS
:
name
+=
".ps"
;
break
;
case
FORMAT_EPS
:
name
+=
".eps"
;
break
;
case
FORMAT_PDF
:
name
+=
".pdf"
;
break
;
...
...
@@ -523,6 +525,16 @@ void CreateOutputFile(const std::string &fileName, int format,
}
break
;
case
FORMAT_PGF
:
{
if
(
!
FlGui
::
available
())
break
;
PixelBuffer
*
buffer
=
GetCompositePixelBuffer
(
GL_RGB
,
GL_UNSIGNED_BYTE
);
drawContext
*
ctx
=
FlGui
::
instance
()
->
getCurrentOpenglWindow
()
->
getDrawContext
();
print_pgf
(
name
,
buffer
,
ctx
->
r
,
ctx
->
viewport
,
ctx
->
proj
,
ctx
->
model
);
delete
buffer
;
}
break
;
#if defined(HAVE_MPEG_ENCODE)
case
FORMAT_MPEG
:
case
FORMAT_MPEG_PREVIEW
:
...
...
@@ -634,4 +646,3 @@ void CreateOutputFile(const std::string &fileName, int format,
if
(
redraw
)
drawContext
::
global
()
->
draw
();
#endif
}
This diff is collapsed.
Click to expand it.
Graphics/CMakeLists.txt
+
1
−
0
View file @
94c8183f
...
...
@@ -21,6 +21,7 @@ set(SRC
gl2png.cpp
gl2ppm.cpp
gl2yuv.cpp
gl2pgf.cpp
)
file
(
GLOB HDR RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.h
)
...
...
This diff is collapsed.
Click to expand it.
Graphics/gl2pgf.cpp
0 → 100644
+
685
−
0
View file @
94c8183f
This diff is collapsed.
Click to expand it.
Graphics/gl2pgf.h
0 → 100644
+
15
−
0
View file @
94c8183f
// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
#ifndef _GL2PGF_H_
#define _GL2PGF_H_
#include
<string>
#include
"PixelBuffer.h"
int
print_pgf
(
const
std
::
string
&
name
,
PixelBuffer
*
buffer
,
double
*
eulerAngles
,
int
*
viewport
,
double
*
proj
,
double
*
model
);
#endif
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