From 31b87f07deeb62d1ae7d6e11c78e237b36576e13 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 28 Jun 2001 17:42:08 +0000 Subject: [PATCH] mesh_line_with and posy_line_width --- Common/Context.h | 2 +- Common/DefaultOptions.h | 6 +++++- Common/Options.cpp | 12 +++++++++++- Common/Options.h | 2 ++ Graphics/Mesh.cpp | 7 ++----- Graphics/Post.cpp | 6 +++++- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Common/Context.h b/Common/Context.h index 98d8018aa0..45f2ccf774 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 ff337121df..badcf9756a 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 5128826d31..91fbb93c01 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 3663cf65e3..975b5b6013 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 066b966881..db2545bc9a 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 da4040c513..f0b9d6e8cd 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); -- GitLab