diff --git a/Common/Context.h b/Common/Context.h index 98d8018aa0d2483b0672f4bfaf1e0bef9f09374b..45f2ccf774dc80488dcbff158ba440f986963324 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -165,7 +165,7 @@ public : int gif_dither, gif_sort, gif_interlace, gif_transparent; char *font; int font_size, gl_fonts; - int geom_line_width; + int geom_line_width, mesh_line_width, post_line_width; } print; // color options diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index ff337121df1f19cb46d00402737a33585beec7a0..badcf9756a4953438d996128e9397daa8d3b9987 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -505,8 +505,12 @@ 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 , 1. , + { F|O, "GeometryLineWidth" , opt_print_geom_line_width , 2. , "Width factor for geometry lines in postscript output (10 looks nice for geometry+mesh display)" }, + { F|O, "MeshLineWidth" , opt_print_mesh_line_width , 1. , + "Width factor for mesh lines in postscript output (1 looks nice for geometry+mesh display)" }, + { F|O, "PostProcessingLineWidth" , opt_print_post_line_width , 2. , + "Width factor for post-processing lines in postscript output" }, { 0, NULL , NULL , 0. } } ; diff --git a/Common/Options.cpp b/Common/Options.cpp index 5128826d31935f8f405f537a08001fb73c00e928..91fbb93c016fb30b6430e86ea7cf7bae8424fe35 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.30 2001-06-28 15:16:09 geuzaine Exp $ +// $Id: Options.cpp,v 1.31 2001-06-28 17:42:08 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -1997,6 +1997,16 @@ double opt_print_geom_line_width(OPT_ARGS_NUM){ CTX.print.geom_line_width = (int)val; return CTX.print.geom_line_width; } +double opt_print_mesh_line_width(OPT_ARGS_NUM){ + if(action & GMSH_SET) + CTX.print.mesh_line_width = (int)val; + return CTX.print.mesh_line_width; +} +double opt_print_post_line_width(OPT_ARGS_NUM){ + if(action & GMSH_SET) + CTX.print.post_line_width = (int)val; + return CTX.print.post_line_width; +} // ************** Color option routines **************************** diff --git a/Common/Options.h b/Common/Options.h index 3663cf65e3aef8390f728bdfae476a534c3ce138..975b5b6013ad6dc07cdf1176ef27664bb934f305 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -233,6 +233,8 @@ 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); +double opt_print_mesh_line_width(OPT_ARGS_NUM); +double opt_print_post_line_width(OPT_ARGS_NUM); // COLORS diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp index 066b966881fc5906634dd07fb6398a995af219d0..db2545bc9a9dddec23c16a055791208f8c2c5e7b 100644 --- a/Graphics/Mesh.cpp +++ b/Graphics/Mesh.cpp @@ -1,4 +1,4 @@ -// $Id: Mesh.cpp,v 1.32 2001-06-28 15:16:09 geuzaine Exp $ +// $Id: Mesh.cpp,v 1.33 2001-06-28 17:42:08 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -69,7 +69,7 @@ void Draw_Mesh (Mesh *M) { glClipPlane((GLenum)(GL_CLIP_PLANE0 + i), CTX.clip_plane[i]); glPointSize(2); gl2psPointSize(2); - glLineWidth(1); gl2psLineWidth(1); + glLineWidth(1); gl2psLineWidth(1*CTX.print.mesh_line_width); iColor = 0; if(CTX.mesh.hidden) glEnable(GL_POLYGON_OFFSET_FILL); @@ -116,9 +116,6 @@ 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/Post.cpp b/Graphics/Post.cpp index da4040c513795ce34f020e4f287c8d1dda64d1c2..f0b9d6e8cdc69580e9a7f9a86affdd2deb9e6645 100644 --- a/Graphics/Post.cpp +++ b/Graphics/Post.cpp @@ -1,4 +1,4 @@ -// $Id: Post.cpp,v 1.15 2001-04-22 18:13:02 geuzaine Exp $ +// $Id: Post.cpp,v 1.16 2001-06-28 17:42:08 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -7,6 +7,7 @@ #include "Draw.h" #include "Views.h" #include "Context.h" +#include "gl2ps.h" extern Context_T CTX; @@ -92,6 +93,9 @@ void Draw_Post (void) { if(!Post_ViewList) return; + glPointSize(2); gl2psPointSize(2); + glLineWidth(1); gl2psLineWidth(1*CTX.print.post_line_width); + if(!CTX.post.draw){ // draw only the bbox of the visible views for(iView=0 ; iView<List_Nbr(Post_ViewList) ; iView++){ v = (Post_View*)List_Pointer(Post_ViewList,iView);