diff --git a/Common/Context.h b/Common/Context.h index ad885c8adc0ad22c5074802fee202ca9f5dca159..98d8018aa0d2483b0672f4bfaf1e0bef9f09374b 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -164,7 +164,8 @@ public : int jpeg_quality; int gif_dither, gif_sort, gif_interlace, gif_transparent; char *font; - int font_size, gl_fonts; + int font_size, gl_fonts; + int geom_line_width; } print; // color options diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 35af79ed25f09113e6754dae09771a4e6339af71..71e7924a256f7528af5ffefd33a3bc9415ef1761 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -505,6 +505,8 @@ StringXNumber PrintOptions_Number[] = { "Output transparent GIF image" }, { F|O, "FontSize" , opt_print_font_size , 12. , "Font size used for postscript printing" }, + { F|O, "GeometryLineWidth" , opt_print_geom_line_width , 4. , + "Width factor for geometry lines in postscript output" }, { 0, NULL , NULL , 0. } } ; diff --git a/Common/Options.cpp b/Common/Options.cpp index 4cb161929281bb6e6c7686e594dcb648605023d3..5128826d31935f8f405f537a08001fb73c00e928 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.29 2001-06-26 16:47:23 geuzaine Exp $ +// $Id: Options.cpp,v 1.30 2001-06-28 15:16:09 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -1992,6 +1992,11 @@ double opt_print_font_size(OPT_ARGS_NUM){ CTX.print.font_size = (int)val; return CTX.print.font_size; } +double opt_print_geom_line_width(OPT_ARGS_NUM){ + if(action & GMSH_SET) + CTX.print.geom_line_width = (int)val; + return CTX.print.geom_line_width; +} // ************** Color option routines **************************** diff --git a/Common/Options.h b/Common/Options.h index 28bdb1a9e1774cb9419f8beff7351d0ded8104f6..3663cf65e3aef8390f728bdfae476a534c3ce138 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -232,6 +232,7 @@ double opt_print_gif_sort(OPT_ARGS_NUM); double opt_print_gif_interlace(OPT_ARGS_NUM); double opt_print_gif_transparent(OPT_ARGS_NUM); double opt_print_font_size(OPT_ARGS_NUM); +double opt_print_geom_line_width(OPT_ARGS_NUM); // COLORS diff --git a/Graphics/Geom.cpp b/Graphics/Geom.cpp index cd8e094cd7709acd7a6460fceffbf9a25a7e19f9..24ccad36691a269382aa15d4cc997af394b15c42 100644 --- a/Graphics/Geom.cpp +++ b/Graphics/Geom.cpp @@ -1,4 +1,4 @@ -// $Id: Geom.cpp,v 1.21 2001-06-12 08:29:52 geuzaine Exp $ +// $Id: Geom.cpp,v 1.22 2001-06-28 15:16:09 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -88,15 +88,15 @@ void Draw_Curve (void *a, void *b){ } if((c)->ipar[3]){ - glLineWidth(2.); gl2psLineWidth(2.); + glLineWidth(2.); gl2psLineWidth(2.*CTX.print.geom_line_width); glColor4ubv((GLubyte*)&CTX.color.geom.line_sel); } else if(Highlighted){ - glLineWidth(2.); gl2psLineWidth(2.); + glLineWidth(2.); gl2psLineWidth(2.*CTX.print.geom_line_width); glColor4ubv((GLubyte*)&CTX.color.geom.line_hlt); } else{ - glLineWidth(1.); gl2psLineWidth(1.); + glLineWidth(1.); gl2psLineWidth(1.*CTX.print.geom_line_width); glColor4ubv((GLubyte*)&CTX.color.geom.line); } diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index 77be47871d0e06a273f685f838fa4680fe564cdc..066b966881fc5906634dd07fb6398a995af219d0 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.31 2001-06-25 13:05:16 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.32 2001-06-28 15:16:09 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -116,6 +116,9 @@ void Draw_Mesh (Mesh *M) { if(CTX.mesh.hidden) glDisable(GL_POLYGON_OFFSET_FILL); + glPointSize(2); gl2psPointSize(2); + glLineWidth(1); gl2psLineWidth(1); + if(CTX.render_mode != GMSH_SELECT){ if(CTX.axes) Draw_Axes(CTX.lc_middle/4.); Draw_Post(); // les init de shading se font par view diff --git a/Graphics/gl2ps.cpp b/Graphics/gl2ps.cpp index 8c591907a7760cd2caf14057e03ec3d98e6ba53b..cdbdcda353f1b7d2ea0b98fd7f141840952db854 100644 --- a/Graphics/gl2ps.cpp +++ b/Graphics/gl2ps.cpp @@ -5,7 +5,7 @@ * GL2PS, an OpenGL to Postscript Printing Library * Copyright (C) 1999-2001 Christophe Geuzaine * - * $Id: gl2ps.cpp,v 1.23 2001-06-27 13:52:53 geuzaine Exp $ + * $Id: gl2ps.cpp,v 1.24 2001-06-28 15:16:09 geuzaine Exp $ * * E-mail: Christophe.Geuzaine@AdValvas.be * URL: http://www.geuz.org/gl2ps/ @@ -1188,14 +1188,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.3*prim->width); + 0.2*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.3*prim->width); + prim->verts[0].rgba[2], 0.2*prim->width); } if(prim->dash) fprintf(gl2ps.stream, "[] 0 setdash\n");