From 50ff19b0b0f743719203be027ee34fc8f80763e6 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 19 Nov 2001 13:48:19 +0000 Subject: [PATCH] suppressed the horrible TO_SCREEN TO_FILE --- Common/Context.h | 1 - Common/Options.cpp | 3 +-- Fltk/Opengl.cpp | 3 ++- Graphics/CreateFile.cpp | 6 +----- Graphics/Draw.h | 3 --- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Common/Context.h b/Common/Context.h index e4b2c13571..daf889dc67 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -72,7 +72,6 @@ public : int db; // double buffer? int overlay; // overlay graphic window? - int stream; // output stream: TO_SCREEN or TO_FILE int ortho; // orthogonal projection? int fast; // inhibit mesh and postpro drawing when changing r,s,t int command_win; // command window? diff --git a/Common/Options.cpp b/Common/Options.cpp index df3d24bcb2..c28d7b4dbc 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.63 2001-11-19 13:43:33 geuzaine Exp $ +// $Id: Options.cpp,v 1.64 2001-11-19 13:48:19 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -78,7 +78,6 @@ void Init_Options(int num){ CTX.mesh.initial_only = 0 ; CTX.output_filename = NULL ; CTX.expose = 0 ; - CTX.stream = TO_SCREEN ; CTX.lc = 1.0 ; CTX.viewport[0] = CTX.viewport[1] = 0 ; CTX.min[0] = CTX.min[1] = CTX.min[2] = 0.0 ; diff --git a/Fltk/Opengl.cpp b/Fltk/Opengl.cpp index d4aa7518a9..587a89a3b2 100644 --- a/Fltk/Opengl.cpp +++ b/Fltk/Opengl.cpp @@ -1,4 +1,4 @@ -// $Id: Opengl.cpp,v 1.25 2001-11-19 13:43:33 geuzaine Exp $ +// $Id: Opengl.cpp,v 1.26 2001-11-19 13:48:19 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -57,6 +57,7 @@ void Draw_String(char *s){ gl_draw(s); } else{ // ps, pstex or jpegtex output + if(CTX.print.format == FORMAT_JPEGTEX) return; gl2psText(s,CTX.print.eps_font,CTX.print.eps_font_size); } } diff --git a/Graphics/CreateFile.cpp b/Graphics/CreateFile.cpp index a112248166..8582555efe 100644 --- a/Graphics/CreateFile.cpp +++ b/Graphics/CreateFile.cpp @@ -1,4 +1,4 @@ -// $Id: CreateFile.cpp,v 1.25 2001-11-19 13:43:33 geuzaine Exp $ +// $Id: CreateFile.cpp,v 1.26 2001-11-19 13:48:19 geuzaine Exp $ #include "Gmsh.h" #include "GmshUI.h" @@ -162,11 +162,9 @@ void CreateOutputFile (char *name, int format) { (CTX.print.eps_background ? GL2PS_DRAW_BACKGROUND : 0) | (format==FORMAT_PSTEX ? GL2PS_NO_TEXT : 0), GL_RGBA, 0, NULL, size3d, fp, name); - CTX.stream = TO_FILE ; CTX.print.gl_fonts = 0; FillBuffer(); CTX.print.gl_fonts = 1; - CTX.stream = TO_SCREEN ; res = gl2psEndPage(); } Msg(INFO, "EPS creation complete '%s'", name); @@ -182,11 +180,9 @@ void CreateOutputFile (char *name, int format) { gl2psBeginPage(CTX.base_filename, "Gmsh", GL2PS_TEX, GL2PS_NO_SORT, 0, GL_RGBA, 0, NULL, 1, fp, name); - CTX.stream = TO_FILE ; CTX.print.gl_fonts = 0; FillBuffer(); CTX.print.gl_fonts = 1; - CTX.stream = TO_SCREEN ; res = gl2psEndPage(); Msg(INFO, "TEX creation complete '%s'", name); Msg(STATUS2, "Wrote '%s'", name); diff --git a/Graphics/Draw.h b/Graphics/Draw.h index 395a5136ab..3cc47c267e 100644 --- a/Graphics/Draw.h +++ b/Graphics/Draw.h @@ -9,9 +9,6 @@ #define SELECTION_BUFFER_SIZE 1024 -#define TO_SCREEN 1 -#define TO_FILE 2 - void InitOpengl(void); void InitOverlay(void); void InitShading(void); -- GitLab