Skip to content
Snippets Groups Projects
Commit 2530bfe1 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

gl2psLineWidth, PointSize

parent be20b69a
No related branches found
No related tags found
No related merge requests found
// $Id: Axes.cpp,v 1.3 2001-01-09 19:40:56 remacle Exp $
// $Id: Axes.cpp,v 1.4 2001-06-12 08:29:52 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
#include "Const.h"
#include "Mesh.h"
#include "Draw.h"
#include "Context.h"
#include "gl2ps.h"
extern Context_T CTX;
......@@ -21,7 +23,7 @@ void Draw_Axes (double s) {
b = .1 * s;
c = 0.666 * b;
glLineWidth(1.);
glLineWidth(1.); gl2psLineWidth(1.);
glColor4ubv((GLubyte*)&CTX.color.axes);
glBegin(GL_LINES);
......
// $Id: Geom.cpp,v 1.20 2001-06-11 12:05:02 geuzaine Exp $
// $Id: Geom.cpp,v 1.21 2001-06-12 08:29:52 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -11,6 +11,7 @@
#include "Numeric.h"
#include "Visibility.h"
#include "STL.h"
#include "gl2ps.h"
extern Context_T CTX;
extern Mesh *THEM;
......@@ -33,15 +34,15 @@ void Draw_GeoPoint (void *a, void *b){
}
if((*v)->Frozen){
glPointSize(5);
glPointSize(5); gl2psPointSize(5);
glColor4ubv((GLubyte*)&CTX.color.geom.point_sel);
}
else if(Highlighted){
glPointSize(5);
glPointSize(5); gl2psPointSize(5);
glColor4ubv((GLubyte*)&CTX.color.geom.point_hlt);
}
else{
glPointSize(3);
glPointSize(3); gl2psPointSize(3);
glColor4ubv((GLubyte*)&CTX.color.geom.point);
}
......@@ -87,15 +88,15 @@ void Draw_Curve (void *a, void *b){
}
if((c)->ipar[3]){
glLineWidth(2.);
glLineWidth(2.); gl2psLineWidth(2.);
glColor4ubv((GLubyte*)&CTX.color.geom.line_sel);
}
else if(Highlighted){
glLineWidth(2.);
glLineWidth(2.); gl2psLineWidth(2.);
glColor4ubv((GLubyte*)&CTX.color.geom.line_hlt);
}
else{
glLineWidth(1.);
glLineWidth(1.); gl2psLineWidth(1.);
glColor4ubv((GLubyte*)&CTX.color.geom.line);
}
......@@ -659,15 +660,15 @@ void Draw_Surface (void *a, void *b){
if(!CTX.geom.shade){
if(s->Mat){
glLineWidth(2.);
glLineWidth(2.); gl2psLineWidth(2.);
glColor4ubv((GLubyte*)&CTX.color.geom.surface_sel);
}
else if (Highlighted){
glLineWidth(2.);
glLineWidth(2.); gl2psLineWidth(2.);
glColor4ubv((GLubyte*)&CTX.color.geom.surface_hlt);
}
else{
glLineWidth(1.);
glLineWidth(1.); gl2psLineWidth(1.);
glColor4ubv((GLubyte*)&CTX.color.geom.surface);
}
glEnable(GL_LINE_STIPPLE);
......@@ -711,7 +712,7 @@ void Draw_Curve_For_Volume (void *a, void *b){
Curve *c;
Vertex v;
glLineWidth(2.);
glLineWidth(2.); gl2psLineWidth(2.);
c = *(Curve**)a;
......@@ -745,7 +746,7 @@ void Draw_Curve_For_Volume (void *a, void *b){
}
if((c)->ipar[3]){
glLineWidth(1.);
glLineWidth(1.); gl2psLineWidth(1.);
}
}
......
// $Id: Mesh.cpp,v 1.29 2001-06-03 11:27:25 geuzaine Exp $
// $Id: Mesh.cpp,v 1.30 2001-06-12 08:29:52 geuzaine Exp $
#include "Gmsh.h"
#include "GmshUI.h"
......@@ -68,8 +68,8 @@ void Draw_Mesh (Mesh *M) {
if(CTX.clip[i])
glClipPlane((GLenum)(GL_CLIP_PLANE0 + i), CTX.clip_plane[i]);
glPointSize(2);
glLineWidth(1);
glPointSize(2); gl2psPointSize(2);
glLineWidth(1); gl2psLineWidth(1);
iColor = 0;
if(CTX.mesh.hidden) glEnable(GL_POLYGON_OFFSET_FILL);
......@@ -104,7 +104,7 @@ void Draw_Mesh (Mesh *M) {
DrawVertexSupp = 0 ;
Tree_Action(M->Vertices,Draw_Mesh_Points);
}
glPointSize(4);
glPointSize(4); gl2psPointSize(4);
if(!CTX.geom.shade) InitNoShading();
Draw_Geom(M);
break;
......@@ -160,7 +160,7 @@ void Draw_Mesh_Points (void *a, void *b){
glPushName((*v)->Num);
}
glPointSize(3);
glPointSize(3); gl2psPointSize(3);
if(DrawVertexSupp)
glColor4ubv((GLubyte*)&CTX.color.mesh.vertex_supp);
else
......
......@@ -2,7 +2,7 @@
* GL2PS, an OpenGL to Postscript Printing Library
* Copyright (C) 1999-2001 Christophe Geuzaine
*
* $Id: gl2ps.cpp,v 1.18 2001-06-12 07:32:23 geuzaine Exp $
* $Id: gl2ps.cpp,v 1.19 2001-06-12 08:29:52 geuzaine Exp $
*
* E-mail: Christophe.Geuzaine@AdValvas.be
* URL: http://www.geuz.org/gl2ps/
......@@ -897,7 +897,7 @@ GLvoid gl2psAddPolyPrimitive(GLshort type, GLshort numverts,
prim->depth = 0.;
prim->dash = dash;
prim->width = width;
prim->width = width; /* we should maybe use floats */
if(gl2ps.sort == GL2PS_SIMPLE_SORT){
for(i = 0; i < numverts; i++)
......@@ -1026,12 +1026,12 @@ GLint gl2psParseFeedbackBuffer(GLvoid){
case GL2PS_SET_POINT_SIZE :
current+=2;
used-=2;
psize=(GLint)current[1];
psize=(GLint)current[1];
break;
case GL2PS_SET_LINE_WIDTH :
current+=2;
used-=2;
lwidth=(GLint)current[1];
lwidth=(GLint)current[1];
break;
}
current += 2;
......@@ -1172,7 +1172,7 @@ GLvoid gl2psPrintPostscriptPrimitive(GLvoid *a, GLvoid *b){
break;
case GL2PS_POINT :
fprintf(gl2ps.stream, "%g %g %g %g %g %g P\n",
prim->verts[0].xyz[0], prim->verts[0].xyz[1], 1.0*prim->width,
prim->verts[0].xyz[0], prim->verts[0].xyz[1], 0.5*prim->width,
prim->verts[0].rgba[0], prim->verts[0].rgba[1], prim->verts[0].rgba[2]);
break;
case GL2PS_LINE :
......@@ -1185,14 +1185,14 @@ GLvoid gl2psPrintPostscriptPrimitive(GLvoid *a, GLvoid *b){
prim->verts[1].rgba[2], prim->verts[0].xyz[0],
prim->verts[0].xyz[1], prim->verts[0].rgba[0],
prim->verts[0].rgba[1], prim->verts[0].rgba[2],
0.2*prim->width);
0.5*prim->width);
}
else{
fprintf(gl2ps.stream, "%g %g %g %g %g %g %g %g L\n",
prim->verts[1].xyz[0], prim->verts[1].xyz[1],
prim->verts[0].xyz[0], prim->verts[0].xyz[1],
prim->verts[0].rgba[0], prim->verts[0].rgba[1],
prim->verts[0].rgba[2], 0.2*prim->width);
prim->verts[0].rgba[2], 0.5*prim->width);
}
if(prim->dash)
fprintf(gl2ps.stream, "[] 0 setdash\n");
......@@ -1414,12 +1414,12 @@ GLvoid gl2psDisable(GLint mode){
}
}
GLvoid gl2psPointSize(GLint value){
GLvoid gl2psPointSize(GLfloat value){
glPassThrough(GL2PS_SET_POINT_SIZE);
glPassThrough(value);
}
GLvoid gl2psLineWidth(GLint value){
GLvoid gl2psLineWidth(GLfloat value){
glPassThrough(GL2PS_SET_LINE_WIDTH);
glPassThrough(value);
}
......@@ -2,7 +2,7 @@
* GL2PS, an OpenGL to Postscript Printing Library
* Copyright (C) 1999-2001 Christophe Geuzaine
*
* $Id: gl2ps.h,v 1.10 2001-06-12 07:27:32 geuzaine Exp $
* $Id: gl2ps.h,v 1.11 2001-06-12 08:29:52 geuzaine Exp $
*
* E-mail: Christophe.Geuzaine@AdValvas.be
* URL: http://www.geuz.org/gl2ps/
......@@ -162,7 +162,7 @@ GLint gl2psEndPage(GLvoid);
GLvoid gl2psText(char *str, char *fontname, GLint size);
GLvoid gl2psEnable(GLint mode);
GLvoid gl2psDisable(GLint mode);
GLvoid gl2psPointSize(GLint value);
GLvoid gl2psLineWidth(GLint value);
GLvoid gl2psPointSize(GLfloat value);
GLvoid gl2psLineWidth(GLfloat value);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment