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
7e95e72b
Commit
7e95e72b
authored
22 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Upgrade to latest gl2ps version
parent
095f7550
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Graphics/CreateFile.cpp
+7
-7
7 additions, 7 deletions
Graphics/CreateFile.cpp
Graphics/gl2ps.cpp
+530
-149
530 additions, 149 deletions
Graphics/gl2ps.cpp
Graphics/gl2ps.h
+33
-21
33 additions, 21 deletions
Graphics/gl2ps.h
with
570 additions
and
177 deletions
Graphics/CreateFile.cpp
+
7
−
7
View file @
7e95e72b
// $Id: CreateFile.cpp,v 1.
39
2003-03-0
2 05:31:45
geuzaine Exp $
// $Id: CreateFile.cpp,v 1.
40
2003-03-0
7 18:53:21
geuzaine Exp $
//
// Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -216,11 +216,11 @@ void CreateOutputFile(char *name, int format)
size3d
=
0
;
res
=
GL2PS_OVERFLOW
;
while
(
res
==
GL2PS_OVERFLOW
)
{
size3d
+=
2048
*
2048
;
gl2psBeginPage
(
CTX
.
base_filename
,
"Gmsh"
,
psformat
,
pssort
,
psoptions
,
GL_RGBA
,
0
,
NULL
,
size3d
,
fp
,
name
);
gl2psBeginPage
(
CTX
.
base_filename
,
"Gmsh"
,
CTX
.
viewport
,
psformat
,
pssort
,
psoptions
,
GL_RGBA
,
0
,
NULL
,
0
,
0
,
0
,
size3d
,
fp
,
name
);
CTX
.
print
.
gl_fonts
=
0
;
FillBuffer
();
CTX
.
print
.
gl_fonts
=
1
;
...
...
@@ -236,9 +236,9 @@ void CreateOutputFile(char *name, int format)
Msg
(
GERROR
,
"Unable to open file '%s'"
,
name
);
return
;
}
gl2psBeginPage
(
CTX
.
base_filename
,
"Gmsh"
,
GL2PS_TEX
,
GL2PS_NO_SORT
,
0
,
GL_RGBA
,
0
,
NULL
,
1
,
fp
,
name
);
gl2psBeginPage
(
CTX
.
base_filename
,
"Gmsh"
,
CTX
.
viewport
,
GL2PS_TEX
,
GL2PS_NO_SORT
,
GL2PS_NONE
,
GL_RGBA
,
0
,
NULL
,
0
,
0
,
0
,
1
,
fp
,
name
);
CTX
.
print
.
gl_fonts
=
0
;
FillBuffer
();
CTX
.
print
.
gl_fonts
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Graphics/gl2ps.cpp
+
530
−
149
View file @
7e95e72b
This diff is collapsed.
Click to expand it.
Graphics/gl2ps.h
+
33
−
21
View file @
7e95e72b
...
...
@@ -2,7 +2,7 @@
* GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2003 Christophe Geuzaine
*
* $Id: gl2ps.h,v 1.3
6
2003-03-0
1 22:34:18
geuzaine Exp $
* $Id: gl2ps.h,v 1.3
7
2003-03-0
7 18:53:21
geuzaine Exp $
*
* E-mail: geuz@geuz.org
* URL: http://www.geuz.org/gl2ps/
...
...
@@ -55,7 +55,7 @@
#endif
#define GL2PS_VERSION 0.
74
#define GL2PS_VERSION 0.
8
#define GL2PS_NONE 0
/* Output file format */
...
...
@@ -80,6 +80,7 @@
#define GL2PS_NO_TEXT (1<<5)
#define GL2PS_LANDSCAPE (1<<6)
#define GL2PS_NO_PS3_SHADING (1<<7)
#define GL2PS_NO_PIXMAP (1<<8)
/* Arguments for gl2psEnable/gl2psDisable */
...
...
@@ -96,17 +97,15 @@
#define GL2PS_ZERO(arg) (fabs(arg)<1.e-20)
/*#define GL2PS_ZERO(arg) ((arg)==0.0)*/
/* Message levels */
/* Message levels
and error codes
*/
#define GL2PS_SUCCESS 0
#define GL2PS_INFO 1
#define GL2PS_WARNING 2
#define GL2PS_ERROR 3
/* Error codes */
#define GL2PS_SUCCESS 0
#define GL2PS_NO_FEEDBACK -1
#define GL2PS_OVERFLOW -2
#define GL2PS_NO_FEEDBACK 4
#define GL2PS_OVERFLOW 5
#define GL2PS_UNINITIALIZED 6
/* Primitive types */
...
...
@@ -115,6 +114,7 @@
#define GL2PS_LINE 3
#define GL2PS_QUADRANGLE 4
#define GL2PS_TRIANGLE 5
#define GL2PS_PIXMAP 6
/* BSP tree primitive comparison */
...
...
@@ -174,12 +174,19 @@ typedef struct {
char
*
str
,
*
fontname
;
}
GL2PSstring
;
typedef
struct
{
GLsizei
width
,
height
;
GLenum
format
,
type
;
GLfloat
*
pixels
;
}
GL2PSimage
;
typedef
struct
{
GLshort
type
,
numverts
;
char
boundary
,
dash
,
culled
;
GLfloat
width
,
depth
;
GL2PSvertex
*
verts
;
GL2PSstring
*
text
;
GL2PSimage
*
image
;
}
GL2PSprimitive
;
typedef
struct
{
...
...
@@ -187,32 +194,37 @@ typedef struct {
const
char
*
title
,
*
producer
,
*
filename
;
GLboolean
shade
,
boundary
;
GLfloat
*
feedback
,
offset
[
2
];
GLint
viewport
[
4
];
GL2PSrgba
*
colormap
,
lastrgba
,
threshold
;
float
lastlinewidth
;
GL2PSlist
*
primitives
;
GL2PSbsptree2d
*
image
;
GL2PSbsptree2d
*
image
tree
;
FILE
*
stream
;
}
GL2PScontext
;
/* public functions */
#ifdef __cplusplus
extern
"C"
{
#endif
GL2PSDLL_API
void
gl2psBeginPage
(
const
char
*
title
,
const
char
*
producer
,
GLint
format
,
GLint
sort
,
GLint
options
,
GLint
colormode
,
GLint
colorsize
,
GL2PSrgba
*
colormap
,
GLint
buffersize
,
GL2PSDLL_API
GLint
gl2psBeginPage
(
const
char
*
title
,
const
char
*
producer
,
GLint
viewport
[
4
],
GLint
format
,
GLint
sort
,
GLint
options
,
GLint
colormode
,
GLint
colorsize
,
GL2PSrgba
*
colormap
,
GLint
nr
,
GLint
ng
,
GLint
nb
,
GLint
buffersize
,
FILE
*
stream
,
const
char
*
filename
);
GL2PSDLL_API
GLint
gl2psEndPage
(
void
);
GL2PSDLL_API
void
gl2psText
(
const
char
*
str
,
const
char
*
fontname
,
GLshort
fontsize
);
GL2PSDLL_API
void
gl2psEnable
(
GLint
mode
);
GL2PSDLL_API
void
gl2psDisable
(
GLint
mode
);
GL2PSDLL_API
void
gl2psPointSize
(
GLfloat
value
);
GL2PSDLL_API
void
gl2psLineWidth
(
GLfloat
value
);
GL2PSDLL_API
void
gl2psNumShadeColors
(
GLint
nr
,
GLint
ng
,
GLint
nb
);
GL2PSDLL_API
GLint
gl2psBeginViewport
(
GLint
viewport
[
4
]);
GL2PSDLL_API
GLint
gl2psEndViewport
(
void
);
GL2PSDLL_API
GLint
gl2psText
(
const
char
*
str
,
const
char
*
fontname
,
GLshort
fontsize
);
GL2PSDLL_API
GLint
gl2psDrawPixels
(
GLsizei
width
,
GLsizei
height
,
GLint
xorig
,
GLint
yorig
,
GLenum
format
,
GLenum
type
,
const
void
*
pixels
);
GL2PSDLL_API
GLint
gl2psEnable
(
GLint
mode
);
GL2PSDLL_API
GLint
gl2psDisable
(
GLint
mode
);
GL2PSDLL_API
GLint
gl2psPointSize
(
GLfloat
value
);
GL2PSDLL_API
GLint
gl2psLineWidth
(
GLfloat
value
);
#ifdef __cplusplus
};
...
...
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