From: Rafael Laboissière Date: Tue, 4 Jan 2022 15:46:06 +0000 (-0300) Subject: New upstream version 8.0 X-Git-Tag: archive/raspbian/8.0.1-1+rpi1^2~6^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1ef8321f2fab42f1d40c11434272b653dfa98a3f;p=mathgl.git New upstream version 8.0 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 136425d..d8f842e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,13 @@ cmake_minimum_required(VERSION 3.1.0) if(POLICY CMP0078) - cmake_policy(SET CMP0078 OLD) + cmake_policy(SET CMP0078 NEW) endif() if(POLICY CMP0086) - cmake_policy(SET CMP0086 OLD) + cmake_policy(SET CMP0086 NEW) +endif() +if(POLICY CMP0127) + cmake_policy(SET CMP0127 NEW) endif() project( MathGL2 ) @@ -22,11 +25,11 @@ if(NOT CMAKE_BUILD_TYPE) endif(NOT CMAKE_BUILD_TYPE) set(CMAKE_VERBOSE_MAKEFILE ON) -set(MathGL_VERSION_MAJOR 2) -set(MathGL_VERSION_MINOR 5) +set(MathGL_VERSION_MAJOR 8) +set(MathGL_VERSION_MINOR 0) set(MathGL_PATCH_VERSION 0) set(MathGL_VERSION ${MathGL_VERSION_MAJOR}.${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION}) -set(MathGL_SOVERSION 7.6.0) +set(MathGL_SOVERSION 8.0) string(TIMESTAMP MathGL_DATE UTC) if(CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -214,10 +217,9 @@ CMAKE_DEPENDENT_OPTION(enable-arma "Enable Armadillo support" OFF "NOT enable-al CMAKE_DEPENDENT_OPTION(enable-glut "Enable glut support" OFF "NOT enable-all-widgets" ON) CMAKE_DEPENDENT_OPTION(enable-fltk "Enable fltk widget" OFF "NOT enable-all-widgets" ON) CMAKE_DEPENDENT_OPTION(enable-wx "Enable wxWidget widget" OFF "NOT enable-all-widgets" ON) -CMAKE_DEPENDENT_OPTION(enable-qt "Enable Qt4 and/or Qt5 widget(s)" OFF "NOT enable-all-widgets" ON) -option(enable-qt4 "Enable Qt4 widget" OFF) -CMAKE_DEPENDENT_OPTION(enable-qt4asqt "Set Qt4 as default libmgl-qt" OFF "enable-qt4" OFF) -option(enable-qt5 "Enable Qt5 widget" OFF) +#CMAKE_DEPENDENT_OPTION(enable-qt "Enable Qt4 and/or Qt5 widget(s)" OFF "NOT enable-all-widgets" ON) +CMAKE_DEPENDENT_OPTION(enable-qt "Enable Qt5 widget" OFF "NOT enable-all-widgets" ON) +#option(enable-qt5 "Enable Qt5 widget" OFF) CMAKE_DEPENDENT_OPTION(enable-qt5asqt "Set Qt5 as default libmgl-qt" OFF "enable-qt5" OFF) CMAKE_DEPENDENT_OPTION(enable-freetype "Enable freetype support" OFF "NOT enable-all" ON) set(PY3VERSION_DOTTED "3.8" CACHE STRING "Used python version") @@ -242,17 +244,22 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) unset(CMAKE_REQUIRED_FLAGS) endif(${CMAKE_SIZEOF_VOID_P} EQUAL 4) +#if(enable-qt) +# if(Qt4_FOUND) +# set(enable-qt4 ON) +# find_package(Qt5 COMPONENTS Widgets) +# set(enable-qt5 ON) +# endif(Qt5Widgets_FOUND) +# else(Qt4_FOUND) +# set(enable-qt5 ON) +# endif(Qt4_FOUND) +#endif(enable-qt) if(enable-qt) - FIND_PACKAGE(Qt4 4.8) - if(Qt4_FOUND) - set(enable-qt4 ON) - find_package(Qt5 COMPONENTS Widgets) - if(Qt5Widgets_FOUND) - set(enable-qt5 ON) - endif(Qt5Widgets_FOUND) - else(Qt4_FOUND) - set(enable-qt5 ON) - endif(Qt4_FOUND) + find_package(Qt5 COMPONENTS Widgets) + set(enable-qt5 ON) + if(NOT Qt5Widgets_FOUND) + message(SEND_ERROR "Couldn't find Qt5 widgets.") + endif(NOT Qt5Widgets_FOUND) endif(enable-qt) if(enable-qt4 OR enable-qt5) diff --git a/ChangeLog.txt b/ChangeLog.txt index 54ec6e1..1103ada 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,15 @@ +8.0 Released 1 January 2022 + +* Change version numbering according Debian rules. +* Add accurate line segment and quadrangle/triangle face cutting at axis border crossing. +* Add 'fastcut' for disable accurate but slow line/trig/quad primitives cutting at axis borders. +* Restore back transparent background by default. You can set non-transparent background by using 'clf' or 'background' functions. +* Compatibility changes for Qt5.15 and MSVC. +INCOMPATIBLE: +* Change colorbar C-functions by adding last argument for options. +* Add alpha-value in fill_background(). +* Disable Qt4 interface by default. + 2.5 Released 8 December 2021 * Add 'keep' for keeping the data phase/sign or value along line i and j in given direction diff --git a/examples/full_test.cpp b/examples/full_test.cpp index afb5e0d..f6aaa6a 100644 --- a/examples/full_test.cpp +++ b/examples/full_test.cpp @@ -61,6 +61,7 @@ int width = 800; int height = 600; int big = 0; int srnd = 0; +int fastcut = 0; int use_mgl = 0; int verbose = 0; int quality = MGL_DRAW_NORM; @@ -74,10 +75,9 @@ void mgls_prepare3v(mglData *ex, mglData *ey, mglData *ez); void save(mglGraph *gr,const char *name,const char *suf); void test(mglGraph *gr) { -// gr->Box(); gr->WritePNG("1.png"); return; - mglParse par; - par.Execute(gr,"colorbar;size -2;crange 0 1;value 90"); + par.Execute(gr,"plot [0,-1,nan,0.1,0.5,1.1] 'o'"); //fplot 'x'"); //"box:fplot '2*sin(pi*x)' 'ko'"); +// par.Execute(gr,"colorbar;size -2;crange 0 1;value 90"); // par.Execute(gr,"fplot 'x';legend 'рус':legend"); // par.Execute(gr,"fsurf 'x*y':rasterize:clf:fplot 'sin(x)' '2q':axis"); // par.Execute(gr,"xrange 0 1:new x 10 '3*x':echo x\nnew a 10 'value([0,1,-1],3*x)':echo a\nnew b 10 'spline([0,1,-1],3*x)':echo b"); @@ -186,6 +186,7 @@ static struct option longopts[] = { "list", no_argument, NULL, 'l' }, { "mgl", no_argument, &use_mgl, 1 }, { "srnd", no_argument, &srnd, 1 }, + { "fast", no_argument, &fastcut, 1 }, { "png", no_argument, &type, 0 }, { "eps", no_argument, &type, 1 }, @@ -398,6 +399,7 @@ int main(int argc,char **argv) delete gr; return 0; } else if(dotest==3) { + gr->SetFastCut(fastcut); int qual[7]={0,1,2,4,5,6,8}; size_t ll=strlen(mmgl_dat_prepare)+1; mglParse par; @@ -462,6 +464,7 @@ int main(int argc,char **argv) gr->VertexColor(false); gr->Compression(false); if(name[0]==0) { + gr->SetFastCut(fastcut); while(s->name[0]) // all samples { if(!strcmp(s->name,"icon")) { s++; continue; } @@ -486,6 +489,7 @@ int main(int argc,char **argv) } else // manual sample { + gr->SetFastCut(fastcut); mglSample tst; tst.name=name; int i=0; for(i=0;samp[i].name[0];i++); // determine the number of samples diff --git a/fonts/make_bin.cpp b/fonts/make_bin.cpp index b5fa706..73d0adb 100644 --- a/fonts/make_bin.cpp +++ b/fonts/make_bin.cpp @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) else if(ch=='o') fname = optarg; else if(ch=='h' || (ch==-1 && optind>=argc)) { - printf("make_bin convert mgl font to binary file.\nCurrent version is 2.%g\n",MGL_VER2); + printf("make_bin convert mgl font to binary file.\nCurrent version is %s\n",MGL_VER_STRING); printf("Usage:\tmake_bin [parameter(s)] base\n"); printf( "\t-p path set specific path for base font files\n" diff --git a/include/config.h.in b/include/config.h.in index ed22fd8..b838346 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1,7 +1,7 @@ #ifndef _MGL_CONFIG_H_ #define _MGL_CONFIG_H_ -#define MGL_VER2 ${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION} // minor version of MathGL 2.* (like 1.3 for v.2.1.3) +//#define MGL_VER2 ${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION} // minor version of MathGL 2.* (like 1.3 for v.2.1.3) #define MGL_VER_MAJOR ${MathGL_VERSION_MAJOR} #define MGL_VER_MINOR ${MathGL_VERSION_MINOR} #define MGL_VER_PATCH ${MathGL_PATCH_VERSION} diff --git a/include/mgl2/abstract.h b/include/mgl2/abstract.h index c8c53b8..245333b 100644 --- a/include/mgl2/abstract.h +++ b/include/mgl2/abstract.h @@ -235,7 +235,11 @@ struct MGL_EXPORT mglNum }; //----------------------------------------------------------------------------- /// List of user-defined data arrays +#ifndef MGL_WIDGETS_DLL MGL_EXPORT extern std::vector mglDataList; +#else +__declspec(dllimport) extern std::vector mglDataList; +#endif //----------------------------------------------------------------------------- /// Abstract class for data array class MGL_EXPORT mglDataA diff --git a/include/mgl2/base.h b/include/mgl2/base.h index 5d06b83..fcfc5a7 100644 --- a/include/mgl2/base.h +++ b/include/mgl2/base.h @@ -63,7 +63,7 @@ public: dat = new T*[(size_t)1<(const mglPrim &a,const mglPrim &b); @@ -192,7 +203,7 @@ struct MGL_EXPORT mglBlock int id; ///< object id mglBlock():n1(0),n2(0),n3(0),n4(0),AmbBr(0.5),DifBr(0.5),id(0) {} - mglBlock(const mglBlock &aa) { memcpy(this, &aa, sizeof(mglBlock)); } + mglBlock(const mglBlock &aa) { memcpy((void*)this, &aa, sizeof(mglBlock)); } const mglBlock &operator=(const mglBlock &aa) { n1=aa.n1; n2=aa.n2; n3=aa.n3; n4=aa.n4; for(int i=0;i<10;i++) light[i]=aa.light[i]; AmbBr=aa.AmbBr; DifBr=aa.DifBr; B=aa.B; id=aa.id; return aa; } @@ -242,6 +253,9 @@ struct MGL_EXPORT mglPnt // NOTE: use float for reducing memory size mglPnt(const mglPnt &aa) : sub(aa.sub) { memcpy(dat,aa.dat,15*sizeof(float)); } inline const mglPnt&operator=(const mglPnt &aa) { sub=aa.sub; memcpy(dat,aa.dat,15*sizeof(float)); return aa; } inline bool same(const mglPnt &p, mreal d) const { return fabs(x-p.x)^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -177,8 +177,8 @@ void MGL_EXPORT mgl_colorbar_(uintptr_t *gr, const char *sch,int); * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ -void MGL_EXPORT mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h); -void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h,int); +void MGL_EXPORT mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h, const char *opt); +void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, const char *opt, int,int); /// Draw colorbar with manual colors at edge of axis /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -192,8 +192,8 @@ void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mrea * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ -void MGL_EXPORT mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch); -void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch,int); +void MGL_EXPORT mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch, const char *opt); +void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch, const char *opt,int,int); /// Draw colorbar with manual colors at manual position /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -207,8 +207,8 @@ void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ -void MGL_EXPORT mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h); -void MGL_EXPORT mgl_colorbar_val_ext_(uintptr_t *gr, uintptr_t *dat, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h,int); +void MGL_EXPORT mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h, const char *opt); +void MGL_EXPORT mgl_colorbar_val_ext_(uintptr_t *gr, uintptr_t *dat, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, const char *opt, int,int); /// Add string to legend void MGL_EXPORT mgl_add_legend(HMGL gr, const char *text,const char *style); @@ -437,7 +437,9 @@ void MGL_EXPORT mgl_clf_nfog(HMGL gr); void MGL_EXPORT mgl_clf_nfog_(uintptr_t *gr); /// Clear up the frame and fill background by specified color void MGL_EXPORT mgl_clf_rgb(HMGL gr, double r, double g, double b); +void MGL_EXPORT mgl_clf_rgba(HMGL gr, double r, double g, double b, double a); void MGL_EXPORT mgl_clf_rgb_(uintptr_t *gr, mreal *r, mreal *g, mreal *b); +void MGL_EXPORT mgl_clf_rgba_(uintptr_t *gr, mreal *r, mreal *g, mreal *b, mreal *a); /// Clear up the frame and fill background by specified color void MGL_EXPORT mgl_clf_chr(HMGL gr, char col); void MGL_EXPORT mgl_clf_chr_(uintptr_t *gr, const char *col, int); @@ -456,8 +458,8 @@ void MGL_EXPORT mgl_load_background_(uintptr_t *gr, const char *fname, mreal *al void MGL_EXPORT mgl_load_background_ext(HMGL gr, const char *fname, const char *how, double alpha); void MGL_EXPORT mgl_load_background_ext_(uintptr_t *gr, const char *fname, const char *how, mreal *alpha, int,int); /// Fill background by specified color. Colors r,g,b should be in range [0,1]. -void MGL_EXPORT mgl_fill_background(HMGL gr, double r, double g, double b); -void MGL_EXPORT mgl_fill_background_(uintptr_t *gr, double *r, double *g, double *b); +void MGL_EXPORT mgl_fill_background(HMGL gr, double r, double g, double b, double a); +void MGL_EXPORT mgl_fill_background_(uintptr_t *gr, double *r, double *g, double *b, double *a); /// Put further plotting in m-th cell of nx*ny grid of the image. /** String \a style may contain: diff --git a/include/mgl2/define.h b/include/mgl2/define.h index 6ec43a2..e0075bd 100644 --- a/include/mgl2/define.h +++ b/include/mgl2/define.h @@ -66,7 +66,10 @@ #else #define MGL_FUNC_CONST #define MGL_FUNC_PURE +#define MGL_FUNC_INIT +#define MGL_FUNC_FINI #endif + #define MGL_EXPORT_CONST MGL_EXPORT MGL_FUNC_CONST #define MGL_EXPORT_PURE MGL_EXPORT MGL_FUNC_PURE #define MGL_LOCAL_CONST MGL_NO_EXPORT MGL_FUNC_CONST @@ -138,7 +141,9 @@ typedef long msize; #define getcwd _getcwd #define chdir _chdir // BORLAND has chdir #endif +#if (_MSC_VER<1500) #define snprintf _snprintf +#endif #if (_MSC_VER<1600) // based on https://hg.python.org/cpython/rev/9aedb876c2d7 #define hypot _hypot #endif @@ -288,6 +293,7 @@ extern MGL_EXPORT uint64_t mgl_mask_val[16]; #define MGL_GRAY_MODE 0x00200000 ///< Convert all colors to gray ones #define MGL_FULL_CURV 0x00400000 ///< Disable omitting points in straight-line part(s). #define MGL_NO_SCALE_REL 0x00800000 ///< Disable font scaling in relative inplots +#define MGL_FAST_PRIM 0x01000000 ///< Disable accurate primitive cutting at axis borders //----------------------------------------------------------------------------- #ifdef __cplusplus #include diff --git a/include/mgl2/mgl.h b/include/mgl2/mgl.h index 7a082ea..f963170 100644 --- a/include/mgl2/mgl.h +++ b/include/mgl2/mgl.h @@ -298,6 +298,8 @@ public: /// Set to draw tick labels at axis origin inline void SetOriginTick(bool enable=true) { mgl_set_flag(gr,!enable, MGL_NO_ORIGIN); } + /// Disable accurate but slower primitive cutting at axis borders + inline void SetFastCut(bool enable) { mgl_set_flag(gr,enable, MGL_FAST_PRIM); } /// Set bit-value flag of HMGL state (for advanced users only) inline void SetFlagAdv(int val, uint32_t flag) { mgl_set_flag(gr, val, flag); } @@ -582,6 +584,10 @@ public: /// Clear up the frame and fill background by specified color inline void Clf(double r, double g, double b) { mgl_clf_rgb(gr, r, g, b); } + /// Clear up the frame and fill background by specified color + inline void Clf(double r, double g, double b, double a) { mgl_clf_rgba(gr, r, g, b, a); } + /// Clear up the frame and fill background by specified color + inline void Clf(mglColor c) { mgl_clf_rgba(gr, c.r, c.g, c.b, c.a); } /// Clear up the frame and fill background by specified color with manual transparency inline void Clf(const char *col) { mgl_clf_str(gr, col); } /// Clear up the frame and fill background by specified color @@ -604,7 +610,7 @@ public: { mgl_load_background_ext(gr,fname,how,alpha); } /// Fill background image by specified color. Colors r,g,b should be in range [0,1]. inline void FillBackground(const mglColor &cc) - { mgl_fill_background(gr, cc.r,cc.g,cc.b); } + { mgl_fill_background(gr, cc.r,cc.g,cc.b,cc.a); } /// Force drawing the image and use it as background one inline void Rasterize() { mgl_rasterize(gr); } @@ -807,8 +813,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const char *sch="") - { mgl_colorbar(gr, sch); } + inline void Colorbar(const char *sch="", const char *opt="") + { mgl_colorbar(gr, sch, opt); } /// Draw colorbar at manual position /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -822,8 +828,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const char *sch,double x,double y,double w=1,double h=1) - { mgl_colorbar_ext(gr, sch, x,y,w,h); } + inline void Colorbar(const char *sch,double x,double y,double w=1,double h=1, const char *opt="") + { mgl_colorbar_ext(gr, sch, x,y,w,h, opt); } /// Draw colorbar with manual colors at edge of axis /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -837,8 +843,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const mglDataA &val, const char *sch="") - { mgl_colorbar_val(gr, &val, sch); } + inline void Colorbar(const mglDataA &val, const char *sch="", const char *opt="") + { mgl_colorbar_val(gr, &val, sch, opt); } /// Draw colorbar with manual colors at manual position /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -852,8 +858,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const mglDataA &val, const char *sch,double x,double y,double w=1,double h=1) - { mgl_colorbar_val_ext(gr, &val, sch, x,y,w,h); } + inline void Colorbar(const mglDataA &val, const char *sch,double x,double y,double w=1,double h=1, const char *opt="") + { mgl_colorbar_val_ext(gr, &val, sch, x,y,w,h, opt); } /// Add string to legend inline void AddLegend(const char *text,const char *style) diff --git a/include/mgl2/qmathgl.h b/include/mgl2/qmathgl.h index ac4d8ff..1654e0f 100644 --- a/include/mgl2/qmathgl.h +++ b/include/mgl2/qmathgl.h @@ -32,6 +32,14 @@ class QSpinBox; class QTimer; class mglCanvas; class mglTask; +#if MGL_FORCE_QT4 +#define angleDelta() delta() +#define setPageOrientation(a) setOrientation(a) +#define horizontalAdvance(a) width(a) +#define asprintf(a) sprintf(a) +#define setTabStopWidth(a) setTabStopDistance(a) +#define QPageLayout QPrinter +#endif //----------------------------------------------------------------------------- /// Class is Qt widget which display MathGL graphics class MGL_EXPORT QMathGL : public QWidget diff --git a/include/mgl2/type.h b/include/mgl2/type.h index 1fcb126..2c5ce4c 100644 --- a/include/mgl2/type.h +++ b/include/mgl2/type.h @@ -46,6 +46,8 @@ struct MGL_EXPORT mglPoint inline mreal val(int i) const { mreal dat[4]={x,y,z,c}; return dat[i]; } inline mreal norm() const { return sqrt(x*x+y*y+z*z); } inline void Normalize() { mreal v=norm(); x/=v; y/=v; z/=v; } + inline bool same(const mglPoint &a) const // NOTE: exact comparison is used here + { return (a.x-x)*(a.x-x)+(a.y-y)*(a.y-y)==0; } inline const mglPoint &operator=(const mglPoint &p) { x=p.x; y=p.y; z=p.z; c=p.c; return p; } diff --git a/json/Backend.cpp b/json/Backend.cpp index 0ef1104..91bb2d0 100644 --- a/json/Backend.cpp +++ b/json/Backend.cpp @@ -57,7 +57,7 @@ QString Backend::coor(const QString& xy, const QString& text) const int y = (int)xy.section(" ",1,1).toDouble(); mglPoint p = gr.CalcXYZ(x,y); QString res; - res.sprintf("x = %g, y = %g, z = %g for point (%d, %d)\n", p.x, p.y, p.z, x,y); + res.asprintf("x = %g, y = %g, z = %g for point (%d, %d)\n", p.x, p.y, p.z, x,y); qDebug() << res+"\nask"+xy; return res+"\nask"+xy; } diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 475dabe..d5ab9e2 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -49,17 +49,17 @@ if(enable-python) SWIG_ADD_LIBRARY(mathgl LANGUAGE python SOURCES mathgl.i) endif(${CMAKE_VERSION} VERSION_LESS "3.8.0") SWIG_LINK_LIBRARIES(mathgl mgl ${PYTHON_LIBRARIES}) - set_target_properties(_mathgl PROPERTIES BUILD_WITH_INSTALL_RPATH ON) + set_target_properties(mathgl PROPERTIES BUILD_WITH_INSTALL_RPATH ON) add_custom_command(OUTPUT mathgl.pyc COMMAND ${PYTHON_EXECUTABLE} ARGS -c \"from py_compile import compile\; compile('mathgl.py') \" WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/lang - DEPENDS _mathgl + DEPENDS mathgl ) - add_custom_target(mgl_python_module ALL DEPENDS _mathgl mathgl.pyc) + add_custom_target(mgl_python_module ALL DEPENDS mathgl mathgl.pyc) - install(FILES ${MathGL2_BINARY_DIR}/lang/mathgl.py ${MathGL2_BINARY_DIR}/lang/__pycache__/mathgl.cpython-${PY3VERSION_NODOT}.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl/__pycache__) - install (TARGETS _mathgl LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl) + install(FILES ${MathGL2_BINARY_DIR}/lang/mathgl.py ${MathGL2_BINARY_DIR}/lang/__pycache__/mathgl.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl/__pycache__) + install (TARGETS mathgl LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl) set(mgl_clean_files ${mgl_clean_files} mathgl.py) endif(enable-python) diff --git a/lang/mgl.i b/lang/mgl.i index 7e20a4e..2ceaf30 100644 --- a/lang/mgl.i +++ b/lang/mgl.i @@ -287,6 +287,8 @@ public: /// Set to draw tick labels at axis origin inline void SetOriginTick(bool enable=true) { mgl_set_flag(gr,!enable, MGL_NO_ORIGIN); } + /// Disable accurate primitive cutting at axis borders + inline void SetFastCut(bool enable) { mgl_set_flag(gr,enable, MGL_FAST_PRIM); } /// Set bit-value flag of HMGL state (for advanced users only) inline void SetFlagAdv(int val, uint32_t flag) { mgl_set_flag(gr, val, flag); } @@ -571,6 +573,10 @@ public: /// Clear up the frame and fill background by specified color inline void Clf(double r, double g, double b) { mgl_clf_rgb(gr, r, g, b); } + /// Clear up the frame and fill background by specified color + inline void Clf(double r, double g, double b, double a) { mgl_clf_rgba(gr, r, g, b, a); } + /// Clear up the frame and fill background by specified color + inline void Clf(mglColor c) { mgl_clf_rgba(gr, c.r, c.g, c.b, c.a); } /// Clear up the frame and fill background by specified color with manual transparency inline void Clf(const char *col) { mgl_clf_str(gr, col); } /// Clear up the frame and fill background by specified color @@ -709,6 +715,7 @@ public: /// Draw user-defined symbol in position p along direction d inline void Symbol(mglPoint p, mglPoint d, char id, const char *how="", double size=-1) { mgl_symbol_dir(gr, p.x, p.y, p.z, d.x, d.y, d.z, id, how, size); } + /// Print text in position p with specified font inline void Putsw(mglPoint p,const wchar_t *text,const char *font=":C",double size=-1) { mgl_putsw(gr, p.x, p.y, p.z, text, font, size); } @@ -795,8 +802,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const char *sch="") - { mgl_colorbar(gr, sch); } + inline void Colorbar(const char *sch="", const char *opt="") + { mgl_colorbar(gr, sch, opt); } /// Draw colorbar at manual position /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -810,8 +817,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const char *sch,double x,double y,double w=1,double h=1) - { mgl_colorbar_ext(gr, sch, x,y,w,h); } + inline void Colorbar(const char *sch,double x,double y,double w=1,double h=1, const char *opt="") + { mgl_colorbar_ext(gr, sch, x,y,w,h, opt); } /// Draw colorbar with manual colors at edge of axis /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -825,8 +832,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const mglData &val, const char *sch="") - { mgl_colorbar_val(gr, &val, sch); } + inline void Colorbar(const mglData &val, const char *sch="", const char *opt="") + { mgl_colorbar_val(gr, &val, sch, opt); } /// Draw colorbar with manual colors at manual position /** Parameter \a sch may contain: * ‘<>^_’ for positioning at left, at right, at top or at bottom correspondingly; @@ -840,8 +847,8 @@ public: * ‘+’ for printing ‘+’ for positive ticks; * ‘-’ for printing usual ‘-’ in ticks labels; * ‘0123456789’ for precision at printing ticks labels.*/ - inline void Colorbar(const mglData &val, const char *sch,double x,double y,double w=1,double h=1) - { mgl_colorbar_val_ext(gr, &val, sch, x,y,w,h); } + inline void Colorbar(const mglData &val, const char *sch,double x,double y,double w=1,double h=1, const char *opt="") + { mgl_colorbar_val_ext(gr, &val, sch, x,y,w,h, opt); } /// Add string to legend inline void AddLegend(const char *text,const char *style) diff --git a/mathgl_es.po b/mathgl_es.po index 2403115..957ba31 100644 --- a/mathgl_es.po +++ b/mathgl_es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MathGL2 2.4.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-03 16:47+0300\n" +"POT-Creation-Date: 2021-12-27 05:03+0300\n" "PO-Revision-Date: 2018-03-24 11:08-0400\n" "Last-Translator: Diego Sejas Viscarra \n" "Language-Team: \n" @@ -188,7 +188,7 @@ msgstr " Guardar" msgid " Yes " msgstr " Sí " -#: udav/plot_pnl.cpp:191 +#: udav/plot_pnl.cpp:192 #, c-format msgid "%d - %d of %d" msgstr "%d - %d de %d" @@ -570,11 +570,11 @@ msgstr "Acerca de" msgid "About Qt" msgstr "Acerca de Qt" -#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:372 +#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:373 msgid "Add arc" msgstr "Añadir arco" -#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:375 +#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:376 msgid "Add arc which properties can be changed later by mouse." msgstr "Añadir arco configurable por el mouse." @@ -582,11 +582,11 @@ msgstr "Añadir arco configurable por el mouse." msgid "Add command option(s)" msgstr "Añadir opción(es) de comando" -#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:378 +#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:379 msgid "Add curve" msgstr "Añadir curva" -#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:381 +#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:382 msgid "Add curve which properties can be changed later by mouse." msgstr "Añadir curva configurable por el mouse." @@ -594,11 +594,11 @@ msgstr "Añadir curva configurable por el mouse." msgid "Add data or number" msgstr "Añadir datos o número" -#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:396 +#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:397 msgid "Add ellipse" msgstr "Añadir elipse" -#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405 +#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:400 udav/plot_pnl.cpp:406 msgid "Add ellipse which properties can be changed later by mouse." msgstr "Añadir elipse configurable por el mouse." @@ -607,7 +607,7 @@ msgid "Add inplot" msgstr "Añadir gráfico interno" # Anadir a la leyenda? -#: src/exec_set.cpp:800 +#: src/exec_set.cpp:808 msgid "Add legend entry" msgstr "Añadir entrada a leyenda" @@ -615,24 +615,24 @@ msgstr "Añadir entrada a leyenda" msgid "Add legend entry for the plot" msgstr "Añadir entrada a leyenda del gráfico" -#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:366 +#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:367 msgid "Add line" msgstr "Añadir línea" -#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:369 +#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:370 msgid "Add line which properties can be changed later by mouse." msgstr "Añadir línea configurable por el mouse." -#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:408 +#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:409 msgid "Add mark" msgstr "Añadir marca" # Marker or mark? -#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:411 +#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:412 msgid "Add marker which properties can be changed later by mouse." msgstr "Añadir marca configurable por el mouse." -#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:402 +#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:403 msgid "Add polygon" msgstr "Añadir polígono" @@ -645,31 +645,31 @@ msgid "Add primitive" msgstr "Añadir primitiva" # rect? -#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:384 +#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:385 msgid "Add rect" msgstr "Añadir rectángulo" -#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:387 +#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:388 msgid "Add rectangle which properties can be changed later by mouse." msgstr "Añadir rectángulo configurable por el mouse." -#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:390 +#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:391 msgid "Add rhombus" msgstr "Añadir rombo" -#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:393 +#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:394 msgid "Add rhombus which properties can be changed later by mouse." msgstr "Añadir rombo configurable por el mouse." -#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:414 +#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:415 msgid "Add text" msgstr "Añadir texto" -#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:417 +#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:418 msgid "Add text which properties can be changed later by mouse." msgstr "Añadir texto configurable por el mouse." -#: src/exec_prm.cpp:662 +#: src/exec_prm.cpp:663 msgid "Add title for current subplot/inplot" msgstr "Añadir titulo al subgráfica/gráfica interna" @@ -678,7 +678,7 @@ msgid "Add to" msgstr "Añadir a" # user-defined -#: src/exec_set.cpp:801 +#: src/exec_set.cpp:809 msgid "Add user-defined symbol" msgstr "Añadir símbolo personalizado" @@ -686,11 +686,11 @@ msgstr "Añadir símbolo personalizado" msgid "Adjust picture size to fill drawing area" msgstr "Ajustar imagen al área de dibujo" -#: widgets/fltk.cpp:846 widgets/qt.cpp:1156 udav/plot_pnl.cpp:337 +#: widgets/fltk.cpp:846 widgets/qt.cpp:1156 udav/plot_pnl.cpp:338 msgid "Adjust size" msgstr "Ajustar tamaño" -#: src/exec_set.cpp:802 +#: src/exec_set.cpp:810 msgid "Adjust ticks for best view" msgstr "Optimizar marcas de los ejes" @@ -707,7 +707,7 @@ msgstr "" #. graphics menu #: widgets/qt.cpp:1115 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109 -#: udav/plot_pnl.cpp:290 mgllab/dialogs.cpp:109 +#: udav/plot_pnl.cpp:291 mgllab/dialogs.cpp:109 msgid "Alpha" msgstr "Alfa" @@ -733,7 +733,7 @@ msgid "Angle around z axis (in degrees)" msgstr "Ángulo alrededor del eje z (en grados)" #. animation menu -#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:559 +#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:560 #: mgllab/mathgl.cpp:185 msgid "Animation" msgstr "Animación" @@ -793,7 +793,7 @@ msgstr "Proporción de escala y a escala z" msgid "Aspect x/z" msgstr "Aspecto x/z" -#: src/exec_set.cpp:808 +#: src/exec_set.cpp:816 msgid "Attach light settings to inplot" msgstr "Vincular configuración de luz a gráfico interno" @@ -959,7 +959,7 @@ msgstr "Calculadora" msgid "Cancel" msgstr "Cancelar" -#: src/crust.cpp:588 +#: src/crust.cpp:617 msgid "Cannot triangulate this set!" msgstr "¡Imposible triangular conjunto!" @@ -981,11 +981,11 @@ msgstr "Cambiar" msgid "Change (resize) data" msgstr "Cambiar (tamaño de) datos" -#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:339 +#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:340 msgid "Change canvas size to fill whole region (F6)." msgstr "Maximizar el área de dibujo (F6)." -#: src/exec_set.cpp:812 +#: src/exec_set.cpp:820 msgid "Change current directory" msgstr "Cambiar directorio actual" @@ -1005,7 +1005,7 @@ msgstr "Cambiar valores y cerrar esta ventana" msgid "Change font" msgstr "Cambiar fuente" -#: src/exec_set.cpp:864 +#: src/exec_set.cpp:873 msgid "Change view angles - use 'rotate' for plot rotation" msgstr "Modificar ángulos - use \"rotate\" para rotar gráfico" @@ -1018,11 +1018,11 @@ msgstr "Borrar" msgid "Clear all" msgstr "Borrar todo" -#: src/exec_set.cpp:813 +#: src/exec_set.cpp:821 msgid "Clear legend entries" msgstr "Borrar entradas de leyenda" -#: src/exec_set.cpp:814 +#: src/exec_set.cpp:822 msgid "Clear picture" msgstr "Borrar imagen" @@ -1099,19 +1099,19 @@ msgstr "Opciones de comando" msgid "Comments" msgstr "Comentarios" -#: src/exec_prm.cpp:650 +#: src/exec_prm.cpp:651 msgid "Computes the attractor of an IFS" msgstr "Calcula el atractor de un IFS" -#: src/exec_prm.cpp:651 +#: src/exec_prm.cpp:652 msgid "Computes the attractor of an IFS for 3d case" msgstr "Calcula el atractor de un IFS para el caso 3d" -#: src/exec_prm.cpp:652 +#: src/exec_prm.cpp:653 msgid "Computes the attractor of an IFS with parameters from *.ifs file" msgstr "Calcula el atractor de un IFS con parámetros de un archivo *.ifs" -#: src/exec_prm.cpp:646 +#: src/exec_prm.cpp:647 msgid "Computes the flame fractal" msgstr "Calcula un fractal de flama" @@ -1123,12 +1123,12 @@ msgstr "Condición de un bucle do-while" msgid "Conditional operator" msgstr "Operador condicional" -#: udav/plot_pnl.cpp:358 +#: udav/plot_pnl.cpp:359 msgid "Copy click coor." msgstr "Copiar coords. al clicar" # Clipboard=? -#: udav/plot_pnl.cpp:360 +#: udav/plot_pnl.cpp:361 msgid "Copy coordinates of last mouse click to clipboard." msgstr "Copiar coordenadas del último clic. a memoria" @@ -1144,7 +1144,7 @@ msgstr "Copiar datos de otra variable" msgid "Copy graphics" msgstr "Copiar gráfico" -#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:354 +#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:355 msgid "Copy graphics to clipboard (Ctrl+Shift+G)." msgstr "Copiar gráfico a memoria (Ctrl+Shift+G)." @@ -1152,7 +1152,7 @@ msgstr "Copiar gráfico a memoria (Ctrl+Shift+G)." msgid "Copy image to clipboard" msgstr "Copiar imagen a memoria" -#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:352 +#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:353 msgid "Copy plot" msgstr "Copiar gráfico" @@ -1354,11 +1354,11 @@ msgstr "Vista previa de datos para porción actual." msgid "Data transform" msgstr "Transformar datos" -#: udav/plot_pnl.cpp:556 +#: udav/plot_pnl.cpp:557 msgid "Decrease \\phi angle by 10 degrees." msgstr "Decrementar ángulo \\phi en 10 grados." -#: udav/plot_pnl.cpp:548 +#: udav/plot_pnl.cpp:549 msgid "Decrease \\theta angle by 10 degrees." msgstr "Decrementar ángulo \\theta en 10 grados." @@ -1402,7 +1402,7 @@ msgstr "Borrar TODOS los datos" msgid "Delete data or slice of data" msgstr "Borrar datos o porción de los datos" -#: udav/plot_pnl.cpp:426 +#: udav/plot_pnl.cpp:427 msgid "Delete selected" msgstr "Borrar seleccion" @@ -1414,7 +1414,7 @@ msgstr "Borrar datos seleccionados" msgid "Delete selected data." msgstr "Borrar datos seleccionados." -#: udav/plot_pnl.cpp:428 +#: udav/plot_pnl.cpp:429 msgid "Delete selected plot." msgstr "Borrar gráfico seleccionado." @@ -1455,6 +1455,10 @@ msgstr "Dirección" msgid "Direction along which data will be filled" msgstr "Dirección para llenar los datos" +#: src/exec_set.cpp:830 +msgid "Disable accurate primitive cutting at axis borders" +msgstr "" + #: udav/subplot_dlg.cpp:105 udav/subplot_dlg.cpp:122 msgid "Distance between cells" msgstr "Distancia entre celdas" @@ -1529,7 +1533,7 @@ msgstr "Diagrama STFA" msgid "Draw TeX mark at point position" msgstr "Graficar marca de TeX en posición" -#: src/exec_prm.cpp:628 +#: src/exec_prm.cpp:629 msgid "Draw angle arc" msgstr "Graficar arco" @@ -1553,11 +1557,11 @@ msgstr "Gráfica de correas coloreada por otros datos" msgid "Draw binormales for 1D data" msgstr "Gráfica de binormales para datos 1D" -#: src/exec_prm.cpp:655 +#: src/exec_prm.cpp:656 msgid "Draw bitmap (logo) along axis range" msgstr "Graficar imagen (logo) en el rango de ejes" -#: src/exec_prm.cpp:632 +#: src/exec_prm.cpp:633 msgid "Draw bounding box" msgstr "Graficar bordes" @@ -1577,7 +1581,7 @@ msgstr "Diagrama de velas" msgid "Draw chart" msgstr "Gráfica de cuadros" -#: src/exec_prm.cpp:633 +#: src/exec_prm.cpp:634 msgid "Draw circle" msgstr "Graficar círculo" @@ -1585,11 +1589,11 @@ msgstr "Graficar círculo" msgid "Draw cloud" msgstr "Gráfica de nube" -#: src/exec_prm.cpp:635 +#: src/exec_prm.cpp:636 msgid "Draw colorbar" msgstr "Graficar barra de colores" -#: src/exec_prm.cpp:636 +#: src/exec_prm.cpp:637 msgid "Draw cone" msgstr "Dibujar cono" @@ -1633,7 +1637,7 @@ msgstr "Cilindros de nivel" msgid "Draw contour tubes for surface of triangles" msgstr "Cilindros de nivel para superficie de triángulos" -#: src/exec_prm.cpp:637 +#: src/exec_prm.cpp:638 msgid "Draw curve" msgstr "Graficar curva" @@ -1675,15 +1679,15 @@ msgstr "Gráfica de gotas" msgid "Draw dots for arbitrary data points" msgstr "Diagrama de puntos para datos arbitrarios" -#: src/exec_prm.cpp:638 +#: src/exec_prm.cpp:639 msgid "Draw drop" msgstr "Graficar gota" -#: src/exec_prm.cpp:639 +#: src/exec_prm.cpp:640 msgid "Draw ellipse" msgstr "Graficar elipse" -#: src/exec_prm.cpp:640 +#: src/exec_prm.cpp:641 msgid "Draw error box" msgstr "Graficar caja de error" @@ -1691,19 +1695,19 @@ msgstr "Graficar caja de error" msgid "Draw error boxes" msgstr "Graficar cajas de error" -#: src/exec_prm.cpp:641 +#: src/exec_prm.cpp:642 msgid "Draw face (quadrangle)" msgstr "Graficar faceta (cuadrángulo)" -#: src/exec_prm.cpp:642 +#: src/exec_prm.cpp:643 msgid "Draw face perpendicular to x-axis" msgstr "Graficar faceta perpendicular al eje x" -#: src/exec_prm.cpp:643 +#: src/exec_prm.cpp:644 msgid "Draw face perpendicular to y-axis" msgstr "Graficar faceta perpendicular al eje y" -#: src/exec_prm.cpp:644 +#: src/exec_prm.cpp:645 msgid "Draw face perpendicular to z-axis" msgstr "Graficar faceta perpendicular al eje z" @@ -1727,7 +1731,7 @@ msgstr "Graficar de líneas de flujo desde plano para campo vectorial" msgid "Draw gradient lines for scalar field" msgstr "Graficar líneas de gradiente para campo escalar" -#: src/exec_prm.cpp:649 +#: src/exec_prm.cpp:650 msgid "Draw grid" msgstr "Graficar grilla" @@ -1772,32 +1776,32 @@ msgstr "Isosuperficie para datos 3D con transparencia de otros datos" msgid "Draw label at arbitrary position" msgstr "Etiqueta en posición arbitraria" -#: src/exec_prm.cpp:634 +#: src/exec_prm.cpp:635 #, fuzzy msgid "Draw label for colorbar" msgstr "Etiqueta para eje t" -#: src/exec_prm.cpp:663 +#: src/exec_prm.cpp:664 msgid "Draw label for t-axis" msgstr "Etiqueta para eje t" -#: src/exec_prm.cpp:664 +#: src/exec_prm.cpp:665 msgid "Draw label for x-axis" msgstr "Etiqueta para el eje x" -#: src/exec_prm.cpp:665 +#: src/exec_prm.cpp:666 msgid "Draw label for y-axis" msgstr "Etiqueta para el eje y" -#: src/exec_prm.cpp:666 +#: src/exec_prm.cpp:667 msgid "Draw label for z-axis" msgstr "Etiqueta para el eje z" -#: src/exec_prm.cpp:653 +#: src/exec_prm.cpp:654 msgid "Draw legend" msgstr "Graficar leyenda" -#: src/exec_prm.cpp:654 +#: src/exec_prm.cpp:655 msgid "Draw line" msgstr "Graficar recta" @@ -1818,11 +1822,11 @@ msgstr "Gráfica de marcas para datos 1D" msgid "Draw mesh surface" msgstr "Graficar grilla de superficie" -#: src/exec_prm.cpp:631 +#: src/exec_prm.cpp:632 msgid "Draw point (ball)" msgstr "Graficar punto (esfera)" -#: src/exec_prm.cpp:656 +#: src/exec_prm.cpp:657 msgid "Draw polygon" msgstr "Graficar polígono" @@ -1838,11 +1842,11 @@ msgstr "Diagrama de radar" msgid "Draw reconstructed surface for arbitrary data points" msgstr "Graficar superficie reconstruida para puntos arbitrarios" -#: src/exec_prm.cpp:657 +#: src/exec_prm.cpp:658 msgid "Draw rectangle" msgstr "Graficar rectángulo" -#: src/exec_prm.cpp:658 +#: src/exec_prm.cpp:659 msgid "Draw rhombus" msgstr "Graficar rombo" @@ -1886,7 +1890,7 @@ msgstr "Superficie sólida con coloración de otros datos" msgid "Draw solid surface transpared by other data" msgstr "Superficie sólida con transparencia de otros datos" -#: src/exec_prm.cpp:659 +#: src/exec_prm.cpp:660 msgid "Draw sphere" msgstr "Graficar esfera" @@ -1922,11 +1926,11 @@ msgstr "Graficar tabla de valores" msgid "Draw tension plot for 1D data" msgstr "Gráfica de tensión para datos 1D" -#: src/exec_prm.cpp:661 +#: src/exec_prm.cpp:662 msgid "Draw text at some position or along curve" msgstr "Texto en posición especifica o curva" -#: src/exec_prm.cpp:660 +#: src/exec_prm.cpp:661 msgid "Draw user-defined symbol at given position and direction" msgstr "Símbolo personalizado en posición y dirección dadas" @@ -1950,7 +1954,7 @@ msgstr "Vectores a lo largo de curva" msgid "Draw waterfalls" msgstr "Gráfica de cascadas" -#: udav/plot_pnl.cpp:111 udav/plot_pnl.cpp:130 +#: udav/plot_pnl.cpp:112 udav/plot_pnl.cpp:131 msgid "Drawing time %1 ms" msgstr "Tiempo de graficación %1 ms" @@ -2130,7 +2134,7 @@ msgstr "Ejecutar si condición es falsa" msgid "Execute script after loading" msgstr "Ejecutar script al cargarlo" -#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:333 +#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:334 msgid "Execute script and redraw graphics (F5)." msgstr "Ejecutar script y volver a graficar (F5)." @@ -2162,11 +2166,11 @@ msgstr "¿Exportar datos?" msgid "Export as ..." msgstr "Exportar como ..." -#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:474 +#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:475 msgid "Export as 2D ..." msgstr "Exportar como 2D ..." -#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:484 +#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:485 msgid "Export as 3D ..." msgstr "Exportar como 3D ..." @@ -2265,41 +2269,41 @@ msgstr "Llenar en rango" msgid "Fill x-,k-samples for transforms" msgstr "Llenar muestreo x o k para transformada" -#: src/random.cpp:350 +#: src/random.cpp:345 msgid "Fills by fractional brownian motion" msgstr "" -#: src/random.cpp:356 +#: src/random.cpp:351 msgid "Fills by random integers uniformly chosen in [lo, hi)" msgstr "" -#: src/random.cpp:348 +#: src/random.cpp:343 msgid "" "Fills by random numbers according to Bernoulli distribution with probability " "p" msgstr "" -#: src/random.cpp:353 +#: src/random.cpp:348 msgid "Fills by random numbers according to Gaussian distribution" msgstr "" -#: src/random.cpp:349 +#: src/random.cpp:344 msgid "" "Fills by random numbers according to binomial distribution in n coin flips " "with probability p" msgstr "" -#: src/random.cpp:351 +#: src/random.cpp:346 msgid "Fills by random numbers according to discrete distribution" msgstr "" -#: src/random.cpp:352 +#: src/random.cpp:347 msgid "" "Fills by random numbers according to exponential distribution with " "probability p" msgstr "" -#: src/random.cpp:355 +#: src/random.cpp:350 msgid "Fills by random numbers uniformly chosen in [lo,hi)" msgstr "" @@ -2453,7 +2457,7 @@ msgstr "Bucle \"for\"" msgid "Forward" msgstr "Adelante" -#: udav/plot_pnl.cpp:192 +#: udav/plot_pnl.cpp:193 msgid "Frame %1 of %2" msgstr "Cuadro %1 de %2" @@ -2547,7 +2551,7 @@ msgstr "Ir a la sección previa de datos 3D." msgid "Go to the specified slice for 3D data." msgstr "Ir a la sección especificada de datos 3D." -#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:66 +#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:67 #: mgllab/mgllab.cpp:325 msgid "Graphics" msgstr "Gráfica" @@ -2701,7 +2705,7 @@ msgstr "Gráfica/Transformar/Acercar" msgid "Graphics/Transform/Zoom out" msgstr "Gráfica/Transformar/Alejar" -#: udav/plot_pnl.cpp:304 +#: udav/plot_pnl.cpp:305 msgid "Grid" msgstr "Grilla" @@ -2758,11 +2762,11 @@ msgstr "" msgid "Hidden plots" msgstr "Gráficos ocultos" -#: udav/plot_pnl.cpp:431 +#: udav/plot_pnl.cpp:432 msgid "Hide selected" msgstr "Ocultar seleccionados" -#: udav/plot_pnl.cpp:433 +#: udav/plot_pnl.cpp:434 msgid "Hide selected plots." msgstr "Ocultar gráficos seleccionados." @@ -2838,11 +2842,11 @@ msgstr "¡Parámetros de bucle incompatibles!" msgid "Incorrect type of base data" msgstr "Tipo incorrecto de datos base" -#: udav/plot_pnl.cpp:552 +#: udav/plot_pnl.cpp:553 msgid "Increase \\phi angle by 10 degrees." msgstr "Incrementar ángulo \\phi en 10 grados." -#: udav/plot_pnl.cpp:544 +#: udav/plot_pnl.cpp:545 msgid "Increase \\theta angle by 10 degrees." msgstr "Incrementar ángulo \\theta en 10 grados." @@ -2911,7 +2915,7 @@ msgstr "Intensidad de luz difusa" msgid "Italic style" msgstr "Estilo itálico" -#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:477 +#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:478 msgid "JPEG" msgstr "JPEG" @@ -2974,7 +2978,7 @@ msgstr "Tipo de gráficos: líneas para 1D, densidad para 2D." msgid "L - seagreen" msgstr "L - verde marino" -#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:481 +#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:482 msgid "LaTeX" msgstr "LaTeX" @@ -3015,7 +3019,7 @@ msgid "Legend" msgstr "Leyenda" #: widgets/qt.cpp:1121 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110 -#: udav/plot_pnl.cpp:297 mgllab/dialogs.cpp:115 +#: udav/plot_pnl.cpp:298 mgllab/dialogs.cpp:115 msgid "Light" msgstr "Luz" @@ -3055,7 +3059,7 @@ msgstr "Lista de datos disponibles." msgid "Load Data?" msgstr "¿Cargar datos?" -#: src/exec_set.cpp:829 +#: src/exec_set.cpp:838 msgid "Load commands from external DLL" msgstr "Cargar comandos de librería externa" @@ -3075,7 +3079,7 @@ msgstr "" "Cargar datos de archivo. Estos se borraran solo al\n" "cerrar UDAV, sin advertencia explicita (Ctrl+Shift+O)." -#: src/exec_set.cpp:830 +#: src/exec_set.cpp:839 msgid "Load fontfaces" msgstr "Cargar fuentes" @@ -3083,7 +3087,7 @@ msgstr "Cargar fuentes" msgid "Load from file" msgstr "Cargar de archivo" -#: src/exec_prm.cpp:630 +#: src/exec_prm.cpp:631 msgid "Load image for background" msgstr "Cargar imagen como fondo" @@ -3172,7 +3176,7 @@ msgstr "" "Archivos de datos (*.dat)\n" "Todos los archivos (*.*)" -#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:485 +#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:486 msgid "MGLD" msgstr "MGLD" @@ -3364,27 +3368,27 @@ msgstr "Momento en dirección 'y' para función" msgid "Momentum along 'z' for function" msgstr "Momento en dirección 'z' para función" -#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:527 +#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:528 msgid "Move down" msgstr "Mover abajo" -#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:530 +#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:531 msgid "Move graphics down 1/3 of its height." msgstr "Mover gráfico abajo 1/3 de su altura." -#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:506 +#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:507 msgid "Move graphics left by 1/3 of its width." msgstr "Mover gráfico a la izq. 1/3 de su ancho." -#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:536 +#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:537 msgid "Move graphics right by 1/3 of its width." msgstr "Mover gráfico a la der. 1/3 de su ancho." -#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:512 +#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:513 msgid "Move graphics up by 1/3 of its height." msgstr "Mover gráfico arriba 1/3 de su altura." -#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:503 +#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:504 msgid "Move left" msgstr "Mover a la izq." @@ -3392,27 +3396,27 @@ msgstr "Mover a la izq." msgid "Move mouse-handled primitives to script." msgstr "Move mouse-handled primitives to script." -#: udav/plot_pnl.cpp:454 +#: udav/plot_pnl.cpp:455 msgid "Move plot down" msgstr "Mover gráfica abajo" -#: udav/plot_pnl.cpp:449 +#: udav/plot_pnl.cpp:450 msgid "Move plot up" msgstr "Mover gráfica arriba" -#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:533 +#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:534 msgid "Move right" msgstr "Mover a la der." -#: udav/plot_pnl.cpp:456 +#: udav/plot_pnl.cpp:457 msgid "Move selected plot down to next subplot." msgstr "Mover gráfica seleccionada al subgráfica abajo." -#: udav/plot_pnl.cpp:451 +#: udav/plot_pnl.cpp:452 msgid "Move selected plot up to previous subplot." msgstr "Mover gráfica seleccionada al subgráfica arriba." -#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:509 +#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:510 msgid "Move up" msgstr "Mover arriba" @@ -3449,7 +3453,7 @@ msgstr "Navegacion" #: udav/newcmd_dlg.cpp:101 udav/newcmd_dlg.cpp:308 udav/newcmd_dlg.cpp:336 #: udav/newcmd_dlg.cpp:340 udav/newcmd_dlg.cpp:354 udav/newcmd_dlg.cpp:367 #: udav/newcmd_dlg.cpp:375 udav/newcmd_dlg.cpp:379 udav/newcmd_dlg.cpp:383 -#: udav/text_pnl.cpp:558 udav/plot_pnl.cpp:439 mgllab/dialogs.cpp:702 +#: udav/text_pnl.cpp:558 udav/plot_pnl.cpp:440 mgllab/dialogs.cpp:702 msgid "New command" msgstr "Nuevo comando" @@ -3463,7 +3467,7 @@ msgstr "" "hacer una superficie con curvas de nivel usando los comandos 'surf' y 'cont' " "uno luego del otro (en cualquier orden). " -#: udav/text_pnl.cpp:562 udav/plot_pnl.cpp:444 +#: udav/text_pnl.cpp:562 udav/plot_pnl.cpp:445 msgid "New inplot" msgstr "Nuevo gráfico interno" @@ -3499,7 +3503,7 @@ msgstr "Sgte. @->" msgid "Next slice" msgstr "Siguiente sección" -#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:560 +#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:561 msgid "Next slide" msgstr "Siguiente cuadro" @@ -3603,7 +3607,7 @@ msgstr "Ny" msgid "Nz" msgstr "Nz" -#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:487 +#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:488 msgid "OBJ" msgstr "OBJ" @@ -3710,7 +3714,7 @@ msgstr "P - rosado oscuro" msgid "PDF support was disabled. Please, enable it and rebuild MathGL." msgstr "Formato PDF deshabilitado. Habilítelo y recompile MathGL." -#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:475 +#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:476 msgid "PNG" msgstr "PNG" @@ -3718,12 +3722,12 @@ msgstr "PNG" msgid "PNG Files \t*.png" msgstr "Archivos PNG \t*.png" -#: src/canvas_cf.cpp:546 src/canvas_cf.cpp:548 src/data_png.cpp:118 +#: src/canvas_cf.cpp:551 src/canvas_cf.cpp:553 src/data_png.cpp:118 #: src/export.cpp:75 src/export.cpp:109 msgid "PNG support was disabled. Please, enable it and rebuild MathGL." msgstr "Formato PNG deshabilitado. Habilítelo y recompile MathGL." -#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:486 +#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:487 msgid "PRC" msgstr "PRC" @@ -3792,7 +3796,7 @@ msgstr "Mover editor arriba" msgid "Plot ID" msgstr "ID del gráfico" -#: src/exec_prm.cpp:647 +#: src/exec_prm.cpp:648 msgid "Plot curve by formula" msgstr "Gráficar curva por fórmula" @@ -3821,7 +3825,7 @@ msgstr "Gráfica" msgid "Plot style" msgstr "Estilo de gráfica" -#: src/exec_prm.cpp:648 +#: src/exec_prm.cpp:649 msgid "Plot surface by formula" msgstr "Graficar superficie por fórmula" @@ -3837,7 +3841,7 @@ msgstr "Prev" msgid "Prev slice" msgstr "Seccion prev." -#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:575 +#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:576 msgid "Prev slide" msgstr "Seccion prev." @@ -3853,11 +3857,11 @@ msgstr "Expresiones previas" msgid "Primitives" msgstr "Primitivas" -#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:365 +#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:366 msgid "Primitives ..." msgstr "Primitivas ..." -#: src/exec_set.cpp:863 +#: src/exec_set.cpp:872 msgid "Print MathGL version or check if it is valid" msgstr "Imprimir version de MathGL o verificar su validez" @@ -3889,7 +3893,7 @@ msgstr "Imprimir gráfica" msgid "Print script" msgstr "Imprimir script" -#: src/exec_prm.cpp:645 +#: src/exec_prm.cpp:646 msgid "Print string from file" msgstr "Imprimir texto de archivo" @@ -3959,7 +3963,7 @@ msgstr "Salir" msgid "R - maroon" msgstr "R - carmesí" -#: src/exec_set.cpp:843 +#: src/exec_set.cpp:852 msgid "Rasterize plot and save to background" msgstr "Rasterizar gráfica y guardar de fondo" @@ -4009,7 +4013,7 @@ msgstr "Rehacer" msgid "Redo editor change (Ctrl+Shift+Z)." msgstr "Rehacer cambios de editor (Ctrl+Shift+Z)." -#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:331 +#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:332 msgid "Redraw" msgstr "Volver a graficar" @@ -4033,7 +4037,7 @@ msgstr "Actualizar la imagen" msgid "Relative position of i-th color" msgstr "Posición relativa al i-ésimo color" -#: udav/plot_pnl.cpp:342 +#: udav/plot_pnl.cpp:343 msgid "Reload" msgstr "Recargar" @@ -4103,7 +4107,7 @@ msgstr "Reservar espacio para etiquetas a la der. (estilo '>')" msgid "Reserve space for labels at top side (style '^')" msgstr "Reservar espacio para etiquetas arriba (estilo '^')" -#: src/exec_set.cpp:844 +#: src/exec_set.cpp:853 msgid "Reset settings and clear picture" msgstr "Reestablecer config. y limpiar imagen" @@ -4123,7 +4127,7 @@ msgstr "Reescalar datos" msgid "Resize data with smoothing" msgstr "Reescalar datos con suavizado" -#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:325 +#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:326 msgid "Restore" msgstr "Reestablecer" @@ -4135,11 +4139,11 @@ msgstr "Reestablecer rotacion , zoom y perspectiva por defecto" msgid "Restore default graphics rotation, zoom and perspective (Alt+Space)." msgstr "Reestablecer rotacion, zoom y perspectiva por defecto (Alt+Space)." -#: udav/plot_pnl.cpp:327 +#: udav/plot_pnl.cpp:328 msgid "Restore default graphics rotation, zoom and perspective (Ctrl+Space)." msgstr "Reestablecer rotacion, zoom y perspectiva por defecto (Ctrl+Space)." -#: udav/plot_pnl.cpp:344 +#: udav/plot_pnl.cpp:345 msgid "Restore status for 'once' command and reload data (F9)." msgstr "Reestablecer estado para comando 'once' y recargar datos (F9)." @@ -4177,19 +4181,19 @@ msgid "Roll data along direction(s)" msgstr "Roll data along direction(s)" #. rotate menu -#: udav/plot_pnl.cpp:540 +#: udav/plot_pnl.cpp:541 msgid "Rotate" msgstr "Rotar" -#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:310 +#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:311 msgid "Rotate by mouse" msgstr "Rotar con el mouse" -#: udav/plot_pnl.cpp:545 +#: udav/plot_pnl.cpp:546 msgid "Rotate down" msgstr "Rotar abajo" -#: udav/plot_pnl.cpp:549 +#: udav/plot_pnl.cpp:550 msgid "Rotate left" msgstr "Rotar a la izq." @@ -4201,15 +4205,15 @@ msgstr "Rotate on" msgid "Rotate picture by holding left mouse button" msgstr "Rotar figura al presionando el botón izq. del mouse" -#: src/exec_set.cpp:845 +#: src/exec_set.cpp:854 msgid "Rotate plot" msgstr "Rotar gráfica" -#: udav/plot_pnl.cpp:553 +#: udav/plot_pnl.cpp:554 msgid "Rotate right" msgstr "Rotar a la der." -#: udav/plot_pnl.cpp:541 +#: udav/plot_pnl.cpp:542 msgid "Rotate up" msgstr "Rotar arriba" @@ -4221,7 +4225,7 @@ msgstr "Rotacion" msgid "Run slideshow (CTRl+F5)." msgstr "Correr animación (CTRl+F5)." -#: udav/plot_pnl.cpp:570 +#: udav/plot_pnl.cpp:571 msgid "" "Run slideshow (Ctrl+F5). If no parameter specified\n" "then the dialog with slideshow options will appear." @@ -4237,11 +4241,11 @@ msgstr "Correr/detener animación" msgid "Russian" msgstr "Ruso" -#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:488 +#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:489 msgid "STL" msgstr "STL" -#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:480 +#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:481 msgid "SVG" msgstr "SVG" @@ -4365,7 +4369,7 @@ msgstr "Seleccionar nombre de directorio" msgid "Select kind of plot" msgstr "Seleccionar tipo de gráfica" -#: src/exec_set.cpp:862 +#: src/exec_set.cpp:871 msgid "Select variant of plot style(s)" msgstr "Seleccionar variante de estilo(s) de gráfica" @@ -4373,15 +4377,15 @@ msgstr "Seleccionar variante de estilo(s) de gráfica" msgid "Set" msgstr "Especificar" -#: src/exec_set.cpp:858 +#: src/exec_set.cpp:867 msgid "Set additional tick and axis labels shift" msgstr "Desplazamiento adicional para etiquetas y escala del eje" -#: src/exec_set.cpp:805 +#: src/exec_set.cpp:813 msgid "Set ambient light brightness" msgstr "Especificar brillo de luz ambiental" -#: src/exec_set.cpp:826 +#: src/exec_set.cpp:835 msgid "Set arbitrary position of plot in picture" msgstr "Especificar posición arbitraria de gráfica en imagen" @@ -4389,35 +4393,35 @@ msgstr "Especificar posición arbitraria de gráfica en imagen" msgid "Set arguments" msgstr "Argumentos" -#: src/exec_set.cpp:807 +#: src/exec_set.cpp:815 msgid "Set aspect ration" msgstr "Especificar proporcion de apariencia" -#: src/exec_set.cpp:809 +#: src/exec_set.cpp:817 msgid "Set axis and tick style" msgstr "Especificar estilos de eje y escala" -#: src/exec_set.cpp:835 +#: src/exec_set.cpp:844 msgid "Set axis origin" msgstr "Especificar origen de ejes" -#: src/exec_set.cpp:842 +#: src/exec_set.cpp:851 msgid "Set axis ranges" msgstr "Especificar rango de ejes" -#: src/exec_set.cpp:850 +#: src/exec_set.cpp:859 msgid "Set bit-flags (for advanced users only)" msgstr "Especificar bit-flags (para usuarios avanzados)" -#: src/exec_set.cpp:811 +#: src/exec_set.cpp:819 msgid "Set bounding box for 2d export" msgstr "Especificar \"bounding box\" para exportar 2D" -#: src/exec_set.cpp:832 +#: src/exec_set.cpp:841 msgid "Set brush for given mask id" msgstr "Especificar brocha para máscara id dada" -#: src/exec_set.cpp:816 +#: src/exec_set.cpp:824 msgid "Set color range" msgstr "Especificar rango de colores" @@ -4433,23 +4437,23 @@ msgstr "Activar/desactivar cortado para gráfica particular" msgid "Set data sizes manually" msgstr "Especificar tamaño de datos manualmente" -#: src/exec_set.cpp:810 +#: src/exec_set.cpp:818 msgid "Set default bars width" msgstr "Especificar ancho de barras" -#: src/exec_set.cpp:840 +#: src/exec_set.cpp:849 msgid "Set default filename" msgstr "Especificar nombre de archivo" -#: src/exec_set.cpp:804 +#: src/exec_set.cpp:812 msgid "Set default transparency" msgstr "Especificar transparencia" -#: src/exec_set.cpp:819 +#: src/exec_set.cpp:827 msgid "Set diffusive light brightness" msgstr "Especificar brillo de luz difusa" -#: src/exec_set.cpp:820 +#: src/exec_set.cpp:828 msgid "Set draw region for quality&4" msgstr "Especificar region de dibujo para calida&4" @@ -4473,75 +4477,75 @@ msgstr "Especificar area de dibujo como celda de barra." msgid "Set lighting off/on for particular plot" msgstr "Activar/desactivar luz para gráfica particular" -#: src/exec_set.cpp:833 +#: src/exec_set.cpp:842 msgid "Set number of lines in mesh/fall/vect and so on" msgstr "Especificar número de líneas en grilla/cascada/etc." -#: src/exec_set.cpp:827 +#: src/exec_set.cpp:836 msgid "Set number of marks in the legend" msgstr "Especificar número de marcas en leyenda" -#: src/exec_set.cpp:821 +#: src/exec_set.cpp:829 msgid "Set number of visible faces" msgstr "Especificar número de facetas visibles" -#: src/exec_set.cpp:837 +#: src/exec_set.cpp:846 msgid "Set palette for 1D plots" msgstr "Especificar paleta para gráficas 1D" -#: src/exec_set.cpp:839 +#: src/exec_set.cpp:848 msgid "Set perspective" msgstr "Especificar perspectiva" -#: src/exec_set.cpp:848 +#: src/exec_set.cpp:857 msgid "Set picture size" msgstr "Especificar tamaño de imagen" -#: src/exec_set.cpp:841 +#: src/exec_set.cpp:850 msgid "Set plot quality" msgstr "Especificar calidad de gráfica" -#: src/exec_set.cpp:854 +#: src/exec_set.cpp:863 msgid "Set position of plot as cell of matrix" msgstr "Especificar posición de gráfica como celda de matriz" -#: src/exec_set.cpp:834 +#: src/exec_set.cpp:843 msgid "Set position of plot block in matrix" msgstr "Especificar posición de gráfica en matriz" -#: src/exec_set.cpp:815 +#: src/exec_set.cpp:823 msgid "Set position of plot inside cell of column" msgstr "Especificar posición de gráfica en celda de columna" -#: src/exec_set.cpp:825 +#: src/exec_set.cpp:834 msgid "Set position of plot inside cell of matrix" msgstr "Especificar posición de gráfica en celda de matriz" -#: src/exec_set.cpp:853 +#: src/exec_set.cpp:862 msgid "Set position of plot inside cell of rotated stick" msgstr "Especificar posición de gráfica en celda de barra rotada" -#: src/exec_set.cpp:852 +#: src/exec_set.cpp:861 msgid "Set position of plot inside cell of sheared stick" msgstr "Especificar posición de gráfica en celda de barra recortada" -#: src/exec_set.cpp:866 +#: src/exec_set.cpp:875 msgid "Set range for x-axis" msgstr "Especificar rango de eje x" -#: src/exec_set.cpp:868 +#: src/exec_set.cpp:877 msgid "Set range for y-axis" msgstr "Especificar rango de eje y" -#: src/exec_set.cpp:872 +#: src/exec_set.cpp:881 msgid "Set range for z-axis" msgstr "Especificar rango de eje z" -#: src/exec_set.cpp:847 +#: src/exec_set.cpp:856 msgid "Set scale text in relative subplots too" msgstr "Set scale text in relative subplots too" -#: src/exec_set.cpp:849 +#: src/exec_set.cpp:858 msgid "Set scaling factor for further setsize" msgstr "Especificar factor de escala para \"setsize\"" @@ -4553,51 +4557,51 @@ msgstr "Especificar argumentos de script" msgid "Set size for text, marks and others" msgstr "Especificar tamaño de texto, marcas y otros" -#: src/exec_set.cpp:806 +#: src/exec_set.cpp:814 msgid "Set size of arrows" msgstr "Especificar tamaño de flechas" -#: src/exec_set.cpp:831 +#: src/exec_set.cpp:840 msgid "Set size of markers" msgstr "Especificar tamaño de marcadores" -#: src/exec_set.cpp:838 +#: src/exec_set.cpp:847 msgid "Set size of semi-transparent area around line" msgstr "Especificar tamaño de area semitransparente alrededor de línea" -#: src/exec_set.cpp:836 +#: src/exec_set.cpp:845 msgid "Set tick labels drawing at origin" msgstr "Set tick labels drawing at origin" -#: src/exec_set.cpp:857 +#: src/exec_set.cpp:866 msgid "Set tick length" msgstr "Especificar longtud de marcas" -#: src/exec_set.cpp:817 +#: src/exec_set.cpp:825 msgid "Set ticks for colorbar" msgstr "Especificar escala para barra de colores" -#: src/exec_set.cpp:867 +#: src/exec_set.cpp:876 msgid "Set ticks for x-axis" msgstr "Especificar escala para el eje x" -#: src/exec_set.cpp:869 +#: src/exec_set.cpp:878 msgid "Set ticks for y-axis" msgstr "Especificar escala para el eje y" -#: src/exec_set.cpp:873 +#: src/exec_set.cpp:882 msgid "Set ticks for z-axis" msgstr "Especificar escala para el eje z" -#: src/exec_set.cpp:859 +#: src/exec_set.cpp:868 msgid "Set ticks in time format" msgstr "Especificar escala en formato de tiempo" -#: src/exec_set.cpp:861 +#: src/exec_set.cpp:870 msgid "Set ticks tuning" msgstr "Afinar escala" -#: src/exec_set.cpp:846 +#: src/exec_set.cpp:855 msgid "Set to auto rotate text or not" msgstr "Activar/desactivar rotacion de texto" @@ -4605,7 +4609,7 @@ msgstr "Activar/desactivar rotacion de texto" msgid "Set to use whole area (style '#')" msgstr "Usar toda el area (estilo '#')" -#: src/exec_set.cpp:860 +#: src/exec_set.cpp:869 msgid "Set type transparency" msgstr "Especificar tipo de transparencia" @@ -4613,7 +4617,7 @@ msgstr "Especificar tipo de transparencia" msgid "Set value of \\phi angle." msgstr "Especificar valor de ángulo \\phi." -#: udav/plot_pnl.cpp:472 +#: udav/plot_pnl.cpp:473 msgid "" "Set value of \\phi angle.\n" "You can use keys (Shift+Meta+Left or Shift+Meta+Right)." @@ -4625,7 +4629,7 @@ msgstr "" msgid "Set value of \\theta angle." msgstr "Especificar valor de ángulo \\theta." -#: udav/plot_pnl.cpp:466 +#: udav/plot_pnl.cpp:467 msgid "" "Set value of \\theta angle.\n" "You can use keys (Shift+Meta+Up or Shift+Meta+Down)." @@ -4649,19 +4653,19 @@ msgstr "Animación" msgid "Setup colors for:" msgstr "Config. colores para:" -#: src/exec_set.cpp:823 +#: src/exec_set.cpp:832 msgid "Setup font" msgstr "Config. fuente" -#: src/exec_set.cpp:828 +#: src/exec_set.cpp:837 msgid "Setup light" msgstr "Config. luz" -#: src/exec_prm.cpp:629 +#: src/exec_prm.cpp:630 msgid "Setup or draw axis" msgstr "Config. o graficar eje" -#: src/exec_set.cpp:818 +#: src/exec_set.cpp:826 msgid "Setup plot points cutting" msgstr "Config. cortado de gráfica" @@ -4669,7 +4673,7 @@ msgstr "Config. cortado de gráfica" msgid "Setup script" msgstr "Config. script" -#: udav/plot_pnl.cpp:573 +#: udav/plot_pnl.cpp:574 msgid "Setup show" msgstr "Config. animación" @@ -4685,7 +4689,7 @@ msgstr "Sew phase" msgid "Sharp colors" msgstr "Colores fuertes" -#: src/exec_set.cpp:851 +#: src/exec_set.cpp:860 msgid "Shear plot" msgstr "Recortar gráfica" @@ -4737,12 +4741,12 @@ msgstr "Mostrar dialogo de config. de gráfica" msgid "Show dialog for UDAV properties." msgstr "Mostrar dialogo de propiedades de UDAV." -#: udav/text_pnl.cpp:560 udav/plot_pnl.cpp:441 +#: udav/text_pnl.cpp:560 udav/plot_pnl.cpp:442 msgid "Show dialog for new command or edit arguments of existed one." msgstr "" "Mostrar dialogo de nuevo comando o editar argumentos de los existentes." -#: udav/text_pnl.cpp:564 udav/plot_pnl.cpp:446 +#: udav/text_pnl.cpp:564 udav/plot_pnl.cpp:447 msgid "Show dialog for new inplot and put it into the script." msgstr "Mostrar dialogo para nuevo gráfico interno y añadirlo al script." @@ -4802,7 +4806,7 @@ msgstr "Mostrar líneas" msgid "Show next frame in slideshow" msgstr "Mostrar sgte. cuadro de la animación" -#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:563 +#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:564 msgid "Show next slide (Ctrl+.)." msgstr "Mostrar sgte. cuadro (Ctrl+.)." @@ -4810,7 +4814,7 @@ msgstr "Mostrar sgte. cuadro (Ctrl+.)." msgid "Show previous frame in slideshow" msgstr "Mostrar cuadro previo de la animación" -#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:578 +#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:579 msgid "Show previous slide (Ctrl+,)." msgstr "Mostrar cuadro previo (Ctrl+,)." @@ -4819,7 +4823,7 @@ msgstr "Mostrar cuadro previo (Ctrl+,)." msgid "Show window for primitives" msgstr "Mostrar dialogo de propiedades de UDAV." -#: src/random.cpp:354 +#: src/random.cpp:349 msgid "Shuffle data cells (for dir='a') or slices (for dir='xyz')" msgstr "" @@ -4861,7 +4865,7 @@ msgstr "Tamaños" msgid "Skip commands and iterate for-loop again" msgstr "Saltar comandos e iterar bucle \"for\" nuevamente" -#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:566 +#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:567 msgid "Slideshow" msgstr "Animación" @@ -4978,7 +4982,7 @@ msgstr "Estado" msgid "Step for pulse diffraction" msgstr "Paso para pulso de difracción" -#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:347 +#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:348 msgid "Stop" msgstr "Deterner" @@ -4990,7 +4994,7 @@ msgstr "Detener graficación" msgid "Stop execution" msgstr "Detener ejecución" -#: udav/plot_pnl.cpp:349 +#: udav/plot_pnl.cpp:350 msgid "Stop script execution (F7)." msgstr "Detener ejecución de script (F7)." @@ -5124,16 +5128,16 @@ msgstr "Invertir orden de datos en dirección(es)" msgid "Swap parts" msgstr "Intercambiar partes" -#: src/exec_set.cpp:856 +#: src/exec_set.cpp:865 #, fuzzy msgid "Switch on/off TeX parsing at text output" msgstr "Activar/desactivar transparencia en la imagen" -#: src/exec_set.cpp:822 +#: src/exec_set.cpp:831 msgid "Switch on/off fog" msgstr "Activar/desactivar niebla" -#: src/exec_set.cpp:824 +#: src/exec_set.cpp:833 msgid "Switch on/off gray-scale mode" msgstr "Activar/desactivar modo B/N" @@ -5142,7 +5146,7 @@ msgid "Switch on/off grid drawing" msgstr "Activar/desactivar dibujado de grilla" # Activar/desactivar=(Des)activar? -#: udav/plot_pnl.cpp:307 +#: udav/plot_pnl.cpp:308 msgid "Switch on/off grid of absolute coordinates (Ctrl+G)." msgstr "Activar/desactivar grilla de coordenadas absolutas (Ctrl+G)." @@ -5150,7 +5154,7 @@ msgstr "Activar/desactivar grilla de coordenadas absolutas (Ctrl+G)." msgid "Switch on/off lightning for the graphics (Alt+L)." msgstr "Activar/desactivar luz para las gráficas (Alt+L)." -#: udav/plot_pnl.cpp:301 +#: udav/plot_pnl.cpp:302 msgid "Switch on/off lightning for the graphics (Ctrl+L)." msgstr "Activar/desactivar luz para las gráficas (Alt+L)." @@ -5158,7 +5162,7 @@ msgstr "Activar/desactivar luz para las gráficas (Alt+L)." msgid "Switch on/off lightning in the picture" msgstr "Activar/desactivar luz en la imagen" -#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:314 +#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:315 msgid "" "Switch on/off mouse handling of the graphics\n" "(rotation, shifting, zooming and perspective)." @@ -5171,11 +5175,11 @@ msgid "Switch on/off mouse zoom of selected region." msgstr "Activar/desactivar zoom con el mouse de la región seleccionada." # Ternario or triple? -#: src/exec_set.cpp:855 +#: src/exec_set.cpp:864 msgid "Switch on/off to use ternary axis" msgstr "Activar/desactivar uso de ejes ternarios" -#: src/exec_set.cpp:803 +#: src/exec_set.cpp:811 msgid "Switch on/off transparency" msgstr "Activar/desactivar transparencia" @@ -5183,7 +5187,7 @@ msgstr "Activar/desactivar transparencia" msgid "Switch on/off transparency for the graphics (Alt+T)." msgstr "Activar/desactivar transparencia para gráfica (Alt+T)." -#: udav/plot_pnl.cpp:294 +#: udav/plot_pnl.cpp:295 msgid "Switch on/off transparency for the graphics (Ctrl+T)." msgstr "Activar/desactivar transparencia para gráfica (Alt+T)." @@ -5199,7 +5203,7 @@ msgstr "Rango simétrico" msgid "Symmetrical?" msgstr "¿Simétrico?" -#: src/addon.cpp:121 src/base_cf.cpp:281 +#: src/addon.cpp:122 src/base_cf.cpp:283 #, c-format msgid "TEST: %s\n" msgstr "TEST: %s\n" @@ -5270,7 +5274,7 @@ msgstr "" "Los diálogos especiales (Editar|Insertar|Nuevo comando) ayudan a seleccionar " "un comando, llenar sus argumentos y añadirlo al script." -#: src/crust.cpp:590 +#: src/crust.cpp:619 msgid "" "There are duplicated or indistinguishably adjacent points for triangulation." msgstr "" @@ -5788,7 +5792,7 @@ msgstr "Gráfica de cables o grilla" msgid "Wire style" msgstr "Estilo de alambre" -#: src/exec_set.cpp:865 +#: src/exec_set.cpp:874 msgid "Write current image to graphical file" msgstr "Guardar imagen actual a archivo gráfico" @@ -5824,7 +5828,7 @@ msgstr "Sección x desde" msgid "X/Z" msgstr "X/Z" -#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:489 +#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:490 msgid "XYZ" msgstr "XYZ" @@ -6072,7 +6076,7 @@ msgstr "Tamaño z" msgid "Z-slice from" msgstr "Sección z para" -#: src/exec_set.cpp:871 +#: src/exec_set.cpp:880 msgid "Zoom axis range" msgstr "Rango de zoom para eje" @@ -6085,11 +6089,11 @@ msgid "Zoom graphics" msgstr "Escalar gráfica" # Zoom in=acercar or ampliar? -#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:515 +#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:516 msgid "Zoom in" msgstr "Magnificar" -#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:518 +#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:519 msgid "Zoom in graphics." msgstr "Magnificar gráfica." @@ -6106,11 +6110,11 @@ msgstr "Magnificar texto" msgid "Zoom in the picture" msgstr "Magnificar la imagen" -#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:521 +#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:522 msgid "Zoom out" msgstr "Reducir" -#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:524 +#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:525 msgid "Zoom out graphics." msgstr "Reducir gráfica." @@ -6122,12 +6126,12 @@ msgstr "Reducir texto" msgid "Zoom out the picture" msgstr "Reducir la imagen" -#: src/exec_set.cpp:870 +#: src/exec_set.cpp:879 msgid "Zoom plot region" msgstr "Escalar región de gráfica" #. zooming menu -#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:502 +#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:503 msgid "Zoom/move" msgstr "Zoom/mover" @@ -6206,7 +6210,7 @@ msgstr "b - azul" msgid "bars" msgstr "barras" -#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:478 +#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:479 msgid "bitmap EPS" msgstr "mapa de bits EPS" @@ -6408,28 +6412,28 @@ msgstr "mgl_en" #, c-format msgid "" "mglconv convert mgl script to image file (default PNG).\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mglconv convierte scripts MGL a archivos de imagen (PNG por defecto).\n" -"La version actual es 2.%g\n" +"La version actual es %s\n" #: mgllab/mgllab.cpp:422 #, c-format msgid "" "mgllab draw mgl script interactively.\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mgllab gráfica scripts MGL de manera interactiva.\n" -"La version actual es 2.%g\n" +"La version actual es %s\n" #: mgllab/help.cpp:78 #, c-format msgid "" -"mgllab v. 2.%g\n" +"mgllab v. %s\n" "(c) Alexey Balakin, 2017\n" "http://mathgl.sf.net/" msgstr "" -"mgllab v. 2.%g\n" +"mgllab v. %s\n" "(c) Alexey Balakin, 2017\n" "http://mathgl.sf.net/" @@ -6437,10 +6441,10 @@ msgstr "" #, c-format msgid "" "mglview show plot from MGL script or MGLD file.\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mglview muestra la gráfica de un script MGL o de un archivo MGLD.\n" -"La version actual es 2.%g\n" +"La version actual es %s\n" #: udav/data_dlg.cpp:68 msgid "min" @@ -6605,7 +6609,7 @@ msgstr "suavizado" msgid "solid" msgstr "sólido" -#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:476 +#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:477 msgid "solid PNG" msgstr "PNG sólido" @@ -6676,7 +6680,7 @@ msgstr "usuario" msgid "values" msgstr "valores" -#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:479 +#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:480 msgid "vector EPS" msgstr "EPS vectorial" diff --git a/mathgl_ru.po b/mathgl_ru.po index 87a4e73..02d0909 100644 --- a/mathgl_ru.po +++ b/mathgl_ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: MathGL2 2.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-03 16:47+0300\n" +"POT-Creation-Date: 2021-12-27 05:03+0300\n" "PO-Revision-Date: 2017-04-19 01:17+0300\n" "Last-Translator: Alexey Balakin \n" "Language-Team: Russian\n" @@ -188,7 +188,7 @@ msgstr " Сохранить" msgid " Yes " msgstr "Да" -#: udav/plot_pnl.cpp:191 +#: udav/plot_pnl.cpp:192 #, c-format msgid "%d - %d of %d" msgstr "%d - %d из %d" @@ -570,11 +570,11 @@ msgstr "О программе" msgid "About Qt" msgstr "О версии Qt" -#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:372 +#: widgets/qt.cpp:1173 udav/plot_pnl.cpp:373 msgid "Add arc" msgstr "Добавить дугу" -#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:375 +#: widgets/qt.cpp:1176 udav/plot_pnl.cpp:376 msgid "Add arc which properties can be changed later by mouse." msgstr "Добавить дугу. Ее свойства можно изменить позже мышью." @@ -582,11 +582,11 @@ msgstr "Добавить дугу. Ее свойства можно измени msgid "Add command option(s)" msgstr "Добавить опции команды" -#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:378 +#: widgets/qt.cpp:1178 udav/plot_pnl.cpp:379 msgid "Add curve" msgstr "Добавить кривую" -#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:381 +#: widgets/qt.cpp:1181 udav/plot_pnl.cpp:382 msgid "Add curve which properties can be changed later by mouse." msgstr "Добавить кривую. Ее свойства можно изменить позже мышью." @@ -594,11 +594,11 @@ msgstr "Добавить кривую. Ее свойства можно изме msgid "Add data or number" msgstr "Прибавить массив или число" -#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:396 +#: widgets/qt.cpp:1193 udav/plot_pnl.cpp:397 msgid "Add ellipse" msgstr "Добавить эллипс" -#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:399 udav/plot_pnl.cpp:405 +#: widgets/qt.cpp:1196 udav/plot_pnl.cpp:400 udav/plot_pnl.cpp:406 msgid "Add ellipse which properties can be changed later by mouse." msgstr "Добавить эллипс. Его свойства можно изменить позже мышью." @@ -606,7 +606,7 @@ msgstr "Добавить эллипс. Его свойства можно изм msgid "Add inplot" msgstr "Добавить под-график" -#: src/exec_set.cpp:800 +#: src/exec_set.cpp:808 msgid "Add legend entry" msgstr "Добавить запись легенды" @@ -614,23 +614,23 @@ msgstr "Добавить запись легенды" msgid "Add legend entry for the plot" msgstr "Добавить запись легенды для графика" -#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:366 +#: widgets/qt.cpp:1168 udav/plot_pnl.cpp:367 msgid "Add line" msgstr "Добавить линию" -#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:369 +#: widgets/qt.cpp:1171 udav/plot_pnl.cpp:370 msgid "Add line which properties can be changed later by mouse." msgstr "Добавить линию. Ее свойства можно изменить позже мышью." -#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:408 +#: widgets/qt.cpp:1203 udav/plot_pnl.cpp:409 msgid "Add mark" msgstr "Добавить маркер" -#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:411 +#: widgets/qt.cpp:1206 udav/plot_pnl.cpp:412 msgid "Add marker which properties can be changed later by mouse." msgstr "Добавить маркер. Его свойства можно изменить позже мышью." -#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:402 +#: widgets/qt.cpp:1198 udav/plot_pnl.cpp:403 msgid "Add polygon" msgstr "Добавить полигон" @@ -642,31 +642,31 @@ msgstr "Добавить полигон. Его свойства можно из msgid "Add primitive" msgstr "Добавить примитивы" -#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:384 +#: widgets/qt.cpp:1183 udav/plot_pnl.cpp:385 msgid "Add rect" msgstr "Добавить прямоугольник" -#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:387 +#: widgets/qt.cpp:1186 udav/plot_pnl.cpp:388 msgid "Add rectangle which properties can be changed later by mouse." msgstr "Добавить прямоугольник. Его свойства можно изменить позже мышью." -#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:390 +#: widgets/qt.cpp:1188 udav/plot_pnl.cpp:391 msgid "Add rhombus" msgstr "Добавить ромб" -#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:393 +#: widgets/qt.cpp:1191 udav/plot_pnl.cpp:394 msgid "Add rhombus which properties can be changed later by mouse." msgstr "Добавить ромб. Его свойства можно изменить позже мышью." -#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:414 +#: widgets/qt.cpp:1208 udav/plot_pnl.cpp:415 msgid "Add text" msgstr "Добавить текст" -#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:417 +#: widgets/qt.cpp:1211 udav/plot_pnl.cpp:418 msgid "Add text which properties can be changed later by mouse." msgstr "Добавить текст. Его свойства можно изменить позже мышью." -#: src/exec_prm.cpp:662 +#: src/exec_prm.cpp:663 msgid "Add title for current subplot/inplot" msgstr "Добавить заголовок к текущему под-графику" @@ -674,7 +674,7 @@ msgstr "Добавить заголовок к текущему под-граф msgid "Add to" msgstr "Добавить к" -#: src/exec_set.cpp:801 +#: src/exec_set.cpp:809 msgid "Add user-defined symbol" msgstr "Добавить пользовательский символ" @@ -682,11 +682,11 @@ msgstr "Добавить пользовательский символ" msgid "Adjust picture size to fill drawing area" msgstr "Подогнать размер картинки под область окна" -#: widgets/fltk.cpp:846 widgets/qt.cpp:1156 udav/plot_pnl.cpp:337 +#: widgets/fltk.cpp:846 widgets/qt.cpp:1156 udav/plot_pnl.cpp:338 msgid "Adjust size" msgstr "Подогнать размер" -#: src/exec_set.cpp:802 +#: src/exec_set.cpp:810 msgid "Adjust ticks for best view" msgstr "Подобрать метки осей для лучшего вида" @@ -701,7 +701,7 @@ msgstr "Все индексы (данных, под-графиков и пр.) #. graphics menu #: widgets/qt.cpp:1115 udav/opt_dlg.cpp:51 udav/setup_dlg.cpp:109 -#: udav/plot_pnl.cpp:290 mgllab/dialogs.cpp:109 +#: udav/plot_pnl.cpp:291 mgllab/dialogs.cpp:109 msgid "Alpha" msgstr "" @@ -727,7 +727,7 @@ msgid "Angle around z axis (in degrees)" msgstr "Угол относительно оси z (в градусах)" #. animation menu -#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:559 +#: widgets/qt.cpp:1261 widgets/qt.cpp:1262 udav/plot_pnl.cpp:560 #: mgllab/mathgl.cpp:185 msgid "Animation" msgstr "Анимация" @@ -787,7 +787,7 @@ msgstr "Соотношение сторон по y и z" msgid "Aspect x/z" msgstr "Стороны x/z" -#: src/exec_set.cpp:808 +#: src/exec_set.cpp:816 msgid "Attach light settings to inplot" msgstr "Привязать настройки света к под-графику" @@ -951,7 +951,7 @@ msgstr "Калькулятор" msgid "Cancel" msgstr "Отмена" -#: src/crust.cpp:588 +#: src/crust.cpp:617 msgid "Cannot triangulate this set!" msgstr "Не могу построить триангуляцию!" @@ -972,11 +972,11 @@ msgstr "Изменить" msgid "Change (resize) data" msgstr "Изменить размер данных" -#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:339 +#: widgets/qt.cpp:1158 udav/plot_pnl.cpp:340 msgid "Change canvas size to fill whole region (F6)." msgstr "Подогнать размер рисунка под размер окна (F6)." -#: src/exec_set.cpp:812 +#: src/exec_set.cpp:820 msgid "Change current directory" msgstr "Сменить директорию" @@ -996,7 +996,7 @@ msgstr "Изменить данные и закрыть окно" msgid "Change font" msgstr "Изменить шрифт" -#: src/exec_set.cpp:864 +#: src/exec_set.cpp:873 msgid "Change view angles - use 'rotate' for plot rotation" msgstr "Изменяет углы обзора, а не поворот как 'rotate'" @@ -1008,11 +1008,11 @@ msgstr "Очистить" msgid "Clear all" msgstr "Удалить все" -#: src/exec_set.cpp:813 +#: src/exec_set.cpp:821 msgid "Clear legend entries" msgstr "Удалить записи легенды" -#: src/exec_set.cpp:814 +#: src/exec_set.cpp:822 msgid "Clear picture" msgstr "Очистить рисунок" @@ -1090,19 +1090,19 @@ msgstr "Опции команды" msgid "Comments" msgstr "Комментарий" -#: src/exec_prm.cpp:650 +#: src/exec_prm.cpp:651 msgid "Computes the attractor of an IFS" msgstr "Вычисляет точки фрактала IFS" -#: src/exec_prm.cpp:651 +#: src/exec_prm.cpp:652 msgid "Computes the attractor of an IFS for 3d case" msgstr "Вычисляет точки фрактала IFS в 3d случае" -#: src/exec_prm.cpp:652 +#: src/exec_prm.cpp:653 msgid "Computes the attractor of an IFS with parameters from *.ifs file" msgstr "Вычисляет точки фрактала IFS с параметрами из файла" -#: src/exec_prm.cpp:646 +#: src/exec_prm.cpp:647 msgid "Computes the flame fractal" msgstr "Вычисляет точки фрактала flame" @@ -1114,11 +1114,11 @@ msgstr "Условие do-while цикла" msgid "Conditional operator" msgstr "Условный оператор" -#: udav/plot_pnl.cpp:358 +#: udav/plot_pnl.cpp:359 msgid "Copy click coor." msgstr "Копировать коор. мыши" -#: udav/plot_pnl.cpp:360 +#: udav/plot_pnl.cpp:361 msgid "Copy coordinates of last mouse click to clipboard." msgstr "Копировать координаты последнего нажатия в буфер обмена" @@ -1134,7 +1134,7 @@ msgstr "Копировать данные из другой переменной msgid "Copy graphics" msgstr "Копировать рисунок" -#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:354 +#: widgets/qt.cpp:1162 udav/plot_pnl.cpp:355 msgid "Copy graphics to clipboard (Ctrl+Shift+G)." msgstr "Копировать рисунок в буфер обмена (Ctrl+Shift+G)." @@ -1142,7 +1142,7 @@ msgstr "Копировать рисунок в буфер обмена (Ctrl+Shi msgid "Copy image to clipboard" msgstr "Копировать рисунок в буфер обмена" -#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:352 +#: widgets/qt.cpp:1160 udav/plot_pnl.cpp:353 msgid "Copy plot" msgstr "Копировать рисунок" @@ -1345,11 +1345,11 @@ msgstr "Просмотр текущего среза данных." msgid "Data transform" msgstr "Преобразование данных" -#: udav/plot_pnl.cpp:556 +#: udav/plot_pnl.cpp:557 msgid "Decrease \\phi angle by 10 degrees." msgstr "Уменьшить угол φ на 10 градусов." -#: udav/plot_pnl.cpp:548 +#: udav/plot_pnl.cpp:549 msgid "Decrease \\theta angle by 10 degrees." msgstr "Уменьшить угол θ на 10 градусов." @@ -1393,7 +1393,7 @@ msgstr "Удалить ВСЕ массивы данных" msgid "Delete data or slice of data" msgstr "Удалить данные или их срез" -#: udav/plot_pnl.cpp:426 +#: udav/plot_pnl.cpp:427 msgid "Delete selected" msgstr "Удалить выбранное" @@ -1405,7 +1405,7 @@ msgstr "Удалить выбранные данные" msgid "Delete selected data." msgstr "Удалить выбранные данные." -#: udav/plot_pnl.cpp:428 +#: udav/plot_pnl.cpp:429 msgid "Delete selected plot." msgstr "Удалить выбранный график" @@ -1446,6 +1446,10 @@ msgstr "Направление" msgid "Direction along which data will be filled" msgstr "Направление по которому данные будут заполняться" +#: src/exec_set.cpp:830 +msgid "Disable accurate primitive cutting at axis borders" +msgstr "" + #: udav/subplot_dlg.cpp:105 udav/subplot_dlg.cpp:122 msgid "Distance between cells" msgstr "Расстояние между ячейками" @@ -1519,7 +1523,7 @@ msgstr "Нарисовать диаграмму STFA" msgid "Draw TeX mark at point position" msgstr "Нарисовать ТеХ символы в положении точек" -#: src/exec_prm.cpp:628 +#: src/exec_prm.cpp:629 msgid "Draw angle arc" msgstr "Нарисовать дугу" @@ -1543,11 +1547,11 @@ msgstr "Нарисовать поверхность ленточками с за msgid "Draw binormales for 1D data" msgstr "Нарисовать нормаль и бинормаль для кривой" -#: src/exec_prm.cpp:655 +#: src/exec_prm.cpp:656 msgid "Draw bitmap (logo) along axis range" msgstr "Нарисовать растр (логотип) в области осей координат" -#: src/exec_prm.cpp:632 +#: src/exec_prm.cpp:633 msgid "Draw bounding box" msgstr "Нарисовать ограничивающий параллелепипед" @@ -1567,7 +1571,7 @@ msgstr "Нарисовать свечной график" msgid "Draw chart" msgstr "Нарисовать линейчатую (круговую) диаграмму" -#: src/exec_prm.cpp:633 +#: src/exec_prm.cpp:634 msgid "Draw circle" msgstr "Нарисовать окружность (круг)" @@ -1575,11 +1579,11 @@ msgstr "Нарисовать окружность (круг)" msgid "Draw cloud" msgstr "Нарисовать облако для 3D данных" -#: src/exec_prm.cpp:635 +#: src/exec_prm.cpp:636 msgid "Draw colorbar" msgstr "Нарисовать цветовую шкалу" -#: src/exec_prm.cpp:636 +#: src/exec_prm.cpp:637 msgid "Draw cone" msgstr "Нарисовать конус" @@ -1623,7 +1627,7 @@ msgstr "Нарисовать цилиндры по линиям уровней" msgid "Draw contour tubes for surface of triangles" msgstr "Нарисовать цилиндры по линиям уровней для поверхности из треугольников" -#: src/exec_prm.cpp:637 +#: src/exec_prm.cpp:638 msgid "Draw curve" msgstr "Нарисовать кривую" @@ -1632,9 +1636,8 @@ msgid "Draw curve by tube" msgstr "Нарисовать трубу около кривой" #: src/exec_gr.cpp:1234 -#, fuzzy msgid "Draw curves of cross-section of isosurfaces a,b for 3D data" -msgstr "Нарисовать поверхность постоянного уровня" +msgstr "Нарисовать линии пересечения поверхностей постоянного уровня" #: src/exec_gr.cpp:1235 msgid "Draw density plot" @@ -1664,15 +1667,15 @@ msgstr "Нарисовать векторное поле каплями" msgid "Draw dots for arbitrary data points" msgstr "Нарисовать набор точек" -#: src/exec_prm.cpp:638 +#: src/exec_prm.cpp:639 msgid "Draw drop" msgstr "Нарисовать каплю" -#: src/exec_prm.cpp:639 +#: src/exec_prm.cpp:640 msgid "Draw ellipse" msgstr "Нарисовать эллипс" -#: src/exec_prm.cpp:640 +#: src/exec_prm.cpp:641 msgid "Draw error box" msgstr "Нарисовать размер ошибки" @@ -1680,19 +1683,19 @@ msgstr "Нарисовать размер ошибки" msgid "Draw error boxes" msgstr "Нарисовать размеры ошибок для 1D данных" -#: src/exec_prm.cpp:641 +#: src/exec_prm.cpp:642 msgid "Draw face (quadrangle)" msgstr "Нарисовать грань (четырехугольник)" -#: src/exec_prm.cpp:642 +#: src/exec_prm.cpp:643 msgid "Draw face perpendicular to x-axis" msgstr "Нарисовать грань поперек оси x" -#: src/exec_prm.cpp:643 +#: src/exec_prm.cpp:644 msgid "Draw face perpendicular to y-axis" msgstr "Нарисовать грань поперек оси y" -#: src/exec_prm.cpp:644 +#: src/exec_prm.cpp:645 msgid "Draw face perpendicular to z-axis" msgstr "Нарисовать грань поперек оси z" @@ -1716,7 +1719,7 @@ msgstr "Нарисовать линии тока для векторного п msgid "Draw gradient lines for scalar field" msgstr "Нарисовать линии градиента для скалярного поля" -#: src/exec_prm.cpp:649 +#: src/exec_prm.cpp:650 msgid "Draw grid" msgstr "Нарисовать сетку осей координат" @@ -1760,38 +1763,37 @@ msgstr "Нарисовать поверхность уровня с заданн msgid "Draw label at arbitrary position" msgstr "Вывести надписи для 1D данных" -#: src/exec_prm.cpp:634 +#: src/exec_prm.cpp:635 msgid "Draw label for colorbar" msgstr "Вывести подпись colorbar" -#: src/exec_prm.cpp:663 +#: src/exec_prm.cpp:664 msgid "Draw label for t-axis" msgstr "Вывести подпись оси t" -#: src/exec_prm.cpp:664 +#: src/exec_prm.cpp:665 msgid "Draw label for x-axis" msgstr "Вывести подпись оси x" -#: src/exec_prm.cpp:665 +#: src/exec_prm.cpp:666 msgid "Draw label for y-axis" msgstr "Вывести подпись оси y" -#: src/exec_prm.cpp:666 +#: src/exec_prm.cpp:667 msgid "Draw label for z-axis" msgstr "Вывести подпись оси z" -#: src/exec_prm.cpp:653 +#: src/exec_prm.cpp:654 msgid "Draw legend" msgstr "Нарисовать легенду графика" -#: src/exec_prm.cpp:654 +#: src/exec_prm.cpp:655 msgid "Draw line" msgstr "Нарисовать прямую линию" #: src/exec_gr.cpp:1253 -#, fuzzy msgid "Draw lines with arrows for 1D data" -msgstr "Нарисовать график из вертикальных полос" +msgstr "Нарисовать график из стрелок" #: src/exec_gr.cpp:1254 msgid "Draw mapping plot" @@ -1805,11 +1807,11 @@ msgstr "Нарисовать маркеры переменного размер msgid "Draw mesh surface" msgstr "Нарисовать сетчатую поверхность" -#: src/exec_prm.cpp:631 +#: src/exec_prm.cpp:632 msgid "Draw point (ball)" msgstr "Нарисовать точку" -#: src/exec_prm.cpp:656 +#: src/exec_prm.cpp:657 msgid "Draw polygon" msgstr "Нарисовать полигон" @@ -1825,11 +1827,11 @@ msgstr "Нарисовать круговой график" msgid "Draw reconstructed surface for arbitrary data points" msgstr "Нарисовать поверхность по произвольным точкам" -#: src/exec_prm.cpp:657 +#: src/exec_prm.cpp:658 msgid "Draw rectangle" msgstr "Нарисовать прямоугольник" -#: src/exec_prm.cpp:658 +#: src/exec_prm.cpp:659 msgid "Draw rhombus" msgstr "Нарисовать ромб" @@ -1873,7 +1875,7 @@ msgstr "Нарисовать поверхность с заданным цвет msgid "Draw solid surface transpared by other data" msgstr "Нарисовать поверхность с заданной прозрачностью" -#: src/exec_prm.cpp:659 +#: src/exec_prm.cpp:660 msgid "Draw sphere" msgstr "Нарисовать сферу" @@ -1909,11 +1911,11 @@ msgstr "Нарисовать таблицу значений данных" msgid "Draw tension plot for 1D data" msgstr "Нарисовать кривую с заданным цветом" -#: src/exec_prm.cpp:661 +#: src/exec_prm.cpp:662 msgid "Draw text at some position or along curve" msgstr "Вывести текст в точке или вдоль кривой" -#: src/exec_prm.cpp:660 +#: src/exec_prm.cpp:661 msgid "Draw user-defined symbol at given position and direction" msgstr "Нарисовать символ в заданных точке и направлении" @@ -1937,7 +1939,7 @@ msgstr "Нарисовать вектора вдоль кривой" msgid "Draw waterfalls" msgstr "Нарисовать поверхность набором линий (водопад)" -#: udav/plot_pnl.cpp:111 udav/plot_pnl.cpp:130 +#: udav/plot_pnl.cpp:112 udav/plot_pnl.cpp:131 msgid "Drawing time %1 ms" msgstr "Время рисования %1 мс" @@ -2114,7 +2116,7 @@ msgstr "Выполнить если условие ложно" msgid "Execute script after loading" msgstr "Выполнить скрипт после загрузки" -#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:333 +#: widgets/qt.cpp:1149 udav/plot_pnl.cpp:334 msgid "Execute script and redraw graphics (F5)." msgstr "Выполнить скрипт и обновить рисунок (F5)." @@ -2146,11 +2148,11 @@ msgstr "Экспорт данных?" msgid "Export as ..." msgstr "Экспорт как ..." -#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:474 +#: widgets/qt.cpp:1084 udav/plot_pnl.cpp:475 msgid "Export as 2D ..." msgstr "Экспорт как 2D ..." -#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:484 +#: widgets/qt.cpp:1093 udav/plot_pnl.cpp:485 msgid "Export as 3D ..." msgstr "Экспорт как 3D ..." @@ -2249,41 +2251,41 @@ msgstr "Заполнить в диапазоне" msgid "Fill x-,k-samples for transforms" msgstr "Заполнить как x-,k-координаты для трансформации" -#: src/random.cpp:350 +#: src/random.cpp:345 msgid "Fills by fractional brownian motion" msgstr "Заполнить броуновским движением" -#: src/random.cpp:356 +#: src/random.cpp:351 msgid "Fills by random integers uniformly chosen in [lo, hi)" msgstr "Заполнить случайными целыми числами в интервале [lo, hi)" -#: src/random.cpp:348 +#: src/random.cpp:343 msgid "" "Fills by random numbers according to Bernoulli distribution with probability " "p" msgstr "Заполнить случайными числами с распределением Бернулли" -#: src/random.cpp:353 +#: src/random.cpp:348 msgid "Fills by random numbers according to Gaussian distribution" msgstr "Заполнить случайными числами с гауссовым распределением" -#: src/random.cpp:349 +#: src/random.cpp:344 msgid "" "Fills by random numbers according to binomial distribution in n coin flips " "with probability p" msgstr "Заполнить случайными числами с биномиальным распределением" -#: src/random.cpp:351 +#: src/random.cpp:346 msgid "Fills by random numbers according to discrete distribution" msgstr "Заполнить случайными числами с дискретным распределением" -#: src/random.cpp:352 +#: src/random.cpp:347 msgid "" "Fills by random numbers according to exponential distribution with " "probability p" msgstr "Заполнить случайными числами с экспоненциальным распределением" -#: src/random.cpp:355 +#: src/random.cpp:350 msgid "Fills by random numbers uniformly chosen in [lo,hi)" msgstr "Заполнить случайными числами в интервале [lo, hi)" @@ -2304,18 +2306,16 @@ msgid "Find envelope along direction(s)" msgstr "Найти огибающую в направлении" #: src/exec_dat.cpp:1759 -#, fuzzy msgid "Find first indexes of values larger val over direction" -msgstr "Найти минимум по направлению" +msgstr "Найти первый индекс значения большего val по направлению" #: udav/dat_pnl.cpp:804 msgid "Find histogram of data." msgstr "Найти гистограмму данных" #: src/exec_dat.cpp:1773 -#, fuzzy msgid "Find last indexes of values larger val over direction" -msgstr "Найти максимум по направлению" +msgstr "Найти последний индекс значения большего val по направлению" #: src/exec_dat.cpp:1776 msgid "Find maximal value over direction" @@ -2437,7 +2437,7 @@ msgstr "Цикл for" msgid "Forward" msgstr "Вперед" -#: udav/plot_pnl.cpp:192 +#: udav/plot_pnl.cpp:193 msgid "Frame %1 of %2" msgstr "Кадр %1 из %2" @@ -2532,7 +2532,7 @@ msgstr "Перейти к предыдущему срезу 3D данных" msgid "Go to the specified slice for 3D data." msgstr "Перейти к указанному срезу 3D данных" -#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:66 +#: widgets/qt.cpp:1112 widgets/qt.cpp:1114 udav/plot_pnl.cpp:67 #: mgllab/mgllab.cpp:325 msgid "Graphics" msgstr "Графика" @@ -2686,7 +2686,7 @@ msgstr "Графика/Сдвиг/Приблизить" msgid "Graphics/Transform/Zoom out" msgstr "Графика/Сдвиг/Отдалить" -#: udav/plot_pnl.cpp:304 +#: udav/plot_pnl.cpp:305 msgid "Grid" msgstr "Сетка" @@ -2743,11 +2743,11 @@ msgstr "" msgid "Hidden plots" msgstr "Скрытые графики" -#: udav/plot_pnl.cpp:431 +#: udav/plot_pnl.cpp:432 msgid "Hide selected" msgstr "Скрыть выделенное" -#: udav/plot_pnl.cpp:433 +#: udav/plot_pnl.cpp:434 msgid "Hide selected plots." msgstr "Скрыть выделенные графики" @@ -2823,11 +2823,11 @@ msgstr "Неверные параметры цикла!" msgid "Incorrect type of base data" msgstr "Неверный тип данных" -#: udav/plot_pnl.cpp:552 +#: udav/plot_pnl.cpp:553 msgid "Increase \\phi angle by 10 degrees." msgstr "Увеличить угол φ на 10 градусов" -#: udav/plot_pnl.cpp:544 +#: udav/plot_pnl.cpp:545 msgid "Increase \\theta angle by 10 degrees." msgstr "Увеличить угол θ на 10 градусов" @@ -2896,7 +2896,7 @@ msgstr "Интенсивность рассеянного света" msgid "Italic style" msgstr "Курсив" -#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:477 +#: widgets/qt.cpp:1087 udav/plot_pnl.cpp:478 msgid "JPEG" msgstr "" @@ -2959,7 +2959,7 @@ msgstr "Тип графика: кривые для 1D, график плотно msgid "L - seagreen" msgstr "L - морской волны" -#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:481 +#: widgets/qt.cpp:1091 udav/plot_pnl.cpp:482 msgid "LaTeX" msgstr "LaTeX" @@ -3000,7 +3000,7 @@ msgid "Legend" msgstr "Легенда" #: widgets/qt.cpp:1121 udav/opt_dlg.cpp:64 udav/setup_dlg.cpp:110 -#: udav/plot_pnl.cpp:297 mgllab/dialogs.cpp:115 +#: udav/plot_pnl.cpp:298 mgllab/dialogs.cpp:115 msgid "Light" msgstr "Свет" @@ -3040,7 +3040,7 @@ msgstr "Список доступных данных." msgid "Load Data?" msgstr "Загрузить данные?" -#: src/exec_set.cpp:829 +#: src/exec_set.cpp:838 msgid "Load commands from external DLL" msgstr "Загрузить команды из внешней DLL" @@ -3060,7 +3060,7 @@ msgstr "" "Загрузить данные. Данные будут удалены только\n" "при выходе из программы без запроса на сохранение (Ctrl+Shift+O)." -#: src/exec_set.cpp:830 +#: src/exec_set.cpp:839 msgid "Load fontfaces" msgstr "Загрузить шрифт" @@ -3068,7 +3068,7 @@ msgstr "Загрузить шрифт" msgid "Load from file" msgstr "Загрузить из файла" -#: src/exec_prm.cpp:630 +#: src/exec_prm.cpp:631 msgid "Load image for background" msgstr "Загрузить фоновое изображение" @@ -3157,7 +3157,7 @@ msgstr "" "Data файлы (*.dat)\n" "Все файлы (*.*)" -#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:485 +#: widgets/qt.cpp:1094 udav/plot_pnl.cpp:486 msgid "MGLD" msgstr "" @@ -3349,27 +3349,27 @@ msgstr "Момент вдоль 'y' для функции" msgid "Momentum along 'z' for function" msgstr "Момент вдоль 'z' для функции" -#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:527 +#: widgets/qt.cpp:1250 udav/plot_pnl.cpp:528 msgid "Move down" msgstr "Сдвиг вниз" -#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:530 +#: widgets/qt.cpp:1252 udav/plot_pnl.cpp:531 msgid "Move graphics down 1/3 of its height." msgstr "Сдвинуть графику вниз на 1/3 высоты" -#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:506 +#: widgets/qt.cpp:1236 udav/plot_pnl.cpp:507 msgid "Move graphics left by 1/3 of its width." msgstr "Сдвинуть графику влево на 1/3 ширины" -#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:536 +#: widgets/qt.cpp:1256 udav/plot_pnl.cpp:537 msgid "Move graphics right by 1/3 of its width." msgstr "Сдвинуть графику вправо на 1/3 ширины" -#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:512 +#: widgets/qt.cpp:1240 udav/plot_pnl.cpp:513 msgid "Move graphics up by 1/3 of its height." msgstr "Сдвинуть графику вверх на 1/3 высоты" -#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:503 +#: widgets/qt.cpp:1234 udav/plot_pnl.cpp:504 msgid "Move left" msgstr "Сдвиг влево" @@ -3377,27 +3377,27 @@ msgstr "Сдвиг влево" msgid "Move mouse-handled primitives to script." msgstr "Перенести заданные вручную примитивы в скрипт." -#: udav/plot_pnl.cpp:454 +#: udav/plot_pnl.cpp:455 msgid "Move plot down" msgstr "Сдвинуть график вниз" -#: udav/plot_pnl.cpp:449 +#: udav/plot_pnl.cpp:450 msgid "Move plot up" msgstr "Сдвинуть график вверх" -#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:533 +#: widgets/qt.cpp:1254 udav/plot_pnl.cpp:534 msgid "Move right" msgstr "Сдвиг вправо" -#: udav/plot_pnl.cpp:456 +#: udav/plot_pnl.cpp:457 msgid "Move selected plot down to next subplot." msgstr "Переместить выбранное в следующий под-график." -#: udav/plot_pnl.cpp:451 +#: udav/plot_pnl.cpp:452 msgid "Move selected plot up to previous subplot." msgstr "Переместить выбранное в предыдущий под-график." -#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:509 +#: widgets/qt.cpp:1238 udav/plot_pnl.cpp:510 msgid "Move up" msgstr "Сдвиг вверх" @@ -3434,7 +3434,7 @@ msgstr "Навигация" #: udav/newcmd_dlg.cpp:101 udav/newcmd_dlg.cpp:308 udav/newcmd_dlg.cpp:336 #: udav/newcmd_dlg.cpp:340 udav/newcmd_dlg.cpp:354 udav/newcmd_dlg.cpp:367 #: udav/newcmd_dlg.cpp:375 udav/newcmd_dlg.cpp:379 udav/newcmd_dlg.cpp:383 -#: udav/text_pnl.cpp:558 udav/plot_pnl.cpp:439 mgllab/dialogs.cpp:702 +#: udav/text_pnl.cpp:558 udav/plot_pnl.cpp:440 mgllab/dialogs.cpp:702 msgid "New command" msgstr "Новая команда" @@ -3448,7 +3448,7 @@ msgstr "" "поверхность с линиями уровня вызывая последовательно 'surf' и 'cont' (в " "любом порядке)." -#: udav/text_pnl.cpp:562 udav/plot_pnl.cpp:444 +#: udav/text_pnl.cpp:562 udav/plot_pnl.cpp:445 msgid "New inplot" msgstr "Новый под-график" @@ -3484,7 +3484,7 @@ msgstr "Следующий @->" msgid "Next slice" msgstr "Следующий срез" -#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:560 +#: widgets/qt.cpp:1264 udav/plot_pnl.cpp:561 msgid "Next slide" msgstr "Следующий кадр" @@ -3588,7 +3588,7 @@ msgstr "Ny" msgid "Nz" msgstr "Nz" -#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:487 +#: widgets/qt.cpp:1096 udav/plot_pnl.cpp:488 msgid "OBJ" msgstr "OBJ" @@ -3694,7 +3694,7 @@ msgstr "P - багровый" msgid "PDF support was disabled. Please, enable it and rebuild MathGL." msgstr "PDF поддержка отключена. Включите ее и пересоберите MathGL." -#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:475 +#: widgets/qt.cpp:1085 udav/plot_pnl.cpp:476 msgid "PNG" msgstr "" @@ -3702,12 +3702,12 @@ msgstr "" msgid "PNG Files \t*.png" msgstr "PNG файлы \t*.png" -#: src/canvas_cf.cpp:546 src/canvas_cf.cpp:548 src/data_png.cpp:118 +#: src/canvas_cf.cpp:551 src/canvas_cf.cpp:553 src/data_png.cpp:118 #: src/export.cpp:75 src/export.cpp:109 msgid "PNG support was disabled. Please, enable it and rebuild MathGL." msgstr "PNG поддержка отключена. Включите ее и пересоберите MathGL." -#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:486 +#: widgets/qt.cpp:1095 udav/plot_pnl.cpp:487 msgid "PRC" msgstr "" @@ -3776,7 +3776,7 @@ msgstr "Поместить редактор сверху" msgid "Plot ID" msgstr "ID графика" -#: src/exec_prm.cpp:647 +#: src/exec_prm.cpp:648 msgid "Plot curve by formula" msgstr "Построить кривую по формуле" @@ -3805,7 +3805,7 @@ msgstr "Настройки графика" msgid "Plot style" msgstr "Стиль графика" -#: src/exec_prm.cpp:648 +#: src/exec_prm.cpp:649 msgid "Plot surface by formula" msgstr "Построить поверхность по формуле" @@ -3821,7 +3821,7 @@ msgstr "Предыдущий" msgid "Prev slice" msgstr "Предыдущий срез" -#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:575 +#: widgets/qt.cpp:1273 udav/plot_pnl.cpp:576 msgid "Prev slide" msgstr "Предыдущий кадр" @@ -3837,11 +3837,11 @@ msgstr "Предыдущее выражение" msgid "Primitives" msgstr "Примитивы" -#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:365 +#: widgets/qt.cpp:1167 udav/plot_pnl.cpp:366 msgid "Primitives ..." msgstr "Примитивы ..." -#: src/exec_set.cpp:863 +#: src/exec_set.cpp:872 msgid "Print MathGL version or check if it is valid" msgstr "Вывести версию MathGL или проверить, что она подходит" @@ -3873,7 +3873,7 @@ msgstr "Напечатать график" msgid "Print script" msgstr "Напечатать скрипт" -#: src/exec_prm.cpp:645 +#: src/exec_prm.cpp:646 msgid "Print string from file" msgstr "Вывести строку в файл" @@ -3943,7 +3943,7 @@ msgstr "Выход" msgid "R - maroon" msgstr "R - темно-красный" -#: src/exec_set.cpp:843 +#: src/exec_set.cpp:852 msgid "Rasterize plot and save to background" msgstr "Растеризовать график и установить вместо фона" @@ -3952,9 +3952,8 @@ msgid "Read and join data from several files" msgstr "Загрузить и объединить данные из нескольких файлов" #: src/exec_dat.cpp:1798 -#, fuzzy msgid "Read data from binary file of specified type" -msgstr "Загрузить данные из файла с размерами из первой строки" +msgstr "Загрузить данные из бинарного файла заданного типа" #: src/exec_dat.cpp:1796 msgid "Read data from file" @@ -3992,7 +3991,7 @@ msgstr "Отменить" msgid "Redo editor change (Ctrl+Shift+Z)." msgstr "Отменить правку в редакторе (Ctrl+Shift+Z)." -#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:331 +#: widgets/qt.cpp:1147 udav/plot_pnl.cpp:332 msgid "Redraw" msgstr "Перерисовать" @@ -4016,7 +4015,7 @@ msgstr "Обновить рисунок" msgid "Relative position of i-th color" msgstr "Положение i-го цвета" -#: udav/plot_pnl.cpp:342 +#: udav/plot_pnl.cpp:343 msgid "Reload" msgstr "Перезагрузить" @@ -4086,7 +4085,7 @@ msgstr "Оставить место для подписей справа (сти msgid "Reserve space for labels at top side (style '^')" msgstr "Оставить место для подписей сверху (стиль '^')" -#: src/exec_set.cpp:844 +#: src/exec_set.cpp:853 msgid "Reset settings and clear picture" msgstr "Сбросить настройки и обновить рисунок" @@ -4106,7 +4105,7 @@ msgstr "Изменить размер массива данных" msgid "Resize data with smoothing" msgstr "Изменить размер массива данных со сглаживанием" -#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:325 +#: widgets/qt.cpp:1140 udav/plot_pnl.cpp:326 msgid "Restore" msgstr "Восстановить" @@ -4118,11 +4117,11 @@ msgstr "Восстановить вращение, приближение и п msgid "Restore default graphics rotation, zoom and perspective (Alt+Space)." msgstr "Восстановить вращение, приближение и перспективу графика (Alt+Space)." -#: udav/plot_pnl.cpp:327 +#: udav/plot_pnl.cpp:328 msgid "Restore default graphics rotation, zoom and perspective (Ctrl+Space)." msgstr "Восстановить вращение, приближение и перспективу графика (Ctrl+Space)." -#: udav/plot_pnl.cpp:344 +#: udav/plot_pnl.cpp:345 msgid "Restore status for 'once' command and reload data (F9)." msgstr "Восстановить статус команды 'once' и перезагрузить данные (F9)" @@ -4160,19 +4159,19 @@ msgid "Roll data along direction(s)" msgstr "Сдвинуть данные по направлению" #. rotate menu -#: udav/plot_pnl.cpp:540 +#: udav/plot_pnl.cpp:541 msgid "Rotate" msgstr "Вращать" -#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:310 +#: widgets/qt.cpp:1127 udav/plot_pnl.cpp:311 msgid "Rotate by mouse" msgstr "Вращать мышкой" -#: udav/plot_pnl.cpp:545 +#: udav/plot_pnl.cpp:546 msgid "Rotate down" msgstr "Вращать вниз" -#: udav/plot_pnl.cpp:549 +#: udav/plot_pnl.cpp:550 msgid "Rotate left" msgstr "Вращать влево" @@ -4184,15 +4183,15 @@ msgstr "Поворот" msgid "Rotate picture by holding left mouse button" msgstr "Вращать рисунок при удержании кнопок мыши" -#: src/exec_set.cpp:845 +#: src/exec_set.cpp:854 msgid "Rotate plot" msgstr "Вращать график" -#: udav/plot_pnl.cpp:553 +#: udav/plot_pnl.cpp:554 msgid "Rotate right" msgstr "Вращать вправо" -#: udav/plot_pnl.cpp:541 +#: udav/plot_pnl.cpp:542 msgid "Rotate up" msgstr "Вращать вверх" @@ -4204,7 +4203,7 @@ msgstr "Вращение" msgid "Run slideshow (CTRl+F5)." msgstr "Запустить анимацию (CTRl+F5)." -#: udav/plot_pnl.cpp:570 +#: udav/plot_pnl.cpp:571 msgid "" "Run slideshow (Ctrl+F5). If no parameter specified\n" "then the dialog with slideshow options will appear." @@ -4220,11 +4219,11 @@ msgstr "Запустить/остановить анимацию" msgid "Russian" msgstr "Русский" -#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:488 +#: widgets/qt.cpp:1097 udav/plot_pnl.cpp:489 msgid "STL" msgstr "" -#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:480 +#: widgets/qt.cpp:1090 udav/plot_pnl.cpp:481 msgid "SVG" msgstr "" @@ -4348,7 +4347,7 @@ msgstr "Выбрать путь к папке" msgid "Select kind of plot" msgstr "Выбрать тип графика" -#: src/exec_set.cpp:862 +#: src/exec_set.cpp:871 msgid "Select variant of plot style(s)" msgstr "Выбрать вариант стиля графика" @@ -4356,15 +4355,15 @@ msgstr "Выбрать вариант стиля графика" msgid "Set" msgstr "Задать" -#: src/exec_set.cpp:858 +#: src/exec_set.cpp:867 msgid "Set additional tick and axis labels shift" msgstr "Задает дополнительный сдвиш меток осей" -#: src/exec_set.cpp:805 +#: src/exec_set.cpp:813 msgid "Set ambient light brightness" msgstr "Задает яркость фонового освещения" -#: src/exec_set.cpp:826 +#: src/exec_set.cpp:835 msgid "Set arbitrary position of plot in picture" msgstr "Задать произвольную область рисования внутри рисунка" @@ -4372,35 +4371,35 @@ msgstr "Задать произвольную область рисования msgid "Set arguments" msgstr "Задать аргументы" -#: src/exec_set.cpp:807 +#: src/exec_set.cpp:815 msgid "Set aspect ration" msgstr "Задать соотношение сторон" -#: src/exec_set.cpp:809 +#: src/exec_set.cpp:817 msgid "Set axis and tick style" msgstr "Задать стиль осей и меток" -#: src/exec_set.cpp:835 +#: src/exec_set.cpp:844 msgid "Set axis origin" msgstr "Задать начало координат" -#: src/exec_set.cpp:842 +#: src/exec_set.cpp:851 msgid "Set axis ranges" msgstr "Задать диапазон осей" -#: src/exec_set.cpp:850 +#: src/exec_set.cpp:859 msgid "Set bit-flags (for advanced users only)" msgstr "Задает битовый флаг (для опытных пользователей)" -#: src/exec_set.cpp:811 +#: src/exec_set.cpp:819 msgid "Set bounding box for 2d export" msgstr "Задать границы для 2d экспорта" -#: src/exec_set.cpp:832 +#: src/exec_set.cpp:841 msgid "Set brush for given mask id" msgstr "Задать кисть для маски с выбранным id" -#: src/exec_set.cpp:816 +#: src/exec_set.cpp:824 msgid "Set color range" msgstr "Задать диапазон цвета" @@ -4416,23 +4415,23 @@ msgstr "Вкл/выкл обрезание для конкретного гра msgid "Set data sizes manually" msgstr "Задать размеры данных вручную" -#: src/exec_set.cpp:810 +#: src/exec_set.cpp:818 msgid "Set default bars width" msgstr "Задать размер полос по умолчанию" -#: src/exec_set.cpp:840 +#: src/exec_set.cpp:849 msgid "Set default filename" msgstr "Задать имя файла по умолчанию" -#: src/exec_set.cpp:804 +#: src/exec_set.cpp:812 msgid "Set default transparency" msgstr "Задать прозрачность по умолчанию" -#: src/exec_set.cpp:819 +#: src/exec_set.cpp:827 msgid "Set diffusive light brightness" msgstr "Задать яркость рассеянного света" -#: src/exec_set.cpp:820 +#: src/exec_set.cpp:828 msgid "Set draw region for quality&4" msgstr "Задать область рисования при quality&4" @@ -4456,75 +4455,75 @@ msgstr "Задать область рисования как ячейку бр msgid "Set lighting off/on for particular plot" msgstr "Вкл/выкл освещение отдельного графика" -#: src/exec_set.cpp:833 +#: src/exec_set.cpp:842 msgid "Set number of lines in mesh/fall/vect and so on" msgstr "Задать примерное число линий в mesh/fall/vect ..." -#: src/exec_set.cpp:827 +#: src/exec_set.cpp:836 msgid "Set number of marks in the legend" msgstr "Задать число маркеров в легенде" -#: src/exec_set.cpp:821 +#: src/exec_set.cpp:829 msgid "Set number of visible faces" msgstr "Задать число видимых граней" -#: src/exec_set.cpp:837 +#: src/exec_set.cpp:846 msgid "Set palette for 1D plots" msgstr "Задать палитру для 1D графиков" -#: src/exec_set.cpp:839 +#: src/exec_set.cpp:848 msgid "Set perspective" msgstr "Задать перспективу" -#: src/exec_set.cpp:848 +#: src/exec_set.cpp:857 msgid "Set picture size" msgstr "Задать размер рисунка" -#: src/exec_set.cpp:841 +#: src/exec_set.cpp:850 msgid "Set plot quality" msgstr "Задать качество рисования картинки" -#: src/exec_set.cpp:854 +#: src/exec_set.cpp:863 msgid "Set position of plot as cell of matrix" msgstr "Задать область рисования как ячейку матрицы" -#: src/exec_set.cpp:834 +#: src/exec_set.cpp:843 msgid "Set position of plot block in matrix" msgstr "Задать область рисования как блок в матрице" -#: src/exec_set.cpp:815 +#: src/exec_set.cpp:823 msgid "Set position of plot inside cell of column" msgstr "Задать область рисования как ячейку колонки" -#: src/exec_set.cpp:825 +#: src/exec_set.cpp:834 msgid "Set position of plot inside cell of matrix" msgstr "Задать область рисования внутри ячейки колонки" -#: src/exec_set.cpp:853 +#: src/exec_set.cpp:862 msgid "Set position of plot inside cell of rotated stick" msgstr "Задать область рисования как ячейку повернутого бруска" -#: src/exec_set.cpp:852 +#: src/exec_set.cpp:861 msgid "Set position of plot inside cell of sheared stick" msgstr "Задать область рисования как ячейку наклоненной колонки" -#: src/exec_set.cpp:866 +#: src/exec_set.cpp:875 msgid "Set range for x-axis" msgstr "Задать диапазон по x" -#: src/exec_set.cpp:868 +#: src/exec_set.cpp:877 msgid "Set range for y-axis" msgstr "Задать диапазон по y" -#: src/exec_set.cpp:872 +#: src/exec_set.cpp:881 msgid "Set range for z-axis" msgstr "Задать диапазон по z" -#: src/exec_set.cpp:847 +#: src/exec_set.cpp:856 msgid "Set scale text in relative subplots too" msgstr "Задает масштабирование текста в отн.подграфиках" -#: src/exec_set.cpp:849 +#: src/exec_set.cpp:858 msgid "Set scaling factor for further setsize" msgstr "Задать множитель для всех 'setsize'" @@ -4536,51 +4535,51 @@ msgstr "Задать аргументы скрипта" msgid "Set size for text, marks and others" msgstr "Задать размер текста, маркеров и пр." -#: src/exec_set.cpp:806 +#: src/exec_set.cpp:814 msgid "Set size of arrows" msgstr "Задать размер стрелок" -#: src/exec_set.cpp:831 +#: src/exec_set.cpp:840 msgid "Set size of markers" msgstr "Задать размер маркеров" -#: src/exec_set.cpp:838 +#: src/exec_set.cpp:847 msgid "Set size of semi-transparent area around line" msgstr "Задать размер полупрозрачной области около линии" -#: src/exec_set.cpp:836 +#: src/exec_set.cpp:845 msgid "Set tick labels drawing at origin" msgstr "Разрешить вывод меток осей в начале координат" -#: src/exec_set.cpp:857 +#: src/exec_set.cpp:866 msgid "Set tick length" msgstr "Задать длину меток осей" -#: src/exec_set.cpp:817 +#: src/exec_set.cpp:825 msgid "Set ticks for colorbar" msgstr "Задать метки для цветовой шкалы" -#: src/exec_set.cpp:867 +#: src/exec_set.cpp:876 msgid "Set ticks for x-axis" msgstr "Задать метки для оси x" -#: src/exec_set.cpp:869 +#: src/exec_set.cpp:878 msgid "Set ticks for y-axis" msgstr "Задать метки для оси y" -#: src/exec_set.cpp:873 +#: src/exec_set.cpp:882 msgid "Set ticks for z-axis" msgstr "Задать метки для оси z" -#: src/exec_set.cpp:859 +#: src/exec_set.cpp:868 msgid "Set ticks in time format" msgstr "Задать метки в формате времени" -#: src/exec_set.cpp:861 +#: src/exec_set.cpp:870 msgid "Set ticks tuning" msgstr "Включить оптимизацию меток осей" -#: src/exec_set.cpp:846 +#: src/exec_set.cpp:855 msgid "Set to auto rotate text or not" msgstr "Разрешить поворот текста" @@ -4588,7 +4587,7 @@ msgstr "Разрешить поворот текста" msgid "Set to use whole area (style '#')" msgstr "Задать использование всей области (стиль '#')" -#: src/exec_set.cpp:860 +#: src/exec_set.cpp:869 msgid "Set type transparency" msgstr "Задать тип прозрачности" @@ -4596,7 +4595,7 @@ msgstr "Задать тип прозрачности" msgid "Set value of \\phi angle." msgstr "Задать значени угла φ" -#: udav/plot_pnl.cpp:472 +#: udav/plot_pnl.cpp:473 msgid "" "Set value of \\phi angle.\n" "You can use keys (Shift+Meta+Left or Shift+Meta+Right)." @@ -4608,7 +4607,7 @@ msgstr "" msgid "Set value of \\theta angle." msgstr "Задать значени угла θ" -#: udav/plot_pnl.cpp:466 +#: udav/plot_pnl.cpp:467 msgid "" "Set value of \\theta angle.\n" "You can use keys (Shift+Meta+Up or Shift+Meta+Down)." @@ -4632,19 +4631,19 @@ msgstr "Настроить анимацию" msgid "Setup colors for:" msgstr "Настроить цвета:" -#: src/exec_set.cpp:823 +#: src/exec_set.cpp:832 msgid "Setup font" msgstr "Настроить шрифт" -#: src/exec_set.cpp:828 +#: src/exec_set.cpp:837 msgid "Setup light" msgstr "Настроить освещение" -#: src/exec_prm.cpp:629 +#: src/exec_prm.cpp:630 msgid "Setup or draw axis" msgstr "Настроить или нарисовать оси" -#: src/exec_set.cpp:818 +#: src/exec_set.cpp:826 msgid "Setup plot points cutting" msgstr "Настроить обрезание точек графика" @@ -4652,7 +4651,7 @@ msgstr "Настроить обрезание точек графика" msgid "Setup script" msgstr "Настроить скрипт" -#: udav/plot_pnl.cpp:573 +#: udav/plot_pnl.cpp:574 msgid "Setup show" msgstr "Настроить анимацию" @@ -4668,7 +4667,7 @@ msgstr "Сшить фазу" msgid "Sharp colors" msgstr "Контрастные" -#: src/exec_set.cpp:851 +#: src/exec_set.cpp:860 msgid "Shear plot" msgstr "Наклон графика" @@ -4720,11 +4719,11 @@ msgstr "Показать диалог настроек графика" msgid "Show dialog for UDAV properties." msgstr "Показать диалог настроек UDAV" -#: udav/text_pnl.cpp:560 udav/plot_pnl.cpp:441 +#: udav/text_pnl.cpp:560 udav/plot_pnl.cpp:442 msgid "Show dialog for new command or edit arguments of existed one." msgstr "Показать диалог ввода новой команды или редактирования существующей" -#: udav/text_pnl.cpp:564 udav/plot_pnl.cpp:446 +#: udav/text_pnl.cpp:564 udav/plot_pnl.cpp:447 msgid "Show dialog for new inplot and put it into the script." msgstr "Показать диалог создания под-графика и вставки его в скрипт" @@ -4782,7 +4781,7 @@ msgstr "Показать строки" msgid "Show next frame in slideshow" msgstr "Показать следующий кадр" -#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:563 +#: widgets/qt.cpp:1266 udav/plot_pnl.cpp:564 msgid "Show next slide (Ctrl+.)." msgstr "Показать следующий кадр (Ctrl+.)." @@ -4790,16 +4789,15 @@ msgstr "Показать следующий кадр (Ctrl+.)." msgid "Show previous frame in slideshow" msgstr "Показать предыдущий кадр" -#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:578 +#: widgets/qt.cpp:1275 udav/plot_pnl.cpp:579 msgid "Show previous slide (Ctrl+,)." msgstr "Показать предыдущий кадр (Ctrl+,)." #: mgllab/editor.cpp:532 -#, fuzzy msgid "Show window for primitives" -msgstr "Показать диалог настроек UDAV" +msgstr "Показать окно для примитивов" -#: src/random.cpp:354 +#: src/random.cpp:349 msgid "Shuffle data cells (for dir='a') or slices (for dir='xyz')" msgstr "Перемешать ячейки (для dir='a') или срезы (для dir='xyz') данных" @@ -4841,7 +4839,7 @@ msgstr "Размеры" msgid "Skip commands and iterate for-loop again" msgstr "Пропустить команды до конца цикла for" -#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:566 +#: widgets/qt.cpp:1268 udav/plot_pnl.cpp:567 msgid "Slideshow" msgstr "Анимация" @@ -4957,7 +4955,7 @@ msgstr "Состояние" msgid "Step for pulse diffraction" msgstr "Шаг для расчета дифракции импульса" -#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:347 +#: widgets/qt.cpp:1152 udav/plot_pnl.cpp:348 msgid "Stop" msgstr "Стоп" @@ -4969,7 +4967,7 @@ msgstr "Остановить рисование" msgid "Stop execution" msgstr "Остановить выполнение скрипта" -#: udav/plot_pnl.cpp:349 +#: udav/plot_pnl.cpp:350 msgid "Stop script execution (F7)." msgstr "Остановить выполнение скрипта (F7)" @@ -5102,16 +5100,15 @@ msgstr "Поменять местами данные по направлению msgid "Swap parts" msgstr "Поменять местами" -#: src/exec_set.cpp:856 -#, fuzzy +#: src/exec_set.cpp:865 msgid "Switch on/off TeX parsing at text output" -msgstr "Вкл/выкл прозрачность рисунка" +msgstr "Вкл/выкл разбор TeX команд" -#: src/exec_set.cpp:822 +#: src/exec_set.cpp:831 msgid "Switch on/off fog" msgstr "Вкл/выкл туман" -#: src/exec_set.cpp:824 +#: src/exec_set.cpp:833 msgid "Switch on/off gray-scale mode" msgstr "Вкл/выкл режим оттенков серого" @@ -5119,7 +5116,7 @@ msgstr "Вкл/выкл режим оттенков серого" msgid "Switch on/off grid drawing" msgstr "Вкл/выкл рисование сетки" -#: udav/plot_pnl.cpp:307 +#: udav/plot_pnl.cpp:308 msgid "Switch on/off grid of absolute coordinates (Ctrl+G)." msgstr "Вкл/выкл сетку абсолютных координат (Ctrl+G)." @@ -5127,7 +5124,7 @@ msgstr "Вкл/выкл сетку абсолютных координат (Ctrl msgid "Switch on/off lightning for the graphics (Alt+L)." msgstr "Вкл/выкл освещение графика (Alt+L)." -#: udav/plot_pnl.cpp:301 +#: udav/plot_pnl.cpp:302 msgid "Switch on/off lightning for the graphics (Ctrl+L)." msgstr "Вкл/выкл освещение графика (Ctrl+L)." @@ -5135,7 +5132,7 @@ msgstr "Вкл/выкл освещение графика (Ctrl+L)." msgid "Switch on/off lightning in the picture" msgstr "Вкл/выкл освещение графика" -#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:314 +#: widgets/qt.cpp:1131 udav/plot_pnl.cpp:315 msgid "" "Switch on/off mouse handling of the graphics\n" "(rotation, shifting, zooming and perspective)." @@ -5147,11 +5144,11 @@ msgstr "" msgid "Switch on/off mouse zoom of selected region." msgstr "Вкл/выкл приближение мышью выбранной области." -#: src/exec_set.cpp:855 +#: src/exec_set.cpp:864 msgid "Switch on/off to use ternary axis" msgstr "Указать тип тернарных координат или проекций" -#: src/exec_set.cpp:803 +#: src/exec_set.cpp:811 msgid "Switch on/off transparency" msgstr "Вкл/выкл прозрачность" @@ -5159,7 +5156,7 @@ msgstr "Вкл/выкл прозрачность" msgid "Switch on/off transparency for the graphics (Alt+T)." msgstr "Вкл/выкл прозрачность рисунка (Alt+T)." -#: udav/plot_pnl.cpp:294 +#: udav/plot_pnl.cpp:295 msgid "Switch on/off transparency for the graphics (Ctrl+T)." msgstr "Вкл/выкл прозрачность рисунка (Ctrl+T)." @@ -5175,7 +5172,7 @@ msgstr "Симметричный диапазон" msgid "Symmetrical?" msgstr "Симметрично?" -#: src/addon.cpp:121 src/base_cf.cpp:281 +#: src/addon.cpp:122 src/base_cf.cpp:283 #, c-format msgid "TEST: %s\n" msgstr "ТЕСТ: %s\n" @@ -5244,7 +5241,7 @@ msgstr "" "Специальный диалог (Правка|Вставить|Новая команда) поможет Вам выбрать " "команду, заполнить ее аргументы и вставить в скрипт." -#: src/crust.cpp:590 +#: src/crust.cpp:619 msgid "" "There are duplicated or indistinguishably adjacent points for triangulation." msgstr "Повторяющиеся или близкие точки при триангуляции" @@ -5663,9 +5660,8 @@ msgid "Use color scheme" msgstr "Использовать цветовую схему" #: mgllab/mgllab.cpp:485 -#, fuzzy msgid "Use dark color scheme" -msgstr "Использовать цветовую схему" +msgstr "Использовать темную цветовую схему" #: udav/prop_dlg.cpp:175 msgid "Use dots plot for preview" @@ -5757,7 +5753,7 @@ msgstr "Сетчатый график" msgid "Wire style" msgstr "Контур" -#: src/exec_set.cpp:865 +#: src/exec_set.cpp:874 msgid "Write current image to graphical file" msgstr "Сохранить текущий рисунок в файл" @@ -5793,7 +5789,7 @@ msgstr "Ð¥ срез от" msgid "X/Z" msgstr "" -#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:489 +#: widgets/qt.cpp:1098 udav/plot_pnl.cpp:490 msgid "XYZ" msgstr "" @@ -6039,7 +6035,7 @@ msgstr "Размер по Z" msgid "Z-slice from" msgstr "Z срез от" -#: src/exec_set.cpp:871 +#: src/exec_set.cpp:880 msgid "Zoom axis range" msgstr "Увеличить диапазон осей координат" @@ -6051,11 +6047,11 @@ msgstr "Приблизить мышкой" msgid "Zoom graphics" msgstr "Приблизить рисунок" -#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:515 +#: widgets/qt.cpp:1242 udav/plot_pnl.cpp:516 msgid "Zoom in" msgstr "Приблизить" -#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:518 +#: widgets/qt.cpp:1244 udav/plot_pnl.cpp:519 msgid "Zoom in graphics." msgstr "Приблизить рисунок" @@ -6072,11 +6068,11 @@ msgstr "Увеличить текст" msgid "Zoom in the picture" msgstr "Приблизить рисунок" -#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:521 +#: widgets/qt.cpp:1246 udav/plot_pnl.cpp:522 msgid "Zoom out" msgstr "Отдалить" -#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:524 +#: widgets/qt.cpp:1248 udav/plot_pnl.cpp:525 msgid "Zoom out graphics." msgstr "Отдалить рисунок" @@ -6088,12 +6084,12 @@ msgstr "Уменьшить текст" msgid "Zoom out the picture" msgstr "Отдалить рисунок" -#: src/exec_set.cpp:870 +#: src/exec_set.cpp:879 msgid "Zoom plot region" msgstr "Приблизить область рисунка" #. zooming menu -#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:502 +#: widgets/qt.cpp:1231 udav/plot_pnl.cpp:503 msgid "Zoom/move" msgstr "Приближение/сдвиг" @@ -6171,7 +6167,7 @@ msgstr "b - синий" msgid "bars" msgstr "" -#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:478 +#: widgets/qt.cpp:1088 udav/plot_pnl.cpp:479 msgid "bitmap EPS" msgstr "растровый EPS" @@ -6372,28 +6368,28 @@ msgstr "mgl_ru" #, c-format msgid "" "mglconv convert mgl script to image file (default PNG).\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mglconv конвертирует mgl скрипт в рисунок (по умолчанию PNG).\n" -"Текущая версия 2.%g\n" +"Текущая версия %s\n" #: mgllab/mgllab.cpp:422 #, c-format msgid "" "mgllab draw mgl script interactively.\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mgllab рисует mgl скрипт интерактивно.\n" -"Текущая версия 2.%g\n" +"Текущая версия %s\n" #: mgllab/help.cpp:78 #, c-format msgid "" -"mgllab v. 2.%g\n" +"mgllab v. %s\n" "(c) Alexey Balakin, 2017\n" "http://mathgl.sf.net/" msgstr "" -"mgllab v. 2.%g\n" +"mgllab v. %s\n" "(c) Алексей Балакин, 2017\n" "http://mathgl.sf.net/" @@ -6401,10 +6397,10 @@ msgstr "" #, c-format msgid "" "mglview show plot from MGL script or MGLD file.\n" -"Current version is 2.%g\n" +"Current version is %s\n" msgstr "" "mglview показывает график MGL скрипта или MGLD файла.\n" -"Текущая версия 2.%g\n" +"Текущая версия %s\n" #: udav/data_dlg.cpp:68 msgid "min" @@ -6566,7 +6562,7 @@ msgstr "сгладить" msgid "solid" msgstr "сплош." -#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:476 +#: widgets/qt.cpp:1086 udav/plot_pnl.cpp:477 msgid "solid PNG" msgstr "PNG с заливкой" @@ -6636,7 +6632,7 @@ msgstr "символ" msgid "values" msgstr "значения" -#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:479 +#: widgets/qt.cpp:1089 udav/plot_pnl.cpp:480 msgid "vector EPS" msgstr "векторный EPS" diff --git a/mgllab/help.cpp b/mgllab/help.cpp index de5a9e0..04a829d 100644 --- a/mgllab/help.cpp +++ b/mgllab/help.cpp @@ -75,7 +75,7 @@ void help_out_cb(Fl_Widget*, void*v) void about_cb(Fl_Widget*, void*) { static char s[128]; - snprintf(s,128,_("mgllab v. 2.%g\n(c) Alexey Balakin, 2017\nhttp://mathgl.sf.net/"), MGL_VER2); + snprintf(s,128,_("mgllab v. %s\n(c) Alexey Balakin, 2017\nhttp://mathgl.sf.net/"), MGL_VER_STRING); Fl_Double_Window* w = new Fl_Double_Window(355, 130, "About UDAV"); Fl_Box* o = new Fl_Box(10, 15, 65, 65); o->box(FL_UP_BOX); o->color(55); o->image(new Fl_Pixmap(udav_xpm)); diff --git a/mgllab/mgllab.cpp b/mgllab/mgllab.cpp index c8d5801..0b33bf8 100644 --- a/mgllab/mgllab.cpp +++ b/mgllab/mgllab.cpp @@ -419,7 +419,7 @@ int main(int argc, char **argv) { setlocale(LC_CTYPE, optarg); setlocale(LC_NUMERIC, "C"); } else if(ch=='h') { - printf(_("mgllab draw mgl script interactively.\nCurrent version is 2.%g\n"),MGL_VER2); + printf(_("mgllab draw mgl script interactively.\nCurrent version is %s\n"),MGL_VER_STRING); printf(_("Usage:\tmgllab [parameter(s)] scriptfile\n")); printf(_("\t-1 str set str as argument $1 for script\n" "\t... ...\n" diff --git a/src/addon.cpp b/src/addon.cpp index 04bcbf9..583eac9 100644 --- a/src/addon.cpp +++ b/src/addon.cpp @@ -72,7 +72,8 @@ MGL_EXPORT char *mgl_fgetstr(FILE *fp) if(mgl_fgetstr_script && s[0]=='#' && s[1]=='M' && s[2]=='G' && s[3]=='L' && s[4]==' ') { std::string buf("mglconv -n "); buf+= s+5; - system(buf.c_str()); + if(system(buf.c_str())==-1) + mgl_info("Couldn't execute '%s'",buf.c_str()); } // strlwr(s); } while(!feof(fp) && (s[0]==0 || s[0]=='%' || s[0]=='#')); diff --git a/src/axis.cpp b/src/axis.cpp index d8adac5..82390a6 100644 --- a/src/axis.cpp +++ b/src/axis.cpp @@ -747,7 +747,7 @@ void mglCanvas::DrawGrid(mglAxis &aa, bool at_tick) pp[1].x=Max.x; pp[2].y=Max.y; pp[3].z=Max.z; pp[4].x=Min.x; pp[5].y=Min.y; pp[6].z=Min.z; mreal zm=INFINITY; - memcpy(oo,pp,8*sizeof(mglPoint)); + memcpy((void*)oo,pp,8*sizeof(mglPoint)); for(int i=0;i<8;i++) // find deepest point { ScalePoint(&B,pp[i],nan,false); @@ -932,7 +932,7 @@ void mglCanvas::Box(const char *col, bool ticks) p[1].x=Max.x; p[2].y=Max.y; p[3].z=Max.z; p[4].x=Min.x; p[5].y=Min.y; p[6].z=Min.z; mreal zm=INFINITY; int im=0; - memcpy(oo,p,8*sizeof(mglPoint)); + memcpy((void*)oo,p,8*sizeof(mglPoint)); for(int i=0;i<8;i++) // find deepest point { ScalePoint(&B,p[i],nan,false); @@ -974,7 +974,7 @@ void mglCanvas::Box(const char *col, bool ticks) clr(MGL_NOSUBTICKS); Org=o; TickLen=tl; } //----------------------------------------------------------------------------- -void mglCanvas::Colorbar(const char *sch) +void mglCanvas::Colorbar(const char *sch, const char *opt) { bool in = mglchr(sch,'I'); mreal sx = (fabs(B.b[0])+fabs(B.b[1])+fabs(B.b[2]))/B.pf/B1.b[0], x=1; @@ -983,10 +983,10 @@ void mglCanvas::Colorbar(const char *sch) else if(mglchr(sch,'^')) { x=0; y=in?(1+sy)/2:0.95; } else if(mglchr(sch,'_')) { x=0; y=in?(1-sy)/2:0.05; } else { x=in?(1+sx)/2:0.95; y=0; } - Colorbar(sch, x, y, 1, 1); + Colorbar(sch, x, y, 1, 1, opt); } //----------------------------------------------------------------------------- -void mglCanvas::Colorbar(const char *sch, mreal x, mreal y, mreal w, mreal h) +void mglCanvas::Colorbar(const char *sch, mreal x, mreal y, mreal w, mreal h, const char *opt) { bool in = mglchr(sch,'I'); bool text = !mglchr(sch,'~'); @@ -1010,12 +1010,12 @@ void mglCanvas::Colorbar(const char *sch, mreal x, mreal y, mreal w, mreal h) { v.Fill(log(-Min.c), log(-Max.c)); v.Modify("-exp(u)"); } mreal *c=new mreal[n]; for(long i=0;i1 ? 1/(MGL_EPSILON*(nc-1)):0; for(long i=0;iGetNx();i++) c[i] = s+i*dc; - colorbar(v, c, where, x, y, w, h, text); + colorbar(v, c, where, x, y, w, h, text, opt); delete []c; if(mglchr(sch,'A')) Pop(); } //----------------------------------------------------------------------------- -void mglCanvas::colorbar(HCDT vv, const mreal *c, int where, mreal x, mreal y, mreal w, mreal h, bool text) +void mglCanvas::colorbar(HCDT vv, const mreal *c, int where, mreal x, mreal y, mreal w, mreal h, bool text, const char *opt) { static int cgid=1; StartGroup("Colorbar",cgid++); + mreal angl = SaveState(opt); long n=vv->GetNx(); mreal s3=B.pf,ss=1/s3; // NOTE: colorbar was wider ss=0.9; @@ -1137,7 +1138,7 @@ void mglCanvas::colorbar(HCDT vv, const mreal *c, int where, mreal x, mreal y, m } SetPenPal(AxisStl); bool inv = where!=3 && where!=0; - ac.ns = where; ac.angl=NAN; // NOTE ns isn't used for colorbar + ac.ns = where; ac.angl=angl; //NAN; // NOTE ns isn't used for colorbar if(text) DrawLabels(ac,inv,&M); clr(MGL_DISABLE_SCALE); EndGroup(); } diff --git a/src/base.cpp b/src/base.cpp index 631a79f..bf95b01 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -373,11 +373,12 @@ void mglGlyph::Load(wchar_t id, const char *fname) nt = -id; // TODO optimize and copy points. Q: actual width? Q: cmp with known. FT_BBox boundingBox; FT_Outline_Get_BBox(&outline, &boundingBox); - FT_Pos xMin = boundingBox.xMin; +/* FT_Pos xMin = boundingBox.xMin; FT_Pos yMin = boundingBox.yMin; FT_Pos xMax = boundingBox.xMax; FT_Pos yMax = boundingBox.yMax; -/* m_xMin = xMin; + + m_xMin = xMin; m_yMin = yMin; m_width = xMax - xMin; m_height = yMax - yMin;*/ @@ -512,6 +513,7 @@ bool mglBase::AddPntQ(mglPnt &q, const mglMatrix *mat, mglPoint p, mreal c, mglP // scl&4 -- disable NAN for normales if no light // scl&8 -- bypass palette for enabling alpha // scl&16 -- put points inside axis range + q.xx = NAN; if(mgl_isnan(c) || mgl_isnan(a)) { q.x=NAN; return false; } bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y) && !mgl_isnan(n.z), res=true; if(scl>0) @@ -519,7 +521,7 @@ bool mglBase::AddPntQ(mglPnt &q, const mglMatrix *mat, mglPoint p, mreal c, mglP if(scl&16) mgl_coor_box(this, p); res = ScalePoint(mat,p,n,!(scl&2)); } - if(mgl_isnan(p.x)) { q.x=NAN; return false; } +// if(mgl_isnan(p.x)) { q.x=NAN; return false; } a = (a>=0 && a<=1) ? a : AlphaDef; c = (c>=0) ? c:CDef; @@ -536,6 +538,8 @@ bool mglBase::AddPntQ(mglPnt &q, const mglMatrix *mat, mglPoint p, mreal c, mglP q.x=q.xx=p.x; q.y=q.yy=p.y; q.z=q.zz=p.z; q.c=c; q.ta=a; q.u=n.x; q.v=n.y; q.w=n.z; } + if(!(scl&2) && !res) q.x = NAN; + long ci=long(c); if(ci<0 || ci>=(long)Txt.size()) ci=0; // NOTE never should be here!!! const mglTexture &txt=Txt[ci]; @@ -780,8 +784,9 @@ bool mglBase::ScalePoint(const mglMatrix *, mglPoint &p, mglPoint &n, bool use_n } if(fabs(x)>MGL_FEPSILON || fabs(y)>MGL_FEPSILON || fabs(z)>MGL_FEPSILON) res = false; - if(!res && use_nan) x = NAN; // extra sign that point shouldn't be plotted - else if(limit_pm1) +// if(!res && use_nan) x = NAN; // extra sign that point shouldn't be plotted +// else if(limit_pm1) + if(limit_pm1 && (res || !use_nan)) { x = x>1?1:(x<-1?-1:x); y = y>1?1:(y<-1?-1:y); @@ -1781,20 +1786,15 @@ void mglBase::ClearPrmInd() void mglBase::curve_plot(size_t num, size_t k0, size_t step) { // exclude straight-line parts - if(get(MGL_FULL_CURV)) for(size_t i=0;i+1=num) break; float t1=-100, t2=100; // XY angle boundary @@ -1804,22 +1804,21 @@ void mglBase::curve_plot(size_t num, size_t k0, size_t step) for(k=i+1;k t+d || t2 < t-d) break; // too curved - const mglColor c2(GetPntC(k0+(k-1)*step)-c1); dd = c2.NormS(); - if(dd>0) // color are different + float dd=1/sqrt(p2.x*p2.x+p2.y*p2.y), t = atan2(p2.y,p2.x); + if(t>t1 && tt+dd?t+dd:t2; } // new range + else break; + const mglColor c2(GetPntC(k0+(k-1)*step)-c1); dd = sqrt(c2.NormS()); + if(dd>0) // colors are different { - float rg = atan2(c2.r,c2.g), gb = atan2(c2.g,c2.b); d = atan(1e-4/dd); - if(rg1 > rg+d || rg2 < rg-d || gb1 > gb+d || gb2 < gb-d) break; // too curved + float rg = atan2(c2.r,c2.g), gb = atan2(c2.g,c2.b), d = 1e-2/dd; + if(rg1 > rg || rg2 < rg || gb1 > gb || gb2 < gb) break; // too curved rg1 = rg1rg+d?rg+d:rg2; // new RG range gb1 = gb1gb+d?gb+d:gb2; // new GB range } - t1 = t1t+d?t+d:t2; // new range } - k--; line_plot(k0+i*step,k0+k*step); i = k-1; + if(k>i+1) k--; + line_plot(k0+i*step,k0+k*step); i = k-1; } } //----------------------------------------------------------------------------- diff --git a/src/base_cf.cpp b/src/base_cf.cpp index 0abb3ab..181ea26 100644 --- a/src/base_cf.cpp +++ b/src/base_cf.cpp @@ -249,8 +249,10 @@ void MGL_EXPORT mgl_def_font_(const char *name, const char *path,int l,int n) mglDefFont->Load(name,path); delete []s; delete []d; } //----------------------------------------------------------------------------- int MGL_EXPORT mgl_check_version(const char *ver) -{ double v=0; int r = sscanf(ver,"2.%lg",&v); - return r<1 || v>MGL_VER2; } +{ int m1,m2,res=1, r = sscanf(ver,"%d.%d",&m1,&m2); + if(r==1 && m1<=MGL_VER_MAJOR && m1>1) res=0; + if(r==2 && m1<=MGL_VER_MAJOR && m1>1 && (m1eps) + { + ss = -(1+p1[0])/p2[0]; if(ss>eps && sseps && sseps) + { + ss = -(1+p1[1])/p2[1]; if(ss>eps && sseps && sseps) + { + ss = -(1+p1[2])/p2[2]; if(ss>eps && sseps && ss1-eps) return -1; + q.x = q.xx = q1.xx + s*(q2.xx-q1.xx); + q.y = q.yy = q1.yy + s*(q2.yy-q1.yy); + q.z = q.zz = q1.zz + s*(q2.zz-q1.zz); + q.u = q1.u + s*(q2.u-q1.u); + q.v = q1.v + s*(q2.v-q1.v); + q.w = q1.w + s*(q2.w-q1.w); + q.r = q1.r + s*(q2.r-q1.r); + q.g = q1.g + s*(q2.g-q1.g); + q.b = q1.b + s*(q2.b-q1.b); + q.a = q1.a + s*(q2.a-q1.a); + q.c = q1.c + s*(q2.c-q1.c); + q.ta = q1.ta + s*(q2.ta-q1.ta); + long k; +#pragma omp critical(pnt) + {k=Pnt.size(); MGL_PUSH(Pnt,q,mutexPnt);} + return k; +} +//----------------------------------------------------------------------------- // Put primitives //----------------------------------------------------------------------------- #define MGL_MARK_PLOT if(Quality&MGL_DRAW_LMEM) \ @@ -371,9 +420,19 @@ void mglCanvas::mark_plot(long p, char type, mreal size) a.n1 = p1; a.n2 = p2; a.w = pw; a.angl=0; add_prim(a); } void mglCanvas::line_plot(long p1, long p2) { - if(PDef==0) return; - if(SamePnt(p1,p2)) return; - if(p1>p2) { long kk=p1; p1=p2; p2=kk; } // rearrange start/end for proper dashing + if(PDef==0 || p1<0 || p2<0) return; // nothing to do + if(!(Flag&MGL_FAST_PRIM) && !(TernAxis&3)) + { + if(p1>p2) { long kk=p1; p1=p2; p2=kk; } // rearrange start/end for proper dashing + const mglPnt &q1=Pnt[p1], &q2=Pnt[p2]; + if(q1.x==q2.x && q1.y==q2.y) return; // the same points + if(mgl_isnan(q1.x) && mgl_isnum(q2.x)) + p1 = AddPairBnd(q2,q1); + if(mgl_isnum(q1.x) && mgl_isnan(q2.x)) + p2 = AddPairBnd(q1,q2); + } + if(p1<0 || p2<0 || mgl_isnan(Pnt[p1].x) || mgl_isnan(Pnt[p2].x)) return; + long pp1=p1,pp2=p2; mreal pw = fabs(PenWidth)*sqrt(font_factor/400), d=0; if(TernAxis&12) for(int i=0;i<4;i++) @@ -398,35 +457,278 @@ void mglCanvas::line_plot(long p1, long p2) trig_draw(Pnt[p1],Pnt[p2],Pnt[p3],true,&d); }\ else{ mglPrim a(2); a.n1 = p1; a.n2 = p2; a.n3 = p3; \ a.m=mask; a.angl=MaskAn; a.w = pw; add_prim(a);} -void mglCanvas::trig_plot(long p1, long p2, long p3) -{ - if(SamePnt(p1,p2) || SamePnt(p1,p3)) return; - long pp1=p1,pp2=p2,pp3=p3; - mreal pw = fabs(PenWidth)*sqrt(font_factor/400); - if(TernAxis&12) for(int i=0;i<4;i++) - { p1 = ProjScale(i, pp1); p2 = ProjScale(i, pp2); - p3 = ProjScale(i, pp3); if(p1>=0&&p2>=0&&p3>=0) {MGL_TRIG_PLOT} } - else { MGL_TRIG_PLOT } -} -//----------------------------------------------------------------------------- #define MGL_QUAD_PLOT if(Quality&MGL_DRAW_LMEM) \ { mglDrawReg d; d.set(this,dr_x,dr_y,dr_p); d.PenWidth=pw; \ quad_draw(Pnt[p1],Pnt[p2],Pnt[p3],Pnt[p4],&d); }\ else{ mglPrim a(3); a.n1 = p1; a.n2 = p2; a.n3 = p3; a.n4 = p4; \ a.m=mask; a.angl=MaskAn; a.w = pw; add_prim(a); } +#define MGL_ADD_TRIG { long pp1=p1,pp2=p2,pp3=p3; \ + mreal pw = fabs(PenWidth)*sqrt(font_factor/400); \ + if(TernAxis&12) for(int i=0;i<4;i++) \ + { p1 = ProjScale(i, pp1); p2 = ProjScale(i, pp2); \ + p3 = ProjScale(i, pp3); if(p1>=0&&p2>=0&&p3>=0) {MGL_TRIG_PLOT} } \ + else { MGL_TRIG_PLOT } } +#define MGL_ADD_QUAD { long pp1=p1,pp2=p2,pp3=p3,pp4=p4; \ + mreal pw = fabs(PenWidth)*sqrt(font_factor/400); \ + if(TernAxis&12) for(int i=0;i<4;i++) \ + { p1 = ProjScale(i, pp1); p2 = ProjScale(i, pp2); \ + p3 = ProjScale(i, pp3); p4 = ProjScale(i, pp4); \ + if(p1>=0&&p2>=0&&p3>=0&&p4>=0) {MGL_QUAD_PLOT} } \ + else { MGL_QUAD_PLOT } } + + +void mglCanvas::trig_plot(long p1, long p2, long p3) +{ + if(p1<0 || p2<0 || p3<0) return; // nothing to do + const mglPnt &q1=Pnt[p1], &q2=Pnt[p2], &q3=Pnt[p3]; + long state = (mgl_isnan(q1.x)?1:0)+(mgl_isnan(q2.x)?2:0)+(mgl_isnan(q3.x)?4:0), st, p4; + if((Flag&MGL_FAST_PRIM) || (TernAxis&3)) + { + if(!state) MGL_ADD_TRIG + } + else switch(state) + { + case 0: MGL_ADD_TRIG break; + case 1: + p1 = AddPairBnd(q2,q1); + p4 = p3; + p3 = AddPairBnd(q3,q1); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p3>=0 && mgl_isnum(Pnt[p3].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p3 = p4; MGL_ADD_TRIG break; + } + break; + case 2: + p2 = AddPairBnd(q1,q2); + p4 = AddPairBnd(q3,q2); + st = ((p2>=0 && mgl_isnum(Pnt[p2].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p2 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 3: + p1 = AddPairBnd(q3,q1); + p2 = AddPairBnd(q3,q2); + if(p2>=0 && p1>=0 && mgl_isnum(Pnt[p2].x) && mgl_isnum(Pnt[p1].x)) // valid trig + MGL_ADD_TRIG + break; + case 4: + p3 = AddPairBnd(q1,q3); + p4 = AddPairBnd(q2,q3); + st = ((p3>=0 && mgl_isnum(Pnt[p3].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p3 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 5: + p1 = AddPairBnd(q2,q1); + p3 = AddPairBnd(q2,q3); + if(p1>=0 && p3>=0 && mgl_isnum(Pnt[p1].x) && mgl_isnum(Pnt[p3].x)) // valid trig + MGL_ADD_TRIG + break; + case 6: + p2 = AddPairBnd(q1,q2); + p3 = AddPairBnd(q1,q3); + if(p2>=0 && p3>=0 && mgl_isnum(Pnt[p2].x) && mgl_isnum(Pnt[p3].x)) // valid trig + MGL_ADD_TRIG + break; + } +} +//----------------------------------------------------------------------------- void mglCanvas::quad_plot(long p1, long p2, long p3, long p4) { - if(SamePnt(p1,p2)) { trig_plot(p4,p2,p3); return; } - if(SamePnt(p2,p4)) { trig_plot(p1,p4,p3); return; } - if(SamePnt(p1,p3)) { trig_plot(p1,p2,p4); return; } - if(SamePnt(p3,p4)) { trig_plot(p1,p2,p3); return; } - long pp1=p1,pp2=p2,pp3=p3,pp4=p4; - mreal pw = fabs(PenWidth)*sqrt(font_factor/400); - if(TernAxis&12) for(int i=0;i<4;i++) - { p1 = ProjScale(i, pp1); p2 = ProjScale(i, pp2); - p3 = ProjScale(i, pp3); p4 = ProjScale(i, pp4); - if(p1>=0&&p2>=0&&p3>=0&&p4>=0) {MGL_QUAD_PLOT} } - else { MGL_QUAD_PLOT } + if(p1<0) { trig_plot(p4,p2,p3); return; } + if(p2<0) { trig_plot(p1,p4,p3); return; } + if(p3<0) { trig_plot(p1,p2,p4); return; } + if(p4<0) { trig_plot(p1,p2,p3); return; } + const mglPnt &q1=Pnt[p1], &q2=Pnt[p2], &q3=Pnt[p3], &q4=Pnt[p4]; + int state = (mgl_isnan(q1.x)?1:0)+(mgl_isnan(q2.x)?2:0)+(mgl_isnan(q3.x)?4:0)+(mgl_isnan(q4.x)?8:0), st; + if((Flag&MGL_FAST_PRIM) || (TernAxis&3)) + { + switch(state) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + case 4: p3 = p4; MGL_ADD_TRIG break; + case 8: MGL_ADD_TRIG break; + } + } + else switch(state) + { + case 0: MGL_ADD_QUAD break; + case 1: + p1 = p4; MGL_ADD_TRIG // valid trig + p1 = AddPairBnd(q2,q1); p4=p3; p3=p2; + p2 = AddPairBnd(q3,q1); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + break; + case 2: + p2 = p4; MGL_ADD_TRIG // valid trig + p3 = AddPairBnd(q1,q2); + p4 = AddPairBnd(q4,q2); + st = ((p3>=0 && mgl_isnum(Pnt[p3].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p3 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 3: + p1 = AddPairBnd(q3,q1); + p2 = AddPairBnd(q4,q2); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + break; + case 4: + p3 = p4; MGL_ADD_TRIG // valid trig + p2 = AddPairBnd(q1,q3); + p4 = AddPairBnd(q4,q3); + st = ((p2>=0 && mgl_isnum(Pnt[p2].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p2 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 5: + p1 = AddPairBnd(q2,q1); + p3 = AddPairBnd(q4,q3); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p3>=0 && mgl_isnum(Pnt[p3].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p3 = p4; MGL_ADD_TRIG break; + } + break; + case 6: + p2 = AddPairBnd(q1,q2); p3=p4; + p4 = AddPairBnd(q4,q2); + st = ((p4>=0 && mgl_isnum(Pnt[p4].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + p2 = AddPairBnd(q1,q3); + p4 = AddPairBnd(q4,q3); + st = ((p4>=0 && mgl_isnum(Pnt[p4].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + break; + case 7: + p1 = p4; + p2 = AddPairBnd(q4,q2); + p3 = AddPairBnd(q4,q3); + if(p3>=0 && p2>=0 && mgl_isnum(Pnt[p3].x) && mgl_isnum(Pnt[p2].x)) // valid trig + MGL_ADD_TRIG + break; + case 8: + MGL_ADD_TRIG + p1 = AddPairBnd(q2,q4); p4=p3; p3=p2; + p2 = AddPairBnd(q3,q4); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + break; + case 9: + p1 = AddPairBnd(q3,q1); p4=p2; + p2 = AddPairBnd(q2,q1); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + p1 = AddPairBnd(q3,q4); + p2 = AddPairBnd(q2,q4); + st = ((p1>=0 && mgl_isnum(Pnt[p1].x))?0:1)+((p2>=0 && mgl_isnum(Pnt[p2].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p1 = p4; MGL_ADD_TRIG break; + case 2: p2 = p4; MGL_ADD_TRIG break; + } + break; + case 10: + p2 = AddPairBnd(q1,q2); + p4 = AddPairBnd(q3,q4); + st = ((p2>=0 && mgl_isnum(Pnt[p2].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p2 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 11: + p1 = AddPairBnd(q3,q1); + p2 = AddPairBnd(q3,q4); + if(p1>=0 && p2>=0 && mgl_isnum(Pnt[p1].x) && mgl_isnum(Pnt[p2].x)) // valid trig + MGL_ADD_TRIG + break; + case 12: + p3 = AddPairBnd(q1,q3); + p4 = AddPairBnd(q2,q4); + st = ((p3>=0 && mgl_isnum(Pnt[p3].x))?0:1)+((p4>=0 && mgl_isnum(Pnt[p4].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p3 = p4; MGL_ADD_TRIG break; + case 2: MGL_ADD_TRIG break; + } + break; + case 13: + p1 = AddPairBnd(q2,q1); + p3 = AddPairBnd(q2,q4); + if(p3>=0 && p1>=0 && mgl_isnum(Pnt[p3].x) && mgl_isnum(Pnt[p1].x)) // valid trig + MGL_ADD_TRIG + break; + case 14: + p2 = AddPairBnd(q1,q2); + p3 = AddPairBnd(q1,q3); + st = ((p2>=0 && mgl_isnum(Pnt[p2].x))?0:1)+((p3>=0 && mgl_isnum(Pnt[p3].x))?0:2); + switch(st) + { + case 0: MGL_ADD_QUAD break; + case 1: p2 = p4; MGL_ADD_TRIG break; + case 2: p3 = p4; MGL_ADD_TRIG break; + } + break; + } } //----------------------------------------------------------------------------- mreal mglCanvas::text_plot(long p,const wchar_t *text,const char *font,mreal size,mreal sh,mreal col,bool rot) @@ -515,6 +817,7 @@ pthread_mutex_lock(&mutexPtx); q.u = q.v = NAN; q.a=q.ta=1; memset(Bt.b,0,9*sizeof(float)); Bt.b[0] = Bt.b[4] = Bt.b[8] = fscl; + Bt.ib[0] = Bt.ib[4] = Bt.ib[8] = 1./fscl; float opf = Bt.pf; Bt.RotateN(ftet,0,0,1); Bt.pf = Bt.norot?1.55:opf; if(strchr(font,'@')) // draw box around text @@ -635,6 +938,7 @@ void mglCanvas::InPlot(mreal x1,mreal x2,mreal y1,mreal y2, const char *st) B.b[0] = Width*(x2-x1); B.b[4] = Height*(y2-y1); B.b[8] = sqrt(B.b[0]*B.b[4]); B.z = (1.f-B.b[8]/(2*Depth))*Depth; + B.invert(); B1=B; font_factor = B.b[0] < B.b[4] ? B.b[0] : B.b[4]; mglBlock p; p.AmbBr = AmbBr; p.DifBr = DifBr; p.B = B; @@ -656,6 +960,7 @@ void mglCanvas::InPlot(mglMatrix &M,mreal x1,mreal x2,mreal y1,mreal y2, bool re M.b[0] = B1.b[0]*(x2-x1); M.b[4] = B1.b[4]*(y2-y1); M.b[8] = sqrt(M.b[0]*M.b[4]); M.z = B1.z + (1.f-M.b[8]/(2*Depth))*B1.b[8]; + M.invert(); } else { @@ -664,7 +969,7 @@ void mglCanvas::InPlot(mglMatrix &M,mreal x1,mreal x2,mreal y1,mreal y2, bool re M.b[0] = Width*(x2-x1); M.b[4] = Height*(y2-y1); M.b[8] = sqrt(M.b[0]*M.b[4]); M.z = (1.f-M.b[8]/(2*Depth))*Depth; - B1=M; + M.invert(); B1=M; } inW=M.b[0]; inH=M.b[4]; ZMin=1; inX=Width*x1; inY=Height*y1; @@ -730,6 +1035,7 @@ void mglMatrix::Rotate(mreal tetz,mreal tetx,mreal tety) b[6] = R[0]*O[6] + R[3]*O[7] + R[6]*O[8]; b[7] = R[1]*O[6] + R[4]*O[7] + R[7]*O[8]; b[8] = R[2]*O[6] + R[5]*O[7] + R[8]*O[8]; + invert(); } //----------------------------------------------------------------------------- void mglCanvas::RotateN(mreal Tet,mreal x,mreal y,mreal z) @@ -761,6 +1067,7 @@ void mglMatrix::RotateN(mreal Tet,mreal vx,mreal vy,mreal vz) b[6] = T[0]*R[6] + T[3]*R[7] + T[6]*R[8]; b[7] = T[1]*R[6] + T[4]*R[7] + T[7]*R[8]; b[8] = T[2]*R[6] + T[5]*R[7] + T[8]*R[8]; + invert(); } //----------------------------------------------------------------------------- void mglCanvas::View(mreal tetx,mreal tetz,mreal tety) @@ -773,6 +1080,7 @@ void mglCanvas::Zoom(mreal x1, mreal y1, mreal x2, mreal y2) x1=2*x1-1; x2=2*x2-1; y1=2*y1-1; y2=2*y2-1; Bp.b[0]=2/fabs(x2-x1); Bp.b[4]=2/fabs(y2-y1); Bp.x=(x1+x2)/fabs(x2-x1);Bp.y=(y1+y2)/fabs(y2-y1); + Bp.invert(); } //----------------------------------------------------------------------------- int mglCanvas::GetSplId(long x,long y) const @@ -808,6 +1116,7 @@ void mglCanvas::Aspect(mreal Ax,mreal Ay,mreal Az) B.b[0] *= Ax; B.b[3] *= Ax; B.b[6] *= Ax; B.b[1] *= Ay; B.b[4] *= Ay; B.b[7] *= Ay; B.b[2] *= Az; B.b[5] *= Az; B.b[8] *= Az; + B.invert(); size_t n = Sub.size(); if(n>0) Sub[n-1].B = B; } //----------------------------------------------------------------------------- @@ -817,6 +1126,7 @@ void mglCanvas::Shear(mreal Sx,mreal Sy) const float R[6]={B.b[0],B.b[1],B.b[2],B.b[3],B.b[4],B.b[5]}; B.b[0] = (R[0]+Sx*R[3])/Fx; B.b[1] = (R[1]+Sx*R[4])/Fx; B.b[2] = (R[2]+Sx*R[5])/Fx; B.b[3] = (R[3]+Sy*R[0])/Fy; B.b[4] = (R[4]+Sy*R[1])/Fy; B.b[5] = (R[5]+Sy*R[2])/Fy; + B.invert(); size_t n = Sub.size(); if(n>0) Sub[n-1].B = B; } //----------------------------------------------------------------------------- diff --git a/src/canvas_cf.cpp b/src/canvas_cf.cpp index e93f74b..4344112 100644 --- a/src/canvas_cf.cpp +++ b/src/canvas_cf.cpp @@ -50,7 +50,7 @@ void MGL_EXPORT MGL_FUNC_INIT mgl_init() // TODO try to add ld option: "-init mg #endif for(long i=0;i<360;i++) mgl_cos[i] = cos(i*M_PI/180.); if(!mglDefFont) mglDefFont = new mglFont(MGL_DEF_FONT_NAME); - if(!mglDefaultGr) mglDefaultGr = new mglCanvas(600,400); +// if(!mglDefaultGr) mglDefaultGr = new mglCanvas(600,400); } } void MGL_EXPORT MGL_FUNC_FINI mgl_fini() // TODO try to add ld option: "-fini mgl_fini" @@ -141,14 +141,16 @@ void MGL_EXPORT mgl_clf_chr(HMGL gr, char ch) { mglCanvas *g = dynamic_cast(gr); if(g) g->Clf(mglColor(ch)); } void MGL_EXPORT mgl_clf_rgb(HMGL gr, double r, double g, double b) { mglCanvas *gg = dynamic_cast(gr); if(gg) gg->Clf(mglColor(r,g,b)); } +void MGL_EXPORT mgl_clf_rgba(HMGL gr, double r, double g, double b, double a) +{ mglCanvas *gg = dynamic_cast(gr); if(gg) gg->Clf(mglColor(r,g,b,a)); } void MGL_EXPORT mgl_clf_str(HMGL gr, const char *col) { mglCanvas *g = dynamic_cast(gr); if(g) g->Clf(col); } void MGL_EXPORT mgl_load_background(HMGL gr, const char *fn, double alpha) { mglCanvas *g = dynamic_cast(gr); if(g) g->LoadBackground(fn,alpha); } void MGL_EXPORT mgl_load_background_ext(HMGL gr, const char *fn, const char *how, double alpha) { mglCanvas *g = dynamic_cast(gr); if(g) g->LoadBackground(fn,how,alpha); } -void MGL_EXPORT mgl_fill_background(HMGL gr, double r, double g, double b) -{ mglCanvas *gg = dynamic_cast(gr); if(gg) gg->FillBackground(mglColor(r,g,b)); } +void MGL_EXPORT mgl_fill_background(HMGL gr, double r, double g, double b, double a) +{ mglCanvas *gg = dynamic_cast(gr); if(gg) gg->FillBackground(mglColor(r,g,b,a)); } //----------------------------------------------------------------------------- void MGL_EXPORT mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style,double dx,double dy) { @@ -268,8 +270,8 @@ void MGL_EXPORT mgl_load_background_ext_(uintptr_t *gr, const char *fn, const ch { char *s=new char[l+1]; memcpy(s,fn,l); s[l]=0; char *h=new char[m+1]; memcpy(h,how,l); h[m]=0; mgl_load_background_ext(_GR_,s,h,*a); delete []s; delete []h; } -void MGL_EXPORT mgl_fill_background_(uintptr_t *gr, double *r, double *g, double *b) -{ mgl_fill_background(_GR_,*r,*g,*b); } +void MGL_EXPORT mgl_fill_background_(uintptr_t *gr, double *r, double *g, double *b, double *a) +{ mgl_fill_background(_GR_,*r,*g,*b,*a); } //----------------------------------------------------------------------------- void MGL_EXPORT mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m,const char *st, mreal *dx, mreal *dy,int l) { char *s=new char[l+1]; memcpy(s,st,l); s[l]=0; @@ -336,8 +338,7 @@ HMGL MGL_EXPORT mgl_create_graph(int width, int height) void MGL_EXPORT mgl_delete_graph(HMGL gr) { if(gr) delete gr; } HMGL MGL_EXPORT mgl_default_graph() { - if(!mglDefaultGr) - mglDefaultGr = new mglCanvas(600,400); + if(!mglDefaultGr) mglDefaultGr = new mglCanvas(600,400); return mglDefaultGr; } void MGL_EXPORT mgl_set_size_scl(double scl){ if(scl>0) mgl_size_scl = scl; } @@ -409,14 +410,14 @@ void MGL_EXPORT mgl_label(HMGL gr, char dir, const char *text, double pos, const void MGL_EXPORT mgl_labelw(HMGL gr, char dir, const wchar_t *text, double pos, const char *opt) { mglCanvas *g = dynamic_cast(gr); if(g) g->Labelw(dir,text,pos,opt); } //----------------------------------------------------------------------------- -void MGL_EXPORT mgl_colorbar(HMGL gr, const char *sch) -{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(sch); } -void MGL_EXPORT mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h) -{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(sch,x,y,w,h); } -void MGL_EXPORT mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch) -{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(dat,sch); } -void MGL_EXPORT mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h) -{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(dat,sch,x,y,w,h); } +void MGL_EXPORT mgl_colorbar(HMGL gr, const char *sch, const char *opt) +{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(sch,opt); } +void MGL_EXPORT mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h, const char *opt) +{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(sch,x,y,w,h,opt); } +void MGL_EXPORT mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch, const char *opt) +{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(dat,sch,opt); } +void MGL_EXPORT mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h, const char *opt) +{ mglCanvas *g = dynamic_cast(gr); if(g) g->Colorbar(dat,sch,x,y,w,h,opt); } //----------------------------------------------------------------------------- void MGL_EXPORT mgl_add_legend(HMGL gr, const char *text,const char *style) { mglCanvas *g = dynamic_cast(gr); if(g) g->AddLegend(text,style); } @@ -434,7 +435,7 @@ void MGL_EXPORT mgl_set_legend_marks(HMGL gr, int num) uintptr_t MGL_EXPORT mgl_create_graph_(int *width, int *height) { return uintptr_t(new mglCanvas(*width,*height)); } void MGL_EXPORT mgl_delete_graph_(uintptr_t *gr) { delete _GR_; } -uintptr_t MGL_EXPORT mgl_default_graph_() { return uintptr_t(&mglDefaultGr); } +uintptr_t MGL_EXPORT mgl_default_graph_() { return uintptr_t(mgl_default_graph()); } void MGL_EXPORT mgl_set_size_scl_(double *scl) { mgl_set_size_scl(*scl); } void MGL_EXPORT mgl_set_size_(uintptr_t *gr, int *width, int *height) { mgl_set_size(_GR_,*width,*height); } @@ -502,18 +503,22 @@ void MGL_EXPORT mgl_label_(uintptr_t *gr, const char *dir, const char *text, mre char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0; _GR_->Label(*dir, s, *pos, o); delete []s; delete []o; } //----------------------------------------------------------------------------- -void MGL_EXPORT mgl_colorbar_(uintptr_t *gr, const char *sch, int l) +void MGL_EXPORT mgl_colorbar_(uintptr_t *gr, const char *sch, const char *opt,int l,int m) { char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0; - _GR_->Colorbar(s); delete []s; } -void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int l) + char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0; + _GR_->Colorbar(s,o); delete []s; delete []o; } +void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, const char *opt, int l,int m) { char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0; - _GR_->Colorbar(s,*x,*y,*w,*h); delete []s; } -void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch, int l) + char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0; + _GR_->Colorbar(s,*x,*y,*w,*h,o); delete []s; delete []o; } +void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch, const char *opt,int l,int m) { char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0; - _GR_->Colorbar(_DA_(dat), s); delete []s; } -void MGL_EXPORT mgl_colorbar_val_ext_(uintptr_t *gr, uintptr_t *dat, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int l) + char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0; + _GR_->Colorbar(_DA_(dat), s,o); delete []s; delete []o; } +void MGL_EXPORT mgl_colorbar_val_ext_(uintptr_t *gr, uintptr_t *dat, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, const char *opt, int l,int m) { char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0; - _GR_->Colorbar(_DA_(dat),s,*x,*y,*w,*h); delete []s; } + char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0; + _GR_->Colorbar(_DA_(dat),s,*x,*y,*w,*h,o); delete []s; delete []o; } //----------------------------------------------------------------------------- void MGL_EXPORT mgl_add_legend_(uintptr_t *gr, const char *text,const char *style,int l,int n) { char *s=new char[l+1]; memcpy(s,text,l); s[l]=0; diff --git a/src/complex.cpp b/src/complex.cpp index f2684d2..e6639a8 100644 --- a/src/complex.cpp +++ b/src/complex.cpp @@ -212,18 +212,18 @@ void MGL_EXPORT mgl_datac_smooth(HADT d, const char *dirs, mreal ) // if(Type == SMOOTH_NONE) return; long p[3]={nx,ny,Type}; dual *b = new dual[nx*ny*nz]; - memset(b,0,nx*ny*nz*sizeof(dual)); + memset((void*)b,0,nx*ny*nz*sizeof(dual)); if(nx>4 && xdir) { mglStartThreadC(mgl_csmth_x,0,nx*ny*nz,b,d->a,0,p); memcpy(d->a,b,nx*ny*nz*sizeof(dual)); - memset(b,0,nx*ny*nz*sizeof(dual)); + memset((void*)b,0,nx*ny*nz*sizeof(dual)); } if(ny>4 && ydir) { mglStartThreadC(mgl_csmth_y,0,nx*ny*nz,b,d->a,0,p); memcpy(d->a,b,nx*ny*nz*sizeof(dual)); - memset(b,0,nx*ny*nz*sizeof(dual)); + memset((void*)b,0,nx*ny*nz*sizeof(dual)); } if(nz>4 && zdir) { @@ -1515,7 +1515,7 @@ void MGL_EXPORT mgl_datac_diff_par(HADT d, HCDT x, HCDT y, HCDT z) { long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz(), nn=nx*ny*nz; if(nx<2 || ny<2) return; - dual *b = new dual[nn]; memset(b,0,nn*sizeof(dual)); + dual *b = new dual[nn]; memset((void*)b,0,nn*sizeof(dual)); long p[3]={nx,ny,nz}; if(x&&y&&z && x->GetNN()==nn && y->GetNN()==nn && z->GetNN()==nn) diff --git a/src/complex_io.cpp b/src/complex_io.cpp index 4096eac..15557aa 100644 --- a/src/complex_io.cpp +++ b/src/complex_io.cpp @@ -28,7 +28,7 @@ #include "mgl2/thread.h" #if MGL_HAVE_HDF5 -#define H5_USE_16_API +// #define H5_USE_16_API #include #endif @@ -337,7 +337,7 @@ void MGL_EXPORT mgl_datac_create(HADT d,long mx,long my,long mz) if(d->a && !d->link) delete [](d->a); d->a = new dual[d->nx*d->ny*d->nz]; d->NewId(); d->link=false; - memset(d->a,0,d->nx*d->ny*d->nz*sizeof(dual)); + memset((void*)(d->a),0,d->nx*d->ny*d->nz*sizeof(dual)); } void MGL_EXPORT mgl_datac_create_(uintptr_t *d, int *nx,int *ny,int *nz) { mgl_datac_create(_DC_,*nx,*ny,*nz); } @@ -853,7 +853,7 @@ void MGL_EXPORT mgl_datac_save_hdf(HCDT dat,const char *fname,const char *data,i hid_t hf,hd,hs; hsize_t dims[4]; long rank = 3, res; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); res=H5Fis_hdf5(fname); if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -867,7 +867,7 @@ void MGL_EXPORT mgl_datac_save_hdf(HCDT dat,const char *fname,const char *data,i #else hid_t mem_type_id = H5T_NATIVE_FLOAT; #endif - hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, mem_type_id, hs, hs, H5P_DEFAULT, d->a); H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); } @@ -880,7 +880,7 @@ int MGL_EXPORT mgl_datac_read_hdf(HADT d,const char *fname,const char *data) if(res<=0) return 0; hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); if(hf<0) return 0; - hd = H5Dopen(hf,data); + hd = H5Dopen(hf,data, H5P_DEFAULT); if(hd<0) { H5Fclose(hf); return 0; } hs = H5Dget_space(hd); if(hs<0) { H5Dclose(hd); H5Fclose(hf); return 0; } diff --git a/src/crust.cpp b/src/crust.cpp index 21c3888..7209fd8 100644 --- a/src/crust.cpp +++ b/src/crust.cpp @@ -277,27 +277,56 @@ std::vector MGL_NO_EXPORT mgl_tri_lines(mreal val, HCDT nums, HCDT a { long n = x->GetNN(), m = nums->GetNy(); std::vector lines; + const mreal l0 = 1e-5, l1=1-l0; for(long i=0;iv(0,i)+0.5), k2 = long(nums->v(1,i)+0.5), k3 = long(nums->v(2,i)+0.5); if(k1<0 || k1>=n || k2<0 || k2>=n || k3<0 || k3>=n) continue; mreal v1 = a->v(k1), v2 = a->v(k2), v3 = a->v(k3); mreal d1 = mgl_d(val,v1,v2), d2 = mgl_d(val,v1,v3), d3 = mgl_d(val,v2,v3); + bool ok1=d1>l0 && d1l0 && d2l0 && d3=0 && d1<=1 && d2>=0 && d2<=1) + if(ok1) { line.p1.Set(x->v(k1)*(1-d1)+x->v(k2)*d1, y->v(k1)*(1-d1)+y->v(k2)*d1, z->v(k1)*(1-d1)+z->v(k2)*d1); - line.p2.Set(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2, z->v(k1)*(1-d2)+z->v(k3)*d2); + if(ok2) + line.p2.Set(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2, z->v(k1)*(1-d2)+z->v(k3)*d2); + else if(ok3) + line.p2.Set(x->v(k2)*(1-d3)+x->v(k3)*d3, y->v(k2)*(1-d3)+y->v(k3)*d3, z->v(k2)*(1-d3)+z->v(k3)*d3); + else + line.p2.Set(x->v(k3), y->v(k3), z->v(k3)); + } - else if(d1>=0 && d1<=1 && d3>=0 && d3<=1) + else if(ok3) { - line.p1.Set(x->v(k1)*(1-d1)+x->v(k2)*d1, y->v(k1)*(1-d1)+y->v(k2)*d1, z->v(k1)*(1-d1)+z->v(k2)*d1); line.p2.Set(x->v(k2)*(1-d3)+x->v(k3)*d3, y->v(k2)*(1-d3)+y->v(k3)*d3, z->v(k2)*(1-d3)+z->v(k3)*d3); + if(ok2) + line.p1.Set(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2, z->v(k1)*(1-d2)+z->v(k3)*d2); + else + line.p1.Set(x->v(k1), y->v(k1), z->v(k1)); } - else if(d3>=0 && d3<=1 && d2>=0 && d2<=1) + else if(ok2) { line.p1.Set(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2, z->v(k1)*(1-d2)+z->v(k3)*d2); - line.p2.Set(x->v(k2)*(1-d3)+x->v(k3)*d3, y->v(k2)*(1-d3)+y->v(k3)*d3, z->v(k2)*(1-d3)+z->v(k3)*d3); + if(ok3) + line.p2.Set(x->v(k2)*(1-d3)+x->v(k3)*d3, y->v(k2)*(1-d3)+y->v(k3)*d3, z->v(k2)*(1-d3)+z->v(k3)*d3); + else + line.p2.Set(x->v(k2), y->v(k2), z->v(k2)); + } + else if(fabs(val-v1)v(k1), y->v(k1), z->v(k1)); + line.p2.Set(x->v(k2), y->v(k2), z->v(k2)); + } + else if(fabs(val-v1)v(k1), y->v(k1), z->v(k1)); + line.p2.Set(x->v(k3), y->v(k3), z->v(k3)); + } + else if(fabs(val-v2)v(k2), y->v(k2), z->v(k2)); + line.p2.Set(x->v(k3), y->v(k3), z->v(k3)); } if(line.p1!=line.p2) lines.push_back(line); } diff --git a/src/data_io.cpp b/src/data_io.cpp index c2464f1..59e5a57 100644 --- a/src/data_io.cpp +++ b/src/data_io.cpp @@ -30,7 +30,7 @@ #if MGL_HAVE_HDF5 //#define H5_NO_DEPRECATED_SYMBOLS -#define H5_USE_16_API +// #define H5_USE_16_API #include #endif #if MGL_HAVE_HDF4 @@ -1210,7 +1210,7 @@ void MGL_EXPORT mgl_dual_save_hdf(mdual val,const char *fname,const char *data,i hid_t hf,hd,hs; hsize_t dims[4]={1,2}; long rank = 2, res; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); res=H5Fis_hdf5(fname); if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1221,7 +1221,7 @@ void MGL_EXPORT mgl_dual_save_hdf(mdual val,const char *fname,const char *data,i #else hid_t mem_type_id = H5T_NATIVE_FLOAT; #endif - hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, mem_type_id, hs, hs, H5P_DEFAULT, &val); H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); } @@ -1231,14 +1231,14 @@ void MGL_EXPORT mgl_real_save_hdf(double val,const char *fname,const char *data, hid_t hf,hd,hs; hsize_t dims[3]={1,1,1}; long rank = 1, res; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); res=H5Fis_hdf5(fname); if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if(hf<0) return; hs = H5Screate_simple(rank, dims, 0); hid_t mem_type_id = H5T_NATIVE_DOUBLE; - hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, mem_type_id, hs, hs, H5P_DEFAULT, &val); H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); } @@ -1248,14 +1248,14 @@ void MGL_EXPORT mgl_int_save_hdf(long val,const char *fname,const char *data,int hid_t hf,hd,hs; hsize_t dims[3]={1,1,1}; long rank = 1, res; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); res=H5Fis_hdf5(fname); if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if(hf<0) return; hs = H5Screate_simple(rank, dims, 0); hid_t mem_type_id = H5T_NATIVE_LONG; - hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, mem_type_id, hs, hs, H5P_DEFAULT, &val); H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); } @@ -1267,7 +1267,7 @@ void MGL_EXPORT mgl_data_save_hdf(HCDT dat,const char *fname,const char *data,in hid_t hf,hd,hs; hsize_t dims[3]; long rank = 3, res; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); res=H5Fis_hdf5(fname); if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -1281,7 +1281,7 @@ void MGL_EXPORT mgl_data_save_hdf(HCDT dat,const char *fname,const char *data,in #else hid_t mem_type_id = H5T_NATIVE_FLOAT; #endif - hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, data, mem_type_id, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, mem_type_id, hs, hs, H5P_DEFAULT, d->a); H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); } @@ -1293,7 +1293,7 @@ int MGL_EXPORT mgl_data_read_hdf(HMDT d,const char *fname,const char *data) if(res<=0) return mgl_data_read_hdf4(d,fname,data); hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); if(hf<0) return 0; - hd = H5Dopen(hf,data); + hd = H5Dopen(hf,data, H5P_DEFAULT); if(hd<0) { H5Fclose(hf); return 0; } hs = H5Dget_space(hd); if(hs<0) { H5Dclose(hd); H5Fclose(hf); return 0; } @@ -1322,7 +1322,7 @@ MGL_EXPORT const char * const * mgl_datas_hdf_str(const char *fname) hid_t hf,hg,hd,ht; hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); names.clear(); if(!hf) return 0; - hg = H5Gopen(hf,"/"); + hg = H5Gopen(hf,"/", H5P_DEFAULT); hsize_t num; char name[256]; H5Gget_num_objs(hg, &num); // replace by H5G_info_t t; H5Gget_info(hg,&t); num=t.nlinks; @@ -1330,7 +1330,7 @@ MGL_EXPORT const char * const * mgl_datas_hdf_str(const char *fname) { if(H5Gget_objtype_by_idx(hg, i)!=H5G_DATASET) continue; H5Gget_objname_by_idx(hg, i, name, 256); // replace by H5Lget_name_by_idx(hg,".",i,0,0,name,256,0) ?! - hd = H5Dopen(hf,name); + hd = H5Dopen(hf,name, H5P_DEFAULT); ht = H5Dget_type(hd); if(H5Tget_class(ht)==H5T_FLOAT || H5Tget_class(ht)==H5T_INTEGER) names.push_back(name); H5Dclose(hd); H5Tclose(ht); diff --git a/src/evalc.cpp b/src/evalc.cpp index 9e527f1..1ed8100 100644 --- a/src/evalc.cpp +++ b/src/evalc.cpp @@ -218,7 +218,7 @@ mglFormulaC::mglFormulaC(const char *string):Res(0) dual mglFormulaC::Calc(dual x,dual y,dual t,dual u) const { Error=0; - dual a1[MGL_VS]; memset(a1,0,MGL_VS*sizeof(dual)); + dual a1[MGL_VS]; memset((void*)a1,0,MGL_VS*sizeof(dual)); a1['a'-'a'] = a1['u'-'a'] = u; a1['x'-'a'] = a1['r'-'a'] = x; a1['y'-'a'] = a1['n'-'a'] = a1['v'-'a'] = y; @@ -232,7 +232,7 @@ dual mglFormulaC::Calc(dual x,dual y,dual t,dual u) const dual mglFormulaC::Calc(dual x,dual y,dual t,dual u,dual v,dual w) const { Error=0; - dual a1[MGL_VS]; memset(a1,0,MGL_VS*sizeof(dual)); + dual a1[MGL_VS]; memset((void*)a1,0,MGL_VS*sizeof(dual)); a1['c'-'a'] = a1['w'-'a'] = w; a1['b'-'a'] = a1['v'-'a'] = v; a1['a'-'a'] = a1['u'-'a'] = u; diff --git a/src/exec_prm.cpp b/src/exec_prm.cpp index 94bc8cc..f179bbe 100644 --- a/src/exec_prm.cpp +++ b/src/exec_prm.cpp @@ -70,6 +70,7 @@ int static mgls_background(mglGraph *gr, long , mglArg *a, const char *k, const else if(!strcmp(k,"ss")) gr->LoadBackground(a[0].s.s,a[1].s.s); else if(!strcmp(k,"ssn")) gr->LoadBackground(a[0].s.s,a[1].s.s,a[2].v); else if(!strcmp(k,"nnn")) gr->FillBackground(mglColor(a[0].v,a[1].v,a[2].v)); + else if(!strcmp(k,"nnnn")) gr->FillBackground(mglColor(a[0].v,a[1].v,a[2].v,a[3].v)); else res = 1; return res; } @@ -108,20 +109,20 @@ int static mgls_circle(mglGraph *gr, long , mglArg *a, const char *k, const char //----------------------------------------------------------------------------- int static mgls_colorbar(mglGraph *gr, long , mglArg *a, const char *k, const char *opt) { - int res=0; gr->Self()->SaveState(opt); - if(k[0]==0) gr->Colorbar(""); - else if(!strcmp(k,"s")) gr->Colorbar(a[0].s.s); - else if(!strcmp(k,"d")) gr->Colorbar(*(a[0].d)); - else if(!strcmp(k,"ds")) gr->Colorbar(*(a[0].d), a[1].s.s); - else if(!strcmp(k,"snn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v,1,1); - else if(!strcmp(k,"snnn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v, a[3].v,1); - else if(!strcmp(k,"snnnn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v, a[3].v,a[4].v); - else if(!strcmp(k,"dsnn")) gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v,1,1); - else if(!strcmp(k,"dsnnn")) gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v, a[4].v,1); + int res=0; //gr->Self()->SaveState(opt); + if(k[0]==0) gr->Colorbar("",opt); + else if(!strcmp(k,"s")) gr->Colorbar(a[0].s.s,opt); + else if(!strcmp(k,"d")) gr->Colorbar(*(a[0].d),opt); + else if(!strcmp(k,"ds")) gr->Colorbar(*(a[0].d), a[1].s.s,opt); + else if(!strcmp(k,"snn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v,1,1,opt); + else if(!strcmp(k,"snnn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v, a[3].v,1,opt); + else if(!strcmp(k,"snnnn")) gr->Colorbar(a[0].s.s, a[1].v, a[2].v, a[3].v,a[4].v,opt); + else if(!strcmp(k,"dsnn")) gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v,1,1,opt); + else if(!strcmp(k,"dsnnn")) gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v, a[4].v,1,opt); else if(!strcmp(k,"dsnnnn")) - gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v, a[4].v,a[5].v); + gr->Colorbar(*(a[0].d), a[1].s.s, a[2].v, a[3].v, a[4].v,a[5].v,opt); else res = 1; - gr->Self()->LoadState(); +// gr->Self()->LoadState(); return res; } //----------------------------------------------------------------------------- @@ -627,7 +628,7 @@ int static mgls_zlabel(mglGraph *gr, long , mglArg *a, const char *k, const char mglCommand mgls_prm_cmd[] = { {"arc",_("Draw angle arc"),"arc x0 y0 x1 y1 a ['fmt']|x0 y0 z0 x1 y1 a ['fmt']|x0 y0 z0 xr yr zr x1 y1 z1 a ['fmt']", mgls_arc ,13}, {"axis",_("Setup or draw axis"),"axis ['dir' 'fmt']|'fx' 'fy' 'fz' ['fc']|how", mgls_axis ,12}, - {"background",_("Load image for background"),"background 'fname' [alpha]| 'fname' 'how' [alpha]", mgls_background ,12}, + {"background",_("Load image for background"),"background 'fname' [alpha]| 'fname' 'how' [alpha]| r g b [a]", mgls_background ,12}, {"ball",_("Draw point (ball)"),"ball posx posy ['fmt']|posx posy posz ['fmt']", mgls_ball ,13}, {"box",_("Draw bounding box"),"box ['fmt' ticks]", mgls_box ,12}, {"circle",_("Draw circle"),"circle x y r ['fmt']|x y z r ['fmt']", mgls_circle ,13}, diff --git a/src/exec_set.cpp b/src/exec_set.cpp index 28ec455..b452879 100644 --- a/src/exec_set.cpp +++ b/src/exec_set.cpp @@ -397,6 +397,14 @@ int static mgls_origintick(mglGraph *gr, long , mglArg *a, const char *k, const return res; } //----------------------------------------------------------------------------- +int static mgls_fastcut(mglGraph *gr, long , mglArg *a, const char *k, const char *) +{ + int res=0; + if(!strcmp(k,"n")) gr->SetFastCut(a[0].v); + else res = 1; + return res; +} +//----------------------------------------------------------------------------- int static mgls_palette(mglGraph *gr, long , mglArg *a, const char *k, const char *) { int res=0; @@ -623,7 +631,7 @@ int static mgls_variant(mglGraph *gr, long , mglArg *a, const char *k, const cha int static mgls_version(mglGraph *gr, long , mglArg *a, const char *k, const char *) { int res=0; - char buf[32]; sprintf(buf,"MathGL version is 2.%g",MGL_VER2); + char buf[32]; sprintf(buf,"MathGL version is %s",MGL_VER_STRING); if(k[0]==0) gr->SetWarn(-1,buf); else if(!strcmp(k,"s")) res = mgl_check_version(a[0].s.s)?1:0; else res = 1; @@ -819,6 +827,7 @@ mglCommand mgls_set_cmd[] = { {"diffuse",_("Set diffusive light brightness"),"diffuse val", mgls_diffuse ,2}, {"drawreg",_("Set draw region for quality&4"),"drawreg|nx ny m", mgls_drawreg ,2}, {"facenum",_("Set number of visible faces"),"facenum val", mgls_facenum ,2}, + {"fastcut",_("Disable accurate primitive cutting at axis borders"),"fastcut val", mgls_fastcut ,2}, {"fog",_("Switch on/off fog"),"fog val [dz]", mgls_fog ,2}, {"font",_("Setup font"),"font 'fmt' [size]", mgls_font ,15}, {"gray",_("Switch on/off gray-scale mode"),"gray [val]", mgls_gray ,2}, diff --git a/src/pde.cpp b/src/pde.cpp index a97f42a..a04ad8a 100644 --- a/src/pde.cpp +++ b/src/pde.cpp @@ -31,7 +31,7 @@ const double GAMMA=0.1; ///< value for damping //----------------------------------------------------------------------------- void static mgl_operator_exp(long n, const dual *h, dual *a, dual *f) { - memset(f,0,2*n*sizeof(dual)); + memset((void*)f,0,2*n*sizeof(dual)); const long i1=n/2, i2=3*n/2-1; #pragma omp parallel for for(long j=0;j list; list.push_back(&x); list.push_back(&y); list.push_back(&p); list.push_back(&r); list.push_back(&u); - dual *a = new dual[2*nx]; memset(a,0,2*nx*sizeof(dual)); // Add "damping" area + dual *a = new dual[2*nx]; memset((void*)a,0,2*nx*sizeof(dual)); // Add "damping" area dual *f = new dual[6*nx], *g=f+2*nx, *s=f+4*nx; #pragma omp parallel for for(long i=0;i3*nx/2) dmp[i] += gamma*mgl_ipow((i-3*nx/2-1)/mreal(nx/2),2); } bool have_y = mglchr(func,'y'); - HADT ham; + HADT ham=0; if(!have_y) ham = mgl_apde_calc_ham(&hIm, old, func, list, dd); dual *iexp = new dual[4*nx*nx]; #pragma omp parallel for collapse(2) @@ -320,7 +320,7 @@ HADT MGL_EXPORT mgl_pde_solve_c(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_ ddual *hx = new ddual[2*nx], *hv = new ddual[2*ny]; ddual *hy = new ddual[2*ny], *hu = new ddual[2*nx]; double *dmp = new double[4*nx*ny]; - memset(a,0,4*nx*ny*sizeof(ddual)); + memset((void*)a,0,4*nx*ny*sizeof(ddual)); memset(dmp,0,4*nx*ny*sizeof(double)); #pragma omp parallel for collapse(2) for(long j=0;jNeedStop()) break; tmp.zz = Min.z+dz*k; - memset(hxy,0,4*nx*ny*sizeof(ddual)); memset(hxv,0,4*nx*ny*sizeof(ddual)); - memset(huv,0,4*nx*ny*sizeof(ddual)); memset(huy,0,4*nx*ny*sizeof(ddual)); + memset((void*)hxy,0,4*nx*ny*sizeof(ddual)); memset((void*)hxv,0,4*nx*ny*sizeof(ddual)); + memset((void*)huv,0,4*nx*ny*sizeof(ddual)); memset((void*)huy,0,4*nx*ny*sizeof(ddual)); mgl_pde_hprep(&tmp); for(long i=0;i<2*nx;i++) { hx[i] = hxv[i]; hu[i] = huv[i]; } for(long j=0;j<2*ny;j++) { hy[j] = huy[2*nx*j]; hv[j] = huv[2*nx*j];} @@ -526,7 +526,7 @@ void MGL_NO_EXPORT mgl_set_funcC(const mreal *x, mreal *dx, void *par) for(long i=0;im;i++) { HADT d = static_cast(p->head[i]); - memcpy(d->a, x+2*i*n, 2*n*sizeof(mreal)); + memcpy((void*)d->a, x+2*i*n, 2*n*sizeof(mreal)); } p->t->a[0] = x[2*p->n]; //#pragma omp parallel for collapse(2) diff --git a/src/pixel.cpp b/src/pixel.cpp index f05417d..0e1640e 100644 --- a/src/pixel.cpp +++ b/src/pixel.cpp @@ -55,7 +55,8 @@ void mglCanvas::pxl_backgr(long id, long n, const void *) #pragma omp parallel for #endif for(long i=id;i0) -#pragma omp parallel for + if(alpha<=1 && alpha>=0) +#pragma omp parallel for //simd for(long i=0;i0) -#pragma omp parallel for + if(alpha<=1 && alpha>=0) +#pragma omp parallel for //simd for(long i=0;iSamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; +// if(gr->SamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; if(wire) { gr->line_plot(iq,iq+1); gr->line_plot(iq-1,iq+1); @@ -583,7 +583,7 @@ void MGL_EXPORT mgl_area_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char for(size_t i=1;iSamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; +// if(gr->SamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; if(wire) { gr->line_plot(iq,iq+1); gr->line_plot(iq-1,iq+1); @@ -737,7 +737,7 @@ void MGL_EXPORT mgl_region_3d(HMGL gr, HCDT x1, HCDT y1, HCDT z1, HCDT x2, HCDT for(size_t i=1;iSamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; +// if(gr->SamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; if(wire) { gr->line_plot(iq,iq+1); gr->line_plot(iq-1,iq+1); @@ -790,7 +790,7 @@ void MGL_EXPORT mgl_region_xy(HMGL gr, HCDT x, HCDT y1, HCDT y2, const char *pen for(size_t i=1;iSamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; +// if(gr->SamePnt(iq,iq-2) || gr->SamePnt(iq+1,iq-1)) continue; if(wire) { gr->line_plot(iq,iq+1); diff --git a/src/random.cpp b/src/random.cpp index 4cb7be1..7664599 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -90,7 +90,7 @@ void MGL_EXPORT mgl_data_rnd_binomial_(uintptr_t *d, double *p) //----------------------------------------------------------------------------- mreal MGL_EXPORT mgl_rnd_gaussian(mreal mu, mreal sigma) { - mreal x, y, r=0.0; + mreal x=0, y=0, r=0.0; while (r >= 1 || r == 0) { x = 2.0 * mgl_rnd() - 1.0; @@ -126,18 +126,13 @@ void MGL_EXPORT mgl_data_rnd_exponential_(uintptr_t *d, double *l) long MGL_EXPORT mgl_rnd_discrete(HCDT A) // this assumes A to be 1d { long n=A->GetNx(); - mreal amax=0.0, sum_prob=0.0; + mreal amax=0.0; mreal *sum = new mreal[n]; for(long i=0; iv(i); } mreal r=amax*mgl_rnd(); -// for(i=0; iv(i); -// if(sum_prob > r) break; -// } long i1=0,i2=n-1,i=0; while(i2>i1+1) { diff --git a/texinfo/core_en.texi b/texinfo/core_en.texi index f461f81..9e8a611 100644 --- a/texinfo/core_en.texi +++ b/texinfo/core_en.texi @@ -822,6 +822,14 @@ Additionally extend axis range for any settings made by @code{SetRange} or @code @end deftypefn +@anchor{fastcut} +@deftypefn {MGL command} {} fastcut @code{val} +@ifclear UDAV +@deftypefnx {Method on @code{mglGraph}} @code{void} SetFastCut (@code{bool} val=@code{true}) +@end ifclear +Enable/disable accurate but slower primitive cutting at axis borders. In C/Fortran you can use @code{mgl_set_flag(gr,val, MGL_FAST_PRIM);}. It automatically set on for @ref{ternary} axis now. +@end deftypefn + @c ------------------------------------------------------------------ @external{} @node Curved coordinates, Ticks, Ranges (bounding box), Axis settings @@ -1717,6 +1725,7 @@ These functions change background image. @deftypefnx {C function} @code{void} mgl_clf_str (@code{HMGL} gr, @code{const char *} col) @deftypefnx {C function} @code{void} mgl_clf_chr (@code{HMGL} gr, @code{char} col) @deftypefnx {C function} @code{void} mgl_clf_rgb (@code{HMGL} gr, @code{mreal} r, @code{mreal} g, @code{mreal} b) +@deftypefnx {C function} @code{void} mgl_clf_rgba (@code{HMGL} gr, @code{mreal} r, @code{mreal} g, @code{mreal} b, @code{mreal} a) @end ifclear Clear the picture and fill background by specified color. @end deftypefn @@ -1745,7 +1754,7 @@ Load PNG or JPEG file @var{fname} as background for the plot. Parameter @var{alp @deftypefn {MGL command} {} background @code{r g b} @ifclear UDAV @deftypefnx {Method on @code{mglGraph}} @code{void} FillBackground (@code{const mglColor &}rgb) -@deftypefnx {C function} @code{void} mgl_fill_background (@code{HMGL} gr, @code{double} r, @code{double} g, @code{double} b) +@deftypefnx {C function} @code{void} mgl_fill_background (@code{HMGL} gr, @code{double} r, @code{double} g, @code{double} b, @code{double} a) @end ifclear Fill background by the specified color. Values should be in range [0,1]. @end deftypefn @@ -2137,8 +2146,8 @@ Styles of ticks and axis can be overrided by using @var{stl} string. Option @cod @anchor{colorbar} @deftypefn {MGL command} {} colorbar ['sch'=''] @ifclear UDAV -@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const char *}sch=@code{""}) -@deftypefnx {C function} @code{void} mgl_colorbar (@code{HMGL} gr, @code{const char *}sch) +@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const char *}sch=@code{""}, @code{const char *}opt=@code{""}) +@deftypefnx {C function} @code{void} mgl_colorbar (@code{HMGL} gr, @code{const char *}sch, @code{const char *}opt) @end ifclear Draws colorbar. Parameter @var{sch} may contain: @itemize @bullet @@ -2161,24 +2170,24 @@ color scheme (see @ref{Color scheme}); @deftypefn {MGL command} {} colorbar vdat ['sch'=''] @ifclear UDAV -@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const mglDataA &}v, @code{const char *}sch=@code{""}) -@deftypefnx {C function} @code{void} mgl_colorbar_val (@code{HMGL} gr, @code{HCDT} v, @code{const char *}sch) +@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const mglDataA &}v, @code{const char *}sch=@code{""}, @code{const char *}opt=@code{""}) +@deftypefnx {C function} @code{void} mgl_colorbar_val (@code{HMGL} gr, @code{HCDT} v, @code{const char *}sch, @code{const char *}opt) @end ifclear The same as previous but with sharp colors @var{sch} (current palette if @code{sch=""}) for values @var{v}. @sref{contd sample} @end deftypefn @deftypefn {MGL command} {} colorbar 'sch' @code{x y [w=1 h=1]} @ifclear UDAV -@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w=@code{1}, @code{mreal} h=@code{1}) -@deftypefnx {C function} @code{void} mgl_colorbar_ext (@code{HMGL} gr, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w, @code{mreal} h) +@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w=@code{1}, @code{mreal} h=@code{1}, @code{const char *}opt=@code{""}) +@deftypefnx {C function} @code{void} mgl_colorbar_ext (@code{HMGL} gr, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w, @code{mreal} h, @code{const char *}opt) @end ifclear The same as first one but at arbitrary position of subplot @{@var{x}, @var{y}@} (supposed to be in range [0,1]). Parameters @var{w}, @var{h} set the relative width and height of the colorbar. @end deftypefn @deftypefn {MGL command} {} colorbar vdat 'sch' @code{x y [w=1 h=1]} @ifclear UDAV -@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const mglDataA &}v, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w=@code{1}, @code{mreal} h=@code{1}) -@deftypefnx {C function} @code{void} mgl_colorbar_val_ext (@code{HMGL} gr, @code{HCDT} v, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w, @code{mreal} h) +@deftypefnx {Method on @code{mglGraph}} @code{void} Colorbar (@code{const mglDataA &}v, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w=@code{1}, @code{mreal} h=@code{1}, @code{const char *}opt=@code{""}) +@deftypefnx {C function} @code{void} mgl_colorbar_val_ext (@code{HMGL} gr, @code{HCDT} v, @code{const char *}sch, @code{mreal} x, @code{mreal} y, @code{mreal} w, @code{mreal} h, @code{const char *}opt) @end ifclear The same as previous but with sharp colors @var{sch} (current palette if @code{sch=""}) for values @var{v}. @sref{contd sample} @end deftypefn diff --git a/texinfo/core_ru.texi b/texinfo/core_ru.texi index c465cb8..35d128e 100644 --- a/texinfo/core_ru.texi +++ b/texinfo/core_ru.texi @@ -821,6 +821,14 @@ Setsize: размер(ы) равны нулю или отрицательны Дополнительно расширяет диапазон осей координат, задаваемый функциями @code{SetRange} или @code{SetRanges}, в соответствии с формулами @math{min += (max-min)*p1} и @math{max += (max-min)*p1} (или @math{min *= (max/min)^p1} и @math{max *= (max/min)^p1} для "логарифмических" диапазонов, когда @math{inf>max/min>100} или @math{0 #include #include +#include #include #include #include @@ -103,7 +104,7 @@ void PlotPanel::execute() raisePanel(this); objId = subId = -1; emit clearWarn(); - QTime t; t.start(); + QElapsedTimer t; t.start(); mgl_set_facenum(mgl->getGraph(),0); draw->text=textMGL->toPlainText(); draw->line=curPos; @@ -123,7 +124,7 @@ void PlotPanel::pressF9() parser.AddParam(0,str); delete []str; - QTime t; t.start(); + QElapsedTimer t; t.start(); parser.RestoreOnce(); draw->text=textMGL->toPlainText(); draw->line=curPos; mgl->update(); diff --git a/udav/text_pnl.cpp b/udav/text_pnl.cpp index bab19e5..571049a 100644 --- a/udav/text_pnl.cpp +++ b/udav/text_pnl.cpp @@ -79,7 +79,7 @@ TextPanel::TextPanel(QWidget *parent) : QWidget(parent) edit->setLineWrapMode(QTextEdit::NoWrap); setCompleter(mglCompleter); QFontMetrics metrics(edit->currentFont()); - edit->setTabStopWidth(4 * metrics.width(' ')); + edit->setTabStopDistance(4 * metrics.horizontalAdvance(' ')); menu = new QMenu(_("Edit"),this); QBoxLayout *v = new QVBoxLayout(this); @@ -262,7 +262,7 @@ void TextPanel::setEditorFont(QFont *f) QFont d(defFontFamily, defFontSize); edit->setFont(f ? *f : d); QFontMetrics metrics(f ? *f : d); - edit->setTabStopWidth(4 * metrics.width(' ')); + edit->setTabStopDistance(4*metrics.horizontalAdvance(' ')); } //----------------------------------------------------------------------------- QString TextPanel::selection() @@ -285,7 +285,7 @@ void TextPanel::newCmd(int n) } //----------------------------------------------------------------------------- #if MGL_HAVE_HDF5 -#define H5_USE_16_API +// #define H5_USE_16_API #include void TextPanel::loadHDF5(const QString &fileName) { @@ -295,7 +295,7 @@ void TextPanel::loadHDF5(const QString &fileName) long rank; hf = H5Fopen(fileName.toLocal8Bit().constData(), H5F_ACC_RDONLY, H5P_DEFAULT); if(!hf) return; - hg = H5Gopen(hf, "/"); + hg = H5Gopen(hf, "/", H5P_DEFAULT); hsize_t num, nx, ny, nz, i; char name[256]; H5Gget_num_objs(hg, &num); @@ -303,7 +303,7 @@ void TextPanel::loadHDF5(const QString &fileName) { if(H5Gget_objtype_by_idx(hg, i)!=H5G_DATASET) continue; H5Gget_objname_by_idx(hg, i, name, 256); - hd = H5Dopen(hg,name); hs = H5Dget_space(hd); + hd = H5Dopen(hg,name, H5P_DEFAULT); hs = H5Dget_space(hd); ht = H5Dget_type(hd); rank = H5Sget_simple_extent_ndims(hs); if(H5Tget_class(ht)==H5T_STRING) // load script @@ -358,7 +358,7 @@ void TextPanel::saveHDF5(const QString &fileName) hsize_t dims[3]; long rank = 3; - H5Eset_auto(0,0); + H5Eset_auto(0,0,0); hf = H5Fcreate(fileName.toLocal8Bit().constData(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); if(hf<0) { @@ -375,7 +375,7 @@ void TextPanel::saveHDF5(const QString &fileName) memcpy(buf, txt.toLocal8Bit().constData(), dims[0]); buf[dims[0]]=0; hs = H5Screate_simple(1, dims, 0); - hd = H5Dcreate(hf, "mgl_script", H5T_C_S1, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, "mgl_script", H5T_C_S1, hs, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); H5Dwrite(hd, H5T_C_S1, hs, hs, H5P_DEFAULT, buf); H5Dclose(hd); H5Sclose(hs); delete []buf; @@ -395,7 +395,7 @@ void TextPanel::saveHDF5(const QString &fileName) else { rank = 3; dims[0] = v->nz; dims[1] = v->ny; dims[2] = v->nx; } hs = H5Screate_simple(rank, dims, 0); - hd = H5Dcreate(hf, name, H5T_IEEE_F32LE, hs, H5P_DEFAULT); + hd = H5Dcreate(hf, name, H5T_IEEE_F32LE, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, v->a); H5Dclose(hd); H5Sclose(hs); diff --git a/udav/textedit.cpp b/udav/textedit.cpp index 846f54f..a34672e 100644 --- a/udav/textedit.cpp +++ b/udav/textedit.cpp @@ -170,7 +170,7 @@ int TextEdit::lineNumberAreaWidth() int digits = 1; int max = qMax(1, document()->blockCount()); while (max >= 10) { max /= 10; ++digits; } - int space = 13 + fontMetrics().width(QLatin1Char('9')) * (digits); + int space = 13 + fontMetrics().horizontalAdvance(QLatin1Char('9'))*digits; return space; } //----------------------------------------------------------------------------- diff --git a/udav/udav_wnd.cpp b/udav/udav_wnd.cpp index 0542af8..03271b5 100644 --- a/udav/udav_wnd.cpp +++ b/udav/udav_wnd.cpp @@ -115,7 +115,7 @@ int main(int argc, char **argv) settings.endGroup(); mgl_suppress_warn(true); - QCoreApplication::setAttribute(Qt::AA_X11InitThreads); +// QCoreApplication::setAttribute(Qt::AA_X11InitThreads); #ifdef WIN32 QCoreApplication::addLibraryPath("c:/plugins/"); QCoreApplication::addLibraryPath(QFileInfo(QString::fromLocal8Bit(argv[0])).absolutePath().append("/plugins/")); @@ -451,7 +451,7 @@ void MainWindow::properties() { propDlg->exec(); } //----------------------------------------------------------------------------- void MainWindow::about() { - QString s = "UDAV v. 2."+QString::number(MGL_VER2)+ + QString s = "UDAV v. "+QString(MGL_VER_STRING)+ _("
(c) Alexey Balakin, 2007-present

License is GPL v.2 or later."); QMessageBox::about(this, _("UDAV - about"), s); } diff --git a/udav_new.png b/udav_new.png index b754eef..24b4c28 100644 Binary files a/udav_new.png and b/udav_new.png differ diff --git a/utils/make_pas.cpp b/utils/make_pas.cpp index c9bd75c..f5ed661 100644 --- a/utils/make_pas.cpp +++ b/utils/make_pas.cpp @@ -58,7 +58,6 @@ uses\n\ Windows, Graphics,\n\ {$ENDIF}\n\ Math;\n\n\ -const MGL_VER2 = 2.2;\n\ //* This define enables double precision in MathGL */\n\ MGL_USE_DOUBLE = 1;\n\n\ const\n\ @@ -421,7 +420,7 @@ bool parse_file(const char *fname, FILE *out) { do { - fgets(buf, 1024, fp); + if(!fgets(buf, 1024, fp)) break; } while ( !strstr(buf, "*/") ); continue; diff --git a/utils/mglconv.cpp b/utils/mglconv.cpp index abde554..d4d950c 100644 --- a/utils/mglconv.cpp +++ b/utils/mglconv.cpp @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) } else if(ch=='h' || (ch==-1 && optind>=argc)) { - printf(_("mglconv convert mgl script to image file (default PNG).\nCurrent version is 2.%g\n"),MGL_VER2); + printf(_("mglconv convert mgl script to image file (default PNG).\nCurrent version is %s\n"),MGL_VER_STRING); printf(_("Usage:\tmglconv [parameter(s)] scriptfile\n")); printf( _("\t-1 str set str as argument $1 for script\n" diff --git a/utils/mglview.cpp b/utils/mglview.cpp index de7a1bf..2a6c459 100644 --- a/utils/mglview.cpp +++ b/utils/mglview.cpp @@ -79,7 +79,7 @@ int main(int argc, char **argv) { setlocale(LC_ALL, optarg); setlocale(LC_NUMERIC, "C"); } else if(ch=='h' || (ch==-1 && optind>=argc)) { - printf(_("mglview show plot from MGL script or MGLD file.\nCurrent version is 2.%g\n"),MGL_VER2); + printf(_("mglview show plot from MGL script or MGLD file.\nCurrent version is %s\n"),MGL_VER_STRING); printf(_("Usage:\tmglview [parameter(s)] scriptfile\n")); printf( _("\t-1 str set str as argument $1 for script\n" diff --git a/website/index.html b/website/index.html index 9c60693..71b73cf 100644 --- a/website/index.html +++ b/website/index.html @@ -82,8 +82,8 @@

-

14 March 2018. -New version (v.2.4.3) of MathGL is released. There are new clabel command for drawing colorbar labels, EPS output now may have mask, compatibility changes for complex numbers, and many other improvements.

+

8 December 2021. +New version (v.2.5) of MathGL is released. There are big improve in formula evaluation (user-defined function, summation and product, new functions for data interpolation), new plot kind dcont and lines, set of functions for random distributions, new data handling functions (like, keep), extend ode to solve PDE/cascade/etc, add mask for most of plotting functions and bugfixes, which denoted here.

Games

diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt index a9e1269..fd14ba5 100644 --- a/widgets/CMakeLists.txt +++ b/widgets/CMakeLists.txt @@ -1,7 +1,7 @@ include(GenerateExportHeader) if(MSVC) - add_definitions(-DMGL_LIB_MSVC) + add_definitions(-DMGL_LIB_MSVC -DMGL_WIDGETS_DLL) endif(MSVC) if(MGL_HAVE_FLTK) @@ -27,7 +27,7 @@ if(MGL_HAVE_WX) target_link_libraries(mgl-wx-static mgl-static ${wxWidgets_LIBRARIES}) endif(MGL_HAVE_WX) -add_subdirectory( qt4 ) +#add_subdirectory( qt4 ) add_subdirectory( qt5 ) mgl_po_src(fltk.cpp ../include/mgl2/fltk.h ../include/mgl2/Fl_MathGL.h glut.cpp ../include/mgl2/glut.h wx.cpp ../include/mgl2/wx.h qt.cpp ../include/mgl2/qt.h ../include/mgl2/qmathgl.h) diff --git a/widgets/qt.cpp b/widgets/qt.cpp index 05f1c7e..f0daf34 100644 --- a/widgets/qt.cpp +++ b/widgets/qt.cpp @@ -503,7 +503,7 @@ void QMathGL::mouseMoveEvent(QMouseEvent *ev) if(gg) emit perChanged(int(per)); refresh(); } - if(ev->buttons()&Qt::MidButton) // shift + if(ev->buttons()&Qt::MiddleButton) // shift { mreal ff = 1./sqrt(mreal(width()*height())); mreal dx = (x0-xe)*ff*(x2-x1), dy = (y0-ye)*ff*(y2-y1); @@ -513,7 +513,7 @@ void QMathGL::mouseMoveEvent(QMouseEvent *ev) refresh(); } else if(zoom) refresh(); - else if(ev->buttons()&Qt::MidButton) // shift axis + else if(ev->buttons()&Qt::MiddleButton) // shift axis { mreal ff = 1./sqrt(mreal(width()*height())); mreal dx = (x0-xe)*ff*(ax2-ax1), dy = (y0-ye)*ff*(ay2-ay1); @@ -665,14 +665,14 @@ void QMathGL::wheelEvent(QWheelEvent *ev) if(!enableWheel) { ev->ignore(); return; } if(rotate) // zoom { - mreal d,c,f=exp(0.001*ev->delta())/2; + mreal d,c,f=exp(0.001*ev->angleDelta().y())/2; d = (y2-y1)*f; c = (y2+y1)/2; y1 = c-d; y2 = c+d; d = (x2-x1)*f; c = (x2+x1)/2; x1 = c-d; x2 = c+d; refresh(); ev->accept(); } else // zoom axis { - mreal d,c,f=exp(0.001*ev->delta())/2; + mreal d,c,f=exp(0.001*ev->angleDelta().y())/2; d = (ay2-ay1)*f; c = (ay2+ay1)/2; ay1 = c-d; ay2 = c+d; d = (ax2-ax1)*f; c = (ax2+ax1)/2; ax1 = c-d; ax2 = c+d; mgl_zoom_axis(gr,ax1,ay1,0,0,ax2,ay2,0,0); @@ -873,7 +873,7 @@ void QMathGL::setSize(int w, int h) //----------------------------------------------------------------------------- void QMathGL::about() { - QString s = _("MathGL v. 2.") + QString::number(MGL_VER2) + _("\n(c) Alexey Balakin, 2007\nhttp://mathgl.sourceforge.net/"); + QString s = _("MathGL v. 2.") + QString(MGL_VER_STRING) + _("\n(c) Alexey Balakin, 2007\nhttp://mathgl.sourceforge.net/"); QMessageBox::about(this, _("MathGL - about"), s); } //----------------------------------------------------------------------------- @@ -882,7 +882,7 @@ void QMathGL::aboutQt() { QMessageBox::aboutQt(this, _("About Qt")); } void QMathGL::print() { QPrinter *printer = new QPrinter; - printer->setOrientation(getRatio()>1 ? QPrinter::Landscape : QPrinter::Portrait); + printer->setPageOrientation(getRatio()>1 ? QPageLayout::Landscape : QPageLayout::Portrait); QPrintDialog printDlg(printer, this); if (printDlg.exec() == QDialog::Accepted) { @@ -1018,7 +1018,7 @@ void mglCanvasQT::Window(int argc, char **argv, int (*draw)(mglBase *gr, void *p if(!qApp) { - QCoreApplication::setAttribute(Qt::AA_X11InitThreads); +// QCoreApplication::setAttribute(Qt::AA_X11InitThreads); if(!argv) { argc_ = 0; argv_=&parg; } else { argc_ = argc; argv_=argv; } QApplication *a = new QApplication(argc_, argv_); diff --git a/widgets/wx.cpp b/widgets/wx.cpp index 78a2613..91f0b44 100644 --- a/widgets/wx.cpp +++ b/widgets/wx.cpp @@ -414,7 +414,7 @@ void wxMathGL::Animation(bool st) //----------------------------------------------------------------------------- void wxMathGL::About() { - wxString s = wxT("MathGL v. 2.") + wxString::Format(wxT("%g"),MGL_VER2) + + wxString s = wxT("MathGL v. ") + wxString::Format(wxT("%s"),MGL_VER_STRING) + wxT("\n(c) Alexey Balakin, 2007\nhttp://mathgl.sourceforge.net/"); wxMessageBox(s, wxT("MathGL - about"), wxOK|wxICON_INFORMATION, this); }