[SCM] Packaging for mathgl branch, experimental, updated. debian/2.1.1-1-7-g298c48f
Dimitrios Eftaxiopoulos
eftaxi12 at otenet.gr
Thu Feb 14 21:18:39 UTC 2013
The following commit has been merged in the experimental branch:
commit 7d95b7e3adb1fbd076d0ac2fc6ba05c75db19b40
Author: Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr>
Date: Tue Feb 12 17:29:36 2013 +0200
Imported Upstream version 2.1.2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5bd669..9469288 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.6)
project( MathGL )
@@ -9,7 +9,7 @@ endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(MathGL_VERSION_MAJOR 2)
-set(MathGL_VERSION_MINOR 1.1)
+set(MathGL_VERSION_MINOR 1.2)
include(CMakeDependentOption)
@@ -28,7 +28,6 @@ option(enable-gsl "Enable gsl support")
option(enable-jpeg "Enable jpeg support")
option(enable-png "Enable png support" ON)
option(enable-zlib "Enable zlib support" ON)
-#option(enable-u3d "Enable u3d support")
option(enable-pdf "Enable pdf support")
option(enable-gif "Enable gif support")
option(enable-hdf4 "Enable hdf4 support")
@@ -44,15 +43,22 @@ option(enable-octave-install "Octave interface will install for all users" ON)
option(enable-doc "Enable documentation building")
include_directories( ${MathGL_SOURCE_DIR}/include ${MathGL_BINARY_DIR}/include)
-
-if(NOT MSVC AND NOT BORLAND)
- find_library(M_LIB m)
- if(NOT M_LIB)
- message(SEND_ERROR "${M_LIB}")
- endif(NOT M_LIB)
-else(NOT MSVC AND NOT BORLAND)
- set(M_LIB)
-endif(NOT MSVC AND NOT BORLAND)
+set(MGL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/include/mgl2")
+
+include(CheckFunctionExists)
+include(CMakePushCheckState)
+CHECK_FUNCTION_EXISTS(sin MGL_SIN)
+if(NOT MGL_SIN)
+ cmake_push_check_state()
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m)
+ CHECK_FUNCTION_EXISTS(sin MGL_SIN_M)
+ cmake_pop_check_state()
+ if(MGL_SIN_M)
+ set(M_LIB m)
+ elseif(MGL_SIN_M)
+ message(SEND_ERROR "Math library not found")
+ endif(MGL_SIN_M)
+endif(NOT MGL_SIN)
if(enable-double)
set(MGL_USE_DOUBLE 1)
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 9a9ce76..c098daf 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,15 @@
+2.1.2 Released 28 January 2013
+
+* Exclude "local" functions from resulting library.
+* String in MGL script now can be concatenated with another string or data/numbers (like 'max(u)=',u.max,' a.u.').
+* Bugfix for colors in 3D PDF.
+* Bugfix for drawing in MPI mode.
+* If Aspect() function have NAN argument(s) then it try to select optimal aspect ratio.
+* Option 'size' in Legend() now change only text size (not mark size).
+* Option 'meshnum' now influence on Boxs() and Belt() functions
+* Adjust marks drawing (line width and dots).
+* Minor improvements and bugfixes.
+
2.1.1 Released 24 December 2012
* Bugfix for SetRange(val,val) function
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 3a64e7e..304c6c9 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -6,6 +6,7 @@ add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp)
target_link_libraries(mgl_example mgl)
if(MGL_HAVE_FLTK)
+ include_directories(${FLTK_INCLUDE_DIR})
add_executable(mgl_fltk_example wnd_samples.cpp fltk_example.cpp)
target_link_libraries(mgl_fltk_example mgl-fltk)
endif(MGL_HAVE_FLTK)
diff --git a/examples/full_test.cpp b/examples/full_test.cpp
index 521bc3d..cb4ede2 100644
--- a/examples/full_test.cpp
+++ b/examples/full_test.cpp
@@ -60,178 +60,16 @@ void mgls_prepare3d(mglData *a, mglData *b=0);
void mgls_prepare2v(mglData *a, mglData *b);
void mgls_prepare3v(mglData *ex, mglData *ey, mglData *ez);
//-----------------------------------------------------------------------------
-void mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png);
void save(mglGraph *gr,const char *name,const char *suf);
void test(mglGraph *gr)
{
- gr->SetSize(800,600);
- gr->SetTuneTicks(0); gr->SetRanges(1000,1000.1,10,10.001);
- gr->SubPlot(3,2,0); gr->SetOrigin(1000,10); gr->Axis();
- gr->SubPlot(3,2,1); gr->SetOrigin(1000.1,10); gr->Axis();
- gr->SubPlot(3,2,2); gr->SetOrigin(1000.05,10); gr->Axis();
- gr->SubPlot(3,2,3); gr->SetOrigin(1000,10.001); gr->Axis();
- gr->SubPlot(3,2,4); gr->SetOrigin(1000.1,10.001); gr->Axis();
- gr->SubPlot(3,2,5); gr->SetOrigin(1000.05,10.001); gr->Axis();
- return;
-
mglParse par;
par.AllowSetSize(true);
setlocale(LC_CTYPE, "");
- FILE *fp=fopen("/home/balakin/mathgl-code/mathgl-2x/build/test.mgl","r");
- par.Execute(gr,fp,true);
- fclose(fp);
-}
-//-----------------------------------------------------------------------------
-void fexport(mglGraph *gr)
-{
- gr->SubPlot(3,2,0);
- double d,x1,x2,x0,y=0.95;
- d=0.3, x0=0.2, x1=0.5, x2=0.6;
- gr->Line(mglPoint(x0,1-0*d),mglPoint(x1,1-0*d),"k-"); gr->Puts(mglPoint(x2,y-0*d),"Solid '-'",":rL");
- gr->Line(mglPoint(x0,1-1*d),mglPoint(x1,1-1*d),"k|"); gr->Puts(mglPoint(x2,y-1*d),"Long Dash '|'",":rL");
- gr->Line(mglPoint(x0,1-2*d),mglPoint(x1,1-2*d),"k;"); gr->Puts(mglPoint(x2,y-2*d),"Dash ';'",":rL");
- gr->Line(mglPoint(x0,1-3*d),mglPoint(x1,1-3*d),"k="); gr->Puts(mglPoint(x2,y-3*d),"Small dash '='",":rL");
- gr->Line(mglPoint(x0,1-4*d),mglPoint(x1,1-4*d),"kj"); gr->Puts(mglPoint(x2,y-4*d),"Dash-dot 'j'",":rL");
- gr->Line(mglPoint(x0,1-5*d),mglPoint(x1,1-5*d),"ki"); gr->Puts(mglPoint(x2,y-5*d),"Small dash-dot 'i'",":rL");
- gr->Line(mglPoint(x0,1-6*d),mglPoint(x1,1-6*d),"k:"); gr->Puts(mglPoint(x2,y-6*d),"Dots ':'",":rL");
- gr->Line(mglPoint(x0,1-7*d),mglPoint(x1,1-7*d),"k "); gr->Puts(mglPoint(x2,y-7*d),"None ' '",":rL");
-
- d=0.25; x1=-1; x0=-0.8; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k."); gr->Puts(mglPoint(x0,y+5*d),"'.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k+"); gr->Puts(mglPoint(x0,y+4*d),"'+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"kx"); gr->Puts(mglPoint(x0,y+3*d),"'x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k*"); gr->Puts(mglPoint(x0,y+2*d),"'*'",":rL");
- gr->Mark(mglPoint(x1,d),"ks"); gr->Puts(mglPoint(x0,y+d),"'s'",":rL");
- gr->Mark(mglPoint(x1,0),"kd"); gr->Puts(mglPoint(x0,y),"'d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"ko"); gr->Puts(mglPoint(x0,y-d),"'o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k^"); gr->Puts(mglPoint(x0,y-2*d),"'\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"kv"); gr->Puts(mglPoint(x0,y-3*d),"'v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k<"); gr->Puts(mglPoint(x0,y-4*d),"'<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k>"); gr->Puts(mglPoint(x0,y-5*d),"'>'",":rL");
-
- d=0.25; x1=-0.5; x0=-0.3; y = -0.05;
- gr->Mark(mglPoint(x1,5*d),"k#."); gr->Puts(mglPoint(x0,y+5*d),"'\\#.'",":rL");
- gr->Mark(mglPoint(x1,4*d),"k#+"); gr->Puts(mglPoint(x0,y+4*d),"'\\#+'",":rL");
- gr->Mark(mglPoint(x1,3*d),"k#x"); gr->Puts(mglPoint(x0,y+3*d),"'\\#x'",":rL");
- gr->Mark(mglPoint(x1,2*d),"k#*"); gr->Puts(mglPoint(x0,y+2*d),"'\\#*'",":rL");
- gr->Mark(mglPoint(x1,d),"k#s"); gr->Puts(mglPoint(x0,y+d),"'\\#s'",":rL");
- gr->Mark(mglPoint(x1,0),"k#d"); gr->Puts(mglPoint(x0,y),"'\\#d'",":rL");
- gr->Mark(mglPoint(x1,-d,0),"k#o"); gr->Puts(mglPoint(x0,y-d),"'\\#o'",":rL");
- gr->Mark(mglPoint(x1,-2*d,0),"k#^"); gr->Puts(mglPoint(x0,y-2*d),"'\\#\\^'",":rL");
- gr->Mark(mglPoint(x1,-3*d,0),"k#v"); gr->Puts(mglPoint(x0,y-3*d),"'\\#v'",":rL");
- gr->Mark(mglPoint(x1,-4*d,0),"k#<"); gr->Puts(mglPoint(x0,y-4*d),"'\\#<'",":rL");
- gr->Mark(mglPoint(x1,-5*d,0),"k#>"); gr->Puts(mglPoint(x0,y-5*d),"'\\#>'",":rL");
-
- gr->SubPlot(3,2,1);
- double a=0.1,b=0.4,c=0.5;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"k-A"); gr->Puts(mglPoint(c,1),"Style 'A' or 'A\\_'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"k-V"); gr->Puts(mglPoint(c,0.8),"Style 'V' or 'V\\_'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"k-K"); gr->Puts(mglPoint(c,0.6),"Style 'K' or 'K\\_'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"k-I"); gr->Puts(mglPoint(c,0.4),"Style 'I' or 'I\\_'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"k-D"); gr->Puts(mglPoint(c,0.2),"Style 'D' or 'D\\_'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"k-S"); gr->Puts(mglPoint(c,0),"Style 'S' or 'S\\_'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"k-O"); gr->Puts(mglPoint(c,-0.2),"Style 'O' or 'O\\_'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"k-T"); gr->Puts(mglPoint(c,-0.4),"Style 'T' or 'T\\_'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-_"); gr->Puts(mglPoint(c,-0.6),"Style '\\_' or none",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-AS"); gr->Puts(mglPoint(c,-0.8),"Style 'AS'",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-_A"); gr->Puts(mglPoint(c,-1),"Style '\\_A'",":rL");
-
- a=-1; b=-0.7; c=-0.6;
- gr->Line(mglPoint(a,1),mglPoint(b,1),"kAA"); gr->Puts(mglPoint(c,1),"Style 'AA'",":rL");
- gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"kVV"); gr->Puts(mglPoint(c,0.8),"Style 'VV'",":rL");
- gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"kKK"); gr->Puts(mglPoint(c,0.6),"Style 'KK'",":rL");
- gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"kII"); gr->Puts(mglPoint(c,0.4),"Style 'II'",":rL");
- gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"kDD"); gr->Puts(mglPoint(c,0.2),"Style 'DD'",":rL");
- gr->Line(mglPoint(a,0),mglPoint(b,0),"kSS"); gr->Puts(mglPoint(c,0),"Style 'SS'",":rL");
- gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"kOO"); gr->Puts(mglPoint(c,-0.2),"Style 'OO'",":rL");
- gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"kTT"); gr->Puts(mglPoint(c,-0.4),"Style 'TT'",":rL");
- gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-__"); gr->Puts(mglPoint(c,-0.6),"Style '\\_\\_'",":rL");
- gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-VA"); gr->Puts(mglPoint(c,-0.8),"Style 'VA'",":rL");
- gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-AV"); gr->Puts(mglPoint(c,-1),"Style 'AV'",":rL");
-
- gr->SubPlot(3,2,2);
- //#LENUQ
- gr->FaceZ(mglPoint(-1, -1), 0.4, 0.3, "L#"); gr->Puts(mglPoint(-0.8,-0.9), "L", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-1), 0.4, 0.3, "E#"); gr->Puts(mglPoint(-0.4,-0.9), "E", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-1), 0.4, 0.3, "N#"); gr->Puts(mglPoint(0, -0.9), "N", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -1), 0.4, 0.3, "U#"); gr->Puts(mglPoint(0.4,-0.9), "U", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -1), 0.4, 0.3, "Q#"); gr->Puts(mglPoint(0.8,-0.9), "Q", "w:C", -1.4);
- //#lenuq
- gr->FaceZ(mglPoint(-1, -0.7), 0.4, 0.3, "l#"); gr->Puts(mglPoint(-0.8,-0.6), "l", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.7), 0.4, 0.3, "e#"); gr->Puts(mglPoint(-0.4,-0.6), "e", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.7), 0.4, 0.3, "n#"); gr->Puts(mglPoint(0, -0.6), "n", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.7), 0.4, 0.3, "u#"); gr->Puts(mglPoint(0.4,-0.6), "u", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.7), 0.4, 0.3, "q#"); gr->Puts(mglPoint(0.8,-0.6), "q", "k:C", -1.4);
- //#CMYkP
- gr->FaceZ(mglPoint(-1, -0.4), 0.4, 0.3, "C#"); gr->Puts(mglPoint(-0.8,-0.3), "C", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.4), 0.4, 0.3, "M#"); gr->Puts(mglPoint(-0.4,-0.3), "M", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.4), 0.4, 0.3, "Y#"); gr->Puts(mglPoint(0, -0.3), "Y", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.4), 0.4, 0.3, "k#"); gr->Puts(mglPoint(0.4,-0.3), "k", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.4), 0.4, 0.3, "P#"); gr->Puts(mglPoint(0.8,-0.3), "P", "w:C", -1.4);
- //#cmywp
- gr->FaceZ(mglPoint(-1, -0.1), 0.4, 0.3, "c#"); gr->Puts(mglPoint(-0.8, 0), "c", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,-0.1), 0.4, 0.3, "m#"); gr->Puts(mglPoint(-0.4, 0), "m", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,-0.1), 0.4, 0.3, "y#"); gr->Puts(mglPoint(0, 0), "y", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, -0.1), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.4, 0), "w", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, -0.1), 0.4, 0.3, "p#"); gr->Puts(mglPoint(0.8, 0), "p", "k:C", -1.4);
- //#BGRHW
- gr->FaceZ(mglPoint(-1, 0.2), 0.4, 0.3, "B#"); gr->Puts(mglPoint(-0.8, 0.3), "B", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.2), 0.4, 0.3, "G#"); gr->Puts(mglPoint(-0.4, 0.3), "G", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.2), 0.4, 0.3, "R#"); gr->Puts(mglPoint(0, 0.3), "R", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.2), 0.4, 0.3, "H#"); gr->Puts(mglPoint(0.4, 0.3), "H", "w:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.2), 0.4, 0.3, "W#"); gr->Puts(mglPoint(0.8, 0.3), "W", "w:C", -1.4);
- //#bgrhw
- gr->FaceZ(mglPoint(-1, 0.5), 0.4, 0.3, "b#"); gr->Puts(mglPoint(-0.8, 0.6), "b", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.5), 0.4, 0.3, "g#"); gr->Puts(mglPoint(-0.4, 0.6), "g", "k:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.5), 0.4, 0.3, "r#"); gr->Puts(mglPoint(0, 0.6), "r", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.5), 0.4, 0.3, "h#"); gr->Puts(mglPoint(0.4, 0.6), "h", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.5), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.8, 0.6), "w", "k:C", -1.4);
- //#brighted
- gr->FaceZ(mglPoint(-1, 0.8), 0.4, 0.3, "{r1}#"); gr->Puts(mglPoint(-0.8, 0.9), "\\{r1\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.6,0.8), 0.4, 0.3, "{r3}#"); gr->Puts(mglPoint(-0.4, 0.9), "\\{r3\\}", "w:C", -1.4);
- gr->FaceZ(mglPoint(-0.2,0.8), 0.4, 0.3, "{r5}#"); gr->Puts(mglPoint(0, 0.9), "\\{r5\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.2, 0.8), 0.4, 0.3, "{r7}#"); gr->Puts(mglPoint(0.4, 0.9), "\\{r7\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0.6, 0.8), 0.4, 0.3, "{r9}#"); gr->Puts(mglPoint(0.8, 0.9), "\\{r9\\}", "k:C", -1.4);
- // HEX
- gr->FaceZ(mglPoint(-1, -1.3), 1, 0.3, "{xff9966}#"); gr->Puts(mglPoint(-0.5,-1.2), "\\{xff9966\\}", "k:C", -1.4);
- gr->FaceZ(mglPoint(0, -1.3), 1, 0.3, "{x83CAFF}#"); gr->Puts(mglPoint( 0.5,-1.2), "\\{x83CAFF\\}", "k:C", -1.4);
-
- gr->SubPlot(3,2,3);
- char stl[3]="r1", txt[4]="'1'";
- for(int i=0;i<10;i++)
- {
- txt[1]=stl[1]='0'+i;
- gr->Line(mglPoint(-1,0.2*i-1),mglPoint(1,0.2*i-1),stl);
- gr->Puts(mglPoint(1.05,0.2*i-1),txt,":L");
- }
-
- gr->SubPlot(3,2,4); gr->Title("TriPlot sample"); gr->Rotate(50,60);
- double t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
- double xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
- mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->TriPlot(tt,uu,vv,ww,"b");
- gr->TriPlot(tt,uu,vv,ww,"k#");
-
- gr->SubPlot(3,2,5);
- mglData r(4); r.Fill(1,4);
- gr->SetRanges(1,4,1,4); gr->Axis();
- gr->Mark(r,r,"s");
- gr->Plot(r,"b");
-
- gr->WriteJPEG("test.jpg");
- gr->WritePNG("test.png");
- gr->WriteBMP("test.bmp");
- gr->WriteTGA("test.tga");
- gr->WriteEPS("test.eps");
- gr->WriteSVG("test.svg");
- gr->WriteGIF("test.gif");
-
- gr->WriteXYZ("test.xyz");
- gr->WriteSTL("test.stl");
- gr->WriteOFF("test.off");
- gr->WriteTEX("test.tex");
- gr->WriteOBJ("test.obj");
- gr->WritePRC("test.prc");
+ par.Execute(gr,"text 0 0 'test':text 0 1 'test='1+1:text 0 -1 'test='[1,3]");
+// FILE *fp=fopen("/home/balakin/progr/mathgl-code/mathgl-2x/build/test.mgl","r");
+// par.Execute(gr,fp,true);
+// fclose(fp);
}
//-----------------------------------------------------------------------------
#if !defined(_MSC_VER) && !defined(__BORLANDC__)
@@ -251,6 +89,7 @@ static struct option longopts[] =
{ "mini", no_argument, &mini, 1 },
{ "none", no_argument, &type, 7 },
{ "obj", no_argument, &type, 11 },
+ { "obj_old",no_argument, &type, 10 },
{ "off", no_argument, &type, 12 },
{ "prc", no_argument, &type, 5 },
{ "pdf", no_argument, &type, 9 },
@@ -262,7 +101,6 @@ static struct option longopts[] =
{ "json", no_argument, &type, 15 },
{ "test", no_argument, &dotest, 1 },
{ "font", no_argument, &dotest, 2 },
- { "fmts", no_argument, &dotest, 3 },
{ "thread", required_argument, NULL, 't' },
{ "verbose",no_argument, &verbose, 1 },
{ "width", required_argument, NULL, 'w' },
@@ -286,6 +124,7 @@ void usage()
"--solid - output solid PNG\n"
"--svg - output SVG\n"
"--obj - output obj/mtl\n"
+ "--obj_old - output obj/mtl in old way\n"
"--off - output off\n"
"--stl - output stl\n"
"--none - none output\n"
@@ -296,7 +135,6 @@ void usage()
"--mgl - use MGL scripts for samples\n"
"--test - perform test\n"
"--font - write current font as C++ file\n"
- "--fmts - write sample in all possible formats\n"
);
}
#endif
@@ -336,6 +174,9 @@ void save(mglGraph *gr,const char *name,const char *suf="")
case 9: // PDF
sprintf(buf,"%s%s.prc",name,suf);
gr->WritePRC(buf); remove(buf); break;
+ case 10: // old OBJ
+ sprintf(buf,"%s%s.obj",name,suf);
+ gr->WriteOBJold(buf); break;
case 11: // OBJ
sprintf(buf,"%s%s.obj",name,suf);
gr->WriteOBJ(buf); break;
@@ -386,6 +227,7 @@ int main(int argc,char **argv)
if(dotest==1) printf("Global (before):%s\n",mglGlobalMess.c_str());
gr = new mglGraph; //gr->SetQuality(0);
+ if( type==11|| type==12|| type==5 || type==9) width=height;
if(mini) { gr->SetSize(190,145); suf = "-sm"; }
else if(big)
{ gr->SetSize(1920,1440); suf = "-lg"; }
@@ -403,13 +245,11 @@ int main(int argc,char **argv)
else if(dotest==2)
{ mgl_create_cpp_font(gr->Self(), L"!-~,¡-ÿ,̀-̏,Α-ω,ϑ,ϕ,ϖ,ϰ,ϱ,ϵ,А-я,ℏ,ℑ,ℓ,ℜ,←-↙,∀-∯,≠-≯,⟂");
delete gr; return 0; }
- else if(dotest==3)
- { fexport(gr); delete gr; return 0; }
if(type==15) mini=1; // save mini version for json
if(srnd) mgl_srnd(1);
- gr->VertexColor(false); gr->TextureColor(true); gr->Compression(false);
+ gr->VertexColor(false); gr->Compression(false);
if(name[0]==0) while(s->name[0]) // all samples
{
gr->DefaultPlotParam(); gr->Clf();
diff --git a/examples/samples.cpp b/examples/samples.cpp
index 408118e..ab3527b 100644
--- a/examples/samples.cpp
+++ b/examples/samples.cpp
@@ -56,7 +56,397 @@ new ex 10 10 10 '0.2*x/$1-0.2*x/$2'\n\
new ey 10 10 10 '0.2*y/$1-0.2*y/$2'\n\
new ez 10 10 10 '0.2*(z-0.3)/$1-0.2*(z+0.3)/$2'\nreturn\n";
//-----------------------------------------------------------------------------
-// Sample functions (v.2.*0)
+// Sample functions (v.2.*)
+//-----------------------------------------------------------------------------
+const char *mmgl_fexport="";
+#define splot1(b) {(b).Norm(-1,1,true);gr->Rotate(70,60);gr->Box();gr->Surf3(b);}
+void smgl_fexport(mglGraph *gr) // surface triangulation
+{
+ gr->SubPlot(3,2,0);
+ double d,x1,x2,x0,y=0.95;
+ d=0.3, x0=0.2, x1=0.5, x2=0.6;
+ gr->Line(mglPoint(x0,1-0*d),mglPoint(x1,1-0*d),"k-"); gr->Puts(mglPoint(x2,y-0*d),"Solid '-'",":rL");
+ gr->Line(mglPoint(x0,1-1*d),mglPoint(x1,1-1*d),"k|"); gr->Puts(mglPoint(x2,y-1*d),"Long Dash '|'",":rL");
+ gr->Line(mglPoint(x0,1-2*d),mglPoint(x1,1-2*d),"k;"); gr->Puts(mglPoint(x2,y-2*d),"Dash ';'",":rL");
+ gr->Line(mglPoint(x0,1-3*d),mglPoint(x1,1-3*d),"k="); gr->Puts(mglPoint(x2,y-3*d),"Small dash '='",":rL");
+ gr->Line(mglPoint(x0,1-4*d),mglPoint(x1,1-4*d),"kj"); gr->Puts(mglPoint(x2,y-4*d),"Dash-dot 'j'",":rL");
+ gr->Line(mglPoint(x0,1-5*d),mglPoint(x1,1-5*d),"ki"); gr->Puts(mglPoint(x2,y-5*d),"Small dash-dot 'i'",":rL");
+ gr->Line(mglPoint(x0,1-6*d),mglPoint(x1,1-6*d),"k:"); gr->Puts(mglPoint(x2,y-6*d),"Dots ':'",":rL");
+ gr->Line(mglPoint(x0,1-7*d),mglPoint(x1,1-7*d),"k "); gr->Puts(mglPoint(x2,y-7*d),"None ' '",":rL");
+
+ d=0.25; x1=-1; x0=-0.8; y = -0.05;
+ gr->Mark(mglPoint(x1,5*d),"k."); gr->Puts(mglPoint(x0,y+5*d),"'.'",":rL");
+ gr->Mark(mglPoint(x1,4*d),"k+"); gr->Puts(mglPoint(x0,y+4*d),"'+'",":rL");
+ gr->Mark(mglPoint(x1,3*d),"kx"); gr->Puts(mglPoint(x0,y+3*d),"'x'",":rL");
+ gr->Mark(mglPoint(x1,2*d),"k*"); gr->Puts(mglPoint(x0,y+2*d),"'*'",":rL");
+ gr->Mark(mglPoint(x1,d),"ks"); gr->Puts(mglPoint(x0,y+d),"'s'",":rL");
+ gr->Mark(mglPoint(x1,0),"kd"); gr->Puts(mglPoint(x0,y),"'d'",":rL");
+ gr->Mark(mglPoint(x1,-d,0),"ko"); gr->Puts(mglPoint(x0,y-d),"'o'",":rL");
+ gr->Mark(mglPoint(x1,-2*d,0),"k^"); gr->Puts(mglPoint(x0,y-2*d),"'\\^'",":rL");
+ gr->Mark(mglPoint(x1,-3*d,0),"kv"); gr->Puts(mglPoint(x0,y-3*d),"'v'",":rL");
+ gr->Mark(mglPoint(x1,-4*d,0),"k<"); gr->Puts(mglPoint(x0,y-4*d),"'<'",":rL");
+ gr->Mark(mglPoint(x1,-5*d,0),"k>"); gr->Puts(mglPoint(x0,y-5*d),"'>'",":rL");
+
+ d=0.25; x1=-0.5; x0=-0.3; y = -0.05;
+ gr->Mark(mglPoint(x1,5*d),"k#."); gr->Puts(mglPoint(x0,y+5*d),"'\\#.'",":rL");
+ gr->Mark(mglPoint(x1,4*d),"k#+"); gr->Puts(mglPoint(x0,y+4*d),"'\\#+'",":rL");
+ gr->Mark(mglPoint(x1,3*d),"k#x"); gr->Puts(mglPoint(x0,y+3*d),"'\\#x'",":rL");
+ gr->Mark(mglPoint(x1,2*d),"k#*"); gr->Puts(mglPoint(x0,y+2*d),"'\\#*'",":rL");
+ gr->Mark(mglPoint(x1,d),"k#s"); gr->Puts(mglPoint(x0,y+d),"'\\#s'",":rL");
+ gr->Mark(mglPoint(x1,0),"k#d"); gr->Puts(mglPoint(x0,y),"'\\#d'",":rL");
+ gr->Mark(mglPoint(x1,-d,0),"k#o"); gr->Puts(mglPoint(x0,y-d),"'\\#o'",":rL");
+ gr->Mark(mglPoint(x1,-2*d,0),"k#^"); gr->Puts(mglPoint(x0,y-2*d),"'\\#\\^'",":rL");
+ gr->Mark(mglPoint(x1,-3*d,0),"k#v"); gr->Puts(mglPoint(x0,y-3*d),"'\\#v'",":rL");
+ gr->Mark(mglPoint(x1,-4*d,0),"k#<"); gr->Puts(mglPoint(x0,y-4*d),"'\\#<'",":rL");
+ gr->Mark(mglPoint(x1,-5*d,0),"k#>"); gr->Puts(mglPoint(x0,y-5*d),"'\\#>'",":rL");
+
+ gr->SubPlot(3,2,1);
+ double a=0.1,b=0.4,c=0.5;
+ gr->Line(mglPoint(a,1),mglPoint(b,1),"k-A"); gr->Puts(mglPoint(c,1),"Style 'A' or 'A\\_'",":rL");
+ gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"k-V"); gr->Puts(mglPoint(c,0.8),"Style 'V' or 'V\\_'",":rL");
+ gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"k-K"); gr->Puts(mglPoint(c,0.6),"Style 'K' or 'K\\_'",":rL");
+ gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"k-I"); gr->Puts(mglPoint(c,0.4),"Style 'I' or 'I\\_'",":rL");
+ gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"k-D"); gr->Puts(mglPoint(c,0.2),"Style 'D' or 'D\\_'",":rL");
+ gr->Line(mglPoint(a,0),mglPoint(b,0),"k-S"); gr->Puts(mglPoint(c,0),"Style 'S' or 'S\\_'",":rL");
+ gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"k-O"); gr->Puts(mglPoint(c,-0.2),"Style 'O' or 'O\\_'",":rL");
+ gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"k-T"); gr->Puts(mglPoint(c,-0.4),"Style 'T' or 'T\\_'",":rL");
+ gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-_"); gr->Puts(mglPoint(c,-0.6),"Style '\\_' or none",":rL");
+ gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-AS"); gr->Puts(mglPoint(c,-0.8),"Style 'AS'",":rL");
+ gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-_A"); gr->Puts(mglPoint(c,-1),"Style '\\_A'",":rL");
+
+ a=-1; b=-0.7; c=-0.6;
+ gr->Line(mglPoint(a,1),mglPoint(b,1),"kAA"); gr->Puts(mglPoint(c,1),"Style 'AA'",":rL");
+ gr->Line(mglPoint(a,0.8),mglPoint(b,0.8),"kVV"); gr->Puts(mglPoint(c,0.8),"Style 'VV'",":rL");
+ gr->Line(mglPoint(a,0.6),mglPoint(b,0.6),"kKK"); gr->Puts(mglPoint(c,0.6),"Style 'KK'",":rL");
+ gr->Line(mglPoint(a,0.4),mglPoint(b,0.4),"kII"); gr->Puts(mglPoint(c,0.4),"Style 'II'",":rL");
+ gr->Line(mglPoint(a,0.2),mglPoint(b,0.2),"kDD"); gr->Puts(mglPoint(c,0.2),"Style 'DD'",":rL");
+ gr->Line(mglPoint(a,0),mglPoint(b,0),"kSS"); gr->Puts(mglPoint(c,0),"Style 'SS'",":rL");
+ gr->Line(mglPoint(a,-0.2),mglPoint(b,-0.2),"kOO"); gr->Puts(mglPoint(c,-0.2),"Style 'OO'",":rL");
+ gr->Line(mglPoint(a,-0.4),mglPoint(b,-0.4),"kTT"); gr->Puts(mglPoint(c,-0.4),"Style 'TT'",":rL");
+ gr->Line(mglPoint(a,-0.6),mglPoint(b,-0.6),"k-__"); gr->Puts(mglPoint(c,-0.6),"Style '\\_\\_'",":rL");
+ gr->Line(mglPoint(a,-0.8),mglPoint(b,-0.8),"k-VA"); gr->Puts(mglPoint(c,-0.8),"Style 'VA'",":rL");
+ gr->Line(mglPoint(a,-1),mglPoint(b,-1),"k-AV"); gr->Puts(mglPoint(c,-1),"Style 'AV'",":rL");
+
+ gr->SubPlot(3,2,2);
+ //#LENUQ
+ gr->FaceZ(mglPoint(-1, -1), 0.4, 0.3, "L#"); gr->Puts(mglPoint(-0.8,-0.9), "L", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,-1), 0.4, 0.3, "E#"); gr->Puts(mglPoint(-0.4,-0.9), "E", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,-1), 0.4, 0.3, "N#"); gr->Puts(mglPoint(0, -0.9), "N", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, -1), 0.4, 0.3, "U#"); gr->Puts(mglPoint(0.4,-0.9), "U", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, -1), 0.4, 0.3, "Q#"); gr->Puts(mglPoint(0.8,-0.9), "Q", "w:C", -1.4);
+ //#lenuq
+ gr->FaceZ(mglPoint(-1, -0.7), 0.4, 0.3, "l#"); gr->Puts(mglPoint(-0.8,-0.6), "l", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,-0.7), 0.4, 0.3, "e#"); gr->Puts(mglPoint(-0.4,-0.6), "e", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,-0.7), 0.4, 0.3, "n#"); gr->Puts(mglPoint(0, -0.6), "n", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, -0.7), 0.4, 0.3, "u#"); gr->Puts(mglPoint(0.4,-0.6), "u", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, -0.7), 0.4, 0.3, "q#"); gr->Puts(mglPoint(0.8,-0.6), "q", "k:C", -1.4);
+ //#CMYkP
+ gr->FaceZ(mglPoint(-1, -0.4), 0.4, 0.3, "C#"); gr->Puts(mglPoint(-0.8,-0.3), "C", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,-0.4), 0.4, 0.3, "M#"); gr->Puts(mglPoint(-0.4,-0.3), "M", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,-0.4), 0.4, 0.3, "Y#"); gr->Puts(mglPoint(0, -0.3), "Y", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, -0.4), 0.4, 0.3, "k#"); gr->Puts(mglPoint(0.4,-0.3), "k", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, -0.4), 0.4, 0.3, "P#"); gr->Puts(mglPoint(0.8,-0.3), "P", "w:C", -1.4);
+ //#cmywp
+ gr->FaceZ(mglPoint(-1, -0.1), 0.4, 0.3, "c#"); gr->Puts(mglPoint(-0.8, 0), "c", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,-0.1), 0.4, 0.3, "m#"); gr->Puts(mglPoint(-0.4, 0), "m", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,-0.1), 0.4, 0.3, "y#"); gr->Puts(mglPoint(0, 0), "y", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, -0.1), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.4, 0), "w", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, -0.1), 0.4, 0.3, "p#"); gr->Puts(mglPoint(0.8, 0), "p", "k:C", -1.4);
+ //#BGRHW
+ gr->FaceZ(mglPoint(-1, 0.2), 0.4, 0.3, "B#"); gr->Puts(mglPoint(-0.8, 0.3), "B", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,0.2), 0.4, 0.3, "G#"); gr->Puts(mglPoint(-0.4, 0.3), "G", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,0.2), 0.4, 0.3, "R#"); gr->Puts(mglPoint(0, 0.3), "R", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, 0.2), 0.4, 0.3, "H#"); gr->Puts(mglPoint(0.4, 0.3), "H", "w:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, 0.2), 0.4, 0.3, "W#"); gr->Puts(mglPoint(0.8, 0.3), "W", "w:C", -1.4);
+ //#bgrhw
+ gr->FaceZ(mglPoint(-1, 0.5), 0.4, 0.3, "b#"); gr->Puts(mglPoint(-0.8, 0.6), "b", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,0.5), 0.4, 0.3, "g#"); gr->Puts(mglPoint(-0.4, 0.6), "g", "k:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,0.5), 0.4, 0.3, "r#"); gr->Puts(mglPoint(0, 0.6), "r", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, 0.5), 0.4, 0.3, "h#"); gr->Puts(mglPoint(0.4, 0.6), "h", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, 0.5), 0.4, 0.3, "w#"); gr->Puts(mglPoint(0.8, 0.6), "w", "k:C", -1.4);
+ //#brighted
+ gr->FaceZ(mglPoint(-1, 0.8), 0.4, 0.3, "{r1}#"); gr->Puts(mglPoint(-0.8, 0.9), "\\{r1\\}", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.6,0.8), 0.4, 0.3, "{r3}#"); gr->Puts(mglPoint(-0.4, 0.9), "\\{r3\\}", "w:C", -1.4);
+ gr->FaceZ(mglPoint(-0.2,0.8), 0.4, 0.3, "{r5}#"); gr->Puts(mglPoint(0, 0.9), "\\{r5\\}", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.2, 0.8), 0.4, 0.3, "{r7}#"); gr->Puts(mglPoint(0.4, 0.9), "\\{r7\\}", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0.6, 0.8), 0.4, 0.3, "{r9}#"); gr->Puts(mglPoint(0.8, 0.9), "\\{r9\\}", "k:C", -1.4);
+ // HEX
+ gr->FaceZ(mglPoint(-1, -1.3), 1, 0.3, "{xff9966}#"); gr->Puts(mglPoint(-0.5,-1.2), "\\{xff9966\\}", "k:C", -1.4);
+ gr->FaceZ(mglPoint(0, -1.3), 1, 0.3, "{x83CAFF}#"); gr->Puts(mglPoint( 0.5,-1.2), "\\{x83CAFF\\}", "k:C", -1.4);
+
+ gr->SubPlot(3,2,3);
+ char stl[3]="r1", txt[4]="'1'";
+ for(int i=0;i<10;i++)
+ {
+ txt[1]=stl[1]='0'+i;
+ gr->Line(mglPoint(-1,0.2*i-1),mglPoint(1,0.2*i-1),stl);
+ gr->Puts(mglPoint(1.05,0.2*i-1),txt,":L");
+ }
+
+ gr->SubPlot(3,2,4); gr->Title("TriPlot sample"); gr->Rotate(50,60);
+ double t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
+ double xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
+ mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
+ gr->TriPlot(tt,uu,vv,ww,"b");
+ gr->TriPlot(tt,uu,vv,ww,"k#");
+
+ gr->SubPlot(3,2,5);
+ mglData r(4); r.Fill(1,4);
+ gr->SetRanges(1,4,1,4); gr->Axis();
+ gr->Mark(r,r,"s");
+ gr->Plot(r,"b");
+
+ gr->WriteJPEG("fexport.jpg");
+ gr->WritePNG("fexport.png");
+ gr->WriteBMP("fexport.bmp");
+ gr->WriteTGA("fexport.tga");
+ gr->WriteEPS("fexport.eps");
+ gr->WriteSVG("fexport.svg");
+ gr->WriteGIF("fexport.gif");
+
+ gr->WriteXYZ("fexport.xyz");
+ gr->WriteSTL("fexport.stl");
+ gr->WriteOFF("fexport.off");
+ gr->WriteTEX("fexport.tex");
+ gr->WriteOBJ("fexport.obj");
+ gr->WritePRC("fexport.prc");
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_data1="new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'\n"
+"light on:alpha on\n"
+"copy b a:diff b 'x':subplot 5 3 0:call 'splot'\n"
+"copy b a:diff2 b 'x':subplot 5 3 1:call 'splot'\n"
+"copy b a:cumsum b 'x':subplot 5 3 2:call 'splot'\n"
+"copy b a:integrate b 'x':subplot 5 3 3:call 'splot'\n"
+"mirror b 'x':subplot 5 3 4:call 'splot'\n"
+"copy b a:diff b 'y':subplot 5 3 5:call 'splot'\n"
+"copy b a:diff2 b 'y':subplot 5 3 6:call 'splot'\n"
+"copy b a:cumsum b 'y':subplot 5 3 7:call 'splot'\n"
+"copy b a:integrate b 'y':subplot 5 3 8:call 'splot'\n"
+"mirror b 'y':subplot 5 3 9:call 'splot'\n"
+"copy b a:diff b 'z':subplot 5 3 10:call 'splot'\n"
+"copy b a:diff2 b 'z':subplot 5 3 11:call 'splot'\n"
+"copy b a:cumsum b 'z':subplot 5 3 12:call 'splot'\n"
+"copy b a:integrate b 'z':subplot 5 3 13:call 'splot'\n"
+"mirror b 'z':subplot 5 3 14:call 'splot'\n"
+"stop\nfunc splot 0\n"
+"title 'max=',b.max:norm b -1 1 on:rotate 70 60:box:surf3 b\n"
+"return\n";
+#define splot1(b) {(b).Norm(-1,1,true);gr->Rotate(70,60);gr->Box();gr->Surf3(b);}
+void smgl_data1(mglGraph *gr) // surface triangulation
+{
+ mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
+ gr->Light(true); gr->Alpha(true);
+ b.Set(a); b.Diff("x"); gr->SubPlot(5,3,0); splot1(b);
+ b.Set(a); b.Diff2("x"); gr->SubPlot(5,3,1); splot1(b);
+ b.Set(a); b.CumSum("x"); gr->SubPlot(5,3,2); splot1(b);
+ b.Set(a); b.Integral("x");gr->SubPlot(5,3,3); splot1(b);
+ b.Mirror("x"); gr->SubPlot(5,3,4); splot1(b);
+ b.Set(a); b.Diff("y"); gr->SubPlot(5,3,5); splot1(b);
+ b.Set(a); b.Diff2("y"); gr->SubPlot(5,3,6); splot1(b);
+ b.Set(a); b.CumSum("y"); gr->SubPlot(5,3,7); splot1(b);
+ b.Set(a); b.Integral("y");gr->SubPlot(5,3,8); splot1(b);
+ b.Mirror("y"); gr->SubPlot(5,3,9); splot1(b);
+ b.Set(a); b.Diff("z"); gr->SubPlot(5,3,10);splot1(b);
+ b.Set(a); b.Diff2("z"); gr->SubPlot(5,3,11);splot1(b);
+ b.Set(a); b.CumSum("z"); gr->SubPlot(5,3,12);splot1(b);
+ b.Set(a); b.Integral("z");gr->SubPlot(5,3,13);splot1(b);
+ b.Mirror("z"); gr->SubPlot(5,3,14);splot1(b);
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_data2="new a 40 50 60 'exp(-x^2-4*y^2-16*z^2)'\n"
+"light on:alpha on\n"
+"copy b a:sinfft b 'x':subplot 5 3 0:call 'splot'\n"
+"copy b a:cosfft b 'x':subplot 5 3 1:call 'splot'\n"
+"copy b a:hankel b 'x':subplot 5 3 2:call 'splot'\n"
+"copy b a:swap b 'x':subplot 5 3 3:call 'splot'\n"
+"copy b a:smooth b 'x':subplot 5 3 4:call 'splot'\n"
+"copy b a:sinfft b 'y':subplot 5 3 5:call 'splot'\n"
+"copy b a:cosfft b 'y':subplot 5 3 6:call 'splot'\n"
+"copy b a:hankel b 'y':subplot 5 3 7:call 'splot'\n"
+"copy b a:swap b 'y':subplot 5 3 8:call 'splot'\n"
+"copy b a:smooth b 'y':subplot 5 3 9:call 'splot'\n"
+"copy b a:sinfft b 'z':subplot 5 3 10:call 'splot'\n"
+"copy b a:cosfft b 'z':subplot 5 3 11:call 'splot'\n"
+"copy b a:hankel b 'z':subplot 5 3 12:call 'splot'\n"
+"copy b a:swap b 'z':subplot 5 3 13:call 'splot'\n"
+"copy b a:smooth b 'z':subplot 5 3 14:call 'splot'\n"
+"stop\nfunc splot 0\n"
+"title 'max=',b.max:norm b -1 1 on:rotate 70 60:box\n"
+"surf3 b 0.5:surf3 b -0.5\nreturn\n";
+#define splot2(b) {(b).Norm(-1,1,true);gr->Rotate(70,60);gr->Box();gr->Surf3(0.5,b);gr->Surf3(-0.5,b);}
+void smgl_data2(mglGraph *gr) // surface triangulation
+{
+ mglData a(40,50,60),b; gr->Fill(a,"exp(-x^2-4*y^2-16*z^2)");
+ gr->Light(true); gr->Alpha(true);
+ b.Set(a); b.SinFFT("x"); gr->SubPlot(5,3,0); splot2(b);
+ b.Set(a); b.CosFFT("x"); gr->SubPlot(5,3,1); splot2(b);
+ b.Set(a); b.Hankel("x"); gr->SubPlot(5,3,2); splot2(b);
+ b.Set(a); b.Swap("x"); gr->SubPlot(5,3,3); splot2(b);
+ b.Set(a); b.Smooth("x"); gr->SubPlot(5,3,4); splot2(b);
+ b.Set(a); b.SinFFT("y"); gr->SubPlot(5,3,5); splot2(b);
+ b.Set(a); b.CosFFT("y"); gr->SubPlot(5,3,6); splot2(b);
+ b.Set(a); b.Hankel("y"); gr->SubPlot(5,3,7); splot2(b);
+ b.Set(a); b.Swap("y"); gr->SubPlot(5,3,8); splot2(b);
+ b.Set(a); b.Smooth("y"); gr->SubPlot(5,3,9); splot2(b);
+ b.Set(a); b.SinFFT("z"); gr->SubPlot(5,3,10);splot2(b);
+ b.Set(a); b.CosFFT("z"); gr->SubPlot(5,3,11);splot2(b);
+ b.Set(a); b.Hankel("z"); gr->SubPlot(5,3,12);splot2(b);
+ b.Set(a); b.Swap("z"); gr->SubPlot(5,3,13);splot2(b);
+ b.Set(a); b.Smooth("z"); gr->SubPlot(5,3,14);splot2(b);
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_param1="new x 100 'sin(pi*x)'\nnew y 100 'cos(pi*x)'\n"
+"new z 100 'sin(2*pi*x)'\nnew c 100 'cos(2*pi*x)'\n\n"
+"subplot 4 3 0:rotate 40 60:box:plot x y z\n"
+"subplot 4 3 1:rotate 40 60:box:area x y z\n"
+"subplot 4 3 2:rotate 40 60:box:tens x y z c\n"
+"subplot 4 3 3:rotate 40 60:box:bars x y z\n"
+"subplot 4 3 4:rotate 40 60:box:stem x y z\n"
+"subplot 4 3 5:rotate 40 60:box:textmark x y z c*2 '\\alpha'\n"
+"subplot 4 3 6:rotate 40 60:box:tube x y z c/10\n"
+"subplot 4 3 7:rotate 40 60:box:mark x y z c 's'\n"
+"subplot 4 3 8:box:error x y z/10 c/10\n"
+"subplot 4 3 9:rotate 40 60:box:step x y z\n"
+"subplot 4 3 10:rotate 40 60:box:torus x z 'z';light on\n"
+"subplot 4 3 11:rotate 40 60:box:label x y z '%z'\n";
+void smgl_param1(mglGraph *gr) // surface triangulation
+{
+ mglData x(100), y(100), z(100), c(100);
+ gr->Fill(x,"sin(pi*x)"); gr->Fill(y,"cos(pi*x)");
+ gr->Fill(z,"sin(2*pi*x)"); gr->Fill(c,"cos(2*pi*x)");
+
+ gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Plot(x,y,z);
+ gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Area(x,y,z);
+ gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Tens(x,y,z,c);
+ gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Bars(x,y,z);
+ gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Stem(x,y,z);
+ gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->TextMark(x,y,z,"\\alpha");
+ gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Tube(x,y,z,c/10,"","light on");
+ gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Mark(x,y,z,c,"s");
+ gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->Error(x,y,z/10,c/10);
+ gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->Step(x,y,z);
+ gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->Torus(x,z,"z","light on");
+ gr->SubPlot(4,3,11);gr->Rotate(40,60); gr->Box(); gr->Label(x,y,z,"%z");
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_param2="new x 100 100 'sin(pi*(x+y)/2)*cos(pi*y/2)'\n"
+"new y 100 100 'cos(pi*(x+y)/2)*cos(pi*y/2)'\n"
+"new z 100 100 'sin(pi*y/2)'\nnew c 100 100 'cos(pi*x)'\n\n"
+"subplot 4 4 0:rotate 40 60:box:surf x y z\n"
+"subplot 4 4 1:rotate 40 60:box:surfc x y z c\n"
+"subplot 4 4 2:rotate 40 60:box:surfa x y z c;alpha 1\n"
+"subplot 4 4 3:rotate 40 60:box:mesh x y z;meshnum 10\n"
+"subplot 4 4 4:rotate 40 60:box:tile x y z;meshnum 10\n"
+"subplot 4 4 5:rotate 40 60:box:tiles x y z c;meshnum 10\n"
+"subplot 4 4 6:rotate 40 60:box:axial x y z;alpha 0.5;light on\n"
+"subplot 4 4 7:rotate 40 60:box:cont x y z\n"
+"subplot 4 4 8:rotate 40 60:box:contf x y z;light on:contv x y z;light on\n"
+"subplot 4 4 9:rotate 40 60:box:belt x y z 'x';meshnum 10;light on\n"
+"subplot 4 4 10:rotate 40 60:box:dens x y z;alpha 0.5\n"
+"subplot 4 4 11:rotate 40 60:box\n"
+"fall x y z 'g';meshnum 10:fall x y z 'rx';meshnum 10\n"
+"subplot 4 4 12:rotate 40 60:box:belt x y z '';meshnum 10;light on\n"
+"subplot 4 4 13:rotate 40 60:box:boxs x y z '';meshnum 10;light on\n"
+"subplot 4 4 14:rotate 40 60:box:boxs x y z '#';meshnum 10;light on\n"
+"subplot 4 4 15:rotate 40 60:box:boxs x y z '@';meshnum 10;light on\n";
+void smgl_param2(mglGraph *gr) // surface triangulation
+{
+ mglData x(100,100), y(100,100), z(100,100), c(100,100);
+ gr->Fill(x,"sin(pi*(x+y)/2)*cos(pi*y/2)"); gr->Fill(y,"cos(pi*(x+y)/2)*cos(pi*y/2)");
+ gr->Fill(z,"sin(pi*y/2)"); gr->Fill(c,"cos(pi*x)");
+
+ gr->SubPlot(4,4,0); gr->Rotate(40,60); gr->Box(); gr->Surf(x,y,z);
+ gr->SubPlot(4,4,1); gr->Rotate(40,60); gr->Box(); gr->SurfC(x,y,z,c);
+ gr->SubPlot(4,4,2); gr->Rotate(40,60); gr->Box(); gr->SurfA(x,y,z,c,"","alpha 1");
+ gr->SubPlot(4,4,3); gr->Rotate(40,60); gr->Box(); gr->Mesh(x,y,z,"","meshnum 10");
+ gr->SubPlot(4,4,4); gr->Rotate(40,60); gr->Box(); gr->Tile(x,y,z,"","meshnum 10");
+ gr->SubPlot(4,4,5); gr->Rotate(40,60); gr->Box(); gr->TileS(x,y,z,c,"","meshnum 10");
+ gr->SubPlot(4,4,6); gr->Rotate(40,60); gr->Box(); gr->Axial(x,y,z,"","alpha 0.5;light on");
+ gr->SubPlot(4,4,7); gr->Rotate(40,60); gr->Box(); gr->Cont(x,y,z);
+ gr->SubPlot(4,4,8); gr->Rotate(40,60); gr->Box(); gr->ContF(x,y,z,"","light on"); gr->ContV(x,y,z,"","light on");
+ gr->SubPlot(4,4,9); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"x","meshnum 10;light on");
+ gr->SubPlot(4,4,10);gr->Rotate(40,60); gr->Box(); gr->Dens(x,y,z,"","alpha 0.5");
+ gr->SubPlot(4,4,11);gr->Rotate(40,60); gr->Box();
+ gr->Fall(x,y,z,"g","meshnum 10"); gr->Fall(x,y,z,"rx","meshnum 10");
+ gr->SubPlot(4,4,12); gr->Rotate(40,60); gr->Box(); gr->Belt(x,y,z,"","meshnum 10;light on");
+ gr->SubPlot(4,4,13); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"","meshnum 10;light on");
+ gr->SubPlot(4,4,14); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"#","meshnum 10");
+ gr->SubPlot(4,4,15); gr->Rotate(40,60); gr->Box(); gr->Boxs(x,y,z,"@","meshnum 10;light on");
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_param3="new x 50 50 50 '(x+2)/3*sin(pi*y/2)'\n"
+"new y 50 50 50 '(x+2)/3*cos(pi*y/2)'\nnew z 50 50 50 'z'\n"
+"new c 50 50 50 '-2*(x^2+y^2+z^4-z^2)+0.2'\n"
+"new d 50 50 50 '1-2*tanh(2*(x+y)^2)'\n\n"
+"alpha on:light on\n"
+"subplot 4 3 0:rotate 40 60:box:surf3 x y z c\n"
+"subplot 4 3 1:rotate 40 60:box:surf3c x y z c d\n"
+"subplot 4 3 2:rotate 40 60:box:surf3a x y z c d\n"
+"subplot 4 3 3:rotate 40 60:box:cloud x y z c\n"
+"subplot 4 3 4:rotate 40 60:box:cont3 x y z c:cont3 x y z c 'x':cont3 x y z c 'z'\n"
+"subplot 4 3 5:rotate 40 60:box:contf3 x y z c:contf3 x y z c 'x':contf3 x y z c 'z'\n"
+"subplot 4 3 6:rotate 40 60:box:dens3 x y z c:dens3 x y z c 'x':dens3 x y z c 'z'\n"
+"subplot 4 3 7:rotate 40 60:box:dots x y z c;meshnum 15\n"
+"subplot 4 3 8:rotate 40 60:box:densx c '' 0:densy c '' 0:densz c '' 0\n"
+"subplot 4 3 9:rotate 40 60:box:contx c '' 0:conty c '' 0:contz c '' 0\n"
+"subplot 4 3 10:rotate 40 60:box:contfx c '' 0:contfy c '' 0:contfz c '' 0\n";
+void smgl_param3(mglGraph *gr) // surface triangulation
+{
+ mglData x(50,50,50), y(50,50,50), z(50,50,50), c(50,50,50), d(50,50,50);
+ gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"z");
+ gr->Fill(c,"-2*(x^2+y^2+z^4-z^2)+0.2"); gr->Fill(d,"1-2*tanh(2*(x+y)^2)");
+
+ gr->Light(true); gr->Alpha(true);
+ gr->SubPlot(4,3,0); gr->Rotate(40,60); gr->Box(); gr->Surf3(x,y,z,c);
+ gr->SubPlot(4,3,1); gr->Rotate(40,60); gr->Box(); gr->Surf3C(x,y,z,c,d);
+ gr->SubPlot(4,3,2); gr->Rotate(40,60); gr->Box(); gr->Surf3A(x,y,z,c,d);
+ gr->SubPlot(4,3,3); gr->Rotate(40,60); gr->Box(); gr->Cloud(x,y,z,c);
+ gr->SubPlot(4,3,4); gr->Rotate(40,60); gr->Box(); gr->Cont3(x,y,z,c); gr->Cont3(x,y,z,c,"x"); gr->Cont3(x,y,z,c,"z");
+ gr->SubPlot(4,3,5); gr->Rotate(40,60); gr->Box(); gr->ContF3(x,y,z,c);gr->ContF3(x,y,z,c,"x");gr->ContF3(x,y,z,c,"z");
+ gr->SubPlot(4,3,6); gr->Rotate(40,60); gr->Box(); gr->Dens3(x,y,z,c); gr->Dens3(x,y,z,c,"x"); gr->Dens3(x,y,z,c,"z");
+ gr->SubPlot(4,3,7); gr->Rotate(40,60); gr->Box(); gr->Dots(x,y,z,c,"","meshnum 15");
+ gr->SubPlot(4,3,8); gr->Rotate(40,60); gr->Box(); gr->DensX(c,"",0); gr->DensY(c,"",0); gr->DensZ(c,"",0);
+ gr->SubPlot(4,3,9); gr->Rotate(40,60); gr->Box(); gr->ContX(c,"",0); gr->ContY(c,"",0); gr->ContZ(c,"",0);
+ gr->SubPlot(4,3,10);gr->Rotate(40,60); gr->Box(); gr->ContFX(c,"",0); gr->ContFY(c,"",0); gr->ContFZ(c,"",0);
+}
+//-----------------------------------------------------------------------------
+const char *mmgl_paramv="new x 20 20 20 '(x+2)/3*sin(pi*y/2)'\n"
+"new y 20 20 20 '(x+2)/3*cos(pi*y/2)'\nnew z 20 20 20 'z+x'\n"
+"new ex 20 20 20 'x'\nnew ey 20 20 20 'x^2+y'\nnew ez 20 20 20 'y^2+z'\n\n"
+"new x1 50 50 '(x+2)/3*sin(pi*y/2)'\n"
+"new y1 50 50 '(x+2)/3*cos(pi*y/2)'\n"
+"new e1 50 50 'x'\nnew e2 50 50 'x^2+y'\n\n"
+"subplot 3 3 0:rotate 40 60:box:vect x1 y1 e1 e2\n"
+"subplot 3 3 1:rotate 40 60:box:flow x1 y1 e1 e2\n"
+"subplot 3 3 2:rotate 40 60:box:pipe x1 y1 e1 e2\n"
+"subplot 3 3 3:rotate 40 60:box:dew x1 y1 e1 e2\n"
+"subplot 3 3 4:rotate 40 60:box:vect x y z ex ey ez\n"
+"subplot 3 3 5:rotate 40 60:box\n"
+"vect3 x y z ex ey ez:vect3 x y z ex ey ez 'x':vect3 x y z ex ey ez 'z'\n"
+"grid3 x y z z '{r9}':grid3 x y z z '{g9}x':grid3 x y z z '{b9}z'\n"
+"subplot 3 3 6:rotate 40 60:box:flow x y z ex ey ez\n"
+"subplot 3 3 7:rotate 40 60:box:pipe x y z ex ey ez\n";
+void smgl_paramv(mglGraph *gr) // surface triangulation
+{
+ mglData x(20,20,20), y(20,20,20), z(20,20,20), ex(20,20,20), ey(20,20,20), ez(20,20,20);
+ gr->Fill(x,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y,"(x+2)/3*cos(pi*y/2)"); gr->Fill(z,"x+z");
+ gr->Fill(ex,"x"); gr->Fill(ey,"x^2+y"); gr->Fill(ez,"y^2+z");
+ mglData x1(20,20), y1(20,20), e1(20,20), e2(20,20);
+ gr->Fill(x1,"(x+2)/3*sin(pi*y/2)"); gr->Fill(y1,"(x+2)/3*cos(pi*y/2)");
+ gr->Fill(e1,"x"); gr->Fill(e2,"x^2+y");
+
+ gr->SubPlot(3,3,0); gr->Rotate(40,60); gr->Box(); gr->Vect(x1,y1,e1,e2);
+ gr->SubPlot(3,3,1); gr->Rotate(40,60); gr->Box(); gr->Flow(x1,y1,e1,e2);
+ gr->SubPlot(3,3,2); gr->Rotate(40,60); gr->Box(); gr->Pipe(x1,y1,e1,e2);
+ gr->SubPlot(3,3,3); gr->Rotate(40,60); gr->Box(); gr->Dew(x1,y1,e1,e2);
+ gr->SubPlot(3,3,4); gr->Rotate(40,60); gr->Box(); gr->Vect(x,y,z,ex,ey,ez);
+ gr->SubPlot(3,3,5); gr->Rotate(40,60); gr->Box();
+ gr->Vect3(x,y,z,ex,ey,ez); gr->Vect3(x,y,z,ex,ey,ez,"x"); gr->Vect3(x,y,z,ex,ey,ez,"z");
+ gr->Grid3(x,y,z,z,"{r9}"); gr->Grid3(x,y,z,z,"{r9}x"); gr->Grid3(x,y,z,z,"{r9}z");
+ gr->SubPlot(3,3,6); gr->Rotate(40,60); gr->Box(); gr->Flow(x,y,z,ex,ey,ez);
+ gr->SubPlot(3,3,7); gr->Rotate(40,60); gr->Box(); gr->Pipe(x,y,z,ex,ey,ez);
+}
//-----------------------------------------------------------------------------
const char *mmgl_solve="zrange 0 1\nnew x 20 30 '(x+2)/3*cos(pi*y)'\n"
"new y 20 30 '(x+2)/3*sin(pi*y)'\nnew z 20 30 'exp(-6*x^2-2*sin(pi*y)^2)'\n\n"
@@ -435,7 +825,8 @@ void smgl_barh(mglGraph *gr)
//-----------------------------------------------------------------------------
const char *mmgl_area="call 'prepare1d'\norigin 0 0 0\nsubplot 2 2 0 '':title 'Area plot (default)':box:area y\n"
"subplot 2 2 1 '':title '2 colors':box:area y 'cbgGyr'\nsubplot 2 2 2 '':title '\"!\" style':box:area y '!'\n"
-"new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'\nsubplot 2 2 3:title '3d variant':rotate 50 60:box:area xc yc z 'r'\n";
+"new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'\nsubplot 2 2 3:title '3d variant':rotate 50 60:box\n"
+"area xc yc z 'r'\narea xc -yc z 'b#'\n";
void smgl_area(mglGraph *gr)
{
mglData y; mgls_prepare1d(&y); gr->SetOrigin(0,0,0);
@@ -448,6 +839,7 @@ void smgl_area(mglGraph *gr)
mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
gr->Area(xc,yc,z,"r");
+ yc.Modify("-sin(pi*(2*x-1))"); gr->Area(xc,yc,z,"b#");
}
//-----------------------------------------------------------------------------
const char *mmgl_plot="call 'prepare1d'\nsubplot 2 2 0 '':title 'Plot plot (default)':box:plot y\n"
@@ -1494,7 +1886,7 @@ void smgl_combined(mglGraph *gr) // flow threads and density plot
mglData c; mgls_prepare3d(&c);
mglData v(10); v.Fill(-0.5,1);
gr->SubPlot(2,2,1,""); gr->Title("Flow + Dens");
- gr->Flow(a,b,"br"); gr->Dens(d,"BbcyrR"); gr->Box();
+ gr->Flow(a,b,"br"); gr->Dens(d); gr->Box();
gr->SubPlot(2,2,0); gr->Title("Surf + Cont"); gr->Rotate(50,60);
gr->Light(true); gr->Surf(a); gr->Cont(a,"y"); gr->Box();
gr->SubPlot(2,2,2); gr->Title("Mesh + Cont"); gr->Rotate(50,60);
@@ -1641,7 +2033,7 @@ const char *mmgl_primitives="subplot 2 2 0 '':title 'Line, Curve, Rhomb, Ellipse
"ellipse 0 -0.5 1 -0.1 0.2 'u#'\nellipse 0 -1 1 -0.6 0.2 'm@'\n\n"
"light on\nsubplot 2 2 1:title 'Face[xyz]':rotate 50 60:box\n"
"facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'\n"
-"face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'm'\n\n"
+"face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'\n\n"
"subplot 2 2 3 '':title 'Cone'\n"
"cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\\n(default)'\n"
"cone 0 -0.3 0 0 0.7 0.5 0.2 0.1 'g@':text 0 -0.7 'with edges\\n('\\@' style)'\n"
@@ -1671,7 +2063,7 @@ void smgl_primitives(mglGraph *gr) // flag #
gr->FaceX(mglPoint(1,0,-1),1,1,"r");
gr->FaceY(mglPoint(-1,-1,-1),1,1,"g");
gr->FaceZ(mglPoint(1,-1,-1),-1,1,"b");
- gr->Face(mglPoint(-1,-1,1),mglPoint(-1,1,1),mglPoint(1,-1,0),mglPoint(1,1,1),"m");
+ gr->Face(mglPoint(-1,-1,1),mglPoint(-1,1,1),mglPoint(1,-1,0),mglPoint(1,1,1),"bmgr");
gr->SubPlot(2,2,3,""); gr->Title("Cone");
gr->Cone(mglPoint(-0.7,-0.3),mglPoint(-0.7,0.7,0.5),0.2,0.1,"b");
@@ -1886,7 +2278,7 @@ void smgl_ternary(mglGraph *gr) // flag #
gr->SubPlot(2,2,1); gr->Title("Ternary axis (x+y+t=1)");
gr->Ternary(1);
- gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a,"BbcyrR");
+ gr->Plot(x,y,"r2"); gr->Plot(rx,ry,"q^ "); gr->Cont(a);
gr->Line(mglPoint(0.5,0), mglPoint(0,0.75), "g2");
gr->Axis(); gr->Grid("xyz","B;");
gr->Label('x',"B"); gr->Label('y',"C"); gr->Label('t',"A");
@@ -1956,28 +2348,39 @@ void smgl_projection5(mglGraph *gr) // flag #
//-----------------------------------------------------------------------------
const char *mmgl_triplot="list q 0 1 2 3 | 4 5 6 7 | 0 2 4 6 | 1 3 5 7 | 0 4 1 5 | 2 6 3 7\n"
"list xq -1 1 -1 1 -1 1 -1 1\nlist yq -1 -1 1 1 -1 -1 1 1\nlist zq -1 -1 -1 -1 1 1 1 1\nlight on\n"
-"subplot 2 1 0:title 'QuadPlot sample':rotate 50 60\n"
+"subplot 2 2 0:title 'QuadPlot sample':rotate 50 60\n"
"quadplot q xq yq zq 'yr'\nquadplot q xq yq zq '#k'\n"
+"subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60\n"
+"quadplot q xq yq zq yq 'yr'\nquadplot q xq yq zq '#k'\n"
"list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3\n"
"list xt -1 1 0 0\nlist yt -1 -1 1 0\nlist zt -1 -1 -1 1\n"
-"subplot 2 1 1:title 'TriPlot sample':rotate 50 60\n"
-"triplot t xt yt zt 'b'\ntriplot t xt yt zt '#k'\n";
+"subplot 2 2 1:title 'TriPlot sample':rotate 50 60\n"
+"triplot t xt yt zt 'b'\ntriplot t xt yt zt '#k'\n"
+"subplot 2 2 3:title 'TriPlot coloring':rotate 50 60\n"
+"triplot t xt yt zt yt 'cb'\ntriplot t xt yt zt '#k'\ntricont t xt yt zt 'B'\n";
void smgl_triplot(mglGraph *gr)
{
double q[] = {0,1,2,3, 4,5,6,7, 0,2,4,6, 1,3,5,7, 0,4,1,5, 2,6,3,7};
double xc[] = {-1,1,-1,1,-1,1,-1,1}, yc[] = {-1,-1,1,1,-1,-1,1,1}, zc[] = {-1,-1,-1,-1,1,1,1,1};
mglData qq(6,4,q), xx(8,xc), yy(8,yc), zz(8,zc);
gr->Light(true); //gr->Alpha(true);
- gr->SubPlot(2,1,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
gr->QuadPlot(qq,xx,yy,zz,"yr");
gr->QuadPlot(qq,xx,yy,zz,"k#");
-
+ gr->SubPlot(2,2,2); gr->Title("QuadPlot coloring"); gr->Rotate(50,60);
+ gr->QuadPlot(qq,xx,yy,zz,yy,"yr");
+ gr->QuadPlot(qq,xx,yy,zz,"k#");
+
double t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
double xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->SubPlot(2,1,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
gr->TriPlot(tt,uu,vv,ww,"b");
gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->SubPlot(2,2,3); gr->Title("TriPlot coloring"); gr->Rotate(50,60);
+ gr->TriPlot(tt,uu,vv,ww,vv,"cb");
+ gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->TriCont(tt,uu,vv,ww,"B");
}
//-----------------------------------------------------------------------------
const char *mmgl_dots="new t 1000 'pi*(rnd-0.5)':new f 1000 '2*pi*rnd'\n"
@@ -2067,6 +2470,8 @@ mglSample samp[] = {
{"cut", smgl_cut, mmgl_cut},
{"dat_diff", smgl_dat_diff, mmgl_dat_diff},
{"dat_extra", smgl_dat_extra, mmgl_dat_extra },
+ {"data1", smgl_data1, mmgl_data1},
+ {"data2", smgl_data2, mmgl_data2},
{"dens", smgl_dens, mmgl_dens},
{"dens_xyz", smgl_dens_xyz, mmgl_dens_xyz},
{"densa", smgl_densa, mmgl_densa},
@@ -2074,6 +2479,7 @@ mglSample samp[] = {
{"dots", smgl_dots, mmgl_dots},
{"error", smgl_error, mmgl_error },
{"fall", smgl_fall, mmgl_fall},
+ {"fexport", smgl_fexport, mmgl_fexport},
{"fit", smgl_fit, mmgl_fit},
{"flow", smgl_flow, mmgl_flow},
{"fog", smgl_fog, mmgl_fog},
@@ -2089,6 +2495,10 @@ mglSample samp[] = {
{"mesh", smgl_mesh, mmgl_mesh},
{"mirror", smgl_mirror, mmgl_mirror },
{"molecule", smgl_molecule, mmgl_molecule },
+ {"param1", smgl_param1, mmgl_param1},
+ {"param2", smgl_param2, mmgl_param2},
+ {"param3", smgl_param3, mmgl_param3},
+ {"paramv", smgl_paramv, mmgl_paramv},
{"parser", smgl_parser, mmgl_parser},
{"pde", smgl_pde, mmgl_pde},
{"pipe", smgl_pipe, mmgl_pipe},
diff --git a/examples/wnd_samples.cpp b/examples/wnd_samples.cpp
index 4d751e4..865875d 100644
--- a/examples/wnd_samples.cpp
+++ b/examples/wnd_samples.cpp
@@ -218,7 +218,7 @@ int sample_2(mglGraph *gr)
gr->Puts(mglPoint(0,1.2,1),"Simple surface");
gr->Rotate(40,60);
gr->Box(); gr->Axis();
- gr->Surf(a,"BbcyrR");
+ gr->Surf(a);
// gr->Colorbar();
gr->EndFrame();
@@ -248,7 +248,7 @@ int sample_2(mglGraph *gr)
gr->NewFrame();
gr->Box(); gr->Axis();
gr->Puts(mglPoint(0,1.2,1),"Density plot");
- gr->Dens(a,"BbcyrR");
+ gr->Dens(a);
gr->InPlot(0.6,1,0.6,1,false); // new axis in upper right corner
gr->Box(); gr->Axis();
gr->Puts(mglPoint(0,1.2,1),"... with bicolor");
@@ -266,7 +266,7 @@ int sample_2(mglGraph *gr)
gr->Puts(mglPoint(0,1.2,1),"Surface of boxes");
gr->Rotate(40,60);
gr->Box(); gr->Axis();
- gr->Boxs(a,"BbcyrR");
+ gr->Boxs(a);
gr->EndFrame();
gr->NewFrame();
@@ -359,7 +359,7 @@ int sample_3(mglGraph *gr)
gr->Puts(mglPoint(0,1.2,1),"Cloud plot (switch alpha !!!)");
gr->Rotate(40,60);
gr->Box(); gr->Axis();
- gr->Cloud(a,"BbcyrR");
+ gr->Cloud(a);
gr->EndFrame();
gr->NewFrame();
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 794601d..12f30ef 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -1,6 +1,5 @@
configure_file(${MathGL_SOURCE_DIR}/include/config.h.in ${MathGL_BINARY_DIR}/include/mgl2/config.h)
-set(MGL_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/include/mgl2")
install(DIRECTORY mgl2/ DESTINATION ${MGL_INCLUDE_PATH}
PATTERN ".svn" EXCLUDE
PATTERN "fltk.h" EXCLUDE
diff --git a/include/mgl2/addon.h b/include/mgl2/addon.h
index 3b25e2e..cda391a 100644
--- a/include/mgl2/addon.h
+++ b/include/mgl2/addon.h
@@ -23,38 +23,38 @@
#include "mgl2/define.h"
#ifdef __cplusplus
//-----------------------------------------------------------------------------
-dual mgl_ipowc(dual x,int n);
+dual MGL_EXPORT mgl_ipowc(dual x,int n);
dual expi(dual a);
dual expi(double a);
/// Explicit scheme for 1 step of axial diffraction
-bool mgl_difr_axial(dual *a, int n, dual q, int Border,dual *b, dual *d, int kk, double di);
+bool MGL_EXPORT mgl_difr_axial(dual *a, int n, dual q, int Border,dual *b, dual *d, int kk, double di);
/// Explicit scheme for 1 step of plane diffraction
-bool mgl_difr_grid(dual *a,int n,dual q,int Border,dual *b,dual *d,int kk);
+bool MGL_EXPORT mgl_difr_grid(dual *a,int n,dual q,int Border,dual *b,dual *d,int kk);
//-----------------------------------------------------------------------------
extern "C" {
#endif
-double mgl_gauss_rnd();
-void mgl_fft_freq(double *freq,size_t nn);
+double MGL_EXPORT mgl_gauss_rnd();
+void MGL_EXPORT mgl_fft_freq(double *freq,size_t nn);
/// Remove double spaces from the string
-void mgl_strcls(char *str);
+void MGL_EXPORT mgl_strcls(char *str);
/// Get position of substring or return -1 if not found
-int mgl_strpos(const char *str,char *fnd);
+int MGL_EXPORT mgl_strpos(const char *str,char *fnd);
/// Get position of symbol or return -1 if not found
-int mgl_chrpos(const char *str,char fnd);
+int MGL_EXPORT mgl_chrpos(const char *str,char fnd);
/// Get uncommented string from file (NOTE: it is not thread safe!!!)
-char *mgl_fgetstr(FILE *fp);
+MGL_EXPORT char *mgl_fgetstr(FILE *fp);
/// Check if symbol denote true
-int mgl_istrue(char ch);
+int MGL_EXPORT mgl_istrue(char ch);
/// Print test message
-void mgl_test(const char *str, ...);
+void MGL_EXPORT mgl_test(const char *str, ...);
/// Print info message
-void mgl_info(const char *str, ...);
+void MGL_EXPORT mgl_info(const char *str, ...);
/// Locate next data block (block started by -----)
-FILE *mgl_next_data(const char *fname,int p);
+MGL_EXPORT FILE *mgl_next_data(const char *fname,int p);
#ifdef __cplusplus
}
diff --git a/include/mgl2/base.h b/include/mgl2/base.h
index e425797..acb5b21 100644
--- a/include/mgl2/base.h
+++ b/include/mgl2/base.h
@@ -19,16 +19,18 @@
***************************************************************************/
#ifndef _MGL_BASE_H_
#define _MGL_BASE_H_
-#if !defined(_MSC_VER)
+#if !defined(_MSC_VER) && !defined(__BORLANDC__)
#include <stdint.h>
#endif
+#if defined(__BORLANDC__)
+typedef unsigned uintptr_t;
+#endif
#include "mgl2/define.h"
#ifdef __cplusplus
#include <vector>
#include <string>
#include "mgl2/type.h"
-#include "mgl2/eval.h"
//-----------------------------------------------------------------------------
class mglBase;
class mglData;
@@ -46,6 +48,9 @@ typedef const mglData* HCDT;
#include "mgl2/data.h"
#else
//-----------------------------------------------------------------------------
+/// Callback function for asking user a question. Result shouldn't exceed 1024.
+extern MGL_EXPORT void (*mgl_ask_func)(const wchar_t *quest, wchar_t *res);
+//-----------------------------------------------------------------------------
/// Abstract class for data array
class mglDataA
{
@@ -69,7 +74,7 @@ public:
#endif
typedef const mglDataA* HCDT;
//-----------------------------------------------------------------------------
-inline mreal mgl_d(mreal v,mreal v1,mreal v2) { return v2!=v1?(v-v1)/(v2-v1):NAN; }
+inline mreal MGL_EXPORT mgl_d(mreal v,mreal v1,mreal v2) { return v2!=v1?(v-v1)/(v2-v1):NAN; }
//-----------------------------------------------------------------------------
mglPoint GetX(HCDT x, int i, int j, int k=0);
mglPoint GetY(HCDT y, int i, int j, int k=0);
@@ -158,7 +163,7 @@ struct mglGlyph
};
//-----------------------------------------------------------------------------
/// Structure for texture (color scheme + palette) representation
-struct mglTexture
+struct MGL_EXPORT mglTexture
{
mglColor col[512]; ///< Colors itself
long n; ///< Number of initial colors along u
@@ -178,6 +183,7 @@ struct mglTexture
inline bool IsSame(const mglTexture &t) const
{ return n==t.n && !memcmp(col,t.col,512*sizeof(mglColor)); }
void GetRGBA(unsigned char *f) const;
+ void GetRGBAPRC(unsigned char *f) const;
void GetRGBAOBJ(unsigned char *f) const; // Export repeating border colors, since OBJ by default wraps textures and we need an extra boundary to work around implementation quirks
};
//-----------------------------------------------------------------------------
@@ -185,7 +191,6 @@ const mglColor NC(-1,-1,-1);
const mglColor BC( 0, 0, 0);
const mglColor WC( 1, 1, 1);
const mglColor RC( 1, 0, 0);
-long mgl_have_color(const char *stl);
//-----------------------------------------------------------------------------
/// Structure for color ID
struct mglColorID
@@ -193,8 +198,8 @@ struct mglColorID
char id;
mglColor col;
};
-extern mglColorID mglColorIds[31];
-extern std::string mglGlobalMess; ///< Buffer for receiving global messages
+MGL_EXPORT extern mglColorID mglColorIds[31];
+MGL_EXPORT extern std::string mglGlobalMess; ///< Buffer for receiving global messages
//-----------------------------------------------------------------------------
/// Structure active points
struct mglActivePos
@@ -205,7 +210,7 @@ struct mglActivePos
};
//-----------------------------------------------------------------------------
/// Base class for canvas which handle all basic drawing
-class mglBase
+class MGL_EXPORT mglBase
{
public:
mglBase();
@@ -299,7 +304,7 @@ public:
inline long GetNumPal(long id) const { return Txt[labs(id)/256].n; }
/// Set default color scheme
inline void SetDefScheme(const char *colors)
- { Txt[1].Set(mgl_have_color(colors)?colors:"BbcyrR"); }
+ { Txt[1].Set(mgl_have_color(colors)?colors:MGL_DEF_SCH); }
/// Set number of mesh lines
inline void SetMeshNum(int val) { MeshNum=val; }
@@ -385,6 +390,8 @@ public:
{ const mglPnt &p=Pnt[i]; return mglPoint(p.x,p.y,p.z); }
inline mglPoint GetPntN(long i) const
{ const mglPnt &p=Pnt[i]; return mglPoint(p.u,p.v,p.w); }
+ inline mglColor GetPntC(long i) const
+ { const mglPnt &p=Pnt[i]; return mglColor(p.r,p.g,p.b,p.a); }
inline float GetClrC(long i) const { return Pnt[i].c; }
inline const mglGlyph &GetGlf(long i) const { return Glf[i]; }
inline long GetGlfNum() const { return Glf.size(); }
@@ -424,6 +431,7 @@ public:
virtual void trig_plot(long p1, long p2, long p3)=0;
virtual void quad_plot(long p1, long p2, long p3, long p4)=0;
virtual void Glyph(mreal x, mreal y, mreal f, int style, long icode, mreal col)=0;
+ virtual float GetGlyphPhi(const mglPnt &q, float phi)=0;
virtual mreal text_plot(long p,const wchar_t *text,const char *fnt,mreal size=-1,mreal sh=0,mreal col=-('k'),bool rot=true)=0;
void vect_plot(long p1, long p2, mreal s=1);
inline mreal mark_size() { return MarkSize*font_factor; }
@@ -477,7 +485,7 @@ protected:
virtual void LightScale()=0; ///< Scale positions of light sources
-private:
+ // block for SaveState()
mglPoint MinS; ///< Saved lower edge of bounding box for graphics.
mglPoint MaxS; ///< Saved upper edge of bounding box for graphics.
mreal MSS, ASS, FSS, ADS, MNS, LSS; ///< Saved state
@@ -486,6 +494,8 @@ private:
bool saved; ///< State is saved
std::string leg_str;///< text to be save in legend
+private:
+
mglPoint CutMin; ///< Lower edge of bounding box for cut off.
mglPoint CutMax; ///< Upper edge of bounding box for cut off.
@@ -495,13 +505,13 @@ private:
void ClearEq(); ///< Clear the used variables for axis transformation
};
//-----------------------------------------------------------------------------
-bool mgl_check_dim0(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less=false);
-bool mgl_check_dim1(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less=false);
-bool mgl_check_dim2(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, bool less=false);
-bool mgl_check_dim3(HMGL gr, bool both, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *name);
-bool mgl_check_vec3(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *name);
-bool mgl_check_trig(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, int d=3);
-bool mgl_isboth(HCDT x, HCDT y, HCDT z, HCDT a);
+bool MGL_EXPORT mgl_check_dim0(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less=false);
+bool MGL_EXPORT mgl_check_dim1(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less=false);
+bool MGL_EXPORT mgl_check_dim2(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, bool less=false);
+bool MGL_EXPORT mgl_check_dim3(HMGL gr, bool both, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *name);
+bool MGL_EXPORT mgl_check_vec3(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *name);
+bool MGL_EXPORT mgl_check_trig(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, int d=3);
+bool MGL_EXPORT mgl_isboth(HCDT x, HCDT y, HCDT z, HCDT a);
//-----------------------------------------------------------------------------
#define _Da_(d) (*((const mglDataA *)(d)))
#define _DA_(a) ((const mglDataA *)*(a))
diff --git a/include/mgl2/base_cf.h b/include/mgl2/base_cf.h
index f4b2b69..73b9e34 100644
--- a/include/mgl2/base_cf.h
+++ b/include/mgl2/base_cf.h
@@ -26,139 +26,153 @@ extern "C" {
#endif
/// Get last warning code
-int mgl_get_warn(HMGL gr);
-int mgl_get_warn_(uintptr_t *gr);
+int MGL_EXPORT mgl_get_warn(HMGL gr);
+int MGL_EXPORT mgl_get_warn_(uintptr_t *gr);
/// Set warning code ant fill message
-void mgl_set_warn(HMGL gr, int code, const char *text);
-void mgl_set_warn_(uintptr_t *gr, int *code, const char *text,int);
+void MGL_EXPORT mgl_set_warn(HMGL gr, int code, const char *text);
+void MGL_EXPORT mgl_set_warn_(uintptr_t *gr, int *code, const char *text,int);
/// Set buffer for warning messages
-const char *mgl_get_mess(HMGL gr);
+MGL_EXPORT const char *mgl_get_mess(HMGL gr);
+/// Set name of plot for saving filename
+void MGL_EXPORT mgl_set_plotid(HMGL gr, const char *id);
+void MGL_EXPORT mgl_set_plotid_(uintptr_t *gr, const char *id,int);
+/// Get name of plot for saving filename
+MGL_EXPORT const char *mgl_get_plotid(HMGL gr);
+
+/// Get plot quality
+int MGL_EXPORT mgl_get_quality(HMGL gr);
+int MGL_EXPORT mgl_get_quality_(uintptr_t *gr);
+/// Set plot quality
+void MGL_EXPORT mgl_set_quality(HMGL gr, int qual);
+void MGL_EXPORT mgl_set_quality_(uintptr_t *gr, int *qual);
+/// Is frames
+int MGL_EXPORT mgl_is_frames(HMGL gr);
/// Get bit-value flag of HMGL state (for advanced users only)
-int mgl_get_flag(HMGL gr, long flag);
+int MGL_EXPORT mgl_get_flag(HMGL gr, long flag);
/// Set bit-value flag of HMGL state (for advanced users only)
-void mgl_set_flag(HMGL gr, int val, long flag);
+void MGL_EXPORT mgl_set_flag(HMGL gr, int val, long flag);
/// Change counter of HMGL uses (for advanced users only). Non-zero counter prevent automatic object removing.
-long mgl_use_graph(HMGL gr, int inc);
-long mgl_use_graph_(uintptr_t *gr, int *inc);
-void mgl_set_rdc_acc(HMGL gr, int reduce); // TODO
-void mgl_set_rdc_acc_(uintptr_t *gr, int *reduce);
+long MGL_EXPORT mgl_use_graph(HMGL gr, int inc);
+long MGL_EXPORT mgl_use_graph_(uintptr_t *gr, int *inc);
+void MGL_EXPORT mgl_set_rdc_acc(HMGL gr, int reduce); // TODO
+void MGL_EXPORT mgl_set_rdc_acc_(uintptr_t *gr, int *reduce);
/// Start group of objects
-void mgl_start_group(HMGL gr, const char *);
-void mgl_start_group_(uintptr_t *gr, const char *,int);
+void MGL_EXPORT mgl_start_group(HMGL gr, const char *);
+void MGL_EXPORT mgl_start_group_(uintptr_t *gr, const char *,int);
/// End group of objects
-void mgl_end_group(HMGL gr);
-void mgl_end_group_(uintptr_t *gr);
+void MGL_EXPORT mgl_end_group(HMGL gr);
+void MGL_EXPORT mgl_end_group_(uintptr_t *gr);
/// Highlight objects with given id
-void mgl_highlight(HMGL gr, int id);
-void mgl_highlight_(uintptr_t *gr, int *id);
+void MGL_EXPORT mgl_highlight(HMGL gr, int id);
+void MGL_EXPORT mgl_highlight_(uintptr_t *gr, int *id);
/// Set default palette
-void mgl_set_palette(HMGL gr, const char *colors);
-void mgl_set_palette_(uintptr_t *gr, const char *colors, int);
-void mgl_set_pal_color_(uintptr_t *gr, int *n, mreal *r, mreal *g, mreal *b);
-void mgl_set_pal_num_(uintptr_t *gr, int *num);
+void MGL_EXPORT mgl_set_palette(HMGL gr, const char *colors);
+void MGL_EXPORT mgl_set_palette_(uintptr_t *gr, const char *colors, int);
+void MGL_EXPORT mgl_set_pal_color_(uintptr_t *gr, int *n, mreal *r, mreal *g, mreal *b);
+void MGL_EXPORT mgl_set_pal_num_(uintptr_t *gr, int *num);
/// Sets RGB values for color with given id
-void mgl_set_color(char id, double r, double g, double b);
-void mgl_set_color_(char *id, mreal *r, mreal *g, mreal *b, int);
+void MGL_EXPORT mgl_set_color(char id, double r, double g, double b);
+void MGL_EXPORT mgl_set_color_(char *id, mreal *r, mreal *g, mreal *b, int);
/// Set default color scheme
-void mgl_set_def_sch(HMGL gr, const char *sch);
-void mgl_set_def_sch_(uintptr_t *gr, const char *sch,int);
+void MGL_EXPORT mgl_set_def_sch(HMGL gr, const char *sch);
+void MGL_EXPORT mgl_set_def_sch_(uintptr_t *gr, const char *sch,int);
/// Set default value of alpha-channel
-void mgl_set_alpha_default(HMGL gr, double alpha);
-void mgl_set_alpha_default_(uintptr_t *gr, mreal *alpha);
+void MGL_EXPORT mgl_set_alpha_default(HMGL gr, double alpha);
+void MGL_EXPORT mgl_set_alpha_default_(uintptr_t *gr, mreal *alpha);
/// Set relative width of rectangles in Bars, Barh, BoxPlot
-void mgl_set_bar_width(HMGL gr, double width);
-void mgl_set_bar_width_(uintptr_t *gr, mreal *width);
+void MGL_EXPORT mgl_set_bar_width(HMGL gr, double width);
+void MGL_EXPORT mgl_set_bar_width_(uintptr_t *gr, mreal *width);
/// Set number of mesh lines (use 0 to draw all of them)
-void mgl_set_meshnum(HMGL gr, int num);
-void mgl_set_meshnum_(uintptr_t *gr, int *num);
+void MGL_EXPORT mgl_set_meshnum(HMGL gr, int num);
+void MGL_EXPORT mgl_set_meshnum_(uintptr_t *gr, int *num);
/// Set number of visible faces (use 0 to draw all of them)
-void mgl_set_facenum(HMGL gr, int num);
-void mgl_set_facenum_(uintptr_t *gr, int *num);
+void MGL_EXPORT mgl_set_facenum(HMGL gr, int num);
+void MGL_EXPORT mgl_set_facenum_(uintptr_t *gr, int *num);
/// Clear unused points and primitives. Useful only in combination with mgl_set_facenum().
-void mgl_clear_unused(HMGL gr);
-void mgl_clear_unused_(uintptr_t *gr);
+void MGL_EXPORT mgl_clear_unused(HMGL gr);
+void MGL_EXPORT mgl_clear_unused_(uintptr_t *gr);
/// Set ambient light brightness
-void mgl_set_ambbr(HMGL gr, double i);
-void mgl_set_ambbr_(uintptr_t *gr, mreal *i);
+void MGL_EXPORT mgl_set_ambbr(HMGL gr, double i);
+void MGL_EXPORT mgl_set_ambbr_(uintptr_t *gr, mreal *i);
/// Use diffusive light (only for local light sources)
-void mgl_set_light_dif(HMGL gr, int enable);
-void mgl_set_light_dif_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_light_dif(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_light_dif_(uintptr_t *gr, int *enable);
/// Set cutting for points outside of bounding box
-void mgl_set_cut(HMGL gr, int cut);
-void mgl_set_cut_(uintptr_t *gr, int *cut);
+void MGL_EXPORT mgl_set_cut(HMGL gr, int cut);
+void MGL_EXPORT mgl_set_cut_(uintptr_t *gr, int *cut);
/// Set additional cutting box
-void mgl_set_cut_box(HMGL gr, double x1,double y1,double z1,double x2,double y2,double z2);
-void mgl_set_cut_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2);
+void MGL_EXPORT mgl_set_cut_box(HMGL gr, double x1,double y1,double z1,double x2,double y2,double z2);
+void MGL_EXPORT mgl_set_cut_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2);
/// Set the cutting off condition (formula)
-void mgl_set_cutoff(HMGL gr, const char *EqC);
-void mgl_set_cutoff_(uintptr_t *gr, const char *EqC, int);
+void MGL_EXPORT mgl_set_cutoff(HMGL gr, const char *EqC);
+void MGL_EXPORT mgl_set_cutoff_(uintptr_t *gr, const char *EqC, int);
/// Set values of axis range
-void mgl_set_ranges(HMGL gr, double x1, double x2, double y1, double y2, double z1, double z2);
-void mgl_set_ranges_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2, mreal *z1, mreal *z2);
+void MGL_EXPORT mgl_set_ranges(HMGL gr, double x1, double x2, double y1, double y2, double z1, double z2);
+void MGL_EXPORT mgl_set_ranges_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2, mreal *z1, mreal *z2);
/// Set range in direction dir as [v1, v2]
-void mgl_set_range_val(HMGL gr, char dir, double v1,double v2);
-void mgl_set_range_val_(uintptr_t *gr, const char *dir, mreal *v1, mreal *v2,int);
+void MGL_EXPORT mgl_set_range_val(HMGL gr, char dir, double v1,double v2);
+void MGL_EXPORT mgl_set_range_val_(uintptr_t *gr, const char *dir, mreal *v1, mreal *v2,int);
/// Set range in direction dir as minimal and maximal values of data a
-void mgl_set_range_dat(HMGL gr, char dir, HCDT a, int add);
-void mgl_set_range_dat_(uintptr_t *gr, const char *dir, uintptr_t *a, int *add,int);
+void MGL_EXPORT mgl_set_range_dat(HMGL gr, char dir, HCDT a, int add);
+void MGL_EXPORT mgl_set_range_dat_(uintptr_t *gr, const char *dir, uintptr_t *a, int *add,int);
/// Set axis range scaling -- simplified way to shift/zoom axis range -- need to redraw whole image!
-void mgl_zoom_axis(HMGL gr, double x1,double y1,double z1,double c1,double x2,double y2,double z2,double c2);
-void mgl_zoom_axis_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *c1, mreal *x2, mreal *y2, mreal *z2, mreal *c2);
+void MGL_EXPORT mgl_zoom_axis(HMGL gr, double x1,double y1,double z1,double c1,double x2,double y2,double z2,double c2);
+void MGL_EXPORT mgl_zoom_axis_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *c1, mreal *x2, mreal *y2, mreal *z2, mreal *c2);
/// Set axis origin
-void mgl_set_origin(HMGL gr, double x0, double y0, double z0);
-void mgl_set_origin_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0);
+void MGL_EXPORT mgl_set_origin(HMGL gr, double x0, double y0, double z0);
+void MGL_EXPORT mgl_set_origin_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0);
/// Set the transformation formulas for coordinate
-void mgl_set_func(HMGL gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA);
-void mgl_set_func_(uintptr_t *gr, const char *EqX, const char *EqY, const char *EqZ, const char *EqA, int, int, int, int);
+void MGL_EXPORT mgl_set_func(HMGL gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA);
+void MGL_EXPORT mgl_set_func_(uintptr_t *gr, const char *EqX, const char *EqY, const char *EqZ, const char *EqA, int, int, int, int);
/// Set one of predefined transformation rule
-void mgl_set_coor(HMGL gr, int how);
-void mgl_set_coor_(uintptr_t *gr, int *how);
+void MGL_EXPORT mgl_set_coor(HMGL gr, int how);
+void MGL_EXPORT mgl_set_coor_(uintptr_t *gr, int *how);
/// Set to draw Ternary axis (triangle like axis, grid and so on)
-void mgl_set_ternary(HMGL gr, int enable);
-void mgl_set_ternary_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_ternary(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_ternary_(uintptr_t *gr, int *enable);
/// Set to use or not tick labels rotation
-void mgl_set_tick_rotate(HMGL gr, int enable);
-void mgl_set_tick_rotate_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_tick_rotate(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_tick_rotate_(uintptr_t *gr, int *enable);
/// Set to use or not tick labels skipping
-void mgl_set_tick_skip(HMGL gr, int enable);
-void mgl_set_tick_skip_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_tick_skip(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_tick_skip_(uintptr_t *gr, int *enable);
/// Set default font for all new HMGL objects
-void mgl_def_font(const char *name, const char *path);
-void mgl_def_font_(const char *name, const char *path,int,int);
+void MGL_EXPORT mgl_def_font(const char *name, const char *path);
+void MGL_EXPORT mgl_def_font_(const char *name, const char *path,int,int);
/// Set default size of marks (locally you can use "size" option)
-void mgl_set_mark_size(HMGL gr, double size);
-void mgl_set_mark_size_(uintptr_t *gr, mreal *size);
+void MGL_EXPORT mgl_set_mark_size(HMGL gr, double size);
+void MGL_EXPORT mgl_set_mark_size_(uintptr_t *gr, mreal *size);
/// Set default size of arrows (locally you can use "size" option)
-void mgl_set_arrow_size(HMGL gr, double size);
-void mgl_set_arrow_size_(uintptr_t *gr, mreal *size);
+void MGL_EXPORT mgl_set_arrow_size(HMGL gr, double size);
+void MGL_EXPORT mgl_set_arrow_size_(uintptr_t *gr, mreal *size);
/// Set default font size
-void mgl_set_font_size(HMGL gr, double size);
-void mgl_set_font_size_(uintptr_t *gr, mreal *size);
+void MGL_EXPORT mgl_set_font_size(HMGL gr, double size);
+void MGL_EXPORT mgl_set_font_size_(uintptr_t *gr, mreal *size);
/// Set default font style and color
-void mgl_set_font_def(HMGL gr, const char *fnt);
-void mgl_set_font_def_(uintptr_t *gr, const char *fnt, int);
+void MGL_EXPORT mgl_set_font_def(HMGL gr, const char *fnt);
+void MGL_EXPORT mgl_set_font_def_(uintptr_t *gr, const char *fnt, int);
/// Set to use or not text rotation
-void mgl_set_rotated_text(HMGL gr, int enable);
-void mgl_set_rotated_text_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_rotated_text(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_rotated_text_(uintptr_t *gr, int *enable);
/// Load font from file
-void mgl_load_font(HMGL gr, const char *name, const char *path);
-void mgl_load_font_(uintptr_t *gr, char *name, char *path, int l, int n);
+void MGL_EXPORT mgl_load_font(HMGL gr, const char *name, const char *path);
+void MGL_EXPORT mgl_load_font_(uintptr_t *gr, char *name, char *path, int l, int n);
/// Copy font from another mglGraph instance
-void mgl_copy_font(HMGL gr, HMGL gr_from);
-void mgl_copy_font_(uintptr_t *gr, uintptr_t *gr_from);
+void MGL_EXPORT mgl_copy_font(HMGL gr, HMGL gr_from);
+void MGL_EXPORT mgl_copy_font_(uintptr_t *gr, uintptr_t *gr_from);
/// Restore font (load default font for new HMGL objects)
-void mgl_restore_font(HMGL gr);
-void mgl_restore_font_(uintptr_t *gr);
+void MGL_EXPORT mgl_restore_font(HMGL gr);
+void MGL_EXPORT mgl_restore_font_(uintptr_t *gr);
#ifdef __cplusplus
}
diff --git a/include/mgl2/canvas.h b/include/mgl2/canvas.h
index 2189f66..1e4ceb1 100644
--- a/include/mgl2/canvas.h
+++ b/include/mgl2/canvas.h
@@ -25,11 +25,7 @@
#define MGL_STACK_ENTRY 10
#endif
//-----------------------------------------------------------------------------
-#if MGL_HAVE_GIF
-#include <gif_lib.h>
-#else
struct GifFileType;
-#endif
//-----------------------------------------------------------------------------
/// Structure for transformation matrix
struct mglMatrix
@@ -110,7 +106,7 @@ struct mglDrawDat
};
//-----------------------------------------------------------------------------
/// Class contains all functionality for creating different mathematical plots
-class mglCanvas : public mglBase
+class MGL_EXPORT mglCanvas : public mglBase
{
friend struct mglPrim;
public:
@@ -304,6 +300,8 @@ using mglBase::Light;
/// Set extra shift for tick and axis labels
inline void SetTickShift(mglPoint p)
{ ax.sh = p.x; ay.sh = p.y; az.sh = p.z; ac.sh = p.c; }
+ /// Get rotation angle for glyph
+ float GetGlyphPhi(const mglPnt &q, float phi);
protected:
mreal Delay; ///< Delay for animation in seconds
diff --git a/include/mgl2/canvas_cf.h b/include/mgl2/canvas_cf.h
index 9f8260b..a2f0df7 100644
--- a/include/mgl2/canvas_cf.h
+++ b/include/mgl2/canvas_cf.h
@@ -26,483 +26,483 @@ extern "C" {
#endif
/// Create HMGL object with specified sizes
-HMGL mgl_create_graph(int width, int height);
-uintptr_t mgl_create_graph_(int *width, int *height);
+HMGL MGL_EXPORT mgl_create_graph(int width, int height);
+uintptr_t MGL_EXPORT mgl_create_graph_(int *width, int *height);
/// Delete HMGL object
-void mgl_delete_graph(HMGL gr);
-void mgl_delete_graph_(uintptr_t *gr);
+void MGL_EXPORT mgl_delete_graph(HMGL gr);
+void MGL_EXPORT mgl_delete_graph_(uintptr_t *gr);
/// Set size of frame in pixels. Normally this function is called internally.
-void mgl_set_size(HMGL gr, int width, int height);
-void mgl_set_size_(uintptr_t *gr, int *width, int *height);
+void MGL_EXPORT mgl_set_size(HMGL gr, int width, int height);
+void MGL_EXPORT mgl_set_size_(uintptr_t *gr, int *width, int *height);
/// Set default parameters for plotting
-void mgl_set_def_param(HMGL gr);
-void mgl_set_def_param_(uintptr_t *gr);
-/// Set plot quality
-void mgl_set_quality(HMGL gr, int qual);
-void mgl_set_quality_(uintptr_t *gr, int *qual);
+void MGL_EXPORT mgl_set_def_param(HMGL gr);
+void MGL_EXPORT mgl_set_def_param_(uintptr_t *gr);
/// Combine plots from 2 canvases. Result will be saved into gr
-void mgl_combine_gr(HMGL gr, HMGL in);
-void mgl_combine_gr_(uintptr_t *gr, uintptr_t *in);
+void MGL_EXPORT mgl_combine_gr(HMGL gr, HMGL in);
+void MGL_EXPORT mgl_combine_gr_(uintptr_t *gr, uintptr_t *in);
/// Force preparing the image. It can be useful for OpenGL mode mostly.
-void mgl_finish(HMGL gr);
-void mgl_finish_(uintptr_t *gr);
+void MGL_EXPORT mgl_finish(HMGL gr);
+void MGL_EXPORT mgl_finish_(uintptr_t *gr);
/// Set tick length
-void mgl_set_tick_len(HMGL gr, double len, double stt);
-void mgl_set_tick_len_(uintptr_t *gr, mreal *len, mreal *stt);
+void MGL_EXPORT mgl_set_tick_len(HMGL gr, double len, double stt);
+void MGL_EXPORT mgl_set_tick_len_(uintptr_t *gr, mreal *len, mreal *stt);
/// Set axis and ticks style
-void mgl_set_axis_stl(HMGL gr, const char *stl, const char *tck, const char *sub);
-void mgl_set_axis_stl_(uintptr_t *gr, const char *stl, const char *tck, const char *sub, int,int,int);
+void MGL_EXPORT mgl_set_axis_stl(HMGL gr, const char *stl, const char *tck, const char *sub);
+void MGL_EXPORT mgl_set_axis_stl_(uintptr_t *gr, const char *stl, const char *tck, const char *sub, int,int,int);
/// Auto adjust ticks
-void mgl_adjust_ticks(HMGL gr, const char *dir);
-void mgl_adjust_ticks_(uintptr_t *gr, const char *dir, int);
+void MGL_EXPORT mgl_adjust_ticks(HMGL gr, const char *dir);
+void MGL_EXPORT mgl_adjust_ticks_(uintptr_t *gr, const char *dir, int);
/// Set the ticks parameters
-void mgl_set_ticks(HMGL gr, char dir, double d, int ns, double org);
-void mgl_set_ticks_(uintptr_t *gr, char *dir, mreal *d, int *ns, mreal *org, int);
+void MGL_EXPORT mgl_set_ticks(HMGL gr, char dir, double d, int ns, double org);
+void MGL_EXPORT mgl_set_ticks_(uintptr_t *gr, char *dir, mreal *d, int *ns, mreal *org, int);
/// Set ticks text (\n separated). Use "" to disable this feature.
-void mgl_set_ticks_str(HMGL gr, char dir, const char *lbl, int add);
-void mgl_set_ticks_str_(uintptr_t *gr, const char *dir, const char *lbl, int *add,int,int);
-void mgl_set_ticks_wcs(HMGL gr, char dir, const wchar_t *lbl, int add);
+void MGL_EXPORT mgl_set_ticks_str(HMGL gr, char dir, const char *lbl, int add);
+void MGL_EXPORT mgl_set_ticks_str_(uintptr_t *gr, const char *dir, const char *lbl, int *add,int,int);
+void MGL_EXPORT mgl_set_ticks_wcs(HMGL gr, char dir, const wchar_t *lbl, int add);
/// Set ticks position and text (\n separated). Use "" to disable this feature.
-void mgl_set_ticks_val(HMGL gr, char dir, HCDT val, const char *lbl, int add);
-void mgl_set_ticks_val_(uintptr_t *gr, const char *dir, uintptr_t *val, const char *lbl, int *add,int,int);
-void mgl_set_ticks_valw(HMGL gr, char dir, HCDT val, const wchar_t *lbl, int add);
+void MGL_EXPORT mgl_set_ticks_val(HMGL gr, char dir, HCDT val, const char *lbl, int add);
+void MGL_EXPORT mgl_set_ticks_val_(uintptr_t *gr, const char *dir, uintptr_t *val, const char *lbl, int *add,int,int);
+void MGL_EXPORT mgl_set_ticks_valw(HMGL gr, char dir, HCDT val, const wchar_t *lbl, int add);
/// Tune ticks
-void mgl_tune_ticks(HMGL gr, int tune, double fact_pos);
-void mgl_tune_ticks_(uintptr_t *gr, int *tune, mreal *fact_pos);
+void MGL_EXPORT mgl_tune_ticks(HMGL gr, int tune, double fact_pos);
+void MGL_EXPORT mgl_tune_ticks_(uintptr_t *gr, int *tune, mreal *fact_pos);
/// Set templates for ticks
-void mgl_set_tick_templ(HMGL gr, char dir, const char *templ);
-void mgl_set_tick_templ_(uintptr_t *gr, const char *dir, const char *templ,int,int);
-void mgl_set_tick_templw(HMGL gr, char dir, const wchar_t *templ);
+void MGL_EXPORT mgl_set_tick_templ(HMGL gr, char dir, const char *templ);
+void MGL_EXPORT mgl_set_tick_templ_(uintptr_t *gr, const char *dir, const char *templ,int,int);
+void MGL_EXPORT mgl_set_tick_templw(HMGL gr, char dir, const wchar_t *templ);
/// Set time templates for ticks
-void mgl_set_ticks_time(HMGL gr, char dir, double d, const char *t);
-void mgl_set_ticks_time_(uintptr_t *gr, const char *dir, mreal *d, const char *t,int,int);
+void MGL_EXPORT mgl_set_ticks_time(HMGL gr, char dir, double d, const char *t);
+void MGL_EXPORT mgl_set_ticks_time_(uintptr_t *gr, const char *dir, mreal *d, const char *t,int,int);
/// Set additional shift of tick labels
-void mgl_set_tick_shift(HMGL gr, double sx, double sy, double sz, double sc);
-void mgl_set_tick_shift_(uintptr_t *gr, mreal *sx, mreal *sy, mreal *sz, mreal *sc);
+void MGL_EXPORT mgl_set_tick_shift(HMGL gr, double sx, double sy, double sz, double sc);
+void MGL_EXPORT mgl_set_tick_shift_(uintptr_t *gr, mreal *sx, mreal *sy, mreal *sz, mreal *sc);
/// Draws bounding box outside the plotting volume
-void mgl_box(HMGL gr);
-void mgl_box_(uintptr_t *gr);
+void MGL_EXPORT mgl_box(HMGL gr);
+void MGL_EXPORT mgl_box_(uintptr_t *gr);
/// Draws bounding box outside the plotting volume with color c
-void mgl_box_str(HMGL gr, const char *col, int ticks);
-void mgl_box_str_(uintptr_t *gr, const char *col, int *ticks, int);
+void MGL_EXPORT mgl_box_str(HMGL gr, const char *col, int ticks);
+void MGL_EXPORT mgl_box_str_(uintptr_t *gr, const char *col, int *ticks, int);
/// Draw axises with ticks in direction(s) dir.
-void mgl_axis(HMGL gr, const char *dir, const char *stl, const char *opt);
-void mgl_axis_(uintptr_t *gr, const char *dir, const char *stl, const char *opt,int,int,int);
+void MGL_EXPORT mgl_axis(HMGL gr, const char *dir, const char *stl, const char *opt);
+void MGL_EXPORT mgl_axis_(uintptr_t *gr, const char *dir, const char *stl, const char *opt,int,int,int);
/// Draw grid lines perpendicular to direction(s) dir.
-void mgl_axis_grid(HMGL gr, const char *dir,const char *pen, const char *opt);
-void mgl_axis_grid_(uintptr_t *gr, const char *dir,const char *pen, const char *opt,int,int,int);
+void MGL_EXPORT mgl_axis_grid(HMGL gr, const char *dir,const char *pen, const char *opt);
+void MGL_EXPORT mgl_axis_grid_(uintptr_t *gr, const char *dir,const char *pen, const char *opt,int,int,int);
/// Print the label text for axis dir.
-void mgl_label(HMGL gr, char dir, const char *text, double pos, const char *opt);
-void mgl_label_(uintptr_t *gr, const char *dir, const char *text, const char *opt,int,int,int);
-void mgl_labelw(HMGL gr, char dir, const wchar_t *text, double pos, const char *opt);
+void MGL_EXPORT mgl_label(HMGL gr, char dir, const char *text, double pos, const char *opt);
+void MGL_EXPORT mgl_label_(uintptr_t *gr, const char *dir, const char *text, const char *opt,int,int,int);
+void MGL_EXPORT mgl_labelw(HMGL gr, char dir, const wchar_t *text, double pos, const char *opt);
/// Draw colorbar at edge of axis
-void mgl_colorbar(HMGL gr, const char *sch);
-void mgl_colorbar_(uintptr_t *gr, const char *sch,int);
+void MGL_EXPORT mgl_colorbar(HMGL gr, const char *sch);
+void MGL_EXPORT mgl_colorbar_(uintptr_t *gr, const char *sch,int);
/// Draw colorbar at manual position
-void mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h);
-void 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);
+void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int);
/// Draw colorbar with manual colors at edge of axis
-void mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch);
-void 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);
+void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch,int);
/// Draw colorbar with manual colors at manual position
-void mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h);
-void 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);
+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);
/// Add string to legend
-void mgl_add_legend(HMGL gr, const char *text,const char *style);
-void mgl_add_legend_(uintptr_t *gr, const char *text,const char *style,int,int);
-void mgl_add_legendw(HMGL gr, const wchar_t *text,const char *style);
+void MGL_EXPORT mgl_add_legend(HMGL gr, const char *text,const char *style);
+void MGL_EXPORT mgl_add_legend_(uintptr_t *gr, const char *text,const char *style,int,int);
+void MGL_EXPORT mgl_add_legendw(HMGL gr, const wchar_t *text,const char *style);
/// Clear saved legend string
-void mgl_clear_legend(HMGL gr);
-void mgl_clear_legend_(uintptr_t *gr);
+void MGL_EXPORT mgl_clear_legend(HMGL gr);
+void MGL_EXPORT mgl_clear_legend_(uintptr_t *gr);
/// Draw legend of accumulated strings at position {x,y}
-void mgl_legend_pos(HMGL gr, double x, double y, const char *font, const char *opt);
-void mgl_legend_pos_(uintptr_t *gr, mreal *x, mreal *y, const char *font, const char *opt,int,int);
+void MGL_EXPORT mgl_legend_pos(HMGL gr, double x, double y, const char *font, const char *opt);
+void MGL_EXPORT mgl_legend_pos_(uintptr_t *gr, mreal *x, mreal *y, const char *font, const char *opt,int,int);
/// Draw legend of accumulated strings
-void mgl_legend(HMGL gr, int where, const char *font, const char *opt);
-void mgl_legend_(uintptr_t *gr, int *where, const char *font, const char *opt,int,int);
+void MGL_EXPORT mgl_legend(HMGL gr, int where, const char *font, const char *opt);
+void MGL_EXPORT mgl_legend_(uintptr_t *gr, int *where, const char *font, const char *opt,int,int);
/// Set number of marks in legend sample
-void mgl_set_legend_marks(HMGL gr, int num);
-void mgl_set_legend_marks_(uintptr_t *gr, int *num);
+void MGL_EXPORT mgl_set_legend_marks(HMGL gr, int num);
+void MGL_EXPORT mgl_set_legend_marks_(uintptr_t *gr, int *num);
/// Show current image
-void mgl_show_image(HMGL gr, const char *viewer, int keep);
-void mgl_show_image_(uintptr_t *gr, const char *viewer, int *keep, int);
+void MGL_EXPORT mgl_show_image(HMGL gr, const char *viewer, int keep);
+void MGL_EXPORT mgl_show_image_(uintptr_t *gr, const char *viewer, int *keep, int);
/// Write the frame in file (depending extension, write current frame if fname is empty)
-void mgl_write_frame(HMGL gr, const char *fname,const char *descr);
-void mgl_write_frame_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_frame(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_frame_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using BMP format
-void mgl_write_tga(HMGL gr, const char *fname,const char *descr);
-void mgl_write_tga_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_tga(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_tga_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using BMP format
-void mgl_write_bmp(HMGL gr, const char *fname,const char *descr);
-void mgl_write_bmp_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_bmp(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_bmp_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using JPEG format
-void mgl_write_jpg(HMGL gr, const char *fname,const char *descr);
-void mgl_write_jpg_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_jpg(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_jpg_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using PNG format with transparency
-void mgl_write_png(HMGL gr, const char *fname,const char *descr);
-void mgl_write_png_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_png(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_png_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using PNG format without transparency
-void mgl_write_png_solid(HMGL gr, const char *fname,const char *descr);
-void mgl_write_png_solid_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_png_solid(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_png_solid_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using PostScript format as bitmap
-void mgl_write_bps(HMGL gr, const char *fname,const char *descr);
-void mgl_write_bps_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_bps(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_bps_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using PostScript format
-void mgl_write_eps(HMGL gr, const char *fname,const char *descr);
-void mgl_write_eps_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_eps(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_eps_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using SVG format
-void mgl_write_svg(HMGL gr, const char *fname,const char *descr);
-void mgl_write_svg_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_svg(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_svg_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using LaTeX format
-void mgl_write_tex(HMGL gr, const char *fname,const char *descr);
-void mgl_write_tex_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_tex(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_tex_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using OBJ format
-void mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png);
-void mgl_write_obj_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int,int);
+void MGL_EXPORT mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png);
+void MGL_EXPORT mgl_write_obj_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int,int);
+/// Write the frame in file using OBJ format (old version)
+void MGL_EXPORT mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png);
+void MGL_EXPORT mgl_write_obj_old_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int,int);
/// Write the frame in file using STL format (faces only)
-void mgl_write_stl(HMGL gr, const char *fname,const char *descr);
-void mgl_write_stl_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_stl(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_stl_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Write the frame in file using OFF format
-void mgl_write_off(HMGL gr, const char *fname,const char *descr, int colored);
-void mgl_write_off_(uintptr_t *gr, const char *fname,const char *descr,int *colored,int,int);
+void MGL_EXPORT mgl_write_off(HMGL gr, const char *fname,const char *descr, int colored);
+void MGL_EXPORT mgl_write_off_(uintptr_t *gr, const char *fname,const char *descr,int *colored,int,int);
/// Write the frame in file using XYZ format
-void mgl_write_xyz(HMGL gr, const char *fname,const char *descr);
-void mgl_write_xyz_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_xyz(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_xyz_(uintptr_t *gr, const char *fname,const char *descr,int,int);
-/*void mgl_write_x3d(HMGL gr, const char *fname,const char *descr);
-void mgl_write_x3d_(uintptr_t *gr, const char *fname,const char *descr,int,int);
-void mgl_write_wgl(HMGL gr, const char *fname,const char *descr);
-void mgl_write_wgl_(uintptr_t *gr, const char *fname,const char *descr,int,int);*/
+/*void MGL_EXPORT mgl_write_x3d(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_x3d_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_wgl(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_wgl_(uintptr_t *gr, const char *fname,const char *descr,int,int);*/
/// Write the frame in file using PRC format
-void mgl_write_prc(HMGL gr, const char *fname,const char *descr, int make_pdf);
-void mgl_write_prc_(uintptr_t *gr, const char *fname,const char *descr, int *make_pdf,int,int);
+void MGL_EXPORT mgl_write_prc(HMGL gr, const char *fname,const char *descr, int make_pdf);
+void MGL_EXPORT mgl_write_prc_(uintptr_t *gr, const char *fname,const char *descr, int *make_pdf,int,int);
/// Write the frame in file using GIF format (only for current frame!)
-void mgl_write_gif(HMGL gr, const char *fname,const char *descr);
-void mgl_write_gif_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_gif(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_gif_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Start write frames to cinema using GIF format
-void mgl_start_gif(HMGL gr, const char *fname,int ms);
-void mgl_start_gif_(uintptr_t *gr, const char *fname,int *ms,int);
+void MGL_EXPORT mgl_start_gif(HMGL gr, const char *fname,int ms);
+void MGL_EXPORT mgl_start_gif_(uintptr_t *gr, const char *fname,int *ms,int);
/// Stop writing cinema using GIF format
-void mgl_close_gif(HMGL gr);
-void mgl_close_gif_(uintptr_t *gr);
-/// Set name of plot for saving filename
-void mgl_set_plotid(HMGL gr, const char *id);
-void mgl_set_plotid_(uintptr_t *gr, const char *id,int);
+void MGL_EXPORT mgl_close_gif(HMGL gr);
+void MGL_EXPORT mgl_close_gif_(uintptr_t *gr);
/// Export points and primitives in file using MGLD format
-void mgl_export_mgld(HMGL gr, const char *fname,const char *descr);
-void mgl_export_mgld_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_export_mgld(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_export_mgld_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Import points and primitives from file using MGLD format
-void mgl_import_mgld(HMGL gr, const char *fname, int add);
-void mgl_import_mgld_(uintptr_t *gr, const char *fname, int *add, int);
+void MGL_EXPORT mgl_import_mgld(HMGL gr, const char *fname, int add);
+void MGL_EXPORT mgl_import_mgld_(uintptr_t *gr, const char *fname, int *add, int);
/// Export in JSON format suitable for later drawing by JavaScript
-void mgl_write_json(HMGL gr, const char *fname,const char *descr);
-void mgl_write_json_(uintptr_t *gr, const char *fname,const char *descr,int,int);
+void MGL_EXPORT mgl_write_json(HMGL gr, const char *fname,const char *descr);
+void MGL_EXPORT mgl_write_json_(uintptr_t *gr, const char *fname,const char *descr,int,int);
/// Get RGB values of current bitmap
-const unsigned char *mgl_get_rgb(HMGL gr);
-const unsigned char *mgl_get_rgb_(uintptr_t *gr);
+MGL_EXPORT const unsigned char *mgl_get_rgb(HMGL gr);
+MGL_EXPORT const unsigned char *mgl_get_rgb_(uintptr_t *gr);
/// Get RGBA values of current bitmap
-const unsigned char *mgl_get_rgba(HMGL gr);
-const unsigned char *mgl_get_rgba_(uintptr_t *gr);
+MGL_EXPORT const unsigned char *mgl_get_rgba(HMGL gr);
+MGL_EXPORT const unsigned char *mgl_get_rgba_(uintptr_t *gr);
/// Set object/subplot id
-void mgl_set_obj_id(HMGL gr, int id);
-void mgl_set_obj_id_(uintptr_t *gr, int *id);
+void MGL_EXPORT mgl_set_obj_id(HMGL gr, int id);
+void MGL_EXPORT mgl_set_obj_id_(uintptr_t *gr, int *id);
/// Get object id
-int mgl_get_obj_id(HMGL gr, int x, int y);
-int mgl_get_obj_id_(uintptr_t *gr, int *x, int *y);
+int MGL_EXPORT mgl_get_obj_id(HMGL gr, int x, int y);
+int MGL_EXPORT mgl_get_obj_id_(uintptr_t *gr, int *x, int *y);
/// Get subplot id
-int mgl_get_spl_id(HMGL gr, int x, int y);
-int mgl_get_spl_id_(uintptr_t *gr, int *x, int *y);
+int MGL_EXPORT mgl_get_spl_id(HMGL gr, int x, int y);
+int MGL_EXPORT mgl_get_spl_id_(uintptr_t *gr, int *x, int *y);
/// Get width of the image
-int mgl_get_width(HMGL gr);
-int mgl_get_width_(uintptr_t *gr);
+int MGL_EXPORT mgl_get_width(HMGL gr);
+int MGL_EXPORT mgl_get_width_(uintptr_t *gr);
/// Get height of the image
-int mgl_get_height(HMGL gr);
-int mgl_get_height_(uintptr_t *gr);
+int MGL_EXPORT mgl_get_height(HMGL gr);
+int MGL_EXPORT mgl_get_height_(uintptr_t *gr);
/// Calculate 3D coordinate {x,y,z} for screen point {xs,ys}
-void mgl_calc_xyz(HMGL gr, int xs, int ys, mreal *x, mreal *y, mreal *z);
-void mgl_calc_xyz_(uintptr_t *gr, int *xs, int *ys, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_calc_xyz(HMGL gr, int xs, int ys, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_calc_xyz_(uintptr_t *gr, int *xs, int *ys, mreal *x, mreal *y, mreal *z);
/// Calculate screen point {xs,ys} for 3D coordinate {x,y,z}
-void mgl_calc_scr(HMGL gr, double x, double y, double z, int *xs, int *ys);
-void mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys);
+void MGL_EXPORT mgl_calc_scr(HMGL gr, double x, double y, double z, int *xs, int *ys);
+void MGL_EXPORT mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys);
/// Check if {xs,ys} is close to active point with accuracy d, and return its position or -1
-long mgl_is_active(HMGL gr, int xs, int ys, int d);
-long mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d);
+long MGL_EXPORT mgl_is_active(HMGL gr, int xs, int ys, int d);
+long MGL_EXPORT mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d);
/// Create new frame.
-int mgl_new_frame(HMGL gr);
-int mgl_new_frame_(uintptr_t *gr);
+int MGL_EXPORT mgl_new_frame(HMGL gr);
+int MGL_EXPORT mgl_new_frame_(uintptr_t *gr);
/// Finish frame drawing
-void mgl_end_frame(HMGL gr);
-void mgl_end_frame_(uintptr_t *gr);
+void MGL_EXPORT mgl_end_frame(HMGL gr);
+void MGL_EXPORT mgl_end_frame_(uintptr_t *gr);
/// Get the number of created frames
-int mgl_get_num_frame(HMGL gr);
-int mgl_get_num_frame_(uintptr_t *gr);
+int MGL_EXPORT mgl_get_num_frame(HMGL gr);
+int MGL_EXPORT mgl_get_num_frame_(uintptr_t *gr);
/// Reset frames counter (start it from zero)
-void mgl_reset_frames(HMGL gr);
-void mgl_reset_frames_(uintptr_t *gr);
+void MGL_EXPORT mgl_reset_frames(HMGL gr);
+void MGL_EXPORT mgl_reset_frames_(uintptr_t *gr);
/// Get drawing data for i-th frame (work if MGL_VECT_FRAME is set on)
-void mgl_get_frame(HMGL gr, int i);
-void mgl_get_frame_(uintptr_t *gr, int *i);
+void MGL_EXPORT mgl_get_frame(HMGL gr, int i);
+void MGL_EXPORT mgl_get_frame_(uintptr_t *gr, int *i);
/// Set drawing data for i-th frame (work if MGL_VECT_FRAME is set on)
-void mgl_set_frame(HMGL gr, int i);
-void mgl_set_frame_(uintptr_t *gr, int *i);
+void MGL_EXPORT mgl_set_frame(HMGL gr, int i);
+void MGL_EXPORT mgl_set_frame_(uintptr_t *gr, int *i);
/// Append drawing data from i-th frame (work if MGL_VECT_FRAME is set on)
-void mgl_show_frame(HMGL gr, int i);
-void mgl_show_frame_(uintptr_t *gr, int *i);
+void MGL_EXPORT mgl_show_frame(HMGL gr, int i);
+void MGL_EXPORT mgl_show_frame_(uintptr_t *gr, int *i);
/// Delete primitives for i-th frame (work if MGL_VECT_FRAME is set on)
-void mgl_del_frame(HMGL gr, int i);
-void mgl_del_frame_(uintptr_t *gr, int *i);
+void MGL_EXPORT mgl_del_frame(HMGL gr, int i);
+void MGL_EXPORT mgl_del_frame_(uintptr_t *gr, int *i);
/// Set the transparency type (0 - usual, 1 - glass, 2 - lamp)
-void mgl_set_transp_type(HMGL gr, int type);
-void mgl_set_transp_type_(uintptr_t *gr, int *type);
+void MGL_EXPORT mgl_set_transp_type(HMGL gr, int type);
+void MGL_EXPORT mgl_set_transp_type_(uintptr_t *gr, int *type);
/// Set the transparency on/off.
-void mgl_set_alpha(HMGL gr, int enable);
-void mgl_set_alpha_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_alpha(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_alpha_(uintptr_t *gr, int *enable);
/// Set the fog distance or switch it off (if d=0).
-void mgl_set_fog(HMGL gr, double d, double dz);
-void mgl_set_fog_(uintptr_t *gr, mreal *dist, mreal *dz);
+void MGL_EXPORT mgl_set_fog(HMGL gr, double d, double dz);
+void MGL_EXPORT mgl_set_fog_(uintptr_t *gr, mreal *dist, mreal *dz);
/// Set the using of light on/off.
-void mgl_set_light(HMGL gr, int enable);
-void mgl_set_light_(uintptr_t *gr, int *enable);
+void MGL_EXPORT mgl_set_light(HMGL gr, int enable);
+void MGL_EXPORT mgl_set_light_(uintptr_t *gr, int *enable);
/// Switch on/off the specified light source.
-void mgl_set_light_n(HMGL gr, int n, int enable);
-void mgl_set_light_n_(uintptr_t *gr, int *n, int *enable);
+void MGL_EXPORT mgl_set_light_n(HMGL gr, int n, int enable);
+void MGL_EXPORT mgl_set_light_n_(uintptr_t *gr, int *n, int *enable);
/// Add white light source at infinity.
-void mgl_add_light(HMGL gr, int n, double x, double y, double z);
-void mgl_add_light_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_add_light(HMGL gr, int n, double x, double y, double z);
+void MGL_EXPORT mgl_add_light_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z);
/// Add light source at infinity (more settings).
-void mgl_add_light_ext(HMGL gr, int n, double x, double y, double z, char c, double br, double ap);
-void mgl_add_light_ext_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, char *c, mreal *br, mreal *ap, int);
+void MGL_EXPORT mgl_add_light_ext(HMGL gr, int n, double x, double y, double z, char c, double br, double ap);
+void MGL_EXPORT mgl_add_light_ext_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, char *c, mreal *br, mreal *ap, int);
/// Add local light source.
-void mgl_add_light_loc(HMGL gr, int n, double x, double y, double z, double dx, double dy, double dz, char c, double br, double ap);
-void mgl_add_light_loc_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, char *c, mreal *br, mreal *ap, int);
+void MGL_EXPORT mgl_add_light_loc(HMGL gr, int n, double x, double y, double z, double dx, double dy, double dz, char c, double br, double ap);
+void MGL_EXPORT mgl_add_light_loc_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, char *c, mreal *br, mreal *ap, int);
/// Pop transformation matrix from stack
-void mgl_mat_pop(HMGL gr);
-void mgl_mat_pop_(uintptr_t *gr);
+void MGL_EXPORT mgl_mat_pop(HMGL gr);
+void MGL_EXPORT mgl_mat_pop_(uintptr_t *gr);
/// Push transformation matrix into stack
-void mgl_mat_push(HMGL gr);
-void mgl_mat_push_(uintptr_t *gr);
+void MGL_EXPORT mgl_mat_push(HMGL gr);
+void MGL_EXPORT mgl_mat_push_(uintptr_t *gr);
/// Clear up the frame
-void mgl_clf(HMGL gr);
-void mgl_clf_(uintptr_t *gr);
+void MGL_EXPORT mgl_clf(HMGL gr);
+void MGL_EXPORT mgl_clf_(uintptr_t *gr);
/// Clear up the frame and fill background by specified color
-void mgl_clf_rgb(HMGL gr, double r, double g, double b);
-void mgl_clf_rgb_(uintptr_t *gr, mreal *r, mreal *g, mreal *b);
+void MGL_EXPORT mgl_clf_rgb(HMGL gr, double r, double g, double b);
+void MGL_EXPORT mgl_clf_rgb_(uintptr_t *gr, mreal *r, mreal *g, mreal *b);
/// Put further plotting in some region of whole frame.
-void mgl_subplot(HMGL gr, int nx,int ny,int m,const char *style);
-void mgl_subplot_(uintptr_t *gr, int *nx,int *ny,int *m, const char *s,int);
+void MGL_EXPORT mgl_subplot(HMGL gr, int nx,int ny,int m,const char *style);
+void MGL_EXPORT mgl_subplot_(uintptr_t *gr, int *nx,int *ny,int *m, const char *s,int);
/// Put further plotting in some region of whole frame and shift it by distance {dx,dy}.
-void mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style, double dx, double dy);
-void mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m, mreal *dx, mreal *dy);
-/// Like mgl_subplot() but "join" several cells
-void mgl_multiplot(HMGL gr, int nx,int ny,int m,int dx,int dy,const char *style);
-void mgl_multiplot_(uintptr_t *gr, int *nx,int *ny,int *m,int *dx,int *dy, const char *s,int);
+void MGL_EXPORT mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style, double dx, double dy);
+void MGL_EXPORT mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m, mreal *dx, mreal *dy);
+/// Like MGL_EXPORT mgl_subplot() but "join" several cells
+void MGL_EXPORT mgl_multiplot(HMGL gr, int nx,int ny,int m,int dx,int dy,const char *style);
+void MGL_EXPORT mgl_multiplot_(uintptr_t *gr, int *nx,int *ny,int *m,int *dx,int *dy, const char *s,int);
/// Put further plotting in a region of whole frame.
-void mgl_inplot(HMGL gr, double x1,double x2,double y1,double y2);
-void mgl_inplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2);
+void MGL_EXPORT mgl_inplot(HMGL gr, double x1,double x2,double y1,double y2);
+void MGL_EXPORT mgl_inplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2);
/// Put further plotting in a region of current subplot/inplot.
-void mgl_relplot(HMGL gr, double x1,double x2,double y1,double y2);
-void mgl_relplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2);
+void MGL_EXPORT mgl_relplot(HMGL gr, double x1,double x2,double y1,double y2);
+void MGL_EXPORT mgl_relplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2);
/// Put further plotting in column cell of previous subplot/inplot.
-void mgl_columnplot(HMGL gr, int num, int ind, double d);
-void mgl_columnplot_(uintptr_t *gr, int *num, int *i, mreal *d);
+void MGL_EXPORT mgl_columnplot(HMGL gr, int num, int ind, double d);
+void MGL_EXPORT mgl_columnplot_(uintptr_t *gr, int *num, int *i, mreal *d);
/// Put further plotting in matrix cell of previous subplot/inplot.
-void mgl_gridplot(HMGL gr, int nx, int ny, int m, double d);
-void mgl_gridplot_(uintptr_t *gr, int *nx, int *ny, int *i, mreal *d);
+void MGL_EXPORT mgl_gridplot(HMGL gr, int nx, int ny, int m, double d);
+void MGL_EXPORT mgl_gridplot_(uintptr_t *gr, int *nx, int *ny, int *i, mreal *d);
/// Put further plotting in cell of stick rotated on angles tet, phi.
-void mgl_stickplot(HMGL gr, int num, int ind, double tet, double phi);
-void mgl_stickplot_(uintptr_t *gr, int *num, int *i, mreal *tet, mreal *phi);
+void MGL_EXPORT mgl_stickplot(HMGL gr, int num, int ind, double tet, double phi);
+void MGL_EXPORT mgl_stickplot_(uintptr_t *gr, int *num, int *i, mreal *tet, mreal *phi);
/// Add title for current subplot/inplot.
-void mgl_title(HMGL gr, const char *title, const char *stl, double size);
-void mgl_title_(uintptr_t *gr, const char *title, const char *stl, mreal *size, int,int);
-void mgl_titlew(HMGL gr, const wchar_t *title, const char *stl, double size);
+void MGL_EXPORT mgl_title(HMGL gr, const char *title, const char *stl, double size);
+void MGL_EXPORT mgl_title_(uintptr_t *gr, const char *title, const char *stl, mreal *size, int,int);
+void MGL_EXPORT mgl_titlew(HMGL gr, const wchar_t *title, const char *stl, double size);
/// Set factor of plot size
-void mgl_set_plotfactor(HMGL gr, double val);
-void mgl_set_plotfactor_(uintptr_t *gr, mreal *val);
+void MGL_EXPORT mgl_set_plotfactor(HMGL gr, double val);
+void MGL_EXPORT mgl_set_plotfactor_(uintptr_t *gr, mreal *val);
/// Set aspect ratio for further plotting.
-void mgl_aspect(HMGL gr, double Ax,double Ay,double Az);
-void mgl_aspect_(uintptr_t *gr, mreal *Ax, mreal *Ay, mreal *Az);
+void MGL_EXPORT mgl_aspect(HMGL gr, double Ax,double Ay,double Az);
+void MGL_EXPORT mgl_aspect_(uintptr_t *gr, mreal *Ax, mreal *Ay, mreal *Az);
/// Rotate a further plotting.
-void mgl_rotate(HMGL gr, double TetX,double TetZ,double TetY);
-void mgl_rotate_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY);
+void MGL_EXPORT mgl_rotate(HMGL gr, double TetX,double TetZ,double TetY);
+void MGL_EXPORT mgl_rotate_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY);
/// Rotate a further plotting around vector {x,y,z}.
-void mgl_rotate_vector(HMGL gr, double Tet,double x,double y,double z);
-void mgl_rotate_vector_(uintptr_t *gr, mreal *Tet, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_rotate_vector(HMGL gr, double Tet,double x,double y,double z);
+void MGL_EXPORT mgl_rotate_vector_(uintptr_t *gr, mreal *Tet, mreal *x, mreal *y, mreal *z);
/// Set perspective (in range [0,1)) for plot. Set to zero for switching off.
-void mgl_perspective(HMGL gr, double val);
-void mgl_perspective_(uintptr_t *gr, double val);
+void MGL_EXPORT mgl_perspective(HMGL gr, double val);
+void MGL_EXPORT mgl_perspective_(uintptr_t *gr, double val);
/// Set angle of view independently from Rotate().
-void mgl_view(HMGL gr, double TetX,double TetZ,double TetY);
-void mgl_view_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY);
+void MGL_EXPORT mgl_view(HMGL gr, double TetX,double TetZ,double TetY);
+void MGL_EXPORT mgl_view_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY);
/// Zoom in/out a part of picture (use mgl_zoom(0, 0, 1, 1) for restore default)
-void mgl_zoom(HMGL gr, double x1, double y1, double x2, double y2);
-void mgl_zoom_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *x2, mreal *y2);
+void MGL_EXPORT mgl_zoom(HMGL gr, double x1, double y1, double x2, double y2);
+void MGL_EXPORT mgl_zoom_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *x2, mreal *y2);
/// Send graphical information to node id using MPI
-void mgl_mpi_send(HMGL gr, int id);
-void mgl_mpi_send_(uintptr_t *gr, int *id);
+void MGL_EXPORT mgl_mpi_send(HMGL gr, int id);
+void MGL_EXPORT mgl_mpi_send_(uintptr_t *gr, int *id);
/// Receive graphical information from node id using MPI
-void mgl_mpi_recv(HMGL gr, int id);
-void mgl_mpi_recv_(uintptr_t *gr, int *id);
+void MGL_EXPORT mgl_mpi_recv(HMGL gr, int id);
+void MGL_EXPORT mgl_mpi_recv_(uintptr_t *gr, int *id);
//-----------------------------------------------------------------------------
-void mgl_draw_thr(void *);
+void MGL_EXPORT mgl_draw_thr(void *);
/// Callback function for mouse click
-void mgl_set_click_func(HMGL gr, void (*func)(void *p));
+void MGL_EXPORT mgl_set_click_func(HMGL gr, void (*func)(void *p));
-/// Delay for animation in seconds
-void mgl_wnd_set_delay(HMGL gr, double dt);
-void mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt);
+/// Set delay for animation in seconds
+void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt);
+void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt);
+/// Get delay for animation in seconds
+double MGL_EXPORT mgl_wnd_get_delay(HMGL gr);
+double MGL_EXPORT mgl_wnd_get_delay_(uintptr_t *gr);
/// Set window properties
-void mgl_setup_window(HMGL gr, int clf_upd, int showpos);
-void mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos);
+void MGL_EXPORT mgl_setup_window(HMGL gr, int clf_upd, int showpos);
+void MGL_EXPORT mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos);
/// Switch on/off transparency (do not overwrite user settings)
-void mgl_wnd_toggle_alpha(HMGL gr);
-void mgl_wnd_toggle_alpha_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_toggle_alpha(HMGL gr);
+void MGL_EXPORT mgl_wnd_toggle_alpha_(uintptr_t *gr);
/// Switch on/off lighting (do not overwrite user settings)
-void mgl_wnd_toggle_light(HMGL gr);
-void mgl_wnd_toggle_light_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_toggle_light(HMGL gr);
+void MGL_EXPORT mgl_wnd_toggle_light_(uintptr_t *gr);
/// Switch on/off zooming by mouse
-void mgl_wnd_toggle_zoom(HMGL gr);
-void mgl_wnd_toggle_zoom_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_toggle_zoom(HMGL gr);
+void MGL_EXPORT mgl_wnd_toggle_zoom_(uintptr_t *gr);
/// Switch on/off rotation by mouse
-void mgl_wnd_toggle_rotate(HMGL gr);
-void mgl_wnd_toggle_rotate_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_toggle_rotate(HMGL gr);
+void MGL_EXPORT mgl_wnd_toggle_rotate_(uintptr_t *gr);
/// Switch off all zooming and rotation
-void mgl_wnd_toggle_no(HMGL gr);
-void mgl_wnd_toggle_no_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_toggle_no(HMGL gr);
+void MGL_EXPORT mgl_wnd_toggle_no_(uintptr_t *gr);
/// Update picture by calling user drawing function
-void mgl_wnd_update(HMGL gr);
-void mgl_wnd_update_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_update(HMGL gr);
+void MGL_EXPORT mgl_wnd_update_(uintptr_t *gr);
/// Reload user data and update picture
-void mgl_wnd_reload(HMGL gr);
-void mgl_wnd_reload_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_reload(HMGL gr);
+void MGL_EXPORT mgl_wnd_reload_(uintptr_t *gr);
/// Adjust size of bitmap to window size
-void mgl_wnd_adjust(HMGL gr);
-void mgl_wnd_adjust_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_adjust(HMGL gr);
+void MGL_EXPORT mgl_wnd_adjust_(uintptr_t *gr);
/// Show next frame (if one)
-void mgl_wnd_next_frame(HMGL gr);
-void mgl_wnd_next_frame_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_next_frame(HMGL gr);
+void MGL_EXPORT mgl_wnd_next_frame_(uintptr_t *gr);
/// Show previous frame (if one)
-void mgl_wnd_prev_frame(HMGL gr);
-void mgl_wnd_prev_frame_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_prev_frame(HMGL gr);
+void MGL_EXPORT mgl_wnd_prev_frame_(uintptr_t *gr);
/// Run slideshow (animation) of frames
-void mgl_wnd_animation(HMGL gr);
-void mgl_wnd_animation_(uintptr_t *gr);
+void MGL_EXPORT mgl_wnd_animation(HMGL gr);
+void MGL_EXPORT mgl_wnd_animation_(uintptr_t *gr);
/// Get last mouse position
-void mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z);
-void mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);
//-----------------------------------------------------------------------------
/// Create HMPR object for parsing MGL scripts
-HMPR mgl_create_parser();
-uintptr_t mgl_create_parser_();
+HMPR MGL_EXPORT mgl_create_parser();
+uintptr_t MGL_EXPORT mgl_create_parser_();
/// Change counter of HMPR uses (for advanced users only). Non-zero counter prevent automatic object removing.
-long mgl_use_parser(HMPR p, int inc);
-long mgl_use_parser_(uintptr_t* , int *inc);
+long MGL_EXPORT mgl_use_parser(HMPR p, int inc);
+long MGL_EXPORT mgl_use_parser_(uintptr_t* , int *inc);
/// Delete HMPR object
-void mgl_delete_parser(HMPR p);
-void mgl_delete_parser_(uintptr_t* p);
+void MGL_EXPORT mgl_delete_parser(HMPR p);
+void MGL_EXPORT mgl_delete_parser_(uintptr_t* p);
/// Set value for parameter $N
-void mgl_parser_add_param(HMPR p, int id, const char *str);
-void mgl_parser_add_param_(uintptr_t* p, int *id, const char *str, int);
-void mgl_parser_add_paramw(HMPR p, int id, const wchar_t *str);
+void MGL_EXPORT mgl_parser_add_param(HMPR p, int id, const char *str);
+void MGL_EXPORT mgl_parser_add_param_(uintptr_t* p, int *id, const char *str, int);
+void MGL_EXPORT mgl_parser_add_paramw(HMPR p, int id, const wchar_t *str);
/// Find variable with given name or add a new one
/// NOTE !!! You must not delete obtained data arrays !!!
-HMDT mgl_parser_add_var(HMPR p, const char *name);
-uintptr_t mgl_parser_add_var_(uintptr_t* p, const char *name, int);
-HMDT mgl_parser_add_varw(HMPR p, const wchar_t *name);
+HMDT MGL_EXPORT mgl_parser_add_var(HMPR p, const char *name);
+uintptr_t MGL_EXPORT mgl_parser_add_var_(uintptr_t* p, const char *name, int);
+HMDT MGL_EXPORT mgl_parser_add_varw(HMPR p, const wchar_t *name);
/// Find variable with given name or return NULL if no one
/// NOTE !!! You must not delete obtained data arrays !!!
-HMDT mgl_parser_find_var(HMPR p, const char *name);
-uintptr_t mgl_parser_find_var_(uintptr_t* p, const char *name, int);
-HMDT mgl_parser_find_varw(HMPR p, const wchar_t *name);
+HMDT MGL_EXPORT mgl_parser_find_var(HMPR p, const char *name);
+uintptr_t MGL_EXPORT mgl_parser_find_var_(uintptr_t* p, const char *name, int);
+HMDT MGL_EXPORT mgl_parser_find_varw(HMPR p, const wchar_t *name);
/// Delete variable with name
-void mgl_parser_del_var(HMPR p, const char *name);
-void mgl_parser_del_var_(uintptr_t* p, const char *name, int);
-void mgl_parser_del_varw(HMPR p, const wchar_t *name);
+void MGL_EXPORT mgl_parser_del_var(HMPR p, const char *name);
+void MGL_EXPORT mgl_parser_del_var_(uintptr_t* p, const char *name, int);
+void MGL_EXPORT mgl_parser_del_varw(HMPR p, const wchar_t *name);
/// Delete all data variables
-void mgl_parser_del_all(HMPR p);
-void mgl_parser_del_all_(uintptr_t *p);
+void MGL_EXPORT mgl_parser_del_all(HMPR p);
+void MGL_EXPORT mgl_parser_del_all_(uintptr_t *p);
/// Parse and draw single line of the MGL script
-int mgl_parse_line(HMGL gr, HMPR p, const char *str, int pos);
-int mgl_parse_line_(uintptr_t* gr, uintptr_t* p, const char *str, int *pos, int);
-int mgl_parse_linew(HMGL gr, HMPR p, const wchar_t *str, int pos);
+int MGL_EXPORT mgl_parse_line(HMGL gr, HMPR p, const char *str, int pos);
+int MGL_EXPORT mgl_parse_line_(uintptr_t* gr, uintptr_t* p, const char *str, int *pos, int);
+int MGL_EXPORT mgl_parse_linew(HMGL gr, HMPR p, const wchar_t *str, int pos);
/// Execute and draw script from the file
-void mgl_parse_file(HMGL gr, HMPR p, FILE *fp, int print);
+void MGL_EXPORT mgl_parse_file(HMGL gr, HMPR p, FILE *fp, int print);
/// Execute MGL script text with '\n' separated lines
-void mgl_parse_text(HMGL gr, HMPR p, const char *str);
-void mgl_parse_text_(uintptr_t* gr, uintptr_t* p, const char *str, int);
-void mgl_parse_textw(HMGL gr, HMPR p, const wchar_t *str);
+void MGL_EXPORT mgl_parse_text(HMGL gr, HMPR p, const char *str);
+void MGL_EXPORT mgl_parse_text_(uintptr_t* gr, uintptr_t* p, const char *str, int);
+void MGL_EXPORT mgl_parse_textw(HMGL gr, HMPR p, const wchar_t *str);
/// Restore once flag
-void mgl_parser_restore_once(HMPR p);
-void mgl_parser_restore_once_(uintptr_t* p);
+void MGL_EXPORT mgl_parser_restore_once(HMPR p);
+void MGL_EXPORT mgl_parser_restore_once_(uintptr_t* p);
/// Allow changing size of the picture
-void mgl_parser_allow_setsize(HMPR p, int a);
-void mgl_parser_allow_setsize_(uintptr_t* p, int *a);
+void MGL_EXPORT mgl_parser_allow_setsize(HMPR p, int a);
+void MGL_EXPORT mgl_parser_allow_setsize_(uintptr_t* p, int *a);
/// Allow reading/saving files
-void mgl_parser_allow_file_io(HMPR p, int a);
-void mgl_parser_allow_file_io_(uintptr_t* p, int *a);
+void MGL_EXPORT mgl_parser_allow_file_io(HMPR p, int a);
+void MGL_EXPORT mgl_parser_allow_file_io_(uintptr_t* p, int *a);
/// Set flag to stop script parsing
-void mgl_parser_stop(HMPR p);
-void mgl_parser_stop_(uintptr_t* p);
+void MGL_EXPORT mgl_parser_stop(HMPR p);
+void MGL_EXPORT mgl_parser_stop_(uintptr_t* p);
/// Return type of command: 0 - not found, 1 - data plot, 2 - other plot,
/// 3 - setup, 4 - data handle, 5 - data create, 6 - subplot, 7 - program
/// 8 - 1d plot, 9 - 2d plot, 10 - 3d plot, 11 - dd plot, 12 - vector plot
/// 13 - axis, 14 - primitives, 15 - axis setup, 16 - text/legend, 17 - data transform
-int mgl_parser_cmd_type(HMPR pr, const char *name);
-int mgl_parser_cmd_type_(uintptr_t* p, const char *name, int);
+int MGL_EXPORT mgl_parser_cmd_type(HMPR pr, const char *name);
+int MGL_EXPORT mgl_parser_cmd_type_(uintptr_t* p, const char *name, int);
/// Return description of MGL command
-const char *mgl_parser_cmd_desc(HMPR pr, const char *name);
+MGL_EXPORT const char *mgl_parser_cmd_desc(HMPR pr, const char *name);
/// Return string of command format (command name and its argument[s])
-const char *mgl_parser_cmd_frmt(HMPR pr, const char *name);
+MGL_EXPORT const char *mgl_parser_cmd_frmt(HMPR pr, const char *name);
/// Get name of command with nmber n
-const char *mgl_parser_cmd_name(HMPR pr, long id);
+MGL_EXPORT const char *mgl_parser_cmd_name(HMPR pr, long id);
/// Get number of defined commands
-long mgl_parser_cmd_num(HMPR pr);
+long MGL_EXPORT mgl_parser_cmd_num(HMPR pr);
/// Return result of formula evaluation
-HMDT mgl_parser_calc(HMPR pr, const char *formula);
-uintptr_t mgl_parser_calc_(uintptr_t *pr, const char *formula,int);
-HMDT mgl_parser_calcw(HMPR pr, const wchar_t *formula);
+HMDT MGL_EXPORT mgl_parser_calc(HMPR pr, const char *formula);
+uintptr_t MGL_EXPORT mgl_parser_calc_(uintptr_t *pr, const char *formula,int);
+HMDT MGL_EXPORT mgl_parser_calcw(HMPR pr, const wchar_t *formula);
//-----------------------------------------------------------------------------
/// Create HMEX object for expression evaluating
-HMEX mgl_create_expr(const char *expr);
-uintptr_t mgl_create_expr_(const char *expr, int);
+HMEX MGL_EXPORT mgl_create_expr(const char *expr);
+uintptr_t MGL_EXPORT mgl_create_expr_(const char *expr, int);
/// Delete HMEX object
-void mgl_delete_expr(HMEX ex);
-void mgl_delete_expr_(uintptr_t *ex);
+void MGL_EXPORT mgl_delete_expr(HMEX ex);
+void MGL_EXPORT mgl_delete_expr_(uintptr_t *ex);
/// Return value of expression for given x,y,z variables
-double mgl_expr_eval(HMEX ex, double x, double y,double z);
-double mgl_eval_expr_(uintptr_t *ex, mreal *x, mreal *y, mreal *z);
+double MGL_EXPORT mgl_expr_eval(HMEX ex, double x, double y,double z);
+double MGL_EXPORT mgl_eval_expr_(uintptr_t *ex, mreal *x, mreal *y, mreal *z);
/// Return value of expression for given variables
-double mgl_expr_eval_v(HMEX ex, mreal *var);
+double MGL_EXPORT mgl_expr_eval_v(HMEX ex, mreal *var);
/// Return value of expression differentiation over variable dir for given x,y,z variables
-double mgl_expr_diff(HMEX ex, char dir, double x, double y,double z);
-double mgl_diff_expr_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int);
+double MGL_EXPORT mgl_expr_diff(HMEX ex, char dir, double x, double y,double z);
+double MGL_EXPORT mgl_diff_expr_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int);
/// Return value of expression differentiation over variable dir for given variables
-double mgl_expr_diff_v(HMEX ex, char dir, mreal *var);
+double MGL_EXPORT mgl_expr_diff_v(HMEX ex, char dir, mreal *var);
#ifdef __cplusplus
}
diff --git a/include/mgl2/canvas_wnd.h b/include/mgl2/canvas_wnd.h
index f1b2430..5d5b19e 100644
--- a/include/mgl2/canvas_wnd.h
+++ b/include/mgl2/canvas_wnd.h
@@ -24,7 +24,7 @@
#include "mgl2/wnd.h"
//-----------------------------------------------------------------------------
/// Base class for windows containing MathGL graphics
-class mglCanvasWnd : public mglCanvas
+class MGL_EXPORT mglCanvasWnd : public mglCanvas
{
public:
mglPoint LastMousePos; ///< Last mouse position
diff --git a/include/mgl2/cont.h b/include/mgl2/cont.h
index 22bc70d..39c7060 100644
--- a/include/mgl2/cont.h
+++ b/include/mgl2/cont.h
@@ -26,129 +26,131 @@ extern "C" {
#endif
/// Print text along the curve in parametric form {x,y,z}
-void mgl_text_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *text, const char *font, const char *opt);
-void mgl_text_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z,const char *text,const char *font, const char *opt,int,int l,int n);
-void mgl_textw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z,const char *text,const char *font, const char *opt,int,int l,int n);
+void MGL_EXPORT mgl_textw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *font, const char *opt);
/// Print text along the curve in parametric form {x,y}
-void mgl_text_xy(HMGL gr, HCDT x, HCDT y, const char *text, const char *font, const char *opt);
-void mgl_text_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *font, const char *opt,int, int l,int n);
-void mgl_textw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_xy(HMGL gr, HCDT x, HCDT y, const char *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *font, const char *opt,int, int l,int n);
+void MGL_EXPORT mgl_textw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *font, const char *opt);
/// Print text along the curve
-void mgl_text_y(HMGL gr, HCDT y, const char *text, const char *font, const char *opt);
-void mgl_text_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *font, const char *opt,int, int l,int n);
-void mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_y(HMGL gr, HCDT y, const char *text, const char *font, const char *opt);
+void MGL_EXPORT mgl_text_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *font, const char *opt,int, int l,int n);
+void MGL_EXPORT mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const char *opt);
-void mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
-void mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
+void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
+void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
+void MGL_EXPORT mgl_contv_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
+void MGL_EXPORT mgl_axial_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *stl);
/// Draw manual contour lines for 2d data specified parametrically
-void mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_cont_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_cont_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual contour lines for 2d data
-void mgl_cont_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
-void mgl_cont_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_cont_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw contour lines for 2d data specified parametrically
-void mgl_cont_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_cont_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_cont_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw contour lines for 2d data
-void mgl_cont(HMGL gr, HCDT z, const char *sch, const char *opt);
-void mgl_cont_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_cont(HMGL gr, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_cont_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual solid contours for 2d data specified parametrically
-void mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contf_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contf_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual solid contours for 2d data
-void mgl_contf_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
-void mgl_contf_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contf_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw solid contours for 2d data specified parametrically
-void mgl_contf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw solid contours for 2d data
-void mgl_contf(HMGL gr, HCDT z, const char *sch, const char *opt);
-void mgl_contf_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contf(HMGL gr, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contf_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual solid contours for 2d data specified parametrically with manual colors
-void mgl_contd_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contd_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contd_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contd_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual solid contours for 2d data with manual colors
-void mgl_contd_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
-void mgl_contd_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contd_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contd_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw solid contours for 2d data specified parametrically with manual colors
-void mgl_contd_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contd_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contd_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contd_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw solid contours for 2d data with manual colors
-void mgl_contd(HMGL gr, HCDT z, const char *sch, const char *opt);
-void mgl_contd_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contd(HMGL gr, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contd_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual contour tubes for 2d data specified parametrically
-void mgl_contv_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contv_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contv_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contv_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual contour tubes for 2d data
-void mgl_contv_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
-void mgl_contv_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contv_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contv_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw contour tubes for 2d data specified parametrically
-void mgl_contv_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_contv_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contv_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contv_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw contour tubes for 2d data
-void mgl_contv(HMGL gr, HCDT z, const char *sch, const char *opt);
-void mgl_contv_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_contv(HMGL gr, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_contv_(uintptr_t *gr, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw manual axial-symmetric isosurfaces for 2d data specified parametrically
-void mgl_axial_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt);
-void mgl_axial_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_axial_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt);
+void MGL_EXPORT mgl_axial_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw manual axial-symmetric isosurfaces for 2d data
-void mgl_axial_val(HMGL gr, HCDT v, HCDT a, const char *sch, const char *opt);
-void mgl_axial_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_axial_val(HMGL gr, HCDT v, HCDT a, const char *sch, const char *opt);
+void MGL_EXPORT mgl_axial_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw axial-symmetric isosurfaces for 2d data specified parametrically
-void mgl_axial_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt);
-void mgl_axial_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_axial_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt);
+void MGL_EXPORT mgl_axial_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw axial-symmetric isosurfaces for 2d data
-void mgl_axial(HMGL gr, HCDT a, const char *sch, const char *opt);
-void mgl_axial_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_axial(HMGL gr, HCDT a, const char *sch, const char *opt);
+void MGL_EXPORT mgl_axial_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw surface of curve {r,z} rotatation around axis
-void mgl_torus(HMGL gr, HCDT r, HCDT z, const char *col, const char *opt);
-void mgl_torus_(uintptr_t *gr, uintptr_t *r, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_torus(HMGL gr, HCDT r, HCDT z, const char *col, const char *opt);
+void MGL_EXPORT mgl_torus_(uintptr_t *gr, uintptr_t *r, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw grid lines for density plot at slice for 3d data specified parametrically
-void mgl_grid3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_grid3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_grid3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_grid3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw grid lines for density plot at slice for 3d data
-void mgl_grid3(HMGL gr, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_grid3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_grid3(HMGL gr, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_grid3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw density plot at slice for 3d data specified parametrically
-void mgl_dens3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_dens3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_dens3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_dens3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw density plot at slice for 3d data
-void mgl_dens3(HMGL gr, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_dens3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_dens3(HMGL gr, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_dens3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw manual contour lines at slice for 3d data specified parametrically
-void mgl_cont3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_cont3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw manual contour lines at slice for 3d data
-void mgl_cont3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_cont3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw contour lines at slice for 3d data specified parametrically
-void mgl_cont3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_cont3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw contour lines at slice for 3d data
-void mgl_cont3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_cont3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw manual solid contours at slice for 3d data specified parametrically
-void mgl_contf3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_contf3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw manual solid contours at slice for 3d data
-void mgl_contf3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_contf3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw solid contours at slice for 3d data specified parametrically
-void mgl_contf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_contf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw solid contours at slice for 3d data
-void mgl_contf3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt);
-void mgl_contf3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int,int);
//-----------------------------------------------------------------------------
#ifdef __cplusplus
diff --git a/include/mgl2/data.h b/include/mgl2/data.h
index e95f20d..06a1fd1 100644
--- a/include/mgl2/data.h
+++ b/include/mgl2/data.h
@@ -491,6 +491,11 @@ inline mglData mglQO2d(const char *ham, const mglDataA &ini_re, const mglDataA &
{ return mglData(true, mgl_qo2d_solve(ham, &ini_re, &ini_im, &ray, r, k0, 0, 0)); }
inline mglData mglQO2d(const char *ham, const mglDataA &ini_re, const mglDataA &ini_im, const mglDataA &ray, mglData &xx, mglData &yy, mreal r=1, mreal k0=100)
{ return mglData(true, mgl_qo2d_solve(ham, &ini_re, &ini_im, &ray, r, k0, &xx, &yy)); }
+/// Saves result of PDE solving for "Hamiltonian" ham with initial conditions ini along a curve ray (must have nx>=7 - x,y,z,px,py,pz,tau or nx=5 - x,y,px,py,tau)
+inline mglData mglQO3d(const char *ham, const mglDataA &ini_re, const mglDataA &ini_im, const mglDataA &ray, mreal r=1, mreal k0=100)
+{ return mglData(true, mgl_qo3d_solve(ham, &ini_re, &ini_im, &ray, r, k0, 0, 0, 0)); }
+inline mglData mglQO3d(const char *ham, const mglDataA &ini_re, const mglDataA &ini_im, const mglDataA &ray, mglData &xx, mglData &yy, mglData &zz, mreal r=1, mreal k0=100)
+{ return mglData(true, mgl_qo3d_solve(ham, &ini_re, &ini_im, &ray, r, k0, &xx, &yy, &zz)); }
/// Finds ray with starting point r0, p0 (and prepares ray data for mglQO2d)
inline mglData mglRay(const char *ham, mglPoint r0, mglPoint p0, mreal dt=0.1, mreal tmax=10)
{ return mglData(true, mgl_ray_trace(ham, r0.x, r0.y, r0.z, p0.x, p0.y, p0.z, dt, tmax)); }
diff --git a/include/mgl2/data_cf.h b/include/mgl2/data_cf.h
index c928ec0..2c36b88 100644
--- a/include/mgl2/data_cf.h
+++ b/include/mgl2/data_cf.h
@@ -34,377 +34,391 @@ struct gsl_matrix;
extern "C" {
#endif
-void mgl_srnd(long seed);
-double mgl_rnd();
-double mgl_ipow(double x,int n);
+/// Set seed for random numbers
+void MGL_EXPORT mgl_srnd(long seed);
+void MGL_EXPORT mgl_srnd_(int *seed);
+/// Get random number
+double MGL_EXPORT mgl_rnd();
+double MGL_EXPORT mgl_rnd_();
+/// Get integer power of x
+double MGL_EXPORT mgl_ipow(double x,int n);
+double MGL_EXPORT mgl_ipow_(double *x,int *n);
+/// Get number of seconds since 1970 for given string
+double MGL_EXPORT mgl_get_time(const char *time, const char *fmt);
+double MGL_EXPORT mgl_get_time_(const char *time, const char *fmt,int,int);
/// Create HMDT object
-HMDT mgl_create_data();
-uintptr_t mgl_create_data_();
+HMDT MGL_EXPORT mgl_create_data();
+uintptr_t MGL_EXPORT mgl_create_data_();
/// Create HMDT object with specified sizes
-HMDT mgl_create_data_size(long nx, long ny, long nz);
-uintptr_t mgl_create_data_size_(int *nx, int *ny, int *nz);
+HMDT MGL_EXPORT mgl_create_data_size(long nx, long ny, long nz);
+uintptr_t MGL_EXPORT mgl_create_data_size_(int *nx, int *ny, int *nz);
/// Create HMDT object with data from file
-HMDT mgl_create_data_file(const char *fname);
-uintptr_t mgl_create_data_file_(const char *fname, int len);
+HMDT MGL_EXPORT mgl_create_data_file(const char *fname);
+uintptr_t MGL_EXPORT mgl_create_data_file_(const char *fname, int len);
/// Delete HMDT object
-void mgl_delete_data(HMDT dat);
-void mgl_delete_data_(uintptr_t *dat);
+void MGL_EXPORT mgl_delete_data(HMDT dat);
+void MGL_EXPORT mgl_delete_data_(uintptr_t *dat);
/// Get information about the data (sizes and momentum) to string
-const char *mgl_data_info(HCDT dat);
+MGL_EXPORT const char *mgl_data_info(HCDT dat);
/// Rearange data dimensions
-void mgl_data_rearrange(HMDT dat, long mx,long my,long mz);
-void mgl_data_rearrange_(uintptr_t *dat, int *mx, int *my, int *mz);
+void MGL_EXPORT mgl_data_rearrange(HMDT dat, long mx,long my,long mz);
+void MGL_EXPORT mgl_data_rearrange_(uintptr_t *dat, int *mx, int *my, int *mz);
/// Link external data array (don't delete it at exit)
-void mgl_data_link(HMDT dat, mreal *A,long mx,long my,long mz);
-void mgl_data_link_(uintptr_t *d, float *A, int *nx,int *ny,int *nz);
+void MGL_EXPORT mgl_data_link(HMDT dat, mreal *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_data_link_(uintptr_t *d, float *A, int *nx,int *ny,int *nz);
/// Allocate memory and copy the data from the (float *) array
-void mgl_data_set_float(HMDT dat, const float *A,long mx,long my,long mz);
-void mgl_data_set_float_(uintptr_t *dat, const float *A,int *NX,int *NY,int *NZ);
-void mgl_data_set_float1_(uintptr_t *d, const float *A,int *N1);
+void MGL_EXPORT mgl_data_set_float(HMDT dat, const float *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_data_set_float_(uintptr_t *dat, const float *A,int *NX,int *NY,int *NZ);
+void MGL_EXPORT mgl_data_set_float1_(uintptr_t *d, const float *A,int *N1);
/// Allocate memory and copy the data from the (double *) array
-void mgl_data_set_double(HMDT dat, const double *A,long mx,long my,long mz);
-void mgl_data_set_double_(uintptr_t *dat, const double *A,int *NX,int *NY,int *NZ);
-void mgl_data_set_double1_(uintptr_t *d, const double *A,int *N1);
+void MGL_EXPORT mgl_data_set_double(HMDT dat, const double *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_data_set_double_(uintptr_t *dat, const double *A,int *NX,int *NY,int *NZ);
+void MGL_EXPORT mgl_data_set_double1_(uintptr_t *d, const double *A,int *N1);
/// Allocate memory and copy the data from the (float **) array
-void mgl_data_set_float2(HMDT d, const float **A,long N1,long N2);
-void mgl_data_set_float2_(uintptr_t *d, const float *A,int *N1,int *N2);
+void MGL_EXPORT mgl_data_set_float2(HMDT d, const float **A,long N1,long N2);
+void MGL_EXPORT mgl_data_set_float2_(uintptr_t *d, const float *A,int *N1,int *N2);
/// Allocate memory and copy the data from the (double **) array
-void mgl_data_set_double2(HMDT d, const double **A,long N1,long N2);
-void mgl_data_set_double2_(uintptr_t *d, const double *A,int *N1,int *N2);
+void MGL_EXPORT mgl_data_set_double2(HMDT d, const double **A,long N1,long N2);
+void MGL_EXPORT mgl_data_set_double2_(uintptr_t *d, const double *A,int *N1,int *N2);
/// Allocate memory and copy the data from the (float ***) array
-void mgl_data_set_float3(HMDT d, const float ***A,long N1,long N2,long N3);
-void mgl_data_set_float3_(uintptr_t *d, const float *A,int *N1,int *N2,int *N3);
+void MGL_EXPORT mgl_data_set_float3(HMDT d, const float ***A,long N1,long N2,long N3);
+void MGL_EXPORT mgl_data_set_float3_(uintptr_t *d, const float *A,int *N1,int *N2,int *N3);
/// Allocate memory and copy the data from the (double ***) array
-void mgl_data_set_double3(HMDT d, const double ***A,long N1,long N2,long N3);
-void mgl_data_set_double3_(uintptr_t *d, const double *A,int *N1,int *N2,int *N3);
+void MGL_EXPORT mgl_data_set_double3(HMDT d, const double ***A,long N1,long N2,long N3);
+void MGL_EXPORT mgl_data_set_double3_(uintptr_t *d, const double *A,int *N1,int *N2,int *N3);
/// Import data from abstract type
-void mgl_data_set(HMDT dat, HCDT a);
-void mgl_data_set_(uintptr_t *dat, uintptr_t *a);
+void MGL_EXPORT mgl_data_set(HMDT dat, HCDT a);
+void MGL_EXPORT mgl_data_set_(uintptr_t *dat, uintptr_t *a);
/// Allocate memory and copy the data from the gsl_vector
-void mgl_data_set_vector(HMDT dat, gsl_vector *v);
+void MGL_EXPORT mgl_data_set_vector(HMDT dat, gsl_vector *v);
/// Allocate memory and copy the data from the gsl_matrix
-void mgl_data_set_matrix(HMDT dat, gsl_matrix *m);
+void MGL_EXPORT mgl_data_set_matrix(HMDT dat, gsl_matrix *m);
/// Set value of data element [i,j,k]
-void mgl_data_set_value(HMDT dat, mreal v, long i, long j, long k);
-void mgl_data_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k);
+void MGL_EXPORT mgl_data_set_value(HMDT dat, mreal v, long i, long j, long k);
+void MGL_EXPORT mgl_data_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k);
/// Get value of data element [i,j,k]
-mreal mgl_data_get_value(HCDT dat, long i, long j, long k);
-mreal mgl_data_get_value_(uintptr_t *d, int *i, int *j, int *k);
+mreal MGL_EXPORT mgl_data_get_value(HCDT dat, long i, long j, long k);
+mreal MGL_EXPORT mgl_data_get_value_(uintptr_t *d, int *i, int *j, int *k);
/// Allocate memory and scanf the data from the string
-void mgl_data_set_values(HMDT dat, const char *val, long nx, long ny, long nz);
-void mgl_data_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l);
+void MGL_EXPORT mgl_data_set_values(HMDT dat, const char *val, long nx, long ny, long nz);
+void MGL_EXPORT mgl_data_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l);
/// Read data array from HDF file (parse HDF4 and HDF5 files)
-int mgl_data_read_hdf(HMDT d,const char *fname,const char *data);
-int mgl_data_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n);
+int MGL_EXPORT mgl_data_read_hdf(HMDT d,const char *fname,const char *data);
+int MGL_EXPORT mgl_data_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n);
/// Save data to HDF file
-void mgl_data_save_hdf(HCDT d,const char *fname,const char *data,int rewrite);
-void mgl_data_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n);
+void MGL_EXPORT mgl_data_save_hdf(HCDT d,const char *fname,const char *data,int rewrite);
+void MGL_EXPORT mgl_data_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n);
/// Put HDF data names into buf as '\t' separated.
-int mgl_datas_hdf(const char *fname, char *buf, long size);
+int MGL_EXPORT mgl_datas_hdf(const char *fname, char *buf, long size);
/// Read data from tab-separated text file with auto determining size
-int mgl_data_read(HMDT dat, const char *fname);
-int mgl_data_read_(uintptr_t *d, const char *fname,int l);
+int MGL_EXPORT mgl_data_read(HMDT dat, const char *fname);
+int MGL_EXPORT mgl_data_read_(uintptr_t *d, const char *fname,int l);
/// Read data from text file with size specified at beginning of the file
-int mgl_data_read_mat(HMDT dat, const char *fname, long dim);
-int mgl_data_read_mat_(uintptr_t *dat, const char *fname, int *dim, int);
+int MGL_EXPORT mgl_data_read_mat(HMDT dat, const char *fname, long dim);
+int MGL_EXPORT mgl_data_read_mat_(uintptr_t *dat, const char *fname, int *dim, int);
/// Read data from text file with specifeid size
-int mgl_data_read_dim(HMDT dat, const char *fname,long mx,long my,long mz);
-int mgl_data_read_dim_(uintptr_t *dat, const char *fname,int *mx,int *my,int *mz,int);
+int MGL_EXPORT mgl_data_read_dim(HMDT dat, const char *fname,long mx,long my,long mz);
+int MGL_EXPORT mgl_data_read_dim_(uintptr_t *dat, const char *fname,int *mx,int *my,int *mz,int);
/// Read data from tab-separated text files with auto determining size which filenames are result of sprintf(fname,templ,t) where t=from:step:to
-int mgl_data_read_range(HMDT d, const char *templ, double from, double to, double step, int as_slice);
-int mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l);
+int MGL_EXPORT mgl_data_read_range(HMDT d, const char *templ, double from, double to, double step, int as_slice);
+int MGL_EXPORT mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l);
/// Read data from tab-separated text files with auto determining size which filenames are satisfied to template (like "t_*.dat")
-int mgl_data_read_all(HMDT dat, const char *templ, int as_slice);
-int mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l);
+int MGL_EXPORT mgl_data_read_all(HMDT dat, const char *templ, int as_slice);
+int MGL_EXPORT mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l);
/// Save whole data array (for ns=-1) or only ns-th slice to text file
-void mgl_data_save(HCDT dat, const char *fname,long ns);
-void mgl_data_save_(uintptr_t *dat, const char *fname,int *ns,int);
+void MGL_EXPORT mgl_data_save(HCDT dat, const char *fname,long ns);
+void MGL_EXPORT mgl_data_save_(uintptr_t *dat, const char *fname,int *ns,int);
/// Export data array (for ns=-1) or only ns-th slice to PNG file according color scheme
-void mgl_data_export(HCDT dat, const char *fname, const char *scheme,mreal v1,mreal v2,long ns);
-void mgl_data_export_(uintptr_t *dat, const char *fname, const char *scheme,mreal *v1,mreal *v2,int *ns,int,int);
+void MGL_EXPORT mgl_data_export(HCDT dat, const char *fname, const char *scheme,mreal v1,mreal v2,long ns);
+void MGL_EXPORT mgl_data_export_(uintptr_t *dat, const char *fname, const char *scheme,mreal *v1,mreal *v2,int *ns,int,int);
/// Import data array from PNG file according color scheme
-void mgl_data_import(HMDT dat, const char *fname, const char *scheme,mreal v1,mreal v2);
-void mgl_data_import_(uintptr_t *dat, const char *fname, const char *scheme,mreal *v1,mreal *v2,int,int);
+void MGL_EXPORT mgl_data_import(HMDT dat, const char *fname, const char *scheme,mreal v1,mreal v2);
+void MGL_EXPORT mgl_data_import_(uintptr_t *dat, const char *fname, const char *scheme,mreal *v1,mreal *v2,int,int);
/// Create or recreate the array with specified size and fill it by zero
-void mgl_data_create(HMDT dat, long nx,long ny,long nz);
-void mgl_data_create_(uintptr_t *dat, int *nx,int *ny,int *nz);
+void MGL_EXPORT mgl_data_create(HMDT dat, long nx,long ny,long nz);
+void MGL_EXPORT mgl_data_create_(uintptr_t *dat, int *nx,int *ny,int *nz);
/// Transpose dimensions of the data (generalization of Transpose)
-void mgl_data_transpose(HMDT dat, const char *dim);
-void mgl_data_transpose_(uintptr_t *dat, const char *dim,int);
+void MGL_EXPORT mgl_data_transpose(HMDT dat, const char *dim);
+void MGL_EXPORT mgl_data_transpose_(uintptr_t *dat, const char *dim,int);
/// Normalize the data to range [v1,v2]
-void mgl_data_norm(HMDT dat, mreal v1,mreal v2,long sym,long dim);
-void mgl_data_norm_(uintptr_t *dat, mreal *v1,mreal *v2,int *sym,int *dim);
+void MGL_EXPORT mgl_data_norm(HMDT dat, mreal v1,mreal v2,long sym,long dim);
+void MGL_EXPORT mgl_data_norm_(uintptr_t *dat, mreal *v1,mreal *v2,int *sym,int *dim);
/// Normalize the data to range [v1,v2] slice by slice
-void mgl_data_norm_slice(HMDT dat, mreal v1,mreal v2,char dir,long keep_en,long sym);
-void mgl_data_norm_slice_(uintptr_t *dat, mreal *v1,mreal *v2,char *dir,int *keep_en,int *sym,int l);
+void MGL_EXPORT mgl_data_norm_slice(HMDT dat, mreal v1,mreal v2,char dir,long keep_en,long sym);
+void MGL_EXPORT mgl_data_norm_slice_(uintptr_t *dat, mreal *v1,mreal *v2,char *dir,int *keep_en,int *sym,int l);
/// Get sub-array of the data with given fixed indexes
-HMDT mgl_data_subdata(HCDT dat, long xx,long yy,long zz);
-uintptr_t mgl_data_subdata_(uintptr_t *dat, int *xx,int *yy,int *zz);
+HMDT MGL_EXPORT mgl_data_subdata(HCDT dat, long xx,long yy,long zz);
+uintptr_t MGL_EXPORT mgl_data_subdata_(uintptr_t *dat, int *xx,int *yy,int *zz);
/// Get sub-array of the data with given fixed indexes (like indirect access)
-HMDT mgl_data_subdata_ext(HCDT dat, HCDT xx, HCDT yy, HCDT zz);
-uintptr_t mgl_data_subdata_ext_(uintptr_t *dat, uintptr_t *xx,uintptr_t *yy,uintptr_t *zz);
+HMDT MGL_EXPORT mgl_data_subdata_ext(HCDT dat, HCDT xx, HCDT yy, HCDT zz);
+uintptr_t MGL_EXPORT mgl_data_subdata_ext_(uintptr_t *dat, uintptr_t *xx,uintptr_t *yy,uintptr_t *zz);
/// Get column (or slice) of the data filled by formulas of named columns
-HMDT mgl_data_column(HCDT dat, const char *eq);
-uintptr_t mgl_data_column_(uintptr_t *dat, const char *eq,int l);
+HMDT MGL_EXPORT mgl_data_column(HCDT dat, const char *eq);
+uintptr_t MGL_EXPORT mgl_data_column_(uintptr_t *dat, const char *eq,int l);
/// Set names for columns (slices)
-void mgl_data_set_id(HMDT d, const char *id);
-void mgl_data_set_id_(uintptr_t *dat, const char *id,int l);
+void MGL_EXPORT mgl_data_set_id(HMDT d, const char *id);
+void MGL_EXPORT mgl_data_set_id_(uintptr_t *dat, const char *id,int l);
/// Equidistantly fill the data to range [x1,x2] in direction dir
-void mgl_data_fill(HMDT dat, mreal x1,mreal x2,char dir);
-void mgl_data_fill_(uintptr_t *dat, mreal *x1,mreal *x2,const char *dir,int);
+void MGL_EXPORT mgl_data_fill(HMDT dat, mreal x1,mreal x2,char dir);
+void MGL_EXPORT mgl_data_fill_(uintptr_t *dat, mreal *x1,mreal *x2,const char *dir,int);
/// Modify the data by specified formula assuming x,y,z in range [r1,r2]
-void mgl_data_fill_eq(HMGL gr, HMDT dat, const char *eq, HCDT vdat, HCDT wdat,const char *opt);
-void mgl_data_fill_eq_(uintptr_t *gr, uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,const char *opt, int, int);
+void MGL_EXPORT mgl_data_fill_eq(HMGL gr, HMDT dat, const char *eq, HCDT vdat, HCDT wdat,const char *opt);
+void MGL_EXPORT mgl_data_fill_eq_(uintptr_t *gr, uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,const char *opt, int, int);
/// Set the data by triangulated surface values assuming x,y,z in range [r1,r2]
-void mgl_data_grid(HMGL gr, HMDT d, HCDT xdat, HCDT ydat, HCDT zdat,const char *opt);
-void mgl_data_grid_(uintptr_t *gr, uintptr_t *dat, uintptr_t *xdat, uintptr_t *ydat, uintptr_t *zdat, const char *opt,int);
+void MGL_EXPORT mgl_data_grid(HMGL gr, HMDT d, HCDT xdat, HCDT ydat, HCDT zdat,const char *opt);
+void MGL_EXPORT mgl_data_grid_(uintptr_t *gr, uintptr_t *dat, uintptr_t *xdat, uintptr_t *ydat, uintptr_t *zdat, const char *opt,int);
/// Put value to data element(s)
-void mgl_data_put_val(HMDT dat, mreal val, long i, long j, long k);
-void mgl_data_put_val_(uintptr_t *dat, mreal *val, int *i, int *j, int *k);
+void MGL_EXPORT mgl_data_put_val(HMDT dat, mreal val, long i, long j, long k);
+void MGL_EXPORT mgl_data_put_val_(uintptr_t *dat, mreal *val, int *i, int *j, int *k);
/// Put array to data element(s)
-void mgl_data_put_dat(HMDT dat, HCDT val, long i, long j, long k);
-void mgl_data_put_dat_(uintptr_t *dat, uintptr_t *val, int *i, int *j, int *k);
+void MGL_EXPORT mgl_data_put_dat(HMDT dat, HCDT val, long i, long j, long k);
+void MGL_EXPORT mgl_data_put_dat_(uintptr_t *dat, uintptr_t *val, int *i, int *j, int *k);
/// Modify the data by specified formula
-void mgl_data_modify(HMDT dat, const char *eq,long dim);
-void mgl_data_modify_(uintptr_t *dat, const char *eq,int *dim,int);
+void MGL_EXPORT mgl_data_modify(HMDT dat, const char *eq,long dim);
+void MGL_EXPORT mgl_data_modify_(uintptr_t *dat, const char *eq,int *dim,int);
/// Modify the data by specified formula
-void mgl_data_modify_vw(HMDT dat, const char *eq,HCDT vdat,HCDT wdat);
-void mgl_data_modify_vw_(uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,int);
+void MGL_EXPORT mgl_data_modify_vw(HMDT dat, const char *eq,HCDT vdat,HCDT wdat);
+void MGL_EXPORT mgl_data_modify_vw_(uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,int);
/// Reduce size of the data
-void mgl_data_squeeze(HMDT dat, long rx,long ry,long rz,long smooth);
-void mgl_data_squeeze_(uintptr_t *dat, int *rx,int *ry,int *rz,int *smooth);
+void MGL_EXPORT mgl_data_squeeze(HMDT dat, long rx,long ry,long rz,long smooth);
+void MGL_EXPORT mgl_data_squeeze_(uintptr_t *dat, int *rx,int *ry,int *rz,int *smooth);
/// Get maximal value of the data
-mreal mgl_data_max(HCDT dat);
-mreal mgl_data_max_(uintptr_t *dat);
+mreal MGL_EXPORT mgl_data_max(HCDT dat);
+mreal MGL_EXPORT mgl_data_max_(uintptr_t *dat);
/// Get minimal value of the data
-mreal mgl_data_min(HCDT dat);
-mreal mgl_data_min_(uintptr_t *dat);
+mreal MGL_EXPORT mgl_data_min(HCDT dat);
+mreal MGL_EXPORT mgl_data_min_(uintptr_t *dat);
/// Returns pointer to data element [i,j,k]
-mreal *mgl_data_value(HMDT dat, long i,long j,long k);
+MGL_EXPORT mreal *mgl_data_value(HMDT dat, long i,long j,long k);
/// Returns pointer to internal data array
-mreal *mgl_data_data(HMDT dat);
+MGL_EXPORT mreal *mgl_data_data(HMDT dat);
/// Gets the x-size of the data.
-long mgl_data_get_nx(HCDT d);
-long mgl_data_get_nx_(uintptr_t *d);
+long MGL_EXPORT mgl_data_get_nx(HCDT d);
+long MGL_EXPORT mgl_data_get_nx_(uintptr_t *d);
/// Gets the y-size of the data.
-long mgl_data_get_ny(HCDT d);
-long mgl_data_get_ny_(uintptr_t *d);
+long MGL_EXPORT mgl_data_get_ny(HCDT d);
+long MGL_EXPORT mgl_data_get_ny_(uintptr_t *d);
/// Gets the z-size of the data.
-long mgl_data_get_nz(HCDT d);
-long mgl_data_get_nz_(uintptr_t *d);
+long MGL_EXPORT mgl_data_get_nz(HCDT d);
+long MGL_EXPORT mgl_data_get_nz_(uintptr_t *d);
/// Find position (after specified in i,j,k) of first nonzero value of formula
-mreal mgl_data_first(HCDT dat, const char *cond, long *i, long *j, long *k);
-mreal mgl_data_first_(uintptr_t *dat, const char *cond, int *i, int *j, int *k, int);
+mreal MGL_EXPORT mgl_data_first(HCDT dat, const char *cond, long *i, long *j, long *k);
+mreal MGL_EXPORT mgl_data_first_(uintptr_t *dat, const char *cond, int *i, int *j, int *k, int);
/// Find position (before specified in i,j,k) of last nonzero value of formula
-mreal mgl_data_last(HCDT dat, const char *cond, long *i, long *j, long *k);
-mreal mgl_data_last_(uintptr_t *dat, const char *cond, int *i, int *j, int *k, int);
+mreal MGL_EXPORT mgl_data_last(HCDT dat, const char *cond, long *i, long *j, long *k);
+mreal MGL_EXPORT mgl_data_last_(uintptr_t *dat, const char *cond, int *i, int *j, int *k, int);
/// Find position of first in direction 'dir' nonzero value of formula
-long mgl_data_find(HCDT dat, const char *cond, char dir, long i, long j, long k);
-int mgl_data_find_(uintptr_t *dat, const char *cond, char *dir, int *i, int *j, int *k, int,int);
+long MGL_EXPORT mgl_data_find(HCDT dat, const char *cond, char dir, long i, long j, long k);
+int MGL_EXPORT mgl_data_find_(uintptr_t *dat, const char *cond, char *dir, int *i, int *j, int *k, int,int);
/// Find if any nonzero value of formula
-int mgl_data_find_any(HCDT dat, const char *cond);
-int mgl_data_find_any_(uintptr_t *dat, const char *cond, int);
+int MGL_EXPORT mgl_data_find_any(HCDT dat, const char *cond);
+int MGL_EXPORT mgl_data_find_any_(uintptr_t *dat, const char *cond, int);
/// Get maximal value of the data and its position
-mreal mgl_data_max_int(HCDT dat, long *i, long *j, long *k);
-mreal mgl_data_max_int_(uintptr_t *dat, int *i, int *j, int *k);
+mreal MGL_EXPORT mgl_data_max_int(HCDT dat, long *i, long *j, long *k);
+mreal MGL_EXPORT mgl_data_max_int_(uintptr_t *dat, int *i, int *j, int *k);
/// Get maximal value of the data and its approximated position
-mreal mgl_data_max_real(HCDT dat, mreal *x, mreal *y, mreal *z);
-mreal mgl_data_max_real_(uintptr_t *dat, mreal *x, mreal *y, mreal *z);
+mreal MGL_EXPORT mgl_data_max_real(HCDT dat, mreal *x, mreal *y, mreal *z);
+mreal MGL_EXPORT mgl_data_max_real_(uintptr_t *dat, mreal *x, mreal *y, mreal *z);
/// Get minimal value of the data and its position
-mreal mgl_data_min_int(HCDT dat, long *i, long *j, long *k);
-mreal mgl_data_min_int_(uintptr_t *dat, int *i, int *j, int *k);
+mreal MGL_EXPORT mgl_data_min_int(HCDT dat, long *i, long *j, long *k);
+mreal MGL_EXPORT mgl_data_min_int_(uintptr_t *dat, int *i, int *j, int *k);
/// Get minimal value of the data and its approximated position
-mreal mgl_data_min_real(HCDT dat, mreal *x, mreal *y, mreal *z);
-mreal mgl_data_min_real_(uintptr_t *dat, mreal *x, mreal *y, mreal *z);
+mreal MGL_EXPORT mgl_data_min_real(HCDT dat, mreal *x, mreal *y, mreal *z);
+mreal MGL_EXPORT mgl_data_min_real_(uintptr_t *dat, mreal *x, mreal *y, mreal *z);
/// Get "energy and find 4 momenta of data: median, width, skewness, kurtosis
-mreal mgl_data_momentum_val(HCDT d, char dir, mreal *m, mreal *w, mreal *s, mreal *k);
-mreal mgl_data_momentum_val_(uintptr_t *dat, char *dir, mreal *m, mreal *w, mreal *s, mreal *k,int);
+mreal MGL_EXPORT mgl_data_momentum_val(HCDT d, char dir, mreal *m, mreal *w, mreal *s, mreal *k);
+mreal MGL_EXPORT mgl_data_momentum_val_(uintptr_t *dat, char *dir, mreal *m, mreal *w, mreal *s, mreal *k,int);
/// Get the data which is direct multiplication (like, d[i,j] = this[i]*a[j] and so on)
-HMDT mgl_data_combine(HCDT dat1, HCDT dat2);
-uintptr_t mgl_data_combine_(uintptr_t *dat1, uintptr_t *dat2);
+HMDT MGL_EXPORT mgl_data_combine(HCDT dat1, HCDT dat2);
+uintptr_t MGL_EXPORT mgl_data_combine_(uintptr_t *dat1, uintptr_t *dat2);
/// Extend data dimensions
-void mgl_data_extend(HMDT dat, long n1, long n2);
-void mgl_data_extend_(uintptr_t *dat, int *n1, int *n2);
+void MGL_EXPORT mgl_data_extend(HMDT dat, long n1, long n2);
+void MGL_EXPORT mgl_data_extend_(uintptr_t *dat, int *n1, int *n2);
/// Insert data rows/columns/slices
-void mgl_data_insert(HMDT dat, char dir, long at, long num);
-void mgl_data_insert_(uintptr_t *dat, const char *dir, int *at, int *num, int);
+void MGL_EXPORT mgl_data_insert(HMDT dat, char dir, long at, long num);
+void MGL_EXPORT mgl_data_insert_(uintptr_t *dat, const char *dir, int *at, int *num, int);
/// Delete data rows/columns/slices
-void mgl_data_delete(HMDT dat, char dir, long at, long num);
-void mgl_data_delete_(uintptr_t *dat, const char *dir, int *at, int *num, int);
+void MGL_EXPORT mgl_data_delete(HMDT dat, char dir, long at, long num);
+void MGL_EXPORT mgl_data_delete_(uintptr_t *dat, const char *dir, int *at, int *num, int);
/// Smooth the data on specified direction or directions
-void mgl_data_smooth(HMDT d, const char *dirs, mreal delta);
-void mgl_data_smooth_(uintptr_t *dat, const char *dirs, mreal *delta,int);
+void MGL_EXPORT mgl_data_smooth(HMDT d, const char *dirs, mreal delta);
+void MGL_EXPORT mgl_data_smooth_(uintptr_t *dat, const char *dirs, mreal *delta,int);
/// Get array which is result of summation in given direction or directions
-HMDT mgl_data_sum(HCDT dat, const char *dir);
-uintptr_t mgl_data_sum_(uintptr_t *dat, const char *dir,int);
+HMDT MGL_EXPORT mgl_data_sum(HCDT dat, const char *dir);
+uintptr_t MGL_EXPORT mgl_data_sum_(uintptr_t *dat, const char *dir,int);
/// Get array which is result of maximal values in given direction or directions
-HMDT mgl_data_max_dir(HCDT dat, const char *dir);
-uintptr_t mgl_data_max_dir_(uintptr_t *dat, const char *dir,int);
+HMDT MGL_EXPORT mgl_data_max_dir(HCDT dat, const char *dir);
+uintptr_t MGL_EXPORT mgl_data_max_dir_(uintptr_t *dat, const char *dir,int);
/// Get array which is result of minimal values in given direction or directions
-HMDT mgl_data_min_dir(HCDT dat, const char *dir);
-uintptr_t mgl_data_min_dir_(uintptr_t *dat, const char *dir,int);
+HMDT MGL_EXPORT mgl_data_min_dir(HCDT dat, const char *dir);
+uintptr_t MGL_EXPORT mgl_data_min_dir_(uintptr_t *dat, const char *dir,int);
/// Cumulative summation the data in given direction or directions
-void mgl_data_cumsum(HMDT dat, const char *dir);
-void mgl_data_cumsum_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_cumsum(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_cumsum_(uintptr_t *dat, const char *dir,int);
/// Integrate (cumulative summation) the data in given direction or directions
-void mgl_data_integral(HMDT dat, const char *dir);
-void mgl_data_integral_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_integral(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_integral_(uintptr_t *dat, const char *dir,int);
/// Differentiate the data in given direction or directions
-void mgl_data_diff(HMDT dat, const char *dir);
-void mgl_data_diff_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_diff(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_diff_(uintptr_t *dat, const char *dir,int);
/// Differentiate the parametrically specified data along direction v1 with v2,v3=const (v3 can be NULL)
-void mgl_data_diff_par(HMDT dat, HCDT v1, HCDT v2, HCDT v3);
-void mgl_data_diff_par_(uintptr_t *dat, uintptr_t *v1, uintptr_t *v2, uintptr_t *v3);
+void MGL_EXPORT mgl_data_diff_par(HMDT dat, HCDT v1, HCDT v2, HCDT v3);
+void MGL_EXPORT mgl_data_diff_par_(uintptr_t *dat, uintptr_t *v1, uintptr_t *v2, uintptr_t *v3);
/// Double-differentiate (like Laplace operator) the data in given direction
-void mgl_data_diff2(HMDT dat, const char *dir);
-void mgl_data_diff2_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_diff2(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_diff2_(uintptr_t *dat, const char *dir,int);
/// Swap left and right part of the data in given direction (useful for Fourier spectrum)
-void mgl_data_swap(HMDT dat, const char *dir);
-void mgl_data_swap_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_swap(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_swap_(uintptr_t *dat, const char *dir,int);
/// Roll data along direction dir by num slices
-void mgl_data_roll(HMDT dat, char dir, long num);
-void mgl_data_roll_(uintptr_t *dat, const char *dir, int *num, int);
+void MGL_EXPORT mgl_data_roll(HMDT dat, char dir, long num);
+void MGL_EXPORT mgl_data_roll_(uintptr_t *dat, const char *dir, int *num, int);
/// Mirror the data in given direction (useful for Fourier spectrum)
-void mgl_data_mirror(HMDT dat, const char *dir);
-void mgl_data_mirror_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_mirror(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_mirror_(uintptr_t *dat, const char *dir,int);
/// Sort rows (or slices) by values of specified column
-void mgl_data_sort(HMDT dat, long idx, long idy);
-void mgl_data_sort_(uintptr_t *dat, int *idx, int *idy);
+void MGL_EXPORT mgl_data_sort(HMDT dat, long idx, long idy);
+void MGL_EXPORT mgl_data_sort_(uintptr_t *dat, int *idx, int *idy);
/// Apply Hankel transform
-void mgl_data_hankel(HMDT dat, const char *dir);
-void mgl_data_hankel_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_hankel(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_hankel_(uintptr_t *dat, const char *dir,int);
/// Apply Sin-Fourier transform
-void mgl_data_sinfft(HMDT dat, const char *dir);
-void mgl_data_sinfft_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_sinfft(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_sinfft_(uintptr_t *dat, const char *dir,int);
/// Apply Cos-Fourier transform
-void mgl_data_cosfft(HMDT dat, const char *dir);
-void mgl_data_cosfft_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_data_cosfft(HMDT dat, const char *dir);
+void MGL_EXPORT mgl_data_cosfft_(uintptr_t *dat, const char *dir,int);
/// Fill data by 'x'/'k' samples for Hankel ('h') or Fourier ('f') transform
-void mgl_data_fill_sample(HMDT dat, const char *how);
-void mgl_data_fill_sample_(uintptr_t *dat, const char *how,int);
+void MGL_EXPORT mgl_data_fill_sample(HMDT dat, const char *how);
+void MGL_EXPORT mgl_data_fill_sample_(uintptr_t *dat, const char *how,int);
/// Interpolate by cubic spline the data to given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-mreal mgl_data_spline(HCDT dat, mreal x,mreal y,mreal z);
-mreal mgl_data_spline_(uintptr_t *dat, mreal *x,mreal *y,mreal *z);
+mreal MGL_EXPORT mgl_data_spline(HCDT dat, mreal x,mreal y,mreal z);
+mreal MGL_EXPORT mgl_data_spline_(uintptr_t *dat, mreal *x,mreal *y,mreal *z);
/// Interpolate by linear function the data to given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-mreal mgl_data_linear(HCDT dat, mreal x,mreal y,mreal z);
-mreal mgl_data_linear_(uintptr_t *dat, mreal *x,mreal *y,mreal *z);
+mreal MGL_EXPORT mgl_data_linear(HCDT dat, mreal x,mreal y,mreal z);
+mreal MGL_EXPORT mgl_data_linear_(uintptr_t *dat, mreal *x,mreal *y,mreal *z);
/// Interpolate by cubic spline the data and return its derivatives at given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-mreal mgl_data_spline_ext(HCDT dat, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz);
-mreal mgl_data_spline_ext_(uintptr_t *dat, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz);
+mreal MGL_EXPORT mgl_data_spline_ext(HCDT dat, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz);
+mreal MGL_EXPORT mgl_data_spline_ext_(uintptr_t *dat, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz);
/// Interpolate by linear function the data and return its derivatives at given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-mreal mgl_data_linear_ext(HCDT dat, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz);
-mreal mgl_data_linear_ext_(uintptr_t *dat, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz);
+mreal MGL_EXPORT mgl_data_linear_ext(HCDT dat, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz);
+mreal MGL_EXPORT mgl_data_linear_ext_(uintptr_t *dat, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz);
/// Return an approximated x-value (root) when dat(x) = val
-mreal mgl_data_solve_1d(HCDT dat, mreal val, int spl, long i0);
-mreal mgl_data_solve_1d_(uintptr_t *dat, mreal *val, int *spl, int *i0);
+mreal MGL_EXPORT mgl_data_solve_1d(HCDT dat, mreal val, int spl, long i0);
+mreal MGL_EXPORT mgl_data_solve_1d_(uintptr_t *dat, mreal *val, int *spl, int *i0);
/// Return an approximated value (root) when dat(x) = val
-HMDT mgl_data_solve(HCDT dat, mreal val, char dir, HCDT i0, int norm);
-uintptr_t mgl_data_solve_(uintptr_t *dat, mreal *val, const char *dir, uintptr_t *i0, int *norm,int);
+HMDT MGL_EXPORT mgl_data_solve(HCDT dat, mreal val, char dir, HCDT i0, int norm);
+uintptr_t MGL_EXPORT mgl_data_solve_(uintptr_t *dat, mreal *val, const char *dir, uintptr_t *i0, int *norm,int);
/// Get trace of the data array
-HMDT mgl_data_trace(HCDT d);
-uintptr_t mgl_data_trace_(uintptr_t *d);
+HMDT MGL_EXPORT mgl_data_trace(HCDT d);
+uintptr_t MGL_EXPORT mgl_data_trace_(uintptr_t *d);
/// Resize the data to new sizes
-HMDT mgl_data_resize(HCDT dat, long mx,long my,long mz);
-uintptr_t mgl_data_resize_(uintptr_t *dat, int *mx,int *my,int *mz);
+HMDT MGL_EXPORT mgl_data_resize(HCDT dat, long mx,long my,long mz);
+uintptr_t MGL_EXPORT mgl_data_resize_(uintptr_t *dat, int *mx,int *my,int *mz);
/// Resize the data to new sizes of box [x1,x2]*[y1,y2]*[z1,z2]
-HMDT mgl_data_resize_box(HCDT dat, long mx,long my,long mz,mreal x1,mreal x2,mreal y1,mreal y2,mreal z1,mreal z2);
-uintptr_t mgl_data_resize_box_(uintptr_t *dat, int *mx,int *my,int *mz,mreal *x1,mreal *x2,mreal *y1,mreal *y2,mreal *z1,mreal *z2);
+HMDT MGL_EXPORT mgl_data_resize_box(HCDT dat, long mx,long my,long mz,mreal x1,mreal x2,mreal y1,mreal y2,mreal z1,mreal z2);
+uintptr_t MGL_EXPORT mgl_data_resize_box_(uintptr_t *dat, int *mx,int *my,int *mz,mreal *x1,mreal *x2,mreal *y1,mreal *y2,mreal *z1,mreal *z2);
/// Create n-th points distribution of this data values in range [v1, v2]
-HMDT mgl_data_hist(HCDT dat, long n, mreal v1, mreal v2, long nsub);
-uintptr_t mgl_data_momentum_(uintptr_t *dat, char *dir, const char *how, int,int);
+HMDT MGL_EXPORT mgl_data_hist(HCDT dat, long n, mreal v1, mreal v2, long nsub);
+uintptr_t MGL_EXPORT mgl_data_momentum_(uintptr_t *dat, char *dir, const char *how, int,int);
/// Create n-th points distribution of this data values in range [v1, v2] with weight w
-HMDT mgl_data_hist_w(HCDT dat, HCDT weight, long n, mreal v1, mreal v2, long nsub);
-uintptr_t mgl_data_hist_(uintptr_t *dat, int *n, mreal *v1, mreal *v2, int *nsub);
+HMDT MGL_EXPORT mgl_data_hist_w(HCDT dat, HCDT weight, long n, mreal v1, mreal v2, long nsub);
+uintptr_t MGL_EXPORT mgl_data_hist_(uintptr_t *dat, int *n, mreal *v1, mreal *v2, int *nsub);
/// Get momentum (1D-array) of data along direction 'dir'. String looks like "x1" for median in x-direction, "x2" for width in x-dir and so on.
-HMDT mgl_data_momentum(HCDT dat, char dir, const char *how);
-uintptr_t mgl_data_hist_w_(uintptr_t *dat, uintptr_t *weight, int *n, mreal *v1, mreal *v2, int *nsub);
+HMDT MGL_EXPORT mgl_data_momentum(HCDT dat, char dir, const char *how);
+uintptr_t MGL_EXPORT mgl_data_hist_w_(uintptr_t *dat, uintptr_t *weight, int *n, mreal *v1, mreal *v2, int *nsub);
/// Get array which values is result of interpolation this for coordinates from other arrays
-HMDT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm);
-uintptr_t mgl_data_evaluate_(uintptr_t *dat, uintptr_t *idat, uintptr_t *jdat, uintptr_t *kdat, int *norm);
+HMDT MGL_EXPORT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm);
+uintptr_t MGL_EXPORT mgl_data_evaluate_(uintptr_t *dat, uintptr_t *idat, uintptr_t *jdat, uintptr_t *kdat, int *norm);
/// Set as the data envelop
-void mgl_data_envelop(HMDT dat, char dir);
-void mgl_data_envelop_(uintptr_t *dat, const char *dir, int);
+void MGL_EXPORT mgl_data_envelop(HMDT dat, char dir);
+void MGL_EXPORT mgl_data_envelop_(uintptr_t *dat, const char *dir, int);
/// Remove phase jump
-void mgl_data_sew(HMDT dat, const char *dirs, mreal da);
-void mgl_data_sew_(uintptr_t *dat, const char *dirs, mreal *da, int);
+void MGL_EXPORT mgl_data_sew(HMDT dat, const char *dirs, mreal da);
+void MGL_EXPORT mgl_data_sew_(uintptr_t *dat, const char *dirs, mreal *da, int);
/// Crop the data
-void mgl_data_crop(HMDT dat, long n1, long n2, char dir);
-void mgl_data_crop_(uintptr_t *dat, int *n1, int *n2, const char *dir,int);
+void MGL_EXPORT mgl_data_crop(HMDT dat, long n1, long n2, char dir);
+void MGL_EXPORT mgl_data_crop_(uintptr_t *dat, int *n1, int *n2, const char *dir,int);
/// Remove rows with duplicate values in column id
-void mgl_data_clean(HMDT dat, long id);
-void mgl_data_clean_(uintptr_t *dat, int *id);
+void MGL_EXPORT mgl_data_clean(HMDT dat, long id);
+void MGL_EXPORT mgl_data_clean_(uintptr_t *dat, int *id);
/// Multiply the data by other one for each element
-void mgl_data_mul_dat(HMDT dat, HCDT d);
-void mgl_data_mul_dat_(uintptr_t *dat, uintptr_t *d);
+void MGL_EXPORT mgl_data_mul_dat(HMDT dat, HCDT d);
+void MGL_EXPORT mgl_data_mul_dat_(uintptr_t *dat, uintptr_t *d);
/// Divide the data by other one for each element
-void mgl_data_div_dat(HMDT dat, HCDT d);
-void mgl_data_div_dat_(uintptr_t *dat, uintptr_t *d);
+void MGL_EXPORT mgl_data_div_dat(HMDT dat, HCDT d);
+void MGL_EXPORT mgl_data_div_dat_(uintptr_t *dat, uintptr_t *d);
/// Add the other data
-void mgl_data_add_dat(HMDT dat, HCDT d);
-void mgl_data_add_dat_(uintptr_t *dat, uintptr_t *d);
+void MGL_EXPORT mgl_data_add_dat(HMDT dat, HCDT d);
+void MGL_EXPORT mgl_data_add_dat_(uintptr_t *dat, uintptr_t *d);
/// Subtract the other data
-void mgl_data_sub_dat(HMDT dat, HCDT d);
-void mgl_data_sub_dat_(uintptr_t *dat, uintptr_t *d);
+void MGL_EXPORT mgl_data_sub_dat(HMDT dat, HCDT d);
+void MGL_EXPORT mgl_data_sub_dat_(uintptr_t *dat, uintptr_t *d);
/// Multiply each element by the number
-void mgl_data_mul_num(HMDT dat, mreal d);
-void mgl_data_mul_num_(uintptr_t *dat, mreal *d);
+void MGL_EXPORT mgl_data_mul_num(HMDT dat, mreal d);
+void MGL_EXPORT mgl_data_mul_num_(uintptr_t *dat, mreal *d);
/// Divide each element by the number
-void mgl_data_div_num(HMDT dat, mreal d);
-void mgl_data_div_num_(uintptr_t *dat, mreal *d);
+void MGL_EXPORT mgl_data_div_num(HMDT dat, mreal d);
+void MGL_EXPORT mgl_data_div_num_(uintptr_t *dat, mreal *d);
/// Add the number
-void mgl_data_add_num(HMDT dat, mreal d);
-void mgl_data_add_num_(uintptr_t *dat, mreal *d);
+void MGL_EXPORT mgl_data_add_num(HMDT dat, mreal d);
+void MGL_EXPORT mgl_data_add_num_(uintptr_t *dat, mreal *d);
/// Subtract the number
-void mgl_data_sub_num(HMDT dat, mreal d);
-void mgl_data_sub_num_(uintptr_t *dat, mreal *d);
+void MGL_EXPORT mgl_data_sub_num(HMDT dat, mreal d);
+void MGL_EXPORT mgl_data_sub_num_(uintptr_t *dat, mreal *d);
/// Saves result of PDE solving (|u|^2) for "Hamiltonian" ham with initial conditions ini
-HMDT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz, mreal k0,const char *opt);
-uintptr_t mgl_pde_solve_(uintptr_t* gr, const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, mreal *dz, mreal *k0,const char *opt,int,int);
+HMDT MGL_EXPORT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz, mreal k0,const char *opt);
+uintptr_t MGL_EXPORT mgl_pde_solve_(uintptr_t* gr, const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, mreal *dz, mreal *k0,const char *opt,int,int);
/// Saves result of PDE solving for "Hamiltonian" ham with initial conditions ini along a curve ray (must have nx>=7 - x,y,z,px,py,pz,tau or nx=5 - x,y,px,py,tau)
-HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray, mreal r, mreal k0, HMDT xx, HMDT yy);
-uintptr_t mgl_qo2d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, int);
+HMDT MGL_EXPORT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray, mreal r, mreal k0, HMDT xx, HMDT yy);
+HMDT MGL_EXPORT mgl_qo2d_func(dual (*ham)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par), void *par, HCDT ini_re, HCDT ini_im, HCDT ray, mreal r, mreal k0, HMDT xx, HMDT yy);
+uintptr_t MGL_EXPORT mgl_qo2d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, int);
+/// Saves result of PDE solving for "Hamiltonian" ham with initial conditions ini along a curve ray (must have nx>=7 - x,y,z,px,py,pz,tau or nx=5 - x,y,px,py,tau)
+HMDT MGL_EXPORT mgl_qo3d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray, mreal r, mreal k0, HMDT xx, HMDT yy, HMDT zz);
+HMDT MGL_EXPORT mgl_qo3d_func(dual (*ham)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par), void *par, HCDT ini_re, HCDT ini_im, HCDT ray, mreal r, mreal k0, HMDT xx, HMDT yy, HMDT zz);
+uintptr_t MGL_EXPORT mgl_qo3d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, uintptr_t* zz, int);
/// Finds ray with starting point r0, p0 (and prepares ray data for mgl_qo2d_solve)
-HMDT mgl_ray_trace(const char *ham, mreal x0, mreal y0, mreal z0, mreal px, mreal py, mreal pz, mreal dt, mreal tmax);
-uintptr_t mgl_ray_trace_(const char *ham, mreal *x0, mreal *y0, mreal *z0, mreal *px, mreal *py, mreal *pz, mreal *dt, mreal *tmax,int);
+HMDT MGL_EXPORT mgl_ray_trace(const char *ham, mreal x0, mreal y0, mreal z0, mreal px, mreal py, mreal pz, mreal dt, mreal tmax);
+uintptr_t MGL_EXPORT mgl_ray_trace_(const char *ham, mreal *x0, mreal *y0, mreal *z0, mreal *px, mreal *py, mreal *pz, mreal *dt, mreal *tmax,int);
/// Calculate Jacobian determinant for D{x(u,v), y(u,v)} = dx/du*dy/dv-dx/dv*dy/du
-HMDT mgl_jacobian_2d(HCDT x, HCDT y);
-uintptr_t mgl_jacobian_2d_(uintptr_t* x, uintptr_t* y);
+HMDT MGL_EXPORT mgl_jacobian_2d(HCDT x, HCDT y);
+uintptr_t MGL_EXPORT mgl_jacobian_2d_(uintptr_t* x, uintptr_t* y);
/// Calculate Jacobian determinant for D{x(u,v,w), y(u,v,w), z(u,v,w)}
-HMDT mgl_jacobian_3d(HCDT x, HCDT y, HCDT z);
-uintptr_t mgl_jacobian_3d_(uintptr_t* x, uintptr_t* y, uintptr_t* z);
+HMDT MGL_EXPORT mgl_jacobian_3d(HCDT x, HCDT y, HCDT z);
+uintptr_t MGL_EXPORT mgl_jacobian_3d_(uintptr_t* x, uintptr_t* y, uintptr_t* z);
/// Integral data transformation (like Fourier 'f' or 'i', Hankel 'h' or None 'n') for amplitude and phase
-HMDT mgl_transform_a(HCDT am, HCDT ph, const char *tr);
-uintptr_t mgl_transform_a_(uintptr_t *am, uintptr_t *ph, const char *tr, int);
+HMDT MGL_EXPORT mgl_transform_a(HCDT am, HCDT ph, const char *tr);
+uintptr_t MGL_EXPORT mgl_transform_a_(uintptr_t *am, uintptr_t *ph, const char *tr, int);
/// Integral data transformation (like Fourier 'f' or 'i', Hankel 'h' or None 'n') for real and imaginary parts
-HMDT mgl_transform(HCDT re, HCDT im, const char *tr);
-uintptr_t mgl_transform_(uintptr_t *re, uintptr_t *im, const char *tr, int);
+HMDT MGL_EXPORT mgl_transform(HCDT re, HCDT im, const char *tr);
+uintptr_t MGL_EXPORT mgl_transform_(uintptr_t *re, uintptr_t *im, const char *tr, int);
/// Apply Fourier transform for the data and save result into it
-void mgl_data_fourier(HMDT re, HMDT im, const char *dir);
-void mgl_data_fourier_(uintptr_t *re, uintptr_t *im, const char *dir, int l);
+void MGL_EXPORT mgl_data_fourier(HMDT re, HMDT im, const char *dir);
+void MGL_EXPORT mgl_data_fourier_(uintptr_t *re, uintptr_t *im, const char *dir, int l);
/// Short time Fourier analysis for real and imaginary parts. Output is amplitude of partial Fourier (result will have size {dn, floor(nx/dn), ny} for dir='x'
-HMDT mgl_data_stfa(HCDT re, HCDT im, long dn, char dir);
-uintptr_t mgl_data_stfa_(uintptr_t *re, uintptr_t *im, int *dn, char *dir, int);
+HMDT MGL_EXPORT mgl_data_stfa(HCDT re, HCDT im, long dn, char dir);
+uintptr_t MGL_EXPORT mgl_data_stfa_(uintptr_t *re, uintptr_t *im, int *dn, char *dir, int);
/// Do something like Delone triangulation for 3d points
-HMDT mgl_triangulation_3d(HCDT x, HCDT y, HCDT z);
-uintptr_t mgl_triangulation_3d_(uintptr_t *x, uintptr_t *y, uintptr_t *z);
+HMDT MGL_EXPORT mgl_triangulation_3d(HCDT x, HCDT y, HCDT z);
+uintptr_t MGL_EXPORT mgl_triangulation_3d_(uintptr_t *x, uintptr_t *y, uintptr_t *z);
/// Do Delone triangulation for 2d points
-HMDT mgl_triangulation_2d(HCDT x, HCDT y);
-uintptr_t mgl_triangulation_2d_(uintptr_t *x, uintptr_t *y);
+HMDT MGL_EXPORT mgl_triangulation_2d(HCDT x, HCDT y);
+uintptr_t MGL_EXPORT mgl_triangulation_2d_(uintptr_t *x, uintptr_t *y);
#ifdef __cplusplus
}
diff --git a/include/mgl2/datac_cf.h b/include/mgl2/datac_cf.h
index 80ca34c..8404d76 100644
--- a/include/mgl2/datac_cf.h
+++ b/include/mgl2/datac_cf.h
@@ -39,172 +39,172 @@ typedef void *HADT;
#endif
/// Create HMDT object
-HADT mgl_create_datac();
-uintptr_t mgl_create_datac_();
+HADT MGL_EXPORT mgl_create_datac();
+uintptr_t MGL_EXPORT mgl_create_datac_();
/// Create HMDT object with specified sizes
-HADT mgl_create_datac_size(long nx, long ny, long nz);
-uintptr_t mgl_create_datac_size_(int *nx, int *ny, int *nz);
+HADT MGL_EXPORT mgl_create_datac_size(long nx, long ny, long nz);
+uintptr_t MGL_EXPORT mgl_create_datac_size_(int *nx, int *ny, int *nz);
/// Create HMDT object with data from file
-HADT mgl_create_datac_file(const char *fname);
-uintptr_t mgl_create_datac_file_(const char *fname, int len);
+HADT MGL_EXPORT mgl_create_datac_file(const char *fname);
+uintptr_t MGL_EXPORT mgl_create_datac_file_(const char *fname, int len);
/// Delete HMDT object
-void mgl_delete_datac(HADT dat);
-void mgl_delete_datac_(uintptr_t *dat);
+void MGL_EXPORT mgl_delete_datac(HADT dat);
+void MGL_EXPORT mgl_delete_datac_(uintptr_t *dat);
/// Rearange data dimensions
-void mgl_datac_rearrange(HADT dat, long mx,long my,long mz);
-void mgl_datac_rearrange_(uintptr_t *dat, int *mx, int *my, int *mz);
+void MGL_EXPORT mgl_datac_rearrange(HADT dat, long mx,long my,long mz);
+void MGL_EXPORT mgl_datac_rearrange_(uintptr_t *dat, int *mx, int *my, int *mz);
/// Link external data array (don't delete it at exit)
-void mgl_datac_link(HADT dat, dual *A,long mx,long my,long mz);
-void mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz);
+void MGL_EXPORT mgl_datac_link(HADT dat, dual *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz);
/// Allocate memory and copy the data from the (float *) array
-void mgl_datac_set_float(HADT dat, const float *A,long mx,long my,long mz);
-void mgl_datac_set_float_(uintptr_t *dat, const float *A,int *NX,int *NY,int *NZ);
+void MGL_EXPORT mgl_datac_set_float(HADT dat, const float *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_datac_set_float_(uintptr_t *dat, const float *A,int *NX,int *NY,int *NZ);
/// Allocate memory and copy the data from the (double *) array
-void mgl_datac_set_double(HADT dat, const double *A,long mx,long my,long mz);
-void mgl_datac_set_double_(uintptr_t *dat, const double *A,int *NX,int *NY,int *NZ);
+void MGL_EXPORT mgl_datac_set_double(HADT dat, const double *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_datac_set_double_(uintptr_t *dat, const double *A,int *NX,int *NY,int *NZ);
/// Allocate memory and copy the data from the (dual *) array
-void mgl_datac_set_complex(HADT dat, const dual *A,long mx,long my,long mz);
-void mgl_datac_set_complex_(uintptr_t *d, const dual *A,int *NX,int *NY,int *NZ);
+void MGL_EXPORT mgl_datac_set_complex(HADT dat, const dual *A,long mx,long my,long mz);
+void MGL_EXPORT mgl_datac_set_complex_(uintptr_t *d, const dual *A,int *NX,int *NY,int *NZ);
/// Import data from abstract type
-void mgl_datac_set(HADT dat, HCDT a);
-void mgl_datac_set_(uintptr_t *dat, uintptr_t *a);
+void MGL_EXPORT mgl_datac_set(HADT dat, HCDT a);
+void MGL_EXPORT mgl_datac_set_(uintptr_t *dat, uintptr_t *a);
/// Allocate memory and copy the data from the gsl_vector
-void mgl_datac_set_vector(HADT dat, gsl_vector *v);
+void MGL_EXPORT mgl_datac_set_vector(HADT dat, gsl_vector *v);
/// Allocate memory and copy the data from the gsl_matrix
-void mgl_datac_set_matrix(HADT dat, gsl_matrix *m);
+void MGL_EXPORT mgl_datac_set_matrix(HADT dat, gsl_matrix *m);
/// Set value of data element [i,j,k]
-void mgl_datac_set_value(HADT dat, dual v, long i, long j, long k);
-void mgl_datac_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k);
+void MGL_EXPORT mgl_datac_set_value(HADT dat, dual v, long i, long j, long k);
+void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k);
/// Get value of data element [i,j,k]
-dual mgl_datac_get_value(HCDT dat, long i, long j, long k);
+dual MGL_EXPORT mgl_datac_get_value(HCDT dat, long i, long j, long k);
/// Allocate memory and scanf the data from the string
-void mgl_datac_set_values(HADT dat, const char *val, long nx, long ny, long nz);
-void mgl_datac_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l);
+void MGL_EXPORT mgl_datac_set_values(HADT dat, const char *val, long nx, long ny, long nz);
+void MGL_EXPORT mgl_datac_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l);
/// Returns pointer to internal data array
-dual *mgl_datac_data(HADT dat);
+MGL_EXPORT dual *mgl_datac_data(HADT dat);
/// Returns pointer to data element [i,j,k]
-dual *mgl_datac_value(HADT dat, long i,long j,long k);
+MGL_EXPORT dual *mgl_datac_value(HADT dat, long i,long j,long k);
/// Set the data from HCDT objects for real and imaginary parts
-void mgl_datac_set_ri(HADT dat, HCDT re, HCDT im);
-void mgl_datac_set_ri_(uintptr_t *dat, uintptr_t *re, uintptr_t *im);
+void MGL_EXPORT mgl_datac_set_ri(HADT dat, HCDT re, HCDT im);
+void MGL_EXPORT mgl_datac_set_ri_(uintptr_t *dat, uintptr_t *re, uintptr_t *im);
/// Set the data from HCDT objects as amplitude and phase of complex data
-void mgl_datac_set_ap(HADT dat, HCDT abs, HCDT phi);
-void mgl_datac_set_ap_(uintptr_t *dat, uintptr_t *abs, uintptr_t *phi);
+void MGL_EXPORT mgl_datac_set_ap(HADT dat, HCDT abs, HCDT phi);
+void MGL_EXPORT mgl_datac_set_ap_(uintptr_t *dat, uintptr_t *abs, uintptr_t *phi);
/// Read data from tab-separated text file with auto determining size
-int mgl_datac_read(HADT dat, const char *fname);
-int mgl_datac_read_(uintptr_t *d, const char *fname,int l);
+int MGL_EXPORT mgl_datac_read(HADT dat, const char *fname);
+int MGL_EXPORT mgl_datac_read_(uintptr_t *d, const char *fname,int l);
/// Read data from text file with size specified at beginning of the file
-int mgl_datac_read_mat(HADT dat, const char *fname, long dim);
-int mgl_datac_read_mat_(uintptr_t *dat, const char *fname, int *dim, int);
+int MGL_EXPORT mgl_datac_read_mat(HADT dat, const char *fname, long dim);
+int MGL_EXPORT mgl_datac_read_mat_(uintptr_t *dat, const char *fname, int *dim, int);
/// Read data from text file with specifeid size
-int mgl_datac_read_dim(HADT dat, const char *fname,long mx,long my,long mz);
-int mgl_datac_read_dim_(uintptr_t *dat, const char *fname,int *mx,int *my,int *mz,int);
+int MGL_EXPORT mgl_datac_read_dim(HADT dat, const char *fname,long mx,long my,long mz);
+int MGL_EXPORT mgl_datac_read_dim_(uintptr_t *dat, const char *fname,int *mx,int *my,int *mz,int);
/// Read data from tab-separated text files with auto determining size which filenames are result of sprintf(fname,templ,t) where t=from:step:to
-int mgl_datac_read_range(HADT d, const char *templ, double from, double to, double step, int as_slice);
-int mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l);
+int MGL_EXPORT mgl_datac_read_range(HADT d, const char *templ, double from, double to, double step, int as_slice);
+int MGL_EXPORT mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l);
/// Read data from tab-separated text files with auto determining size which filenames are satisfied to template (like "t_*.dat")
-int mgl_datac_read_all(HADT dat, const char *templ, int as_slice);
-int mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l);
+int MGL_EXPORT mgl_datac_read_all(HADT dat, const char *templ, int as_slice);
+int MGL_EXPORT mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l);
/// Save whole data array (for ns=-1) or only ns-th slice to text file
-void mgl_datac_save(HCDT dat, const char *fname,long ns);
-void mgl_datac_save_(uintptr_t *dat, const char *fname,int *ns,int);
+void MGL_EXPORT mgl_datac_save(HCDT dat, const char *fname,long ns);
+void MGL_EXPORT mgl_datac_save_(uintptr_t *dat, const char *fname,int *ns,int);
/// Read data array from HDF file (parse HDF4 and HDF5 files)
-int mgl_datac_read_hdf(HADT d,const char *fname,const char *data);
-int mgl_datac_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n);
+int MGL_EXPORT mgl_datac_read_hdf(HADT d,const char *fname,const char *data);
+int MGL_EXPORT mgl_datac_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n);
/// Save data to HDF file
-void mgl_datac_save_hdf(HCDT d,const char *fname,const char *data,int rewrite);
-void mgl_datac_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n);
+void MGL_EXPORT mgl_datac_save_hdf(HCDT d,const char *fname,const char *data,int rewrite);
+void MGL_EXPORT mgl_datac_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n);
/// Create or recreate the array with specified size and fill it by zero
-void mgl_datac_create(HADT dat, long nx,long ny,long nz);
-void mgl_datac_create_(uintptr_t *dat, int *nx,int *ny,int *nz);
+void MGL_EXPORT mgl_datac_create(HADT dat, long nx,long ny,long nz);
+void MGL_EXPORT mgl_datac_create_(uintptr_t *dat, int *nx,int *ny,int *nz);
/// Transpose dimensions of the data (generalization of Transpose)
-void mgl_datac_transpose(HADT dat, const char *dim);
-void mgl_datac_transpose_(uintptr_t *dat, const char *dim,int);
+void MGL_EXPORT mgl_datac_transpose(HADT dat, const char *dim);
+void MGL_EXPORT mgl_datac_transpose_(uintptr_t *dat, const char *dim,int);
/// Set names for columns (slices)
-void mgl_datac_set_id(HADT d, const char *id);
-void mgl_datac_set_id_(uintptr_t *dat, const char *id,int l);
+void MGL_EXPORT mgl_datac_set_id(HADT d, const char *id);
+void MGL_EXPORT mgl_datac_set_id_(uintptr_t *dat, const char *id,int l);
/// Equidistantly fill the data to range [x1,x2] in direction dir
-void mgl_datac_fill(HADT dat, dual x1,dual x2,char dir);
-void mgl_datac_fill_(uintptr_t *dat, mreal *x1,mreal *x2,const char *dir,int);
+void MGL_EXPORT mgl_datac_fill(HADT dat, dual x1,dual x2,char dir);
+void MGL_EXPORT mgl_datac_fill_(uintptr_t *dat, mreal *x1,mreal *x2,const char *dir,int);
/// Modify the data by specified formula assuming x,y,z in range [r1,r2]
-void mgl_datac_fill_eq(HMGL gr, HADT dat, const char *eq, HCDT vdat, HCDT wdat,const char *opt);
-void mgl_datac_fill_eq_(uintptr_t *gr, uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,const char *opt, int, int);
+void MGL_EXPORT mgl_datac_fill_eq(HMGL gr, HADT dat, const char *eq, HCDT vdat, HCDT wdat,const char *opt);
+void MGL_EXPORT mgl_datac_fill_eq_(uintptr_t *gr, uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,const char *opt, int, int);
/// Modify the data by specified formula
-void mgl_datac_modify(HADT dat, const char *eq,long dim);
-void mgl_datac_modify_(uintptr_t *dat, const char *eq,int *dim,int);
+void MGL_EXPORT mgl_datac_modify(HADT dat, const char *eq,long dim);
+void MGL_EXPORT mgl_datac_modify_(uintptr_t *dat, const char *eq,int *dim,int);
/// Modify the data by specified formula
-void mgl_datac_modify_vw(HADT dat, const char *eq,HCDT vdat,HCDT wdat);
-void mgl_datac_modify_vw_(uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,int);
+void MGL_EXPORT mgl_datac_modify_vw(HADT dat, const char *eq,HCDT vdat,HCDT wdat);
+void MGL_EXPORT mgl_datac_modify_vw_(uintptr_t *dat, const char *eq, uintptr_t *vdat, uintptr_t *wdat,int);
/// Reduce size of the data
-void mgl_datac_squeeze(HADT dat, long rx,long ry,long rz,long smooth);
-void mgl_datac_squeeze_(uintptr_t *dat, int *rx,int *ry,int *rz,int *smooth);
+void MGL_EXPORT mgl_datac_squeeze(HADT dat, long rx,long ry,long rz,long smooth);
+void MGL_EXPORT mgl_datac_squeeze_(uintptr_t *dat, int *rx,int *ry,int *rz,int *smooth);
/// Extend data dimensions
-void mgl_datac_extend(HADT dat, long n1, long n2);
-void mgl_datac_extend_(uintptr_t *dat, int *n1, int *n2);
+void MGL_EXPORT mgl_datac_extend(HADT dat, long n1, long n2);
+void MGL_EXPORT mgl_datac_extend_(uintptr_t *dat, int *n1, int *n2);
/// Insert data rows/columns/slices
-void mgl_datac_insert(HADT dat, char dir, long at, long num);
-void mgl_datac_insert_(uintptr_t *dat, const char *dir, int *at, int *num, int);
+void MGL_EXPORT mgl_datac_insert(HADT dat, char dir, long at, long num);
+void MGL_EXPORT mgl_datac_insert_(uintptr_t *dat, const char *dir, int *at, int *num, int);
/// Delete data rows/columns/slices
-void mgl_datac_delete(HADT dat, char dir, long at, long num);
-void mgl_datac_delete_(uintptr_t *dat, const char *dir, int *at, int *num, int);
+void MGL_EXPORT mgl_datac_delete(HADT dat, char dir, long at, long num);
+void MGL_EXPORT mgl_datac_delete_(uintptr_t *dat, const char *dir, int *at, int *num, int);
/// Smooth the data on specified direction or directions
-void mgl_datac_smooth(HADT d, const char *dirs, mreal delta);
-void mgl_datac_smooth_(uintptr_t *dat, const char *dirs, mreal *delta,int);
+void MGL_EXPORT mgl_datac_smooth(HADT d, const char *dirs, mreal delta);
+void MGL_EXPORT mgl_datac_smooth_(uintptr_t *dat, const char *dirs, mreal *delta,int);
/// Cumulative summation the data in given direction or directions
-void mgl_datac_cumsum(HADT dat, const char *dir);
-void mgl_datac_cumsum_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_cumsum(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_cumsum_(uintptr_t *dat, const char *dir,int);
/// Integrate (cumulative summation) the data in given direction or directions
-void mgl_datac_integral(HADT dat, const char *dir);
-void mgl_datac_integral_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_integral(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_integral_(uintptr_t *dat, const char *dir,int);
/// Differentiate the data in given direction or directions
-void mgl_datac_diff(HADT dat, const char *dir);
-void mgl_datac_diff_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_diff(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_diff_(uintptr_t *dat, const char *dir,int);
/// Double-differentiate (like Laplace operator) the data in given direction
-void mgl_datac_diff2(HADT dat, const char *dir);
-void mgl_datac_diff2_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_diff2(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_diff2_(uintptr_t *dat, const char *dir,int);
/// Swap left and right part of the data in given direction (useful for Fourier spectrum)
-void mgl_datac_swap(HADT dat, const char *dir);
-void mgl_datac_swap_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_swap(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_swap_(uintptr_t *dat, const char *dir,int);
/// Roll data along direction dir by num slices
-void mgl_datac_roll(HADT dat, char dir, long num);
-void mgl_datac_roll_(uintptr_t *dat, const char *dir, int *num, int);
+void MGL_EXPORT mgl_datac_roll(HADT dat, char dir, long num);
+void MGL_EXPORT mgl_datac_roll_(uintptr_t *dat, const char *dir, int *num, int);
/// Mirror the data in given direction (useful for Fourier spectrum)
-void mgl_datac_mirror(HADT dat, const char *dir);
-void mgl_datac_mirror_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_mirror(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_mirror_(uintptr_t *dat, const char *dir,int);
/// Crop the data
-void mgl_datac_crop(HADT dat, long n1, long n2, char dir);
-void mgl_data_crop_(uintptr_t *dat, int *n1, int *n2, const char *dir,int);
+void MGL_EXPORT mgl_datac_crop(HADT dat, long n1, long n2, char dir);
+void MGL_EXPORT mgl_data_crop_(uintptr_t *dat, int *n1, int *n2, const char *dir,int);
/// Apply Hankel transform
-void mgl_datac_hankel(HADT dat, const char *dir);
-void mgl_datac_hankel_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_hankel(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_hankel_(uintptr_t *dat, const char *dir,int);
/// Apply Fourier transform
-void mgl_datac_fft(HADT dat, const char *dir);
-void mgl_datac_fft_(uintptr_t *dat, const char *dir,int);
+void MGL_EXPORT mgl_datac_fft(HADT dat, const char *dir);
+void MGL_EXPORT mgl_datac_fft_(uintptr_t *dat, const char *dir,int);
-HMDT mgl_datac_real(HCDT dat);
-uintptr_t mgl_datac_real_(uintptr_t *dat);
-HMDT mgl_datac_imag(HCDT dat);
-uintptr_t mgl_datac_imag_(uintptr_t *dat);
-HMDT mgl_datac_abs(HCDT dat);
-uintptr_t mgl_datac_abs_(uintptr_t *dat);
-HMDT mgl_datac_arg(HCDT dat);
-uintptr_t mgl_datac_arg_(uintptr_t *dat);
+HMDT MGL_EXPORT mgl_datac_real(HCDT dat);
+uintptr_t MGL_EXPORT mgl_datac_real_(uintptr_t *dat);
+HMDT MGL_EXPORT mgl_datac_imag(HCDT dat);
+uintptr_t MGL_EXPORT mgl_datac_imag_(uintptr_t *dat);
+HMDT MGL_EXPORT mgl_datac_abs(HCDT dat);
+uintptr_t MGL_EXPORT mgl_datac_abs_(uintptr_t *dat);
+HMDT MGL_EXPORT mgl_datac_arg(HCDT dat);
+uintptr_t MGL_EXPORT mgl_datac_arg_(uintptr_t *dat);
/// Interpolate by linear function the data to given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-dual mgl_datac_linear(HCDT d, mreal x,mreal y,mreal z);
-dual mgl_datac_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z);
+dual MGL_EXPORT mgl_datac_linear(HCDT d, mreal x,mreal y,mreal z);
+dual MGL_EXPORT mgl_datac_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z);
/// Interpolate by linear function the data and return its derivatives at given point x=[0...nx-1], y=[0...ny-1], z=[0...nz-1]
-dual mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dual *dz);
-dual mgl_datac_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, dual *dx,dual *dy,dual *dz);
+dual MGL_EXPORT mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dual *dz);
+dual MGL_EXPORT mgl_datac_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, dual *dx,dual *dy,dual *dz);
#ifdef __cplusplus
}
diff --git a/include/mgl2/define.h b/include/mgl2/define.h
index 249e6b8..47d823d 100644
--- a/include/mgl2/define.h
+++ b/include/mgl2/define.h
@@ -21,8 +21,9 @@
#define _MGL_DEFINE_H_
//-----------------------------------------------------------------------------
#include "mgl2/config.h"
+#include "mgl2/dllexport.h"
-#define MGL_VER2 1.1
+#define MGL_VER2 1.2
//-----------------------------------------------------------------------------
#ifdef WIN32 //_MSC_VER needs this before math.h
#define _USE_MATH_DEFINES
@@ -165,9 +166,8 @@ enum{ // Codes for warnings/messages
mglWarnEnd // Maximal number of warnings (must be last)
};
//-----------------------------------------------------------------------------
-#ifndef MGL_DEF_PAL
#define MGL_DEF_PAL "bgrcmyhlnqeupH" // default palette
-#endif
+#define MGL_DEF_SCH "BbcyrR" // default palette
#define MGL_COLORS "kwrgbcymhWRGBCYMHlenpquLENPQU"
//-----------------------------------------------------------------------------
#define MGL_TRANSP_NORM 0x000000
@@ -241,7 +241,7 @@ void mglStartThreadV(void *(*func)(void *), long n, dual *a, const void *b=0,
void mglStartThreadC(void *(*func)(void *), void (*post)(mglThreadC *,dual *), long n,
dual *a=0, const dual *b=0, const dual *c=0, const long *p=0,
const void *v=0, const dual *d=0, const dual *e=0, const char *s=0);
-extern int mglNumThr; ///< Number of thread for plotting and data handling
+MGL_EXPORT extern int mglNumThr; ///< Number of thread for plotting and data handling
//-----------------------------------------------------------------------------
extern "C" {
#else
@@ -252,17 +252,22 @@ typedef double _Complex dual;
typedef float _Complex dual;
#endif
#endif
-/** Find symbol in string excluding {} and return its position or NULL */
+/// Check if string contain color id and return its number
+long MGL_EXPORT mgl_have_color(const char *stl);
+/// Find symbol in string excluding {} and return its position or NULL
const char *mglchr(const char *str, char ch);
-/** Set number of thread for plotting and data handling*/
-void mgl_set_num_thr(int n);
-void mgl_test_txt(const char *str, ...);
-void mgl_set_test_mode(int enable);
-/** Remove spaces at begining and at the end of the string */
-void mgl_strtrim(char *str);
-void mgl_wcstrim(wchar_t *str);
+/// Set number of thread for plotting and data handling
+void MGL_EXPORT mgl_set_num_thr(int n);
+void MGL_EXPORT mgl_test_txt(const char *str, ...);
+void MGL_EXPORT mgl_set_test_mode(int enable);
+/// Remove spaces at begining and at the end of the string
+void MGL_EXPORT mgl_strtrim(char *str);
+void MGL_EXPORT mgl_wcstrim(wchar_t *str);
/** Change register to lowercase (only for ANSI symbols) */
-void mgl_strlwr(char *str);
+void MGL_EXPORT mgl_strlwr(char *str);
+void MGL_EXPORT mgl_wcslwr(wchar_t *str);
+/// Convert wchar_t* string into char* one
+void MGL_EXPORT mgl_wcstombs(char *dst, const wchar_t *src, int size);
#ifdef __cplusplus
}
#endif
diff --git a/include/mgl2/fit.h b/include/mgl2/fit.h
index 6ac673c..8ab759a 100644
--- a/include/mgl2/fit.h
+++ b/include/mgl2/fit.h
@@ -27,41 +27,41 @@ extern "C" {
//-----------------------------------------------------------------------------
extern int mglFitPnts; ///< Number of output points in fitting
extern char mglFitRes[1024]; ///< Last fitted formula
-HMDT mgl_fit_1(HMGL gr, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_2(HMGL gr, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_3(HMGL gr, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xy(HMGL gr, HCDT x, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xyza(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_ys(HMGL gr, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xys(HMGL gr, HCDT x, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xyzs(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
-HMDT mgl_fit_xyzas(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_1(HMGL gr, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_2(HMGL gr, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_3(HMGL gr, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xy(HMGL gr, HCDT x, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xyza(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_ys(HMGL gr, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xys(HMGL gr, HCDT x, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xyzs(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
+HMDT MGL_EXPORT mgl_fit_xyzas(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt);
-const char *mgl_get_fit(HMGL gr);
+MGL_EXPORT const char *mgl_get_fit(HMGL gr);
-HMDT mgl_hist_x(HMGL gr, HCDT x, HCDT a, const char *opt);
-HMDT mgl_hist_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *opt);
-HMDT mgl_hist_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *opt);
+HMDT MGL_EXPORT mgl_hist_x(HMGL gr, HCDT x, HCDT a, const char *opt);
+HMDT MGL_EXPORT mgl_hist_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *opt);
+HMDT MGL_EXPORT mgl_hist_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *opt);
-void mgl_puts_fit(HMGL gr, double x, double y, double z, const char *prefix, const char *font, double size);
+void MGL_EXPORT mgl_puts_fit(HMGL gr, double x, double y, double z, const char *prefix, const char *font, double size);
//-----------------------------------------------------------------------------
-uintptr_t mgl_fit_1_(uintptr_t* gr, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_2_(uintptr_t* gr, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_3_(uintptr_t* gr, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xyza_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_ys_(uintptr_t* gr, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xys_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xyzs_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_fit_xyzas_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_1_(uintptr_t* gr, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_2_(uintptr_t* gr, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_3_(uintptr_t* gr, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xyza_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_ys_(uintptr_t* gr, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xys_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xyzs_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
+uintptr_t MGL_EXPORT mgl_fit_xyzas_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt,int, int l, int n);
-uintptr_t mgl_hist_x_(uintptr_t* gr, uintptr_t* x, uintptr_t* a, const char *opt,int);
-uintptr_t mgl_hist_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* a, const char *opt,int);
-uintptr_t mgl_hist_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *opt,int);
+uintptr_t MGL_EXPORT mgl_hist_x_(uintptr_t* gr, uintptr_t* x, uintptr_t* a, const char *opt,int);
+uintptr_t MGL_EXPORT mgl_hist_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* a, const char *opt,int);
+uintptr_t MGL_EXPORT mgl_hist_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *opt,int);
-void mgl_puts_fit_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, const char *prefix, const char *font, mreal *size, int l, int n);
+void MGL_EXPORT mgl_puts_fit_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, const char *prefix, const char *font, mreal *size, int l, int n);
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
diff --git a/include/mgl2/fltk.h b/include/mgl2/fltk.h
index 815b604..75f45a5 100644
--- a/include/mgl2/fltk.h
+++ b/include/mgl2/fltk.h
@@ -27,13 +27,13 @@
extern "C" {
#endif
/// Creates FLTK window for plotting
-HMGL mgl_create_graph_fltk(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
-uintptr_t mgl_create_graph_fltk_(const char *title, int);
+HMGL MGL_EXPORT mgl_create_graph_fltk(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
+uintptr_t MGL_EXPORT mgl_create_graph_fltk_(const char *title, int);
/// Run main FLTK loop for event handling.
-int mgl_fltk_run();
-int mgl_fltk_run_();
+int MGL_EXPORT mgl_fltk_run();
+int MGL_EXPORT mgl_fltk_run_();
/// Run main FLTK loop for event handling in separate thread.
-int mgl_fltk_thr();
+int MGL_EXPORT mgl_fltk_thr();
#ifdef __cplusplus
}
//-----------------------------------------------------------------------------
@@ -53,6 +53,7 @@ public:
{ gr = mgl_create_graph_fltk(draw?mgl_draw_class:0,title,draw,mgl_reload_class);
mgl_set_click_func(gr, mgl_click_class); }
int Run() { return mgl_fltk_run(); } ///< Run main loop for event handling
+ int RunThr() { return mgl_fltk_thr(); } ///< Run main loop for event handling in separate thread
};
//-----------------------------------------------------------------------------
#ifdef __MWERKS__
@@ -169,8 +170,8 @@ protected:
void setoff(int &val, Fl_Button *b, const char *txt=NULL);
};
//-----------------------------------------------------------------------------
-void mgl_ask_fltk(const wchar_t *quest, wchar_t *res);
-void mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w);
+void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res);
+void MGL_EXPORT mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w);
//-----------------------------------------------------------------------------
#endif
#endif
diff --git a/include/mgl2/glut.h b/include/mgl2/glut.h
index 2febc46..2a23ab1 100644
--- a/include/mgl2/glut.h
+++ b/include/mgl2/glut.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_glut.h is part of Math Graphic Library
+ * glut.h is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -26,7 +26,7 @@
extern "C" {
#endif
void _mgl_key_up(unsigned char ch,int ,int );
-HMGL mgl_create_graph_glut(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
+HMGL MGL_EXPORT mgl_create_graph_glut(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
#ifdef __cplusplus
}
//-----------------------------------------------------------------------------
diff --git a/include/mgl2/mgl.h b/include/mgl2/mgl.h
index 583e4c3..f2af079 100644
--- a/include/mgl2/mgl.h
+++ b/include/mgl2/mgl.h
@@ -20,7 +20,6 @@
#ifndef _MGL_H_
#define _MGL_H_
-#include "mgl2/define.h"
#include "mgl2/mgl_cf.h"
#include "mgl2/data.h"
#include "mgl2/datac.h"
@@ -55,7 +54,9 @@ public:
inline void DefaultPlotParam() { mgl_set_def_param(gr); }
/// Set name of plot for saving filename
inline void SetPlotId(const char *id) { mgl_set_plotid(gr,id); }
-
+ /// Get name of plot for saving filename
+ inline const char *GetPlotId() { return mgl_get_plotid(gr); }
+
/// Set the transparency on/off.
inline void Alpha(bool enable) { mgl_set_alpha(gr, enable); }
/// Set default value of alpha-channel
@@ -271,6 +272,8 @@ public:
inline void SetSize(int width, int height) { mgl_set_size(gr, width, height); }
/// Set plot quality
inline void SetQuality(int qual=MGL_DRAW_NORM) { mgl_set_quality(gr, qual); }
+ /// Get plot quality
+ inline int GetQuality() { return mgl_get_quality(gr); }
/// Start group of objects
inline void StartGroup(const char *name) { mgl_start_group(gr, name); }
/// End group of objects
@@ -316,6 +319,9 @@ public:
/// Write the frame in file using OBJ format
inline void WriteOBJ(const char *fname,const char *descr="",bool use_png=true)
{ mgl_write_obj(gr, fname, descr, use_png); }
+ /// Write the frame in file using OBJ format - Balakin way
+ inline void WriteOBJold(const char *fname,const char *descr="",bool use_png=true)
+ { mgl_write_obj_old(gr, fname, descr, use_png); }
/// Write the frame in file using XYZ format
inline void WriteXYZ(const char *fname,const char *descr="")
{ mgl_write_xyz(gr, fname, descr); }
@@ -352,7 +358,7 @@ public:
/// Set drawing data for i-th frame (work if MGL_VECT_FRAME is set on). Work as EndFrame() but don't add frame to GIF image.
inline void SetFrame(int i) { mgl_set_frame(gr, i); }
/// Append drawing data from i-th frame (work if MGL_VECT_FRAME is set on)
- inline void ShowFrame(int i) { mgl_show_frame(gr, i); }
+ inline void ShowFrame(int i){ mgl_show_frame(gr, i); }
/// Start write frames to cinema using GIF format
inline void StartGIF(const char *fname, int ms=100)
@@ -1147,12 +1153,9 @@ public:
inline void VertexColor(bool enable) { mgl_set_flag(gr,enable, MGL_PREFERVC); }
/// Render only front side of surfaces for dubugging purposes (for formats that support it, now only PRC does).
inline void DoubleSided(bool enable) { mgl_set_flag(gr,!enable, MGL_ONESIDED); }
- inline void TextureColor(bool){} // NOTE: Add later -- IDTF
+// inline void TextureColor(bool){} // NOTE: Add later -- IDTF
};
//-----------------------------------------------------------------------------
-/// Callback function for asking user a question. Result shouldn't exceed 1024.
-extern void (*mgl_ask_func)(const wchar_t *quest, wchar_t *res);
-//-----------------------------------------------------------------------------
/// Structure for handling named mglData (used by mglParse class).
class mglVar : public mglData
{
diff --git a/include/mgl2/mgl_cf.h b/include/mgl2/mgl_cf.h
index a0f4902..1218230 100644
--- a/include/mgl2/mgl_cf.h
+++ b/include/mgl2/mgl_cf.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_cf.cpp is part of Math Graphic Library
+ * MGL_EXPORT mgl_cf.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -22,7 +22,7 @@
//-----------------------------------------------------------------------------
#ifdef __cplusplus
#include <mgl2/data.h>
-#include <mgl2/data.h>
+#include <mgl2/datac.h>
#endif
//-----------------------------------------------------------------------------
#include <mgl2/base_cf.h>
@@ -44,8 +44,8 @@
extern "C" {
#endif
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph_gl();
-uintptr_t mgl_create_graph_gl_();
+HMGL MGL_EXPORT mgl_create_graph_gl();
+uintptr_t MGL_EXPORT mgl_create_graph_gl_();
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
diff --git a/include/mgl2/opengl.h b/include/mgl2/opengl.h
index c4687a1..501ceee 100644
--- a/include/mgl2/opengl.h
+++ b/include/mgl2/opengl.h
@@ -22,7 +22,7 @@
//-----------------------------------------------------------------------------
#include "mgl2/canvas.h"
//-----------------------------------------------------------------------------
-class mglCanvasGL : public mglCanvas
+class MGL_EXPORT mglCanvasGL : public mglCanvas
{
public:
mglCanvasGL();
diff --git a/include/mgl2/other.h b/include/mgl2/other.h
index afa9578..7de2dfb 100644
--- a/include/mgl2/other.h
+++ b/include/mgl2/other.h
@@ -26,98 +26,98 @@ extern "C" {
#endif
/// Draw triangle mesh for points in arrays {x,y,z} with specified color c.
-void mgl_triplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_triplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_triplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_triplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw triangle mesh for points in arrays {x,y,z} with color proportional to z.
-void mgl_triplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_triplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_triplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_triplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw triangle mesh for points in arrays {x,y}
-void mgl_triplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt);
-void mgl_triplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_triplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt);
+void MGL_EXPORT mgl_triplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int,int);
/// Draw quad mesh for points in arrays {x,y,z} with specified color c.
-void mgl_quadplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_quadplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_quadplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_quadplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw quad mesh for points in arrays {x,y,z} with color proportional to z.
-void mgl_quadplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_quadplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_quadplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_quadplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw quad mesh for points in arrays {x,y}.
-void mgl_quadplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt);
-void mgl_quadplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_quadplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt);
+void MGL_EXPORT mgl_quadplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int,int);
/// Draw manual contour lines for triangle mesh for points in arrays {x,y,z} with specified color c.
-void mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_tricont_xyzcv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tricont_xyzcv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw manual contour lines for triangle mesh for points in arrays {x,y,z}.
-void mgl_tricont_xycv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_tricont_xycv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tricont_xycv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tricont_xycv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw contour lines for triangle mesh for points in arrays {x,y,z} with specified color c.
-void mgl_tricont_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_tricont_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_tricont_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tricont_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int, int);
/// Draw contour lines for triangle mesh for points in arrays {x,y,z}.
-void mgl_tricont_xyc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_tricont_xyc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_tricont_xyc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tricont_xyc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int, int);
/// Draw dots in points {x,y,z}.
-void mgl_dots(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_dots_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_dots(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_dots_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw semitransparent dots in points {x,y,z} with alpha a.
-void mgl_dots_a(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt);
-void mgl_dots_a_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_dots_a(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt);
+void MGL_EXPORT mgl_dots_a_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw surface reconstructed for points in arrays {x,y,z}.
-void mgl_crust(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_crust_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_crust(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_crust_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw density plot for data at x = sVal
-void mgl_dens_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_dens_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_dens_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_dens_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw density plot for data at y = sVal
-void mgl_dens_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_dens_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_dens_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_dens_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw density plot for data at z = sVal
-void mgl_dens_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_dens_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_dens_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_dens_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw contour lines for data at x = sVal
-void mgl_cont_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw contour lines for data at y = sVal
-void mgl_cont_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw contour lines for data at z = sVal
-void mgl_cont_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual contour lines for data at x = sVal
-void mgl_cont_x_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_x_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_x_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_x_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual contour lines for data at y = sVal
-void mgl_cont_y_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_y_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_y_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_y_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual contour lines for data at z = sVal
-void mgl_cont_z_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_cont_z_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_cont_z_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_cont_z_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw solid contours for data at x = sVal
-void mgl_contf_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_x(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_x_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw solid contours for data at y = sVal
-void mgl_contf_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_y(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_y_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw solid contours for data at z = sVal
-void mgl_contf_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_z(HMGL graph, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_z_(uintptr_t *graph, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual solid contours for data at x = sVal
-void mgl_contf_x_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_x_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_x_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_x_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual solid contours for data at y = sVal
-void mgl_contf_y_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_y_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_y_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_y_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
/// Draw manual solid contours for data at z = sVal
-void mgl_contf_z_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
-void mgl_contf_z_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_contf_z_val(HMGL graph, HCDT v, HCDT a, const char *stl, double sVal, const char *opt);
+void MGL_EXPORT mgl_contf_z_val_(uintptr_t *graph, uintptr_t *v, uintptr_t *a, const char *stl, mreal *sVal, const char *opt,int,int);
#ifdef __cplusplus
}
diff --git a/include/mgl2/parser.h b/include/mgl2/parser.h
index 3532a78..2a451b5 100644
--- a/include/mgl2/parser.h
+++ b/include/mgl2/parser.h
@@ -85,7 +85,7 @@ struct mglFnStack
};
//-----------------------------------------------------------------------------
/// Function for asking question in console mode
-void mgl_ask_gets(const wchar_t *quest, wchar_t *res);
+void MGL_EXPORT mgl_ask_gets(const wchar_t *quest, wchar_t *res);
//-----------------------------------------------------------------------------
/// Structure for the command argument (see mglGraph::Exec()).
class mglParser
diff --git a/include/mgl2/plot.h b/include/mgl2/plot.h
index 5e5bb27..8936917 100644
--- a/include/mgl2/plot.h
+++ b/include/mgl2/plot.h
@@ -26,159 +26,159 @@ extern "C" {
#endif
/// Draw curve for formula with x in x-axis range
-void mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt);
-void mgl_fplot_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo);
+void MGL_EXPORT mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt);
+void MGL_EXPORT mgl_fplot_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo);
/// Draw curve for formulas parametrically depended on t in range [0,1]
-void mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt);
-void mgl_fplot_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo);
+void MGL_EXPORT mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt);
+void MGL_EXPORT mgl_fplot_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo);
/// Draw radar chart (plot in curved coordinates)
-void mgl_radar(HMGL graph, HCDT a, const char *pen, const char *opt);
-void mgl_radar_(uintptr_t *gr, uintptr_t *a, const char *pen, const char *opt, int l,int lo);
+void MGL_EXPORT mgl_radar(HMGL graph, HCDT a, const char *pen, const char *opt);
+void MGL_EXPORT mgl_radar_(uintptr_t *gr, uintptr_t *a, const char *pen, const char *opt, int l,int lo);
/// Draw usual curve {x,y,z}
-void mgl_plot_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_plot_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_plot_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_plot_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw usual curve {x,y}
-void mgl_plot_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_plot_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_plot_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_plot_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw usual curve {x,y} with x in x-axis range
-void mgl_plot(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_plot_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_plot(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_plot_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw curve {x,y,z} which is colored by c (like tension plot)
-void mgl_tens_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *pen, const char *opt);
-void mgl_tens_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tens_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tens_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *pen, const char *opt,int,int);
/// Draw curve {x,y} which is colored by c (like tension plot)
-void mgl_tens_xy(HMGL graph, HCDT x, HCDT y, HCDT c, const char *pen, const char *opt);
-void mgl_tens_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tens_xy(HMGL graph, HCDT x, HCDT y, HCDT c, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tens_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int,int);
/// Draw curve {x,y} with x in x-axis range which is colored by c (like tension plot)
-void mgl_tens(HMGL graph, HCDT y, HCDT c, const char *pen, const char *opt);
-void mgl_tens_(uintptr_t *graph, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tens(HMGL graph, HCDT y, HCDT c, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tens_(uintptr_t *graph, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int,int);
/// Draw tape(s) which rotates as (bi-)normales of curve {x,y,z}
-void mgl_tape_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_tape_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tape_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tape_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw tape(s) which rotates as (bi-)normales of curve {x,y}
-void mgl_tape_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_tape_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tape_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tape_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw tape(s) which rotates as (bi-)normales of curve {x,y} with x in x-axis range
-void mgl_tape(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_tape_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tape(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tape_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw box-plot (special 5-value plot used in statistic) for data specified parametrically
-void mgl_boxplot_xy(HMGL graph, HCDT x, HCDT a, const char *pen, const char *opt);
-void mgl_boxplot_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_boxplot_xy(HMGL graph, HCDT x, HCDT a, const char *pen, const char *opt);
+void MGL_EXPORT mgl_boxplot_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw box-plot (special 5-value plot used in statistic)
-void mgl_boxplot(HMGL graph, HCDT a, const char *pen, const char *opt);
-void mgl_boxplot_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_boxplot(HMGL graph, HCDT a, const char *pen, const char *opt);
+void MGL_EXPORT mgl_boxplot_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Fill area between curve {x,y,z} and axis plane
-void mgl_area_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_area_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_area_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_area_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Fill area between curve {x,y} and axis plane
-void mgl_area_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_area_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_area_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_area_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Fill area between curve {x,y} with x in x-axis range and axis plane
-void mgl_area(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_area_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_area(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_area_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Fill area between curves {x,y1} and {x,y2}
-void mgl_region_xy(HMGL graph, HCDT x, HCDT y1, HCDT y2, const char *pen, const char *opt);
-void mgl_region_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int, int);
+void MGL_EXPORT mgl_region_xy(HMGL graph, HCDT x, HCDT y1, HCDT y2, const char *pen, const char *opt);
+void MGL_EXPORT mgl_region_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int, int);
/// Fill area between curves {x,y1} and {x,y2} with x in x-axis range
-void mgl_region(HMGL graph, HCDT y1, HCDT y2, const char *pen, const char *opt);
-void mgl_region_(uintptr_t *graph, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int, int);
+void MGL_EXPORT mgl_region(HMGL graph, HCDT y1, HCDT y2, const char *pen, const char *opt);
+void MGL_EXPORT mgl_region_(uintptr_t *graph, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int, int);
/// Draw vertical lines from points {x,y,z} to axis plane
-void mgl_stem_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_stem_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_stem_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_stem_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw vertical lines from points {x,y} to axis plane
-void mgl_stem_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_stem_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_stem_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_stem_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw vertical lines from points {x,y} with x in x-axis range to axis plane
-void mgl_stem(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_stem_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_stem(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_stem_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw stairs for points in arrays {x,y,z}
-void mgl_step_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_step_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_step_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_step_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw stairs for points in arrays {x,y}
-void mgl_step_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_step_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_step_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_step_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw stairs for points in arrays {x,y} with x in x-axis range
-void mgl_step(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_step_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_step(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_step_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw vertical bars from points {x,y,z} to axis plane
-void mgl_bars_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_bars_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_bars_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_bars_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw vertical bars from points {x,y} to axis plane
-void mgl_bars_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
-void mgl_bars_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_bars_xy(HMGL graph, HCDT x, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_bars_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw vertical bars from points {x,y} with x in x-axis range to axis plane
-void mgl_bars(HMGL graph, HCDT y, const char *pen, const char *opt);
-void mgl_bars_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_bars(HMGL graph, HCDT y, const char *pen, const char *opt);
+void MGL_EXPORT mgl_bars_(uintptr_t *graph, uintptr_t *y, const char *pen, const char *opt,int,int);
/// Draw horizontal bars from points {v,y} to axis plane
-void mgl_barh_yx(HMGL graph, HCDT y, HCDT v, const char *pen, const char *opt);
-void mgl_barh_yx_(uintptr_t *graph, uintptr_t *y, uintptr_t *v, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_barh_yx(HMGL graph, HCDT y, HCDT v, const char *pen, const char *opt);
+void MGL_EXPORT mgl_barh_yx_(uintptr_t *graph, uintptr_t *y, uintptr_t *v, const char *pen, const char *opt,int,int);
/// Draw horizontal bars from points {v,y} with y in y-axis range to axis plane
-void mgl_barh(HMGL graph, HCDT v, const char *pen, const char *opt);
-void mgl_barh_(uintptr_t *graph, uintptr_t *v, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_barh(HMGL graph, HCDT v, const char *pen, const char *opt);
+void MGL_EXPORT mgl_barh_(uintptr_t *graph, uintptr_t *v, const char *pen, const char *opt,int,int);
/// Draw chart for data a
-void mgl_chart(HMGL graph, HCDT a, const char *col, const char *opt);
-void mgl_chart_(uintptr_t *graph, uintptr_t *a, const char *col, const char *opt,int,int);
+void MGL_EXPORT mgl_chart(HMGL graph, HCDT a, const char *col, const char *opt);
+void MGL_EXPORT mgl_chart_(uintptr_t *graph, uintptr_t *a, const char *col, const char *opt,int,int);
/// Draw error boxes {ex,ey} at points {x,y}
-void mgl_error_exy(HMGL graph, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, const char *opt);
-void mgl_error_exy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *ex, uintptr_t *ey, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_error_exy(HMGL graph, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, const char *opt);
+void MGL_EXPORT mgl_error_exy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *ex, uintptr_t *ey, const char *pen, const char *opt,int,int);
/// Draw error boxes {ey} at points {x,y}
-void mgl_error_xy(HMGL graph, HCDT x, HCDT y, HCDT ey, const char *pen, const char *opt);
-void mgl_error_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_error_xy(HMGL graph, HCDT x, HCDT y, HCDT ey, const char *pen, const char *opt);
+void MGL_EXPORT mgl_error_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int,int);
/// Draw error boxes {ey} at points {x,y} with x in x-axis range
-void mgl_error(HMGL graph, HCDT y, HCDT ey, const char *pen, const char *opt);
-void mgl_error_(uintptr_t *graph, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_error(HMGL graph, HCDT y, HCDT ey, const char *pen, const char *opt);
+void MGL_EXPORT mgl_error_(uintptr_t *graph, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int,int);
/// Draw marks with size r at points {x,y,z}
-void mgl_mark_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
-void mgl_mark_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_mark_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_mark_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw marks with size r at points {x,y}
-void mgl_mark_xy(HMGL graph, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt);
-void mgl_mark_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_mark_xy(HMGL graph, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_mark_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw marks with size r at points {x,y} with x in x-axis range
-void mgl_mark_y(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
-void mgl_mark_y_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_mark_y(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_mark_y_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw tube with variable radius r around curve {x,y,z}
-void mgl_tube_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
-void mgl_tube_xyzr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tube_xyzr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw tube with variable radius r around curve {x,y}
-void mgl_tube_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt);
-void mgl_tube_xyr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tube_xyr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw tube with variable radius r around curve {x,y} with x in x-axis range
-void mgl_tube_r(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
-void mgl_tube_r_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube_r(HMGL graph, HCDT y, HCDT r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tube_r_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int,int);
/// Draw tube with constant radius r around curve {x,y,z}
-void mgl_tube_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, double r, const char *pen, const char *opt);
-void mgl_tube_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, mreal *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, double r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tube_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, mreal *r, const char *pen, const char *opt,int,int);
/// Draw tube with constant radius r around curve {x,y}
-void mgl_tube_xy(HMGL graph, HCDT x, HCDT y, double r, const char *penl, const char *opt);
-void mgl_tube_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, mreal *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube_xy(HMGL graph, HCDT x, HCDT y, double r, const char *penl, const char *opt);
+void MGL_EXPORT mgl_tube_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, mreal *r, const char *pen, const char *opt,int,int);
/// Draw tube with constant radius r around curve {x,y} with x in x-axis range
-void mgl_tube(HMGL graph, HCDT y, double r, const char *pen, const char *opt);
-void mgl_tube_(uintptr_t *graph, uintptr_t *y, mreal *r, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_tube(HMGL graph, HCDT y, double r, const char *pen, const char *opt);
+void MGL_EXPORT mgl_tube_(uintptr_t *graph, uintptr_t *y, mreal *r, const char *pen, const char *opt,int,int);
/// Draw candle plot for data specified parametrically
-void mgl_candle_xyv(HMGL gr, HCDT x, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt);
-void mgl_candle_xyv_(uintptr_t *gr, uintptr_t *x, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_candle_xyv(HMGL gr, HCDT x, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt);
+void MGL_EXPORT mgl_candle_xyv_(uintptr_t *gr, uintptr_t *x, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
/// Draw candle plot
-void mgl_candle_yv(HMGL gr, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt);
-void mgl_candle_yv_(uintptr_t *gr, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_candle_yv(HMGL gr, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt);
+void MGL_EXPORT mgl_candle_yv_(uintptr_t *gr, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
/// Draw candle plot with v1=v[i], v2=v[i+1]
-void mgl_candle(HMGL gr, HCDT v, HCDT y1, HCDT y2, const char *pen, const char *opt);
-void mgl_candle_(uintptr_t *gr, uintptr_t *y, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_candle(HMGL gr, HCDT v, HCDT y1, HCDT y2, const char *pen, const char *opt);
+void MGL_EXPORT mgl_candle_(uintptr_t *gr, uintptr_t *y, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int,int);
#ifdef __cplusplus
}
diff --git a/include/mgl2/prim.h b/include/mgl2/prim.h
index a324672..68f5fc9 100644
--- a/include/mgl2/prim.h
+++ b/include/mgl2/prim.h
@@ -26,115 +26,115 @@ extern "C" {
#endif
/// Draws the mark at position {x,y,z}
-void mgl_mark(HMGL gr, double x,double y,double z,const char *mark);
-void mgl_mark_(uintptr_t *gr, mreal *x, mreal *y, mreal *z,const char *mark,int);
+void MGL_EXPORT mgl_mark(HMGL gr, double x,double y,double z,const char *mark);
+void MGL_EXPORT mgl_mark_(uintptr_t *gr, mreal *x, mreal *y, mreal *z,const char *mark,int);
/// Draws red point (ball) at position {x,y,z}
-void mgl_ball(HMGL gr, double x,double y,double z);
-void mgl_ball_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);
+void MGL_EXPORT mgl_ball(HMGL gr, double x,double y,double z);
+void MGL_EXPORT mgl_ball_(uintptr_t *gr, mreal *x, mreal *y, mreal *z);
/// Draws the line between 2 points by specified pen
-void mgl_line(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, const char *pen,int n);
-void mgl_line_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int *n,int);
+void MGL_EXPORT mgl_line(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, const char *pen,int n);
+void MGL_EXPORT mgl_line_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int *n,int);
/// Draws the spline curve between 2 points by specified pen
-void mgl_curve(HMGL gr, double x1, double y1, double z1, double dx1, double dy1, double dz1, double x2, double y2, double z2, double dx2, double dy2, double dz2, const char *pen,int n);
-void mgl_curve_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *dx1, mreal *dy1, mreal *dz1, mreal *x2, mreal *y2, mreal *z2, mreal *dx2, mreal *dy2, mreal *dz2, const char *pen,int *n, int l);
+void MGL_EXPORT mgl_curve(HMGL gr, double x1, double y1, double z1, double dx1, double dy1, double dz1, double x2, double y2, double z2, double dx2, double dy2, double dz2, const char *pen,int n);
+void MGL_EXPORT mgl_curve_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *dx1, mreal *dy1, mreal *dz1, mreal *x2, mreal *y2, mreal *z2, mreal *dx2, mreal *dy2, mreal *dz2, const char *pen,int *n, int l);
/// Draws the 3d error box {ex,ey,ez} for point {x,y,z}
-void mgl_error_box(HMGL gr, double x, double y, double z, double ex, double ey, double ez, const char *pen);
-void mgl_error_box_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *ex, mreal *ey, mreal *ez, const char *pen, int);
+void MGL_EXPORT mgl_error_box(HMGL gr, double x, double y, double z, double ex, double ey, double ez, const char *pen);
+void MGL_EXPORT mgl_error_box_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *ex, mreal *ey, mreal *ez, const char *pen, int);
/// Draws the face between points with color stl (include interpolation up to 4 colors).
-void mgl_face(HMGL gr, double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, const char *stl);
-void mgl_face_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *x3, mreal *y3, mreal *z3, const char *stl, int);
+void MGL_EXPORT mgl_face(HMGL gr, double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, const char *stl);
+void MGL_EXPORT mgl_face_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *x3, mreal *y3, mreal *z3, const char *stl, int);
/// Draws the face in y-z plane at point p with color stl (include interpolation up to 4 colors).
-void mgl_facex(HMGL gr, double x0, double y0, double z0, double wy, double wz, const char *stl, double dx, double dy);
-void mgl_facex_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wy, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l);
+void MGL_EXPORT mgl_facex(HMGL gr, double x0, double y0, double z0, double wy, double wz, const char *stl, double dx, double dy);
+void MGL_EXPORT mgl_facex_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wy, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l);
/// Draws the face in x-z plane at point p with color stl (include interpolation up to 4 colors).
-void mgl_facey(HMGL gr, double x0, double y0, double z0, double wx, double wz, const char *stl, double dx, double dy);
-void mgl_facey_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l);
+void MGL_EXPORT mgl_facey(HMGL gr, double x0, double y0, double z0, double wx, double wz, const char *stl, double dx, double dy);
+void MGL_EXPORT mgl_facey_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l);
/// Draws the face in x-y plane at point p with color stl (include interpolation up to 4 colors).
-void mgl_facez(HMGL gr, double x0, double y0, double z0, double wx, double wy, const char *stl, double dx, double dy);
-void mgl_facez_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wy, const char *stl, mreal *dx, mreal *dy, int l);
+void MGL_EXPORT mgl_facez(HMGL gr, double x0, double y0, double z0, double wx, double wy, const char *stl, double dx, double dy);
+void MGL_EXPORT mgl_facez_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wy, const char *stl, mreal *dx, mreal *dy, int l);
/// Draws the sphere at point {x,y,z} with color stl and radius r
-void mgl_sphere(HMGL gr, double x, double y, double z, double r, const char *stl);
-void mgl_sphere_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *r, const char *stl, int);
+void MGL_EXPORT mgl_sphere(HMGL gr, double x, double y, double z, double r, const char *stl);
+void MGL_EXPORT mgl_sphere_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *r, const char *stl, int);
/// Draws the drop at point {x,y,z} in direction {dx,dy,dz} with color stl and radius r
-void mgl_drop(HMGL gr, double x, double y, double z, double dx, double dy, double dz, double r, const char *stl, double shift, double ap);
-void mgl_drop_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, mreal *shift, mreal *ap, int);
+void MGL_EXPORT mgl_drop(HMGL gr, double x, double y, double z, double dx, double dy, double dz, double r, const char *stl, double shift, double ap);
+void MGL_EXPORT mgl_drop_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, mreal *shift, mreal *ap, int);
/// Draws the cone between points p1,p2 with radius r1,r2 and with style stl
-void mgl_cone(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r1, double r2, const char *stl);
-void mgl_cone_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r1, mreal *r2, const char *stl, int);
+void MGL_EXPORT mgl_cone(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r1, double r2, const char *stl);
+void MGL_EXPORT mgl_cone_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r1, mreal *r2, const char *stl, int);
/// Draws the ellipse between points p1,p2 with color stl and width r
-void mgl_ellipse(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl);
-void mgl_ellipse_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, int);
+void MGL_EXPORT mgl_ellipse(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl);
+void MGL_EXPORT mgl_ellipse_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, int);
/// Draws the rhomb between points p1,p2 with color stl and width r
-void mgl_rhomb(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl);
-void mgl_rhomb_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, int);
+void MGL_EXPORT mgl_rhomb(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl);
+void MGL_EXPORT mgl_rhomb_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, int);
/// Draw cones from points {x,y,z} to axis plane
-void mgl_cones_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
-void mgl_cones_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_cones_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_cones_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw cones from points {x,z} to axis plane
-void mgl_cones_xz(HMGL graph, HCDT x, HCDT z, const char *pen, const char *opt);
-void mgl_coners_xz_(uintptr_t *graph, uintptr_t *x, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_cones_xz(HMGL graph, HCDT x, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_coners_xz_(uintptr_t *graph, uintptr_t *x, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Draw cones from points {x,z} with x in x-axis range to axis plane
-void mgl_cones(HMGL graph, HCDT z, const char *pen, const char *opt);
-void mgl_cones_(uintptr_t *graph, uintptr_t *z, const char *pen, const char *opt,int,int);
+void MGL_EXPORT mgl_cones(HMGL graph, HCDT z, const char *pen, const char *opt);
+void MGL_EXPORT mgl_cones_(uintptr_t *graph, uintptr_t *z, const char *pen, const char *opt,int,int);
/// Plot dew drops for vector field {ax,ay} parametrically depended on coordinate {x,y}
-void mgl_dew_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_dew_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_dew_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_dew_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot dew drops for vector field {ax,ay}
-void mgl_dew_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *optl);
-void mgl_dew_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int l);
+void MGL_EXPORT mgl_dew_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *optl);
+void MGL_EXPORT mgl_dew_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int l);
/// Print text in position {x,y,z} with specified font
/* NOTE: Function don't have options because it can be part of group.*/
-void mgl_puts(HMGL graph, double x, double y, double z,const char *text, const char *font, double size);
-void mgl_puts_(uintptr_t *graph, mreal *x, mreal *y, mreal *z,const char *text, const char *font, mreal *size, int, int);
-void mgl_putsw(HMGL graph, double x, double y, double z,const wchar_t *text, const char *font, double size);
+void MGL_EXPORT mgl_puts(HMGL graph, double x, double y, double z,const char *text, const char *font, double size);
+void MGL_EXPORT mgl_puts_(uintptr_t *graph, mreal *x, mreal *y, mreal *z,const char *text, const char *font, mreal *size, int, int);
+void MGL_EXPORT mgl_putsw(HMGL graph, double x, double y, double z,const wchar_t *text, const char *font, double size);
/// Print text in position {x,y,z} along direction {dx,dy,dz} with specified font
/* NOTE: Function don't have options because it can be part of group.*/
-void mgl_puts_dir(HMGL graph, double x, double y, double z, double dx, double dy, double dz, const char *text, const char *font, double size);
-void mgl_puts_dir_(uintptr_t *graph, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, const char *text, const char *font, mreal *size, int, int);
-void mgl_putsw_dir(HMGL graph, double x, double y, double z, double dx, double dy, double dz, const wchar_t *text, const char *font, double size);
+void MGL_EXPORT mgl_puts_dir(HMGL graph, double x, double y, double z, double dx, double dy, double dz, const char *text, const char *font, double size);
+void MGL_EXPORT mgl_puts_dir_(uintptr_t *graph, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, const char *text, const char *font, mreal *size, int, int);
+void MGL_EXPORT mgl_putsw_dir(HMGL graph, double x, double y, double z, double dx, double dy, double dz, const wchar_t *text, const char *font, double size);
/// Draw textual marks with size r at points {x,y,z}
-void mgl_textmark_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *text, const char *fnt, const char *opt);
-void mgl_textmark_xyzr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_textmarkw_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_xyzr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_textmarkw_xyzr(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
/// Draw textual marks with size r at points {x,y}
-void mgl_textmark_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const char *text, const char *fnt, const char *opt);
-void mgl_textmark_xyr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_textmarkw_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_xyr_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_textmarkw_xyr(HMGL graph, HCDT x, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
/// Draw textual marks with size r at points {x,y} with x in x-axis range
-void mgl_textmark_yr(HMGL graph, HCDT y, HCDT r, const char *text, const char *fnt, const char *opt);
-void mgl_textmark_yr_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_textmarkw_yr(HMGL graph, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_yr(HMGL graph, HCDT y, HCDT r, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_yr_(uintptr_t *graph, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_textmarkw_yr(HMGL graph, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt);
/// Draw textual marks with size r=1 at points {x,y} with x in x-axis range
-void mgl_textmark(HMGL graph, HCDT y, const char *text, const char *fnt, const char *opt);
-void mgl_textmarkw(HMGL graph, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
-void mgl_textmark_(uintptr_t *graph, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_textmark(HMGL graph, HCDT y, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmarkw(HMGL graph, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_textmark_(uintptr_t *graph, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
/// Draw labels for points coordinate(s) at points {x,y,z}
-void mgl_label_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *text, const char *fnt, const char *opt);
-void mgl_label_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_labelw_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_label_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_label_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_labelw_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *fnt, const char *opt);
/// Draw labels for points coordinate(s) at points {x,y}
-void mgl_label_xy(HMGL graph, HCDT x, HCDT y, const char *text, const char *fnt, const char *opt);
-void mgl_label_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_labelw_xy(HMGL graph, HCDT x, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_label_xy(HMGL graph, HCDT x, HCDT y, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_label_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_labelw_xy(HMGL graph, HCDT x, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
/// Draw labels for points coordinate(s) at points {x,y} with x in x-axis range
-void mgl_label_y(HMGL graph, HCDT y, const char *text, const char *fnt, const char *opt);
-void mgl_labelw_y(HMGL graph, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
-void mgl_label_y_(uintptr_t *graph, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_label_y(HMGL graph, HCDT y, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_labelw_y(HMGL graph, HCDT y, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_label_y_(uintptr_t *graph, uintptr_t *y, const char *text, const char *fnt, const char *opt,int,int,int);
/// Draw table for values val along given direction with row labels text at position {x,y}
-void mgl_table(HMGL gr, double x, double y, HCDT val, const char *text, const char *fnt, const char *opt);
-void mgl_table_(uintptr_t *gr, mreal *x, mreal *y, uintptr_t *val, const char *text, const char *fnt, const char *opt,int,int,int);
-void mgl_tablew(HMGL gr, double x, double y, HCDT val, const wchar_t *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_table(HMGL gr, double x, double y, HCDT val, const char *text, const char *fnt, const char *opt);
+void MGL_EXPORT mgl_table_(uintptr_t *gr, mreal *x, mreal *y, uintptr_t *val, const char *text, const char *fnt, const char *opt,int,int,int);
+void MGL_EXPORT mgl_tablew(HMGL gr, double x, double y, HCDT val, const wchar_t *text, const char *fnt, const char *opt);
#ifdef __cplusplus
}
diff --git a/include/mgl2/qmathgl.h b/include/mgl2/qmathgl.h
index 44b902b..9c9459e 100644
--- a/include/mgl2/qmathgl.h
+++ b/include/mgl2/qmathgl.h
@@ -34,10 +34,11 @@ class QTimer;
class mglCanvas;
//-----------------------------------------------------------------------------
/// Class is Qt widget which display MathGL graphics
-class QMathGL : public QWidget
+class MGL_EXPORT QMathGL : public QWidget
{
Q_OBJECT
public:
+ friend void *mgl_qt_thr(void *);
QString appName; ///< Application name for message boxes
bool autoResize; ///< Allow auto resizing (default is false)
bool enableMouse; ///< Enable mouse handlers
@@ -45,7 +46,7 @@ public:
QString primitives; ///< Manual primitives, defined by user
QMathGL(QWidget *parent = 0, Qt::WindowFlags f = 0);
- ~QMathGL();
+ virtual ~QMathGL();
double getRatio();
void setPopup(QMenu *p) { popup = p; } ///< Set popup menu pointer
void setSize(int w, int h); ///< Set window/picture sizes
@@ -188,6 +189,7 @@ protected:
private:
int x0, y0, xe, ye; ///< Temporary variables for mouse
uchar *grBuf;
+ void draw_thr();
};
//-----------------------------------------------------------------------------
/// Class for drawing the MGL script
diff --git a/include/mgl2/qt.h b/include/mgl2/qt.h
index a346191..4aaedb8 100644
--- a/include/mgl2/qt.h
+++ b/include/mgl2/qt.h
@@ -25,11 +25,11 @@
extern "C" {
#endif
/// Creates Qt window for plotting
-HMGL mgl_create_graph_qt(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
-uintptr_t mgl_create_graph_qt_(const char *title, int);
+HMGL MGL_EXPORT mgl_create_graph_qt(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
+uintptr_t MGL_EXPORT mgl_create_graph_qt_(const char *title, int);
/// Run main Qt loop for event handling.
-int mgl_qt_run();
-int mgl_qt_run_();
+int MGL_EXPORT mgl_qt_run();
+int MGL_EXPORT mgl_qt_run_();
#ifdef __cplusplus
}
//-----------------------------------------------------------------------------
diff --git a/include/mgl2/surf.h b/include/mgl2/surf.h
index dd5e205..59d668c 100644
--- a/include/mgl2/surf.h
+++ b/include/mgl2/surf.h
@@ -26,102 +26,102 @@ extern "C" {
#endif
/// Draw surface by formula with x,y in axis range
-void mgl_fsurf(HMGL graph, const char *fz, const char *stl, const char *opt);
-void mgl_fsurf_(uintptr_t *graph, const char *fz, const char *stl, const char *opt,int,int,int);
+void MGL_EXPORT mgl_fsurf(HMGL graph, const char *fz, const char *stl, const char *opt);
+void MGL_EXPORT mgl_fsurf_(uintptr_t *graph, const char *fz, const char *stl, const char *opt,int,int,int);
/// Draw surface by formulas parametrically depended on u,v in range [0,1]
-void mgl_fsurf_xyz(HMGL graph, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt);
-void mgl_fsurf_xyz_(uintptr_t *graph, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int, int, int, int, int);
+void MGL_EXPORT mgl_fsurf_xyz(HMGL graph, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt);
+void MGL_EXPORT mgl_fsurf_xyz_(uintptr_t *graph, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int, int, int, int, int);
/// Draw grid lines for density plot of 2d data specified parametrically
-void mgl_grid_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *stl, const char *opt);
-void mgl_grid_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_grid_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *stl, const char *opt);
+void MGL_EXPORT mgl_grid_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *stl, const char *opt,int,int);
/// Draw grid lines for density plot of 2d data
-void mgl_grid(HMGL graph, HCDT a,const char *stl, const char *opt);
-void mgl_grid_(uintptr_t *graph, uintptr_t *a,const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_grid(HMGL graph, HCDT a,const char *stl, const char *opt);
+void MGL_EXPORT mgl_grid_(uintptr_t *graph, uintptr_t *a,const char *stl, const char *opt,int,int);
/// Draw mesh lines for 2d data specified parametrically
-void mgl_mesh_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_mesh_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_mesh_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_mesh_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw mesh lines for 2d data
-void mgl_mesh(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_mesh_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_mesh(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_mesh_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw mesh lines for 2d data specified parametrically
-void mgl_fall_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_fall_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_fall_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_fall_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw mesh lines for 2d data
-void mgl_fall(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_fall_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_fall(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_fall_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw belts for 2d data specified parametrically
-void mgl_belt_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_belt_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_belt_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_belt_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw belts for 2d data
-void mgl_belt(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_belt_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_belt(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_belt_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data specified parametrically with color proportional to z
-void mgl_surf_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_surf_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surf_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surf_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data with color proportional to z
-void mgl_surf(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_surf_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surf(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surf_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw density plot for 2d data specified parametrically
-void mgl_dens_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_dens_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_dens_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_dens_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw density plot for 2d data
-void mgl_dens(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_dens_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_dens(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_dens_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw vertical boxes for 2d data specified parametrically
-void mgl_boxs_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_boxs_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_boxs_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_boxs_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw vertical boxes for 2d data
-void mgl_boxs(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_boxs_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_boxs(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_boxs_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw vertical tiles for 2d data specified parametrically
-void mgl_tile_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
-void mgl_tile_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tile_xy(HMGL graph, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tile_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int,int);
/// Draw vertical tiles for 2d data
-void mgl_tile(HMGL graph, HCDT z, const char *sch, const char *opt);
-void mgl_tile_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tile(HMGL graph, HCDT z, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tile_(uintptr_t *graph, uintptr_t *z, const char *sch, const char *opt,int,int);
/// Draw vertical tiles with variable size r for 2d data specified parametrically
-void mgl_tiles_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *sch, const char *opt);
-void mgl_tiles_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tiles_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT r, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tiles_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw vertical tiles with variable size r for 2d data
-void mgl_tiles(HMGL graph, HCDT z, HCDT r, const char *sch, const char *opt);
-void mgl_tiles_(uintptr_t *graph, uintptr_t *z, uintptr_t *r, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_tiles(HMGL graph, HCDT z, HCDT r, const char *sch, const char *opt);
+void MGL_EXPORT mgl_tiles_(uintptr_t *graph, uintptr_t *z, uintptr_t *r, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data specified parametrically with color proportional to c
-void mgl_surfc_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_surfc_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surfc_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surfc_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data with color proportional to c
-void mgl_surfc(HMGL graph, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_surfc_(uintptr_t *graph, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surfc(HMGL graph, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surfc_(uintptr_t *graph, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data specified parametrically with alpha proportional to c
-void mgl_surfa_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_surfa_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surfa_xy(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surfa_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw surface for 2d data with alpha proportional to c
-void mgl_surfa(HMGL graph, HCDT z, HCDT c, const char *sch, const char *opt);
-void mgl_surfa_(uintptr_t *graph, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_surfa(HMGL graph, HCDT z, HCDT c, const char *sch, const char *opt);
+void MGL_EXPORT mgl_surfa_(uintptr_t *graph, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int,int);
/// Draw density plot for spectra-gramm specified parametrically
-void mgl_stfa_xy(HMGL graph, HCDT x, HCDT y, HCDT re, HCDT im, int dn, const char *sch, const char *opt);
-void mgl_stfa_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_stfa_xy(HMGL graph, HCDT x, HCDT y, HCDT re, HCDT im, int dn, const char *sch, const char *opt);
+void MGL_EXPORT mgl_stfa_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt,int, int);
/// Draw density plot for spectra-gramm
-void mgl_stfa(HMGL graph, HCDT re, HCDT im, int dn, const char *sch, const char *opt);
-void mgl_stfa_(uintptr_t *graph, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_stfa(HMGL graph, HCDT re, HCDT im, int dn, const char *sch, const char *opt);
+void MGL_EXPORT mgl_stfa_(uintptr_t *graph, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt,int, int);
/// Color map of matrix a to matrix b, both matrix can parametrically depend on coordinates
-void mgl_map_xy(HMGL graph, HCDT x, HCDT y, HCDT a, HCDT b, const char *sch, const char *opt);
-void mgl_map_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_map_xy(HMGL graph, HCDT x, HCDT y, HCDT a, HCDT b, const char *sch, const char *opt);
+void MGL_EXPORT mgl_map_xy_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int,int);
/// Color map of matrix a to matrix b
-void mgl_map(HMGL graph, HCDT a, HCDT b, const char *sch, const char *opt);
-void mgl_map_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_map(HMGL graph, HCDT a, HCDT b, const char *sch, const char *opt);
+void MGL_EXPORT mgl_map_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int,int);
#ifdef __cplusplus
}
diff --git a/include/mgl2/type.h b/include/mgl2/type.h
index e486f6d..1379c16 100644
--- a/include/mgl2/type.h
+++ b/include/mgl2/type.h
@@ -88,7 +88,11 @@ inline mreal mgl_norm(const mglPoint &p)
#endif
//-----------------------------------------------------------------------------
/// Class for incapsulating color
+#ifndef SWIG
+struct MGL_EXPORT mglColor
+#else
struct mglColor
+#endif
{
float r; ///< Red component of color
float g; ///< Green component of color
diff --git a/include/mgl2/vect.h b/include/mgl2/vect.h
index 2406c53..e45e4c2 100644
--- a/include/mgl2/vect.h
+++ b/include/mgl2/vect.h
@@ -26,80 +26,80 @@ extern "C" {
#endif
//-----------------------------------------------------------------------------
/// Plot vectors at position {x,y} along {ax,ay} with length/color proportional to |a|
-void mgl_traj_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_traj_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_traj_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_traj_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot vectors at position {x,y,z} along {ax,ay,az} with length/color proportional to |a|
-void mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_traj_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_traj_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot vector field {ax,ay} parametrically depended on coordinate {x,y} with length/color proportional to |a|
-void mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_vect_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_vect_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot vector field {ax,ay} with length/color proportional to |a|
-void mgl_vect_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_vect_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_vect_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_vect_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot vector field {ax,ay,az} parametrically depended on coordinate {x,y,z} with length/color proportional to |a|
-void mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_vect_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_vect_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot vector field {ax,ay,az} with length/color proportional to |a|
-void mgl_vect_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_vect_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_vect_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_vect_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot flows for vector field {ax,ay} parametrically depended on coordinate {x,y} with color proportional to |a|
-void mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_flow_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flow_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot flows for vector field {ax,ay} with color proportional to |a|
-void mgl_flow_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_flow_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_flow_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flow_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int,int);
/// Plot flows for vector field {ax,ay,az} parametrically depended on coordinate {x,y,z} with color proportional to |a|
-void mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_flow_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flow_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot flows for vector field {ax,ay,az} with color proportional to |a|
-void mgl_flow_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_flow_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_flow_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flow_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot flow from point p for vector field {ax,ay} parametrically depended on coordinate {x,y} with color proportional to |a|
-void mgl_flowp_xy(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_flowp_xy_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_flowp_xy(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flowp_xy_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int, int);
/// Plot flow from point p for vector field {ax,ay} with color proportional to |a|
-void mgl_flowp_2d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, const char *sch, const char *opt);
-void mgl_flowp_2d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_flowp_2d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flowp_2d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int, int);
/// Plot flow from point p for vector field {ax,ay,az} parametrically depended on coordinate {x,y,z} with color proportional to |a|
-void mgl_flowp_xyz(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_flowp_xyz_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_flowp_xyz(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flowp_xyz_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int, int);
/// Plot flow from point p for vector field {ax,ay,az} with color proportional to |a|
-void mgl_flowp_3d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
-void mgl_flowp_3d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_flowp_3d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt);
+void MGL_EXPORT mgl_flowp_3d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int,int);
/// Plot flow pipes for vector field {ax,ay} parametrically depended on coordinate {x,y} with color and radius proportional to |a|
-void mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt);
-void mgl_pipe_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int,int);
+void MGL_EXPORT mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt);
+void MGL_EXPORT mgl_pipe_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int,int);
/// Plot flow pipes for vector field {ax,ay} with color and radius proportional to |a|
-void mgl_pipe_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt);
-void mgl_pipe_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int,int);
+void MGL_EXPORT mgl_pipe_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt);
+void MGL_EXPORT mgl_pipe_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int,int);
/// Plot flow pipes for vector field {ax,ay,az} parametrically depended on coordinate {x,y,z} with color and radius proportional to |a|
-void mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt);
-void mgl_pipe_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int,int);
+void MGL_EXPORT mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt);
+void MGL_EXPORT mgl_pipe_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int,int);
/// Plot flow pipes for vector field {ax,ay,az} with color and radius proportional to |a|
-void mgl_pipe_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt);
-void mgl_pipe_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int,int);
+void MGL_EXPORT mgl_pipe_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt);
+void MGL_EXPORT mgl_pipe_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int,int);
/// Plot flows for gradient of scalar field phi parametrically depended on coordinate {x,y,z}
-void mgl_grad_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ph, const char *sch, const char *opt);
-void mgl_grad_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ph, const char *sch, const char *opt,int, int);
+void MGL_EXPORT mgl_grad_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ph, const char *sch, const char *opt);
+void MGL_EXPORT mgl_grad_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ph, const char *sch, const char *opt,int, int);
/// Plot flows for gradient of scalar field phi parametrically depended on coordinate {x,y}
-void mgl_grad_xy(HMGL gr, HCDT x, HCDT y, HCDT ph, const char *sch, const char *opt);
-void mgl_grad_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ph, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_grad_xy(HMGL gr, HCDT x, HCDT y, HCDT ph, const char *sch, const char *opt);
+void MGL_EXPORT mgl_grad_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ph, const char *sch, const char *opt,int,int);
/// Plot flows for gradient of scalar field phi
-void mgl_grad(HMGL gr, HCDT ph, const char *sch, const char *opt);
-void mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const char *opt,int,int);
+void MGL_EXPORT mgl_grad(HMGL gr, HCDT ph, const char *sch, const char *opt);
+void MGL_EXPORT mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const char *opt,int,int);
/// Draw vector plot at slice for 3d data specified parametrically
-void mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt);
-void mgl_vect3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_vect3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int,int);
/// Draw vector plot at slice for 3d data
-void mgl_vect3(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt);
-void mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int,int);
+void MGL_EXPORT mgl_vect3(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt);
+void MGL_EXPORT mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int,int);
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
diff --git a/include/mgl2/volume.h b/include/mgl2/volume.h
index f5871d2..7a9d248 100644
--- a/include/mgl2/volume.h
+++ b/include/mgl2/volume.h
@@ -26,57 +26,57 @@ extern "C" {
#endif
//-----------------------------------------------------------------------------
/// Draw isosurface for 3d data specified parametrically
-void mgl_surf3_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
-void mgl_surf3_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d data
-void mgl_surf3_val(HMGL graph, double Val, HCDT a, const char *stl, const char *opt);
-void mgl_surf3_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3_val(HMGL graph, double Val, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data specified parametrically
-void mgl_surf3_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
-void mgl_surf3_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data
-void mgl_surf3(HMGL graph, HCDT a, const char *stl, const char *opt);
-void mgl_surf3_(uintptr_t *graph, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3(HMGL graph, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3_(uintptr_t *graph, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d data specified parametrically with alpha proportional to b
-void mgl_surf3a_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3a_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3a_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3a_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d data with alpha proportional to b
-void mgl_surf3a_val(HMGL graph, double Val, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3a_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3a_val(HMGL graph, double Val, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3a_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data specified parametrically with alpha proportional to b
-void mgl_surf3a_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3a_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3a_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3a_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data with alpha proportional to b
-void mgl_surf3a(HMGL graph, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3a_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3a(HMGL graph, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3a_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d data specified parametrically with color proportional to b
-void mgl_surf3c_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3c_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3c_xyz_val(HMGL graph, double Val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3c_xyz_val_(uintptr_t *graph, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d data with color proportional to b
-void mgl_surf3c_val(HMGL graph, double Val, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3c_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3c_val(HMGL graph, double Val, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3c_val_(uintptr_t *graph, mreal *Val, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data specified parametrically with color proportional to b
-void mgl_surf3c_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3c_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3c_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3c_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw isosurfaces for 3d data with color proportional to b
-void mgl_surf3c(HMGL graph, HCDT a, HCDT b, const char *stl, const char *opt);
-void mgl_surf3c_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_surf3c(HMGL graph, HCDT a, HCDT b, const char *stl, const char *opt);
+void MGL_EXPORT mgl_surf3c_(uintptr_t *graph, uintptr_t *a, uintptr_t *b, const char *stl, const char *opt,int,int);
/// Draw a semi-transparent cloud for 3d data specified parametrically
-void mgl_cloud_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
-void mgl_cloud_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_cloud_xyz(HMGL graph, HCDT x, HCDT y, HCDT z, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_cloud_xyz_(uintptr_t *graph, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw a semi-transparent cloud for 3d data
-void mgl_cloud(HMGL graph, HCDT a, const char *stl, const char *opt);
-void mgl_cloud_(uintptr_t *graph, uintptr_t *a, const char *stl, const char *opt,int,int);
+void MGL_EXPORT mgl_cloud(HMGL graph, HCDT a, const char *stl, const char *opt);
+void MGL_EXPORT mgl_cloud_(uintptr_t *graph, uintptr_t *a, const char *stl, const char *opt,int,int);
/// Draw isosurface for 3d beam in curvilinear coordinates
-void mgl_beam_val(HMGL graph, double Val, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int norm);
-void mgl_beam_val_(uintptr_t *gr, mreal *val, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm,int l);
+void MGL_EXPORT mgl_beam_val(HMGL graph, double Val, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int norm);
+void MGL_EXPORT mgl_beam_val_(uintptr_t *gr, mreal *val, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm,int l);
/// Draw several isosurfaces for 3d beam in curvilinear coordinates
-void mgl_beam(HMGL graph, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int norm, int num);
-void mgl_beam_(uintptr_t *gr, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm, int *num,int l);
+void MGL_EXPORT mgl_beam(HMGL graph, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int norm, int num);
+void MGL_EXPORT mgl_beam_(uintptr_t *gr, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm, int *num,int l);
//-----------------------------------------------------------------------------
#ifdef __cplusplus
}
diff --git a/include/mgl2/wnd.h b/include/mgl2/wnd.h
index b2efad4..0ab3689 100644
--- a/include/mgl2/wnd.h
+++ b/include/mgl2/wnd.h
@@ -43,11 +43,11 @@ struct mglDraw
};
//-----------------------------------------------------------------------------
extern "C" {
-int mgl_draw_graph(HMGL gr, void *p);
-// NOTE: mgl_draw_class() and mgl_draw_load() use mglWindow* only. Don't use it with inherited classes
-int mgl_draw_class(HMGL gr, void *p);
-void mgl_click_class(void *p);
-void mgl_reload_class(void *p);
+int MGL_EXPORT mgl_draw_graph(HMGL gr, void *p);
+// NOTE: MGL_EXPORT mgl_draw_class() and MGL_EXPORT mgl_draw_load() use mglWindow* only. Don't use it with inherited classes
+int MGL_EXPORT mgl_draw_class(HMGL gr, void *p);
+void MGL_EXPORT mgl_click_class(void *p);
+void MGL_EXPORT mgl_reload_class(void *p);
}
//-----------------------------------------------------------------------------
/// Abstract class for windows displaying graphics
@@ -82,8 +82,10 @@ public:
void SetClickFunc(void (*func)(void *p)) ///< Callback function for mouse click
{ mgl_set_click_func(gr,func); }
- inline void SetDelay(double dt) ///< Delay for animation in seconds
+ inline void SetDelay(double dt) ///< Set delay for animation in seconds
{ mgl_wnd_set_delay(gr, dt); }
+ inline double GetDelay() ///< Get delay for animation in seconds
+ { return mgl_wnd_get_delay(gr); }
inline void Setup(bool clf_upd=true, bool showpos=false)
{ mgl_setup_window(gr, clf_upd, showpos); }
inline mglPoint LastMousePos() ///< Last mouse position
diff --git a/include/mgl2/wx.h b/include/mgl2/wx.h
index 1f51ea7..4876ad9 100644
--- a/include/mgl2/wx.h
+++ b/include/mgl2/wx.h
@@ -26,11 +26,11 @@
extern "C" {
#endif
/// Creates WX window for plotting
-HMGL mgl_create_graph_wx(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
-uintptr_t mgl_create_graph_wx_(const char *title, int);
+HMGL MGL_EXPORT mgl_create_graph_wx(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p));
+uintptr_t MGL_EXPORT mgl_create_graph_wx_(const char *title, int);
/// Run main WX loop for event handling.
-int mgl_wx_run();
-int mgl_wx_run_();
+int MGL_EXPORT mgl_wx_run();
+int MGL_EXPORT mgl_wx_run_();
#ifdef __cplusplus
}
//-----------------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b9d9aac..531202b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,6 +13,7 @@ set(mgl_hdr
../include/mgl2/base.h ../include/mgl2/prim.h ../include/mgl2/canvas_cf.h
../include/mgl2/font.h ../include/mgl2/canvas.h ../include/mgl2/surf.h
../include/mgl2/mgl_cf.h ../include/mgl2/type.h ${MathGL_BINARY_DIR}/include/mgl2/config.h
+${MathGL_BINARY_DIR}/include/mgl2/dllexport.h
../include/mgl2/cont.h ../include/mgl2/mgl.h ../include/mgl2/vect.h
../include/mgl2/data.h ../include/mgl2/volume.h ../include/mgl2/data_cf.h
../include/mgl2/define.h ../include/mgl2/other.h ../include/mgl2/eval.h
@@ -36,24 +37,21 @@ if(MGL_HAVE_OPENGL)
set(mgl_hdr ${mgl_hdr} ../include/mgl2/opengl.h )
endif(MGL_HAVE_OPENGL)
+include(GenerateExportHeader)
+add_compiler_export_flags()
add_library(mgl SHARED ${mgl_src} ${mgl_hdr})
add_library(mgl-static STATIC ${mgl_src} ${mgl_hdr})
-set_target_properties(mgl-static PROPERTIES OUTPUT_NAME "mgl")
set_target_properties(mgl PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(mgl-static PROPERTIES OUTPUT_NAME "mgl")
set_target_properties(mgl-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+set_target_properties(mgl-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
+generate_export_header(mgl EXPORT_FILE_NAME ../include/mgl2/dllexport.h)
if(MGL_HAVE_LTDL)
target_link_libraries(mgl ${LTDL_LIB})
include_directories(${LTDL_INCLUDE_DIR})
endif(MGL_HAVE_LTDL)
-if(MGL_HAVE_U3D)
-# include_directories( IDTFGen ${U3D_INCLUDE_DIR} )
- target_link_libraries(mgl ${U3D_LIB})
- target_link_libraries(mgl-static ${U3D_LIB})
- include_directories(${U3D_INCLUDE_DIR})
-endif(MGL_HAVE_U3D)
-
if(MGL_HAVE_PDF)
include_directories(${HPDF_INCLUDE_DIR})
target_link_libraries(mgl ${HPDF_LIB})
@@ -109,7 +107,9 @@ if(MGL_HAVE_MPI)
include_directories(${MPI_CXX_INCLUDE_PATH})
endif(MGL_HAVE_MPI)
-target_link_libraries(mgl ${M_LIB})
+if(M_LIB)
+ target_link_libraries(mgl ${M_LIB})
+endif(M_LIB)
set_target_properties(mgl PROPERTIES SOVERSION 7.0.0)
install(
@@ -118,3 +118,4 @@ install(
ARCHIVE DESTINATION ${MGL_LIB_INSTALL_DIR}
LIBRARY DESTINATION ${MGL_LIB_INSTALL_DIR}
)
+install(FILES ${MathGL_BINARY_DIR}/include/mgl2/dllexport.h DESTINATION ${MGL_INCLUDE_PATH})
diff --git a/src/addon.cpp b/src/addon.cpp
index fd35472..4969058 100644
--- a/src/addon.cpp
+++ b/src/addon.cpp
@@ -28,7 +28,7 @@
#include "mgl2/addon.h"
#include "mgl2/data.h"
//-----------------------------------------------------------------------------
-void mgl_strcls(char *str)
+void MGL_EXPORT mgl_strcls(char *str)
{
size_t len = strlen(str),i,n;
char *tmp = new char[len];
@@ -44,7 +44,7 @@ void mgl_strcls(char *str)
delete []tmp;
}
//-----------------------------------------------------------------------------
-int mgl_strpos(const char *str,char *fnd)
+int MGL_EXPORT mgl_strpos(const char *str,char *fnd)
{
const char *p=strstr(str,fnd);
int res;
@@ -53,7 +53,7 @@ int mgl_strpos(const char *str,char *fnd)
return res;
}
//-----------------------------------------------------------------------------
-int mgl_chrpos(const char *str,char ch)
+int MGL_EXPORT mgl_chrpos(const char *str,char ch)
{
const char *p=str?strchr(str,ch):0;
int res;
@@ -62,7 +62,7 @@ int mgl_chrpos(const char *str,char ch)
return res;
}
//-----------------------------------------------------------------------------
-char *mgl_fgetstr(FILE *fp)
+MGL_EXPORT char *mgl_fgetstr(FILE *fp)
{
static char s[256];
do
@@ -74,10 +74,10 @@ char *mgl_fgetstr(FILE *fp)
return s;
}
//-----------------------------------------------------------------------------
-int mgl_istrue(char ch)
+int MGL_EXPORT mgl_istrue(char ch)
{ return (ch=='1' || ch=='t' || ch=='+' || ch=='v'); }
//-----------------------------------------------------------------------------
-void mgl_test(const char *str, ...)
+void MGL_EXPORT mgl_test(const char *str, ...)
{
char buf[256];
va_list lst;
@@ -88,7 +88,7 @@ void mgl_test(const char *str, ...)
fflush(stdout);
}
//-----------------------------------------------------------------------------
-void mgl_info(const char *str, ...)
+void MGL_EXPORT mgl_info(const char *str, ...)
{
char buf[256];
va_list lst;
@@ -101,7 +101,7 @@ void mgl_info(const char *str, ...)
fclose(fp);
}
//-----------------------------------------------------------------------------
-FILE *mgl_next_data(const char *fname,int p)
+MGL_EXPORT FILE *mgl_next_data(const char *fname,int p)
{
char *s;
int len;
@@ -134,7 +134,7 @@ FILE *mgl_next_data(const char *fname,int p)
return fp;
}
//-----------------------------------------------------------------------------
-bool mgl_difr_grid(dual *a,int n,dual q,int Border,dual *b,dual *d,int kk)
+bool MGL_EXPORT mgl_difr_grid(dual *a,int n,dual q,int Border,dual *b,dual *d,int kk)
{
register int i,k;
// if(n<=0 || q>=0.5) return false;
@@ -174,7 +174,7 @@ bool mgl_difr_grid(dual *a,int n,dual q,int Border,dual *b,dual *d,int kk)
return true;
}
//-----------------------------------------------------------------------------
-bool mgl_difr_axial(dual *a, int n, dual q, int Border,dual *b, dual *d, int kk, double di)
+bool MGL_EXPORT mgl_difr_axial(dual *a, int n, dual q, int Border,dual *b, dual *d, int kk, double di)
{
register int i,k,ii = di<0 ? -int(floor(di)) : 0;
dual adt = dual(0.,1.)*q;
@@ -217,7 +217,7 @@ bool mgl_difr_axial(dual *a, int n, dual q, int Border,dual *b, dual *d, int kk,
return true;
}
//-----------------------------------------------------------------------------
-double mgl_gauss_rnd()
+double MGL_EXPORT mgl_gauss_rnd()
{
double v1,v2;
v1 = mgl_rnd();
@@ -225,7 +225,7 @@ double mgl_gauss_rnd()
return v1!=0 ? sqrt(-2.*log(v1))*cos(2*M_PI*v2) : 0;
}
//-----------------------------------------------------------------------------
-void mgl_fft_freq(double *freq, size_t nn)
+void MGL_EXPORT mgl_fft_freq(double *freq, size_t nn)
{
for(size_t i=0;i<=nn/2;i++)
{
diff --git a/src/axis.cpp b/src/axis.cpp
index 7768fde..c0dcdb4 100644
--- a/src/axis.cpp
+++ b/src/axis.cpp
@@ -27,19 +27,19 @@
// NOTE: I use <=0 for proper tick labels rotation. But this mirror labels for central origin!
#define sign(a) ((a)<=0 ? -1:1)
//-----------------------------------------------------------------------------
-inline struct tm* mgl_localtime (const time_t *clock, struct tm *result, bool use_utc)
+MGL_NO_EXPORT inline struct tm *mgl_localtime (const time_t *clock, tm *result, bool use_utc)
{ if (!clock || !result) return NULL;
-memcpy(result,use_utc?gmtime(clock):localtime(clock),sizeof(*result));
- return result; }
+ const tm *res = use_utc?gmtime(clock):localtime(clock);
+ memcpy(result,res,sizeof(tm)); return result; }
//-----------------------------------------------------------------------------
-long mgl_have_color(const char *stl)
+long MGL_EXPORT mgl_have_color(const char *stl)
{
register long i,j=0;
if(stl) for(i=0;stl[i];i++) if(strchr(MGL_COLORS,stl[i])) j++;
return j;
}
//-----------------------------------------------------------------------------
-void mgl_wcstrim(wchar_t *str)
+void MGL_EXPORT mgl_wcstrim(wchar_t *str)
{
size_t n=wcslen(str), k, i;
for(k=0;k<n;k++) if(str[k]>' ') break;
@@ -56,7 +56,7 @@ void mglCanvas::SetAxisStl(const char *stl, const char *tck, const char *sub)
else if(strlen(stl)<32) strcpy(AxisStl,stl);
if(!tck || !(*tck)) strcpy(TickStl,AxisStl);
else if(strlen(tck)<32) strcpy(TickStl,tck);
- if(!sub || !(*sub)) strcpy(SubTStl,AxisStl);
+ if(!sub || !(*sub)) strcpy(SubTStl,TickStl);
else if(strlen(sub)<32) strcpy(SubTStl,sub);
}
//-----------------------------------------------------------------------------
@@ -184,7 +184,7 @@ void mglCanvas::SetTickTempl(char dir, const char *t)
else if(mbstowcs(0,t,0)<256) mbstowcs(aa.t,t,256);
}
//-----------------------------------------------------------------------------
-double mgl_adj_val(double v,mreal *ds=0)
+MGL_NO_EXPORT double mgl_adj_val(double v,mreal *ds=0)
{
double n = floor(log10(v)), s;
v = floor(v*pow(10.,-n)); n = pow(10.,n);
@@ -272,13 +272,13 @@ void mglCanvas::AdjustTicks(const char *dir, bool force)
if(force) SetTuneTicks(-1);
UpdateAxis();
if(strchr(dir,'x') || strchr(dir,'X')) // NOTE dir have to be non-NULL here !!!
- { if(force) ax.d=0; AdjustTicks(ax,fx); }
+ { if(force) ax.d=0; AdjustTicks(ax,fx!=0); }
if(strchr(dir,'y') || strchr(dir,'Y'))
- { if(force) ay.d=0; AdjustTicks(ay,fy); }
+ { if(force) ay.d=0; AdjustTicks(ay,fy!=0); }
if(strchr(dir,'z') || strchr(dir,'Z'))
- { if(force) az.d=0; AdjustTicks(az,fz); }
+ { if(force) az.d=0; AdjustTicks(az,fz!=0); }
if(strchr(dir,'a') || strchr(dir,'c'))
- { if(force) ac.d=0; AdjustTicks(ac,fa); }
+ { if(force) ac.d=0; AdjustTicks(ac,fa!=0); }
}
//-----------------------------------------------------------------------------
void mglCanvas::AdjustTicks(mglAxis &aa, bool ff)
@@ -301,7 +301,7 @@ void mglCanvas::AdjustTicks(mglAxis &aa, bool ff)
LabelTicks(aa);
}
//-----------------------------------------------------------------------------
-int mgl_tick_ext(mreal a, mreal b, wchar_t s[32], mreal &v)
+int MGL_NO_EXPORT mgl_tick_ext(mreal a, mreal b, wchar_t s[32], mreal &v)
{
int kind = 0;
if(fabs(a-b)<=0.001*fabs(a))
@@ -342,7 +342,7 @@ int mgl_tick_ext(mreal a, mreal b, wchar_t s[32], mreal &v)
return kind;
}
//-----------------------------------------------------------------------------
-void mgl_tick_text(mreal z, mreal z0, mreal d, mreal v, int kind, wchar_t str[64], bool tune)
+void MGL_NO_EXPORT mgl_tick_text(mreal z, mreal z0, mreal d, mreal v, int kind, wchar_t str[64], bool tune)
{
mreal u = fabs(z)<d ? 0:z;
if((kind&1) && z>z0) u = fabs(z-z0)<d ? 0:(z-z0);
@@ -374,7 +374,7 @@ void mglCanvas::LabelTicks(mglAxis &aa)
if(aa.ch=='z') aa.v0 = aa.org.z;
wchar_t buf[64]=L"";
- mreal v,v0,v1,w;
+ mreal v,v0,v1,w=0;
int d,ds;
if(aa.f) return;
aa.txt.clear();
@@ -518,6 +518,7 @@ void mglCanvas::DrawAxis(mglAxis &aa, bool text, char arr,const char *stl,const
for(v=v0;(v-aa.v2)*(v-aa.v1)<=0;v+=aa.ds)
tick_draw(o+d*v,da,db,1,stl);
}
+ SetPenPal(mgl_have_color(stl) ? stl:AxisStl);
if(text) DrawLabels(aa);
EndGroup();
}
@@ -709,14 +710,14 @@ void mglCanvas::Labelw(char dir, const wchar_t *text, mreal pos, const char *opt
if(dir=='x')
{
- AdjustTicks(ax,fx); aa = &ax;
+ AdjustTicks(ax,fx!=0); aa = &ax;
if(ax.dv) t = (Min.x+Max.x+pos*(Max.x-Min.x))/2;
else t = Min.x*pow(Max.x/Min.x, (pos+1)/2);
p = mglPoint(t,y0,z0); q = mglPoint(1,0,0); shift += ax.sh;
}
if(dir=='y' && !(TernAxis&3))
{
- AdjustTicks(ay,fy); aa = &ay;
+ AdjustTicks(ay,fy!=0); aa = &ay;
if(ay.dv) t = (Min.y+Max.y+pos*(Max.y-Min.y))/2;
else t = Min.y*pow(Max.y/Min.y, (pos+1)/2);
p = mglPoint(x0,t,z0); q = mglPoint(0,1,0); shift += ay.sh;
@@ -728,7 +729,7 @@ void mglCanvas::Labelw(char dir, const wchar_t *text, mreal pos, const char *opt
if(dir=='y' && (TernAxis&3))
{
ty.ch='T'; ty.dir = mglPoint(-1,1); ty.org = mglPoint(1,0,ay.org.z);
- AdjustTicks(ty,fy); aa = &ty;
+ AdjustTicks(ty,fy!=0); aa = &ty;
if(ty.dv) t = (Min.y+Max.y+pos*(Max.y-Min.y))/2;
else t = Min.y*pow(Max.y/Min.y, (pos+1)/2);
p = mglPoint(x0,t,z0); q = mglPoint(0,1,0); shift += ty.sh;
@@ -740,14 +741,14 @@ void mglCanvas::Labelw(char dir, const wchar_t *text, mreal pos, const char *opt
if(dir=='t' && (TernAxis&3))
{
ty.ch='t'; ty.dir = mglPoint(0,-1); ty.org = mglPoint(0,1,ay.org.z);
- AdjustTicks(ty,fy); pos = -pos; aa = &ty;
+ AdjustTicks(ty,fy!=0); pos = -pos; aa = &ty;
if(ty.dv) t = (Min.y+Max.y+pos*(Max.y-Min.y))/2;
else t = Min.y*pow(Max.y/Min.y, (pos+1)/2);
p = mglPoint(x0,t,z0); q = mglPoint(0,1,0); shift += ty.sh;
}
if(dir=='z')
{
- AdjustTicks(az,fz); aa = &az;
+ AdjustTicks(az,fz!=0); aa = &az;
if(az.dv) t = (Min.z+Max.z+pos*(Max.z-Min.z))/2;
else t = Min.z*pow(Max.z/Min.z, (pos+1)/2);
p = mglPoint(x0,y0,t); q = mglPoint(0,0,1); shift += az.sh;
@@ -938,9 +939,9 @@ void mglCanvas::colorbar(HCDT vv, const mreal *c, int where, mreal x, mreal y, m
ac.AddLabel(buf,d);
}
}
- else { UpdateAxis(); AdjustTicks(ac,fa); }
+ else { UpdateAxis(); AdjustTicks(ac,fa!=0); }
// hint for using standard label drawing function
- SetPenPal(*TickStl ? TickStl:"k-1");
+ SetPenPal(TickStl);
for(i=0;i<ac.txt.size();i++)
{
d = ac.txt[i].val = GetA(ac.txt[i].val)*2-1;
@@ -964,6 +965,7 @@ void mglCanvas::colorbar(HCDT vv, const mreal *c, int where, mreal x, mreal y, m
case 3: ac.dir.y = 0; ac.org.y = y+0.1*h; break;
default:ac.dir.x = 0; ac.org.x = x-0.1*w; break;
}
+ SetPenPal(AxisStl);
ac.ns = where; DrawLabels(ac); // NOTE ns isn't used for colorbar
Pop(); clr(MGL_DISABLE_SCALE); EndGroup();
}
diff --git a/src/base.cpp b/src/base.cpp
index 083a829..eaf22cc 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "mgl2/font.h"
#include "mgl2/base.h"
-#include "mgl2/define.h"
+#include "mgl2/eval.h"
//-----------------------------------------------------------------------------
char *mgl_strdup(const char *s)
{
@@ -28,7 +28,7 @@ char *mgl_strdup(const char *s)
return r;
}
//-----------------------------------------------------------------------------
-void mgl_create_cpp_font(HMGL gr, const wchar_t *how)
+void MGL_EXPORT mgl_create_cpp_font(HMGL gr, const wchar_t *how)
{
unsigned long l=wcslen(how), i, n=0, m;
wchar_t ch=*how;
@@ -70,30 +70,26 @@ void mgl_create_cpp_font(HMGL gr, const wchar_t *how)
printf("};\n");
}
//-----------------------------------------------------------------------------
-void mgl_strtrim(char *str)
+void MGL_EXPORT mgl_strtrim(char *str)
{
char *c = mgl_strdup(str);
- size_t n=strlen(str);
- long k;
- for(k=0;k<long(strlen(str));k++) // óäàëÿåì íà÷àëüíûå ïðîáåëû
- if(str[k]>' ') break;
+ long k,n=strlen(str);
+ for(k=0;k<n;k++) if(str[k]>' ') break;
strcpy(c,&(str[k]));
n = strlen(c);
- for(k=n-1;k>=0;k--) // óäàëÿåì íà÷àëüíûå ïðîáåëû
- if(c[k]>' ') break;
+ for(k=n-1;k>=0;k--) if(c[k]>' ') break;
c[k+1] = 0;
strcpy(str,c); free(c);
}
//-----------------------------------------------------------------------------
-void mgl_strlwr(char *str)
+void MGL_EXPORT mgl_strlwr(char *str)
{
- for(long k=0;k<(long)strlen(str);k++) // óäàëÿåì íà÷àëüíûå ïðîáåëû
+ for(long k=0;k<(long)strlen(str);k++)
str[k] = (str[k]>='A' && str[k]<='Z') ? str[k]+'a'-'A' : str[k];
}
//-----------------------------------------------------------------------------
mglBase::mglBase()
{
-// memset(this,0,sizeof(mglBase)); // since mglBase is abstract then I can do it?!!
Flag=0; saved=false;
#if MGL_HAVE_PTHREAD
pthread_mutex_init(&mutexPnt,0);
@@ -115,7 +111,7 @@ mglBase::mglBase()
// Always create default palette txt[0] and default scheme txt[1]
Txt.reserve(3);
MGL_PUSH(Txt,mglTexture(MGL_DEF_PAL,-1),mutexTxt);
- MGL_PUSH(Txt,mglTexture("BbcyrR",1),mutexTxt);
+ MGL_PUSH(Txt,mglTexture(MGL_DEF_SCH,1),mutexTxt);
memcpy(last_style,"{k5}-1\0",8);
MinS=mglPoint(-1,-1,-1); MaxS=mglPoint(1,1,1);
fnt = new mglFont; fnt->gr = this; PrevState=NAN;
@@ -370,9 +366,9 @@ bool mglBase::ScalePoint(mglPoint &p, mglPoint &n, bool use_nan) const
mreal &x=p.x, &y=p.y, &z=p.z;
if(mgl_isnan(x) || mgl_isnan(y) || mgl_isnan(z)) { x=NAN; return false; }
mreal x1,y1,z1,x2,y2,z2;
- x1 = x>0?x*MGL_FEPSILON:x/MGL_FEPSILON; x2 = x<0?x*MGL_FEPSILON:x/MGL_FEPSILON;
- y1 = y>0?y*MGL_FEPSILON:y/MGL_FEPSILON; y2 = y<0?y*MGL_FEPSILON:y/MGL_FEPSILON;
- z1 = z>0?z*MGL_FEPSILON:z/MGL_FEPSILON; z2 = z<0?z*MGL_FEPSILON:z/MGL_FEPSILON;
+ x1 = x>0?x*MGL_EPSILON:x/MGL_EPSILON; x2 = x<0?x*MGL_EPSILON:x/MGL_EPSILON;
+ y1 = y>0?y*MGL_EPSILON:y/MGL_EPSILON; y2 = y<0?y*MGL_EPSILON:y/MGL_EPSILON;
+ z1 = z>0?z*MGL_EPSILON:z/MGL_EPSILON; z2 = z<0?z*MGL_EPSILON:z/MGL_EPSILON;
bool res = true;
if(x2>CutMin.x && x1<CutMax.x && y2>CutMin.y && y1<CutMax.y &&
z2>CutMin.z && z1<CutMax.z) res = false;
@@ -694,7 +690,7 @@ void mglBase::ClearEq()
//-----------------------------------------------------------------------------
// Colors ids
//-----------------------------------------------------------------------------
-mglColorID mglColorIds[31] = {{'k', mglColor(0,0,0)},
+MGL_EXPORT mglColorID mglColorIds[31] = {{'k', mglColor(0,0,0)},
{'r', mglColor(1,0,0)}, {'R', mglColor(0.5,0,0)},
{'g', mglColor(0,1,0)}, {'G', mglColor(0,0.5,0)},
{'b', mglColor(0,0,1)}, {'B', mglColor(0,0,0.5)},
@@ -749,9 +745,9 @@ void mglTexture::Set(const char *s, int smooth, mreal alpha)
if(!n)
{
if((strchr(s,'|') || strchr(s,'!')) && !smooth) // sharp colors
- { n=l=6; s="BbcyrR"; sm = false; }
+ { n=l=6; s=MGL_DEF_SCH; sm = false; }
else if(smooth==0) // none colors but color scheme
- { n=l=6; s="BbcyrR"; }
+ { n=l=6; s=MGL_DEF_SCH; }
else return;
}
bool man=sm;
@@ -821,7 +817,7 @@ void mglTexture::Set(const char *s, int smooth, mreal alpha)
register mreal u,v=sm?(n-1)/255.:n/256.;
for(i=0,i1=0;i<256;i++)
{
- u = v*i; j = long(u); u-=j;
+ u = v*i; j = long(u); //u-=j;
if(!sm || j==n-1)
{ col[2*i] = c[2*j]; col[2*i+1] = c[2*j+1]; }
else if(j>n-1) // NOTE: never should be here!
@@ -1142,7 +1138,7 @@ void mglBase::AddLegend(const char *str,const char *style)
delete []wcs;
}
//-----------------------------------------------------------------------------
-bool mgl_check_dim2(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, bool less)
+bool MGL_EXPORT mgl_check_dim2(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, bool less)
{
// if(!gr || !x || !y || !z) return true; // if data is absent then should be segfault!!!
register long n=z->GetNx(),m=z->GetNy();
@@ -1166,7 +1162,7 @@ bool mgl_check_dim2(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, b
return false;
}
//-----------------------------------------------------------------------------
-bool mgl_check_dim0(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less)
+bool MGL_EXPORT mgl_check_dim0(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less)
{
// if(!gr || !x || !y) return true; // if data is absent then should be segfault!!!
register long n=y->GetNx();
@@ -1185,7 +1181,7 @@ bool mgl_check_dim0(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, b
return false;
}
//-----------------------------------------------------------------------------
-bool mgl_check_dim1(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less)
+bool MGL_EXPORT mgl_check_dim1(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, bool less)
{
// if(!gr || !x || !y) return true; // if data is absent then should be segfault!!!
register long n=y->GetNx();
@@ -1205,7 +1201,7 @@ bool mgl_check_dim1(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *name, b
return false;
}
//-----------------------------------------------------------------------------
-bool mgl_check_dim3(HMGL gr, bool both, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *name)
+bool MGL_EXPORT mgl_check_dim3(HMGL gr, bool both, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *name)
{
// if(!gr || !x || !y || !z || !a) return true; // if data is absent then should be segfault!!!
register long n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
@@ -1218,7 +1214,7 @@ bool mgl_check_dim3(HMGL gr, bool both, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b,
return false;
}
//-----------------------------------------------------------------------------
-bool mgl_check_trig(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, int d)
+bool MGL_EXPORT mgl_check_trig(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *name, int d)
{
// if(!gr || !x || !y || !z || !a || !nums) return true; // if data is absent then should be segfault!!!
long n = x->GetNx(), m = nums->GetNy();
@@ -1228,13 +1224,13 @@ bool mgl_check_trig(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const ch
return false;
}
//-----------------------------------------------------------------------------
-bool mgl_isboth(HCDT x, HCDT y, HCDT z, HCDT a)
+bool MGL_EXPORT mgl_isboth(HCDT x, HCDT y, HCDT z, HCDT a)
{
register long n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
return x->GetNx()*x->GetNy()*x->GetNz()==n*m*l && y->GetNx()*y->GetNy()*y->GetNz()==n*m*l && z->GetNx()*z->GetNy()*z->GetNz()==n*m*l;
}
//-----------------------------------------------------------------------------
-bool mgl_check_vec3(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *name)
+bool MGL_EXPORT mgl_check_vec3(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *name)
{
// if(!gr || !x || !y || !z || !ax || !ay || !az) return true; // if data is absent then should be segfault!!!
register long n=ax->GetNx(),m=ax->GetNy(),l=ax->GetNz();
diff --git a/src/base_cf.cpp b/src/base_cf.cpp
index 6c01a9c..24e07d6 100644
--- a/src/base_cf.cpp
+++ b/src/base_cf.cpp
@@ -24,100 +24,113 @@
// C interfaces
//
//-----------------------------------------------------------------------------
-int mgl_get_flag(HMGL gr, long flag) { return gr->get(flag); }
-void mgl_set_flag(HMGL gr, int val, long flag) { gr->set(val,flag); }
+void MGL_EXPORT mgl_set_quality(HMGL gr, int qual) { gr->SetQuality(qual); }
+void MGL_EXPORT mgl_set_quality_(uintptr_t *gr, int *qual) { _GR_->SetQuality(*qual); }
+int MGL_EXPORT mgl_get_quality(HMGL gr, int qual) { return gr->GetQuality(); }
+int MGL_EXPORT mgl_get_quality_(uintptr_t *gr, int *qual) { return _GR_->GetQuality(); }
+int MGL_EXPORT mgl_is_frames(HMGL gr)
+{ return gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4); }
//-----------------------------------------------------------------------------
-void mgl_set_color(char id, double r, double g, double b)
+int MGL_EXPORT mgl_get_flag(HMGL gr, long flag) { return gr->get(flag); }
+void MGL_EXPORT mgl_set_flag(HMGL gr, int val, long flag) { gr->set(val,flag); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_color(char id, double r, double g, double b)
{
register size_t i;
for(i=0;mglColorIds[i].id;i++) if(mglColorIds[i].id==id) mglColorIds[i].col = mglColor(r,g,b);
}
-void mgl_set_color_(char *id, mreal *r, mreal *g, mreal *b, int) { mgl_set_color(*id,*r,*g,*b); }
+void MGL_EXPORT mgl_set_color_(char *id, mreal *r, mreal *g, mreal *b, int) { mgl_set_color(*id,*r,*g,*b); }
//-----------------------------------------------------------------------------
-void mgl_set_def_sch(HMGL gr, const char *sch) { gr->SetDefScheme(sch); }
-void mgl_set_def_sch_(uintptr_t *gr, const char *sch,int l)
+void MGL_EXPORT mgl_set_def_sch(HMGL gr, const char *sch) { gr->SetDefScheme(sch); }
+void MGL_EXPORT mgl_set_def_sch_(uintptr_t *gr, const char *sch,int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
mgl_set_def_sch(_GR_, s); delete []s; }
//-----------------------------------------------------------------------------
-const char *mgl_get_mess(HMGL gr) { return gr->Mess.c_str(); }
-int mgl_get_warn(HMGL gr) { return gr->GetWarn(); }
-void mgl_set_warn(HMGL gr, int code, const char *txt)
+void MGL_EXPORT mgl_set_plotid(HMGL gr, const char *id) { gr->PlotId = id; }
+void MGL_EXPORT mgl_set_plotid_(uintptr_t *gr, const char *id,int l)
+{ char *s=new char[l+1]; memcpy(s,id,l); s[l]=0;
+ _GR_->PlotId = s; delete []s; }
+MGL_EXPORT const char *mgl_get_plotid(HMGL gr) { return gr->PlotId.c_str(); }
+//-----------------------------------------------------------------------------
+MGL_EXPORT const char *mgl_get_mess(HMGL gr) { return gr->Mess.c_str(); }
+int MGL_EXPORT mgl_get_warn(HMGL gr) { return gr->GetWarn(); }
+void MGL_EXPORT mgl_set_warn(HMGL gr, int code, const char *txt)
{ gr->SetWarn(code,txt); }
-void mgl_set_origin(HMGL gr, double x0, double y0, double z0)
+void MGL_EXPORT mgl_set_origin(HMGL gr, double x0, double y0, double z0)
{ gr->SetOrigin(x0,y0,z0); }
-void mgl_set_palette(HMGL gr, const char *colors)
+void MGL_EXPORT mgl_set_palette(HMGL gr, const char *colors)
{ gr->SetPalette(colors); }
-void mgl_set_meshnum(HMGL gr, int num) { gr->SetMeshNum(num); }
-void mgl_set_facenum(HMGL gr, int num) { gr->FaceNum=num; }
-void mgl_set_alpha_default(HMGL gr, double alpha) { gr->SetAlphaDef(alpha); }
-void mgl_set_light_dif(HMGL gr, int enable) { gr->SetDifLight(enable); }
-void mgl_clear_unused(HMGL gr) { gr->ClearUnused(); }
-//-----------------------------------------------------------------------------
-void mgl_set_rdc_acc(HMGL gr, int reduce) { gr->SetReduceAcc(reduce); }
-void mgl_highlight(HMGL gr, int id) { gr->Highlight(id); }
-void mgl_set_cut(HMGL gr, int cut) { gr->SetCut(cut); }
-void mgl_set_cut_box(HMGL gr, double x1,double y1,double z1,double x2,double y2,double z2)
+void MGL_EXPORT mgl_set_meshnum(HMGL gr, int num) { gr->SetMeshNum(num); }
+void MGL_EXPORT mgl_set_facenum(HMGL gr, int num) { gr->FaceNum=num; }
+void MGL_EXPORT mgl_set_alpha_default(HMGL gr, double alpha) { gr->SetAlphaDef(alpha); }
+void MGL_EXPORT mgl_set_light_dif(HMGL gr, int enable) { gr->SetDifLight(enable); }
+void MGL_EXPORT mgl_clear_unused(HMGL gr) { gr->ClearUnused(); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_rdc_acc(HMGL gr, int reduce) { gr->SetReduceAcc(reduce); }
+void MGL_EXPORT mgl_highlight(HMGL gr, int id) { gr->Highlight(id); }
+void MGL_EXPORT mgl_set_cut(HMGL gr, int cut) { gr->SetCut(cut); }
+void MGL_EXPORT mgl_set_cut_box(HMGL gr, double x1,double y1,double z1,double x2,double y2,double z2)
{ gr->SetCutBox(x1,y1,z1,x2,y2,z2); }
-void mgl_set_cutoff(HMGL gr, const char *EqC) { gr->CutOff(EqC); }
+void MGL_EXPORT mgl_set_cutoff(HMGL gr, const char *EqC) { gr->CutOff(EqC); }
//-----------------------------------------------------------------------------
-void mgl_set_ternary(HMGL gr, int enable) { gr->Ternary(enable); }
-void mgl_set_range_val(HMGL gr, char dir, double v1,double v2)
+void MGL_EXPORT mgl_set_ternary(HMGL gr, int enable) { gr->Ternary(enable); }
+void MGL_EXPORT mgl_set_range_val(HMGL gr, char dir, double v1,double v2)
{
if(dir=='c') gr->CRange(v1,v2);
else if(dir=='x') gr->XRange(v1,v2);
else if(dir=='y') gr->YRange(v1,v2);
else if(dir=='z') gr->ZRange(v1,v2); }
-void mgl_set_range_dat(HMGL gr, char dir, HCDT a, int add)
+void MGL_EXPORT mgl_set_range_dat(HMGL gr, char dir, HCDT a, int add)
{
if(dir=='c') gr->CRange(a,add);
else if(dir=='x') gr->XRange(a,add);
else if(dir=='y') gr->YRange(a,add);
else if(dir=='z') gr->ZRange(a,add); }
-void mgl_set_ranges(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2)
+void MGL_EXPORT mgl_set_ranges(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2)
{ gr->SetRanges(x1,y1,z1,x2,y2,z2); }
-void mgl_set_func(HMGL gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA)
+void MGL_EXPORT mgl_set_func(HMGL gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA)
{ gr->SetFunc(EqX,EqY,EqZ,EqA); }
-void mgl_set_coor(HMGL gr, int how) { gr->SetCoor(how); }
+void MGL_EXPORT mgl_set_coor(HMGL gr, int how) { gr->SetCoor(how); }
//-----------------------------------------------------------------------------
-void mgl_set_bar_width(HMGL gr, double width) { gr->SetBarWidth(width); }
+void MGL_EXPORT mgl_set_bar_width(HMGL gr, double width) { gr->SetBarWidth(width); }
//-----------------------------------------------------------------------------
//
// Fortran interfaces
//
//-----------------------------------------------------------------------------
-void mgl_set_rdc_acc_(uintptr_t *gr, int *reduce)
+void MGL_EXPORT mgl_set_rdc_acc_(uintptr_t *gr, int *reduce)
{ _GR_->SetReduceAcc(*reduce); }
-void mgl_highlight_(uintptr_t *gr, int *id) { _GR_->Highlight(*id); }
-void mgl_set_origin_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0)
+void MGL_EXPORT mgl_highlight_(uintptr_t *gr, int *id) { _GR_->Highlight(*id); }
+void MGL_EXPORT mgl_set_origin_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0)
{ _GR_->SetOrigin(*x0,*y0,*z0); }
-int mgl_get_warn_(uintptr_t *gr) { return _GR_->GetWarn(); }
-void mgl_set_warn_(uintptr_t *gr, int *code, const char *txt, int l)
+int MGL_EXPORT mgl_get_warn_(uintptr_t *gr) { return _GR_->GetWarn(); }
+void MGL_EXPORT mgl_set_warn_(uintptr_t *gr, int *code, const char *txt, int l)
{ char *s=new char[l+1]; memcpy(s,txt,l); s[l]=0;
_GR_->SetWarn(*code, s); delete []s; }
-void mgl_set_palette_(uintptr_t *gr, const char *colors, int l)
+void MGL_EXPORT mgl_set_palette_(uintptr_t *gr, const char *colors, int l)
{ char *s=new char[l+1]; memcpy(s,colors,l); s[l]=0;
_GR_->SetPalette(s); delete []s; }
-void mgl_set_meshnum_(uintptr_t *gr, int *num) { _GR_->SetMeshNum(*num); }
-void mgl_set_facenum_(uintptr_t *gr, int *num) { _GR_->FaceNum=*num; }
-void mgl_set_alpha_default_(uintptr_t *gr, mreal *alpha) { _GR_->SetAlphaDef(*alpha); }
-void mgl_set_light_dif_(uintptr_t *gr, int *enable) { _GR_->SetDifLight(*enable); }
-void mgl_clear_unused_(uintptr_t *gr) { _GR_->ClearUnused(); }
+void MGL_EXPORT mgl_set_meshnum_(uintptr_t *gr, int *num) { _GR_->SetMeshNum(*num); }
+void MGL_EXPORT mgl_set_facenum_(uintptr_t *gr, int *num) { _GR_->FaceNum=*num; }
+void MGL_EXPORT mgl_set_alpha_default_(uintptr_t *gr, mreal *alpha) { _GR_->SetAlphaDef(*alpha); }
+void MGL_EXPORT mgl_set_light_dif_(uintptr_t *gr, int *enable) { _GR_->SetDifLight(*enable); }
+void MGL_EXPORT mgl_clear_unused_(uintptr_t *gr) { _GR_->ClearUnused(); }
//-----------------------------------------------------------------------------
-void mgl_set_cut_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2)
+void MGL_EXPORT mgl_set_cut_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2)
{ _GR_->SetCutBox(*x1,*y1,*z1,*x2,*y2,*z2); }
-void mgl_set_cut_(uintptr_t *gr, int *cut) { _GR_->SetCut(*cut); }
-void mgl_set_cutoff_(uintptr_t *gr, const char *EqC, int l)
+void MGL_EXPORT mgl_set_cut_(uintptr_t *gr, int *cut) { _GR_->SetCut(*cut); }
+void MGL_EXPORT mgl_set_cutoff_(uintptr_t *gr, const char *EqC, int l)
{ char *s=new char[l+1]; memcpy(s,EqC,l); s[l]=0;
_GR_->CutOff(s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_set_ternary_(uintptr_t *gr, int *enable) { _GR_->Ternary(*enable); }
-void mgl_set_range_val_(uintptr_t *gr, const char *dir, mreal *v1, mreal *v2,int)
+void MGL_EXPORT mgl_set_ternary_(uintptr_t *gr, int *enable) { _GR_->Ternary(*enable); }
+void MGL_EXPORT mgl_set_range_val_(uintptr_t *gr, const char *dir, mreal *v1, mreal *v2,int)
{ mgl_set_range_val(_GR_,*dir,*v1,*v2); }
-void mgl_set_range_dat_(uintptr_t *gr, const char *dir, uintptr_t *a, int *add,int)
+void MGL_EXPORT mgl_set_range_dat_(uintptr_t *gr, const char *dir, uintptr_t *a, int *add,int)
{ mgl_set_range_dat(_GR_,*dir,_DA_(a),*add); }
-void mgl_set_ranges_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2)
+void MGL_EXPORT mgl_set_ranges_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2)
{ _GR_->SetRanges(*x1,*y1,*z1,*x2,*y2,*z2); }
-void mgl_set_func_(uintptr_t *gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA,int lx,int ly,int lz,int la)
+void MGL_EXPORT mgl_set_func_(uintptr_t *gr, const char *EqX,const char *EqY,const char *EqZ,const char *EqA,int lx,int ly,int lz,int la)
{
char *sx=new char[lx+1]; memcpy(sx,EqX,lx); sx[lx]=0;
char *sy=new char[ly+1]; memcpy(sy,EqY,ly); sy[ly]=0;
@@ -126,58 +139,58 @@ void mgl_set_func_(uintptr_t *gr, const char *EqX,const char *EqY,const char *Eq
_GR_->SetFunc(sx,sy,sz,sa);
delete []sx; delete []sy; delete []sz; delete []sa;
}
-void mgl_set_coor_(uintptr_t *gr, int *how)
+void MGL_EXPORT mgl_set_coor_(uintptr_t *gr, int *how)
{ _GR_->SetCoor(*how); }
//-----------------------------------------------------------------------------
-void mgl_set_tick_rotate(HMGL gr, int enable){ gr->SetTickRotate(enable); }
-void mgl_set_tick_skip(HMGL gr, int enable) { gr->SetTickSkip(enable); }
-void mgl_set_tick_rotate_(uintptr_t *gr,int *enable){ _GR_->SetTickRotate(*enable); }
-void mgl_set_tick_skip_(uintptr_t *gr, int *enable) { _GR_->SetTickSkip(*enable); }
-//-----------------------------------------------------------------------------
-void mgl_set_rotated_text(HMGL gr, int enable) { gr->SetRotatedText(enable); }
-void mgl_set_mark_size(HMGL gr, double size) { gr->SetMarkSize(size); }
-void mgl_set_arrow_size(HMGL gr, double size) { gr->SetArrowSize(size); }
-void mgl_set_font_size(HMGL gr, double size) { gr->SetFontSize(size); }
-void mgl_set_font_def(HMGL gr, const char *fnt) { gr->SetFontDef(fnt); }
-void mgl_load_font(HMGL gr, const char *name, const char *path)
+void MGL_EXPORT mgl_set_tick_rotate(HMGL gr, int enable){ gr->SetTickRotate(enable); }
+void MGL_EXPORT mgl_set_tick_skip(HMGL gr, int enable) { gr->SetTickSkip(enable); }
+void MGL_EXPORT mgl_set_tick_rotate_(uintptr_t *gr,int *enable){ _GR_->SetTickRotate(*enable); }
+void MGL_EXPORT mgl_set_tick_skip_(uintptr_t *gr, int *enable) { _GR_->SetTickSkip(*enable); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_rotated_text(HMGL gr, int enable) { gr->SetRotatedText(enable); }
+void MGL_EXPORT mgl_set_mark_size(HMGL gr, double size) { gr->SetMarkSize(size); }
+void MGL_EXPORT mgl_set_arrow_size(HMGL gr, double size) { gr->SetArrowSize(size); }
+void MGL_EXPORT mgl_set_font_size(HMGL gr, double size) { gr->SetFontSize(size); }
+void MGL_EXPORT mgl_set_font_def(HMGL gr, const char *fnt) { gr->SetFontDef(fnt); }
+void MGL_EXPORT mgl_load_font(HMGL gr, const char *name, const char *path)
{ gr->LoadFont(name,path); }
-void mgl_copy_font(HMGL gr, HMGL gr_from) { gr->CopyFont(gr_from); }
-void mgl_restore_font(HMGL gr) { gr->RestoreFont(); }
-//-----------------------------------------------------------------------------
-void mgl_set_bar_width_(uintptr_t *gr, mreal *width) { _GR_->SetBarWidth(*width); }
-void mgl_set_rotated_text_(uintptr_t *gr, int *rotated) { _GR_->SetRotatedText(*rotated); }
-void mgl_set_mark_size_(uintptr_t *gr, mreal *size) { _GR_->SetMarkSize(*size); }
-void mgl_set_arrow_size_(uintptr_t *gr, mreal *size) { _GR_->SetArrowSize(*size); }
-void mgl_set_font_size_(uintptr_t *gr, mreal *size) { _GR_->SetFontSize(*size); }
-void mgl_set_font_def_(uintptr_t *gr, char *name, int l)
+void MGL_EXPORT mgl_copy_font(HMGL gr, HMGL gr_from) { gr->CopyFont(gr_from); }
+void MGL_EXPORT mgl_restore_font(HMGL gr) { gr->RestoreFont(); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_bar_width_(uintptr_t *gr, mreal *width) { _GR_->SetBarWidth(*width); }
+void MGL_EXPORT mgl_set_rotated_text_(uintptr_t *gr, int *rotated) { _GR_->SetRotatedText(*rotated); }
+void MGL_EXPORT mgl_set_mark_size_(uintptr_t *gr, mreal *size) { _GR_->SetMarkSize(*size); }
+void MGL_EXPORT mgl_set_arrow_size_(uintptr_t *gr, mreal *size) { _GR_->SetArrowSize(*size); }
+void MGL_EXPORT mgl_set_font_size_(uintptr_t *gr, mreal *size) { _GR_->SetFontSize(*size); }
+void MGL_EXPORT mgl_set_font_def_(uintptr_t *gr, char *name, int l)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
_GR_->SetFontDef(s); delete []s; }
-void mgl_load_font_(uintptr_t *gr, char *name, char *path, int l,int n)
+void MGL_EXPORT mgl_load_font_(uintptr_t *gr, char *name, char *path, int l,int n)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,path,n); d[n]=0;
_GR_->LoadFont(s,d); delete []s; delete []d; }
-void mgl_copy_font_(uintptr_t *gr, uintptr_t *gr_from)
+void MGL_EXPORT mgl_copy_font_(uintptr_t *gr, uintptr_t *gr_from)
{ _GR_->CopyFont((mglBase *)(*gr_from)); }
-void mgl_restore_font_(uintptr_t *gr) { _GR_->RestoreFont(); }
+void MGL_EXPORT mgl_restore_font_(uintptr_t *gr) { _GR_->RestoreFont(); }
//-----------------------------------------------------------------------------
extern mglFont mglDefFont;
-void mgl_def_font(const char *name, const char *path)
+void MGL_EXPORT mgl_def_font(const char *name, const char *path)
{ mglDefFont.Load(name,path); }
-void mgl_def_font_(const char *name, const char *path,int l,int n)
+void MGL_EXPORT mgl_def_font_(const char *name, const char *path,int l,int n)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,path,n); d[n]=0;
mglDefFont.Load(name,path); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_start_group(HMGL gr, const char *s) { gr->StartAutoGroup(s); }
-void mgl_end_group(HMGL gr) { gr->EndGroup(); }
-void mgl_start_group_(uintptr_t *gr, const char *name,int l)
+void MGL_EXPORT mgl_start_group(HMGL gr, const char *s) { gr->StartAutoGroup(s); }
+void MGL_EXPORT mgl_end_group(HMGL gr) { gr->EndGroup(); }
+void MGL_EXPORT mgl_start_group_(uintptr_t *gr, const char *name,int l)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
_GR_->StartAutoGroup(s); delete []s; }
-void mgl_end_group_(uintptr_t *gr) { _GR_->EndGroup(); }
+void MGL_EXPORT mgl_end_group_(uintptr_t *gr) { _GR_->EndGroup(); }
//-----------------------------------------------------------------------------
#include <stdarg.h>
bool mglTestMode=false;
-void mgl_test_txt(const char *str, ...)
+void MGL_EXPORT mgl_test_txt(const char *str, ...)
{
if(mglTestMode)
{
@@ -190,18 +203,18 @@ void mgl_test_txt(const char *str, ...)
fflush(stdout);
}
}
-void mgl_set_test_mode(int enable) { mglTestMode=enable; }
+void MGL_EXPORT mgl_set_test_mode(int enable) { mglTestMode=enable; }
//---------------------------------------------------------------------------
-long mgl_use_graph(HMGL gr, int inc)
+long MGL_EXPORT mgl_use_graph(HMGL gr, int inc)
{ if(!gr) return 0; gr->InUse+=inc; return gr->InUse; }
-long mgl_use_graph_(uintptr_t *gr, int *inc)
+long MGL_EXPORT mgl_use_graph_(uintptr_t *gr, int *inc)
{ return mgl_use_graph(_GR_,*inc); }
//---------------------------------------------------------------------------
-void mgl_set_ambbr(HMGL gr, double i) { gr->SetAmbient(i); }
-void mgl_set_ambbr_(uintptr_t *gr, mreal *i){ _GR_->SetAmbient(*i); }
+void MGL_EXPORT mgl_set_ambbr(HMGL gr, double i) { gr->SetAmbient(i); }
+void MGL_EXPORT mgl_set_ambbr_(uintptr_t *gr, mreal *i){ _GR_->SetAmbient(*i); }
//---------------------------------------------------------------------------
-void mgl_zoom_axis(HMGL gr, double x1,double y1,double z1,double c1,double x2,double y2,double z2,double c2)
+void MGL_EXPORT mgl_zoom_axis(HMGL gr, double x1,double y1,double z1,double c1,double x2,double y2,double z2,double c2)
{ gr->ZoomAxis(mglPoint(x1,y1,z1,c1), mglPoint(x2,y2,z2,c2)); }
-void mgl_zoom_axis_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *c1, mreal *x2, mreal *y2, mreal *z2, mreal *c2)
+void MGL_EXPORT mgl_zoom_axis_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *c1, mreal *x2, mreal *y2, mreal *z2, mreal *c2)
{ _GR_->ZoomAxis(mglPoint(*x1,*y1,*z1,*c1), mglPoint(*x2,*y2,*z2,*c2)); }
//---------------------------------------------------------------------------
diff --git a/src/canvas.cpp b/src/canvas.cpp
index 9e92f5a..36da383 100644
--- a/src/canvas.cpp
+++ b/src/canvas.cpp
@@ -21,7 +21,7 @@
#include "mgl2/font.h"
#include "mgl2/canvas.h"
//-----------------------------------------------------------------------------
-std::string mglGlobalMess; ///< Buffer for receiving global messages
+MGL_EXPORT std::string mglGlobalMess; ///< Buffer for receiving global messages
//-----------------------------------------------------------------------------
mglCanvas::mglCanvas(int w, int h) : mglBase()
{
@@ -184,7 +184,7 @@ GifFileType *gif;*/
clr(MGL_DISABLE_SCALE);
clr(MGL_USE_GMTIME); clr(MGL_NOSUBTICKS);
SetDifLight(false); SetReduceAcc(false);
- SetDefScheme("BbcyrR"); SetPalette(MGL_DEF_PAL);
+ SetDefScheme(MGL_DEF_SCH); SetPalette(MGL_DEF_PAL);
SetPenPal("k-1"); Alpha(false);
SetTicks('x'); SetTicks('y'); SetTicks('z'); SetTicks('c');
stack.clear(); Restore(); DefColor('k');
@@ -306,15 +306,17 @@ mreal mglCanvas::GetOrgZ(char dir) const
a.n1 = p; a.n4 = type; add_prim(a); }
void mglCanvas::mark_plot(long p, char type, mreal size)
{
- if(p<0 || mgl_isnan(Pnt[p].x)) return;
+ if(p<0 || mgl_isnan(Pnt[p].x) || mgl_isnan(size)) return;
long pp=p;
- mreal pw = fabs(PenWidth)*0.15/sqrt(font_factor);
+// mreal pw = fabs(PenWidth)*0.15/sqrt(font_factor);
+ mreal pw = 0.15/sqrt(font_factor);
mglDrawReg d; d.set(this,1,1,0);
d.PDef = PDef; d.pPos = pPos;
d.ObjId = ObjId; d.PenWidth=pw;
if(size>=0) size *= MarkSize;
if(size==0) size = MarkSize;
size *= 0.35*font_factor;
+ if(type=='.') size = fabs(PenWidth)*sqrt(font_factor/400);
if(TernAxis&4) for(int i=0;i<4;i++)
{ p = ProjScale(i, pp); MGL_MARK_PLOT }
else { MGL_MARK_PLOT }
@@ -665,8 +667,18 @@ int mglCanvas::GetSplId(long x,long y) const
return id;
}
//-----------------------------------------------------------------------------
+#define islog(a, b) (((a)>0 && (b)>10*(a)) || ((b)<0 && (a)<10*(b)))
void mglCanvas::Aspect(mreal Ax,mreal Ay,mreal Az)
{
+ if(mgl_isnan(Ax))
+ {
+ mreal dy = (Max.y-Min.y), dx = (Max.x-Min.x);
+ if(islog(Min.x,Max.x) && fx) dx = log10(Max.x/Min.x);
+ if(islog(Min.y,Max.y) && fy) dy = log10(Max.y/Min.y);
+ mreal f=exp(M_LN10*floor(0.5+log10(fabs(dy/dx))));
+ if(!mgl_isnan(Ay)) f=Ay;
+ Ax = Height*dx*f; Ay = Width*dy; Az = Depth;
+ }
mreal a = fabs(Ax) > fabs(Ay) ? fabs(Ax) : fabs(Ay);
a = a > fabs(Az) ? a : fabs(Az);
if(a==0) { SetWarn(mglWarnZero,"Aspect"); return; }
@@ -708,6 +720,7 @@ void mglCanvas::Legend(const std::vector<mglText> &leg, mreal x, mreal y, const
long n=leg.size(), iw, ih;
if(n<1) { SetWarn(mglWarnLeg,"Legend"); return; }
mreal ll = SaveState(opt); if(mgl_isnan(ll)) ll=0.1;
+ if(saved) MarkSize=MSS; // restore back size of marks
static int cgid=1; StartGroup("Legend",cgid++);
if(ll<=0 || mgl_isnan(ll)) ll=0.1;
ll *=font_factor;
@@ -747,14 +760,14 @@ void mglCanvas::Legend(const std::vector<mglText> &leg, mreal x, mreal y, const
for(i=0;ff[i] && ff[i]!=':';i++) if(strchr(MGL_COLORS,ff[i]))
{
- if(k1 && k2) { k3=ff[i]; k4++; }
+ if(k1 && k2) { k3=ff[i]; k4++; } // NOTE: keep k3 for future usage
if(k1 && !k2) { k2=ff[i]; k4++; }
if(!k1) { k1=ff[i]; k4++; }
}
if(k4==2) k2=0;
if(k4==1) k1=k2=0;
mreal c1=AddTexture(char(k1?k1:'w')), c2=AddTexture(char(k2?k2:'k'));
- if((Flag&3)==2) { mreal cc=c1; c2=c1; c2=cc; }
+ if((Flag&3)==2) { mreal cc=c1; c2=c1; c1=cc; }
if(strchr(ff,'#')) // draw bounding box
{
@@ -890,6 +903,7 @@ void mglCanvas::Title(const wchar_t *title,const char *stl,mreal size)
{
mreal s = size>0 ? size/FontSize:-size, h=TextHeight(stl,size)*s/2;
if(h>=inH) { SetWarn(mglWarnSpc,"Title"); return; }
+ static int cgid=1; StartGroup("Title",cgid++);
bool box=mglchr(stl,'#');
int align; mglGetStyle(stl,0,&align); align = align&3;
mreal y=inY+inH-h;
@@ -898,7 +912,7 @@ void mglCanvas::Title(const wchar_t *title,const char *stl,mreal size)
if(box) // draw boungind box
{
mreal c1=AddTexture('w'), c2=AddTexture('k');
- if((Flag&3)==2) { mreal cc=c1; c2=c1; c2=cc; }
+ if((Flag&3)==2) { mreal cc=c1; c2=c1; c1=cc; }
long k1,k2,k3,k4;
k1=AddPnt(mglPoint(inX,y,Depth),c1,q,-1,0);
k2=AddPnt(mglPoint(inX+inW,y,Depth),c1,q,-1,0);
@@ -912,6 +926,7 @@ void mglCanvas::Title(const wchar_t *title,const char *stl,mreal size)
}
B1.y -= h/2; B1.b[4] -= h; B=B1;
inH-=h; font_factor = B.b[0] < B.b[4] ? B.b[0] : B.b[4];
+ EndGroup();
}
//-----------------------------------------------------------------------------
void mglCanvas::StartAutoGroup (const char *lbl)
diff --git a/src/canvas_cf.cpp b/src/canvas_cf.cpp
index 6cb5d6a..e5f2cd7 100644
--- a/src/canvas_cf.cpp
+++ b/src/canvas_cf.cpp
@@ -19,24 +19,33 @@
***************************************************************************/
#include "mgl2/canvas.h"
#include "mgl2/canvas_cf.h"
+#include "mgl2/eval.h"
//-----------------------------------------------------------------------------
#undef _GR_
#define _GR_ ((mglCanvas *)(*gr))
-#define _Gr_ ((mglCanvas *)(gr))
-//-----------------------------------------------------------------------------
-const unsigned char *mgl_get_rgb(HMGL gr) { return _Gr_->GetBits(); }
-const unsigned char *mgl_get_rgba(HMGL gr) { return _Gr_->GetRGBA(); }
-int mgl_get_width(HMGL gr) { return _Gr_->GetWidth(); }
-int mgl_get_height(HMGL gr) { return _Gr_->GetHeight(); }
-void mgl_calc_xyz(HMGL gr, int xs, int ys, mreal *x, mreal *y, mreal *z)
-{ mglPoint p = _Gr_->CalcXYZ(xs,ys); *x = p.x; *y = p.y; *z = p.z; }
-void mgl_calc_scr(HMGL gr, double x, double y, double z, int *xs, int *ys)
-{ _Gr_->CalcScr(mglPoint(x,y,z),xs,ys); }
-void mgl_set_obj_id(HMGL gr, int id) { _Gr_->SetObjId(id); }
-int mgl_get_obj_id(HMGL gr, int x, int y) { return _Gr_->GetObjId(x,y); }
-int mgl_get_spl_id(HMGL gr, int x, int y) { return _Gr_->GetSplId(x,y); }
-//-----------------------------------------------------------------------------
-long mgl_is_active(HMGL gr, int xs, int ys, int d)
+//-----------------------------------------------------------------------------
+MGL_EXPORT const unsigned char *mgl_get_rgb(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetBits():0; }
+MGL_EXPORT const unsigned char *mgl_get_rgba(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetRGBA():0; }
+int MGL_EXPORT mgl_get_width(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetWidth():0; }
+int MGL_EXPORT mgl_get_height(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetHeight():0; }
+void MGL_EXPORT mgl_calc_xyz(HMGL gr, int xs, int ys, mreal *x, mreal *y, mreal *z)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr);
+ mglPoint p = g?g->CalcXYZ(xs,ys):mglPoint(NAN,NAN,NAN);
+ *x = p.x; *y = p.y; *z = p.z; }
+void MGL_EXPORT mgl_calc_scr(HMGL gr, double x, double y, double z, int *xs, int *ys)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->CalcScr(mglPoint(x,y,z),xs,ys); }
+void MGL_EXPORT mgl_set_obj_id(HMGL gr, int id)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetObjId(id); }
+int MGL_EXPORT mgl_get_obj_id(HMGL gr, int x, int y)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetObjId(x,y):-1; }
+int MGL_EXPORT mgl_get_spl_id(HMGL gr, int x, int y)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetSplId(x,y):-1; }
+//-----------------------------------------------------------------------------
+long MGL_EXPORT mgl_is_active(HMGL gr, int xs, int ys, int d)
{
if(d<=0) d=1;
for(size_t i=0;i<gr->Act.size();i++)
@@ -46,50 +55,68 @@ long mgl_is_active(HMGL gr, int xs, int ys, int d)
}
return -1;
}
-long mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d)
+long MGL_EXPORT mgl_is_active_(uintptr_t *gr, int *xs, int *ys, int *d)
{ return mgl_is_active(_GR_, *xs, *ys, *d); }
//-----------------------------------------------------------------------------
-int mgl_new_frame(HMGL gr) { return _Gr_->NewFrame(); }
-void mgl_end_frame(HMGL gr) { _Gr_->EndFrame(); }
-int mgl_get_num_frame(HMGL gr) { return _Gr_->GetNumFrame(); }
-void mgl_reset_frames(HMGL gr) { _Gr_->ResetFrames(); }
-void mgl_get_frame(HMGL gr, int i) { _Gr_->GetFrame(i); }
-void mgl_set_frame(HMGL gr, int i) { _Gr_->SetFrame(i); }
-void mgl_show_frame(HMGL gr, int i) { _Gr_->ShowFrame(i); }
-void mgl_del_frame(HMGL gr, int i) { _Gr_->DelFrame(i); }
-//-----------------------------------------------------------------------------
-void mgl_set_transp_type(HMGL gr, int type) { _Gr_->SetTranspType(type); }
-void mgl_set_alpha(HMGL gr, int enable) { _Gr_->Alpha(enable); }
-void mgl_set_fog(HMGL gr, double d, double dz) { _Gr_->Fog(d,dz); }
-void mgl_set_light(HMGL gr, int enable) { _Gr_->Light(enable); }
-void mgl_set_light_n(HMGL gr, int n, int enable) { _Gr_->Light(n, enable); }
-void mgl_add_light_ext(HMGL gr, int n, double x, double y, double z, char c, double br, double ap)
-{ _Gr_->AddLight(n,mglPoint(x,y,z),c,br,ap); }
-void mgl_add_light_loc(HMGL gr, int n, double x, double y, double z, double dx, double dy, double dz, char c, double br, double ap)
-{ _Gr_->AddLight(n,mglPoint(x,y,z),mglPoint(dx,dy,dz),c,br,ap); }
-void mgl_add_light(HMGL gr, int n, double x, double y, double z)
-{ _Gr_->AddLight(n,mglPoint(x,y,z)); }
-//-----------------------------------------------------------------------------
-void mgl_mat_push(HMGL gr) { _Gr_->Push(); }
-void mgl_mat_pop(HMGL gr) { _Gr_->Pop(); }
-void mgl_clf(HMGL gr) { _Gr_->Clf(); }
-void mgl_clf_rgb(HMGL gr, double r, double g, double b){ _Gr_->Clf(mglColor(r,g,b)); }
-//-----------------------------------------------------------------------------
-void mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style,double dx,double dy)
+int MGL_EXPORT mgl_new_frame(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->NewFrame():-1; }
+void MGL_EXPORT mgl_end_frame(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->EndFrame(); }
+int MGL_EXPORT mgl_get_num_frame(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetNumFrame():0; }
+void MGL_EXPORT mgl_reset_frames(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->ResetFrames(); }
+void MGL_EXPORT mgl_get_frame(HMGL gr, int i)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->GetFrame(i); }
+void MGL_EXPORT mgl_set_frame(HMGL gr, int i)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetFrame(i); }
+void MGL_EXPORT mgl_show_frame(HMGL gr, int i)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->ShowFrame(i); }
+void MGL_EXPORT mgl_del_frame(HMGL gr, int i)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->DelFrame(i); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_transp_type(HMGL gr, int type)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTranspType(type); }
+void MGL_EXPORT mgl_set_alpha(HMGL gr, int enable)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Alpha(enable); }
+void MGL_EXPORT mgl_set_fog(HMGL gr, double d, double dz)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Fog(d,dz); }
+void MGL_EXPORT mgl_set_light(HMGL gr, int enable)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Light(enable); }
+void MGL_EXPORT mgl_set_light_n(HMGL gr, int n, int enable)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Light(n, enable); }
+void MGL_EXPORT mgl_add_light_ext(HMGL gr, int n, double x, double y, double z, char c, double br, double ap)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AddLight(n,mglPoint(x,y,z),c,br,ap); }
+void MGL_EXPORT mgl_add_light_loc(HMGL gr, int n, double x, double y, double z, double dx, double dy, double dz, char c, double br, double ap)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AddLight(n,mglPoint(x,y,z),mglPoint(dx,dy,dz),c,br,ap); }
+void MGL_EXPORT mgl_add_light(HMGL gr, int n, double x, double y, double z)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AddLight(n,mglPoint(x,y,z)); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_mat_push(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Push(); }
+void MGL_EXPORT mgl_mat_pop(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Pop(); }
+void MGL_EXPORT mgl_clf(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Clf(); }
+void MGL_EXPORT mgl_clf_rgb(HMGL gr, double r, double g, double b)
+{ mglCanvas *gg = dynamic_cast<mglCanvas *>(gr); if(gg) gg->Clf(mglColor(r,g,b)); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_subplot_d(HMGL gr, int nx,int ny,int m,const char *style,double dx,double dy)
{
double x1,x2,y1,y2;
int mx = m%nx, my = m/nx;
- if(_Gr_->get(MGL_AUTO_FACTOR)) { dx /= 1.55; dy /= 1.55; }
+ if(gr->get(MGL_AUTO_FACTOR)) { dx /= 1.55; dy /= 1.55; }
else { dx /= 2; dy /= 2; }
x1 = (mx+dx)/nx; x2 = (mx+1+dx)/nx;
y2 = 1.f-(my+dy)/ny; y1 = 1.f-(my+1+dy)/ny;
- _Gr_->InPlot(x1,x2,y1,y2,style);
+ mglCanvas *g = dynamic_cast<mglCanvas *>(gr);
+ if(g) g->InPlot(x1,x2,y1,y2,style);
}
//-----------------------------------------------------------------------------
-void mgl_subplot(HMGL gr, int nx,int ny,int m,const char *style)
+void MGL_EXPORT mgl_subplot(HMGL gr, int nx,int ny,int m,const char *style)
{ mgl_subplot_d(gr,nx,ny,m,style,0,0); }
//-----------------------------------------------------------------------------
-void mgl_multiplot(HMGL gr, int nx,int ny,int m,int dx,int dy,const char *style)
+void MGL_EXPORT mgl_multiplot(HMGL gr, int nx,int ny,int m,int dx,int dy,const char *style)
{
double x1,x2,y1,y2;
int mx = m%nx, my = m/nx;
@@ -97,332 +124,335 @@ void mgl_multiplot(HMGL gr, int nx,int ny,int m,int dx,int dy,const char *style)
dy = (dy<1 || dy+my>ny) ? 1 : dy;
x1 = double(mx)/nx; x2 = double(mx+dx)/nx;
y2 = 1-double(my)/ny; y1 = 1-double(my+dy)/ny;
- _Gr_->InPlot(x1,x2,y1,y2,style);
+ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->InPlot(x1,x2,y1,y2,style);
}
//-----------------------------------------------------------------------------
-void mgl_inplot(HMGL gr, double x1,double x2,double y1,double y2)
-{ _Gr_->InPlot(x1,x2,y1,y2,false); }
-void mgl_relplot(HMGL gr, double x1,double x2,double y1,double y2)
-{ _Gr_->InPlot(x1,x2,y1,y2,true); }
+void MGL_EXPORT mgl_inplot(HMGL gr, double x1,double x2,double y1,double y2)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->InPlot(x1,x2,y1,y2,false); }
+void MGL_EXPORT mgl_relplot(HMGL gr, double x1,double x2,double y1,double y2)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->InPlot(x1,x2,y1,y2,true); }
//-----------------------------------------------------------------------------
-void mgl_columnplot(HMGL gr, int num, int i, double dd)
+void MGL_EXPORT mgl_columnplot(HMGL gr, int num, int i, double dd)
{
register double w = 1./num;
- _Gr_->InPlot(0,1,1-w*(i+1-dd),1-i*w,true);
+ mglCanvas *g = dynamic_cast<mglCanvas *>(gr);
+ if(g) g->InPlot(0,1,1-w*(i+1-dd),1-i*w,true);
}
//-----------------------------------------------------------------------------
-void mgl_gridplot(HMGL gr, int nx, int ny, int i, double dd)
+void MGL_EXPORT mgl_gridplot(HMGL gr, int nx, int ny, int i, double dd)
{
register int ix=i%nx, iy=i/nx;
register double wx = 1./nx, wy = 1./ny;
- _Gr_->InPlot(ix*wx,wx*(ix+1-dd),1-wy*(iy+1-dd),1-iy*wy,true);
+ mglCanvas *g = dynamic_cast<mglCanvas *>(gr);
+ if(g) g->InPlot(ix*wx,wx*(ix+1-dd),1-wy*(iy+1-dd),1-iy*wy,true);
}
//-----------------------------------------------------------------------------
-void mgl_stickplot(HMGL gr, int num, int i, double tet, double phi)
-{ _Gr_->StickPlot(num, i, tet, phi); }
-//-----------------------------------------------------------------------------
-void mgl_aspect(HMGL gr, double Ax,double Ay,double Az)
-{ _Gr_->Aspect(Ax,Ay,Az); }
-void mgl_rotate(HMGL gr, double TetX,double TetZ,double TetY)
-{ _Gr_->Rotate(TetX,TetZ,TetY); }
-void mgl_view(HMGL gr, double TetX,double TetZ,double TetY)
-{ _Gr_->View(TetX,TetZ,TetY); }
-void mgl_zoom(HMGL gr, double x1, double y1, double x2, double y2)
-{ _Gr_->Zoom(x1,y1,x2,y2); }
-void mgl_rotate_vector(HMGL gr, double Tet,double x,double y,double z)
-{ _Gr_->RotateN(Tet,x,y,z); }
-void mgl_perspective(HMGL gr, double val)
-{ _Gr_->Perspective(val); }
-void mgl_title(HMGL gr, const char *title, const char *stl, double size)
-{ _Gr_->Title(title,stl,size); }
-void mgl_titlew(HMGL gr, const wchar_t *title, const char *stl, double size)
-{ _Gr_->Title(title,stl,size); }
-//-----------------------------------------------------------------------------
-int mgl_new_frame_(uintptr_t *gr) { return _GR_->NewFrame(); }
-void mgl_end_frame_(uintptr_t *gr) { _GR_->EndFrame(); }
-int mgl_get_num_frame_(uintptr_t *gr) { return _GR_->GetNumFrame(); }
-void mgl_reset_frames_(uintptr_t *gr) { _GR_->ResetFrames(); }
-void mgl_get_frame_(uintptr_t *gr, int *i) { _GR_->GetFrame(*i); }
-void mgl_set_frame_(uintptr_t *gr, int *i) { _GR_->SetFrame(*i); }
-void mgl_show_frame_(uintptr_t *gr, int *i) { _GR_->ShowFrame(*i); }
-void mgl_del_frame_(uintptr_t *gr, int *i) { _GR_->DelFrame(*i); }
-//-----------------------------------------------------------------------------
-void mgl_set_transp_type_(uintptr_t *gr, int *type) { _GR_->SetTranspType(*type); }
-void mgl_set_alpha_(uintptr_t *gr, int *enable) { _GR_->Alpha(*enable); }
-void mgl_set_fog_(uintptr_t *gr, mreal *d, mreal *dz) { _GR_->Fog(*d, *dz); }
-void mgl_set_light_(uintptr_t *gr, int *enable) { _GR_->Light(*enable); }
-void mgl_set_light_n_(uintptr_t *gr, int *n, int *enable)
+void MGL_EXPORT mgl_stickplot(HMGL gr, int num, int i, double tet, double phi)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->StickPlot(num, i, tet, phi); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_aspect(HMGL gr, double Ax,double Ay,double Az)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Aspect(Ax,Ay,Az); }
+void MGL_EXPORT mgl_rotate(HMGL gr, double TetX,double TetZ,double TetY)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Rotate(TetX,TetZ,TetY); }
+void MGL_EXPORT mgl_view(HMGL gr, double TetX,double TetZ,double TetY)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->View(TetX,TetZ,TetY); }
+void MGL_EXPORT mgl_zoom(HMGL gr, double x1, double y1, double x2, double y2)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Zoom(x1,y1,x2,y2); }
+void MGL_EXPORT mgl_rotate_vector(HMGL gr, double Tet,double x,double y,double z)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->RotateN(Tet,x,y,z); }
+void MGL_EXPORT mgl_perspective(HMGL gr, double val)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Perspective(val); }
+void MGL_EXPORT mgl_title(HMGL gr, const char *title, const char *stl, double size)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Title(title,stl,size); }
+void MGL_EXPORT mgl_titlew(HMGL gr, const wchar_t *title, const char *stl, double size)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Title(title,stl,size); }
+//-----------------------------------------------------------------------------
+int MGL_EXPORT mgl_new_frame_(uintptr_t *gr) { return _GR_->NewFrame(); }
+void MGL_EXPORT mgl_end_frame_(uintptr_t *gr) { _GR_->EndFrame(); }
+int MGL_EXPORT mgl_get_num_frame_(uintptr_t *gr) { return _GR_->GetNumFrame(); }
+void MGL_EXPORT mgl_reset_frames_(uintptr_t *gr) { _GR_->ResetFrames(); }
+void MGL_EXPORT mgl_get_frame_(uintptr_t *gr, int *i) { _GR_->GetFrame(*i); }
+void MGL_EXPORT mgl_set_frame_(uintptr_t *gr, int *i) { _GR_->SetFrame(*i); }
+void MGL_EXPORT mgl_show_frame_(uintptr_t *gr, int *i) { _GR_->ShowFrame(*i); }
+void MGL_EXPORT mgl_del_frame_(uintptr_t *gr, int *i) { _GR_->DelFrame(*i); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_transp_type_(uintptr_t *gr, int *type) { _GR_->SetTranspType(*type); }
+void MGL_EXPORT mgl_set_alpha_(uintptr_t *gr, int *enable) { _GR_->Alpha(*enable); }
+void MGL_EXPORT mgl_set_fog_(uintptr_t *gr, mreal *d, mreal *dz) { _GR_->Fog(*d, *dz); }
+void MGL_EXPORT mgl_set_light_(uintptr_t *gr, int *enable) { _GR_->Light(*enable); }
+void MGL_EXPORT mgl_set_light_n_(uintptr_t *gr, int *n, int *enable)
{ _GR_->Light(*n, *enable); }
-void mgl_add_light_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_add_light_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z)
{ _GR_->AddLight(*n,mglPoint(*x,*y,*z)); }
-void mgl_add_light_ext_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, char *c, mreal *br, mreal *ap, int)
+void MGL_EXPORT mgl_add_light_ext_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, char *c, mreal *br, mreal *ap, int)
{ _GR_->AddLight(*n,mglPoint(*x,*y,*z),*c,*br,*ap); }
-void mgl_add_light_loc_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, char *c, mreal *br, mreal *ap, int)
+void MGL_EXPORT mgl_add_light_loc_(uintptr_t *gr, int *n, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, char *c, mreal *br, mreal *ap, int)
{ _GR_->AddLight(*n,mglPoint(*x,*y,*z),mglPoint(*dx,*dy,*dz),*c,*br,*ap); }
//-----------------------------------------------------------------------------
-void mgl_mat_push_(uintptr_t *gr) { _GR_->Push(); }
-void mgl_mat_pop_(uintptr_t *gr) { _GR_->Pop(); }
-void mgl_clf_(uintptr_t *gr)
+void MGL_EXPORT mgl_mat_push_(uintptr_t *gr) { _GR_->Push(); }
+void MGL_EXPORT mgl_mat_pop_(uintptr_t *gr) { _GR_->Pop(); }
+void MGL_EXPORT mgl_clf_(uintptr_t *gr)
{ _GR_->Clf(); }
-void mgl_clf_rgb_(uintptr_t *gr, mreal *r, mreal *g, mreal *b)
+void MGL_EXPORT mgl_clf_rgb_(uintptr_t *gr, mreal *r, mreal *g, mreal *b)
{ _GR_->Clf(mglColor(*r,*g,*b)); }
//-----------------------------------------------------------------------------
-void mgl_subplot_d_(uintptr_t *gr, int *nx,int *ny,int *m,const char *st, mreal *dx, mreal *dy,int l)
+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;
mgl_subplot_d(_GR_,*nx,*ny,*m,s,*dx,*dy); delete []s; }
-void mgl_subplot_(uintptr_t *gr, int *nx,int *ny,int *m,const char *st,int l)
+void MGL_EXPORT mgl_subplot_(uintptr_t *gr, int *nx,int *ny,int *m,const char *st,int l)
{ char *s=new char[l+1]; memcpy(s,st,l); s[l]=0;
mgl_subplot(_GR_,*nx,*ny,*m,s); delete []s; }
-void mgl_multiplot_(uintptr_t *gr, int *nx,int *ny,int *m,int *dx,int *dy,const char *st,int l)
+void MGL_EXPORT mgl_multiplot_(uintptr_t *gr, int *nx,int *ny,int *m,int *dx,int *dy,const char *st,int l)
{ char *s=new char[l+1]; memcpy(s,st,l); s[l]=0;
mgl_multiplot(_GR_,*nx,*ny,*m,*dx,*dy,s); delete []s; }
-void mgl_inplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2)
+void MGL_EXPORT mgl_inplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2)
{ _GR_->InPlot(*x1,*x2,*y1,*y2,false); }
-void mgl_relplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2)
+void MGL_EXPORT mgl_relplot_(uintptr_t *gr, mreal *x1, mreal *x2, mreal *y1, mreal *y2)
{ _GR_->InPlot(*x1,*x2,*y1,*y2,true); }
-void mgl_columnplot_(uintptr_t *gr, int *num, int *i, mreal *d)
+void MGL_EXPORT mgl_columnplot_(uintptr_t *gr, int *num, int *i, mreal *d)
{ mgl_columnplot(_GR_,*num,*i,*d); }
-void mgl_columnplot_d_(uintptr_t *gr, int *nx, int *ny, int *i, mreal *d)
+void MGL_EXPORT mgl_columnplot_d_(uintptr_t *gr, int *nx, int *ny, int *i, mreal *d)
{ mgl_gridplot(_GR_,*nx,*ny,*i,*d); }
-void mgl_stickplot_(uintptr_t *gr, int *num, int *i, mreal *tet, mreal *phi)
+void MGL_EXPORT mgl_stickplot_(uintptr_t *gr, int *num, int *i, mreal *tet, mreal *phi)
{ _GR_->StickPlot(*num, *i, *tet, *phi); }
-void mgl_title_(uintptr_t *gr, const char *title, const char *stl, mreal *size, int l,int m)
+void MGL_EXPORT mgl_title_(uintptr_t *gr, const char *title, const char *stl, mreal *size, int l,int m)
{ char *t=new char[l+1]; memcpy(t,title,l); t[l]=0;
char *s=new char[m+1]; memcpy(s,stl,m); s[m]=0;
_GR_->Title(t,s,*size); delete []s; delete []t; }
-void mgl_aspect_(uintptr_t *gr, mreal *Ax, mreal *Ay, mreal *Az)
+void MGL_EXPORT mgl_aspect_(uintptr_t *gr, mreal *Ax, mreal *Ay, mreal *Az)
{ _GR_->Aspect(*Ax,*Ay,*Az); }
-void mgl_rotate_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY)
+void MGL_EXPORT mgl_rotate_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY)
{ _GR_->Rotate(*TetX,*TetZ,*TetY); }
-void mgl_view_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY)
+void MGL_EXPORT mgl_view_(uintptr_t *gr, mreal *TetX, mreal *TetZ, mreal *TetY)
{ _GR_->View(*TetX,*TetZ,*TetY); }
-void mgl_zoom_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *x2, mreal *y2)
+void MGL_EXPORT mgl_zoom_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *x2, mreal *y2)
{ _GR_->Zoom(*x1,*y1,*x2,*y2); }
-void mgl_rotate_vector_(uintptr_t *gr, mreal *Tet, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_rotate_vector_(uintptr_t *gr, mreal *Tet, mreal *x, mreal *y, mreal *z)
{ _GR_->RotateN(*Tet,*x,*y,*z); }
-void mgl_perspective_(uintptr_t *gr, double val)
+void MGL_EXPORT mgl_perspective_(uintptr_t *gr, double val)
{ _GR_->Perspective(val); }
//-----------------------------------------------------------------------------
-const unsigned char *mgl_get_rgb_(uintptr_t *gr) { return gr ? _GR_->GetBits():0; }
-const unsigned char *mgl_get_rgba_(uintptr_t *gr){ return gr ? _GR_->GetRGBA():0; }
-int mgl_get_width_(uintptr_t *gr) { return gr ? _GR_->GetWidth():0; }
-int mgl_get_height_(uintptr_t *gr) { return gr ? _GR_->GetHeight():0;}
-void mgl_calc_xyz_(uintptr_t *gr, int *xs, int *ys, mreal *x, mreal *y, mreal *z)
+MGL_EXPORT const unsigned char *mgl_get_rgb_(uintptr_t *gr) { return gr ? _GR_->GetBits():0; }
+MGL_EXPORT const unsigned char *mgl_get_rgba_(uintptr_t *gr){ return gr ? _GR_->GetRGBA():0; }
+int MGL_EXPORT mgl_get_width_(uintptr_t *gr) { return gr ? _GR_->GetWidth():0; }
+int MGL_EXPORT mgl_get_height_(uintptr_t *gr) { return gr ? _GR_->GetHeight():0;}
+void MGL_EXPORT mgl_calc_xyz_(uintptr_t *gr, int *xs, int *ys, mreal *x, mreal *y, mreal *z)
{ mglPoint p = _GR_->CalcXYZ(*xs,*ys); *x = p.x; *y = p.y; *z = p.z; }
-void mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys)
+void MGL_EXPORT mgl_calc_scr_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, int *xs, int *ys)
{ _GR_->CalcScr(mglPoint(*x,*y,*z),xs,ys); }
-void mgl_set_obj_id_(uintptr_t *gr, int *id) { _GR_->SetObjId(*id); }
-int mgl_get_obj_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetObjId(*x,*y); }
-int mgl_get_spl_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetSplId(*x,*y); }
+void MGL_EXPORT mgl_set_obj_id_(uintptr_t *gr, int *id) { _GR_->SetObjId(*id); }
+int MGL_EXPORT mgl_get_obj_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetObjId(*x,*y); }
+int MGL_EXPORT mgl_get_spl_id_(uintptr_t *gr, int *x, int *y) { return _GR_->GetSplId(*x,*y); }
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph(int width, int height)
+HMGL MGL_EXPORT mgl_create_graph(int width, int height)
{ return new mglCanvas(width,height); }
-void mgl_delete_graph(HMGL gr) { if(gr) delete gr; }
-void mgl_set_size(HMGL gr, int width, int height)
-{ _Gr_->SetSize(width, height); }
-void mgl_set_def_param(HMGL gr) { _Gr_->DefaultPlotParam(); }
-void mgl_combine_gr(HMGL gr, HMGL in)
+void MGL_EXPORT mgl_delete_graph(HMGL gr) { if(gr) delete gr; }
+void MGL_EXPORT mgl_set_size(HMGL gr, int width, int height)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetSize(width, height); }
+void MGL_EXPORT mgl_set_def_param(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->DefaultPlotParam(); }
+void MGL_EXPORT mgl_combine_gr(HMGL gr, HMGL in)
{ const mglCanvas *gg = dynamic_cast<const mglCanvas *>(in);
- if(gg) _Gr_->Combine(gg); }
-//-----------------------------------------------------------------------------
-void mgl_set_tick_len(HMGL gr, double len, double stt)
-{ _Gr_->SetTickLen(len,stt); }
-void mgl_set_axis_stl(HMGL gr, const char *stl, const char *tck, const char *sub)
-{ _Gr_->SetAxisStl(stl,tck,sub); }
-void mgl_tune_ticks(HMGL gr, int tune, double pos)
-{ _Gr_->SetTuneTicks(tune,pos); }
-void mgl_adjust_ticks(HMGL gr, const char *dir)
-{ _Gr_->AdjustTicks(dir,true); }
-void mgl_set_ticks(HMGL gr, char dir, double d, int ns, double org)
-{ _Gr_->SetTicks(dir,d,ns,org); }
-void mgl_set_ticks_str(HMGL gr, char dir, const char *lbl, int add)
-{ _Gr_->SetTicksVal(dir,lbl,add); }
-void mgl_set_ticks_wcs(HMGL gr, char dir, const wchar_t *lbl, int add)
-{ _Gr_->SetTicksVal(dir,lbl,add); }
-void mgl_set_ticks_val(HMGL gr, char dir, HCDT val, const char *lbl, int add)
-{ _Gr_->SetTicksVal(dir,val,lbl,add); }
-void mgl_set_ticks_valw(HMGL gr, char dir, HCDT val, const wchar_t *lbl, int add)
-{ _Gr_->SetTicksVal(dir,val,lbl,add); }
-void mgl_set_tick_templ(HMGL gr, char dir, const char *templ)
-{ _Gr_->SetTickTempl(dir,templ); }
-void mgl_set_tick_templw(HMGL gr, char dir, const wchar_t *templ)
-{ _Gr_->SetTickTempl(dir,templ); }
-void mgl_set_ticks_time(HMGL gr, char dir, double d, const char *t)
-{ _Gr_->SetTickTime(dir,d,t); }
-//-----------------------------------------------------------------------------
-void mgl_box(HMGL gr) { _Gr_->Box(); }
-void mgl_box_str(HMGL gr, const char *col, int ticks)
-{ _Gr_->Box(col,ticks); }
-void mgl_axis(HMGL gr, const char *dir, const char *stl, const char *opt)
-{ _Gr_->Axis(dir,stl,opt); }
-void mgl_axis_grid(HMGL gr, const char *dir,const char *pen, const char *opt)
-{ _Gr_->Grid(dir,pen,opt); }
-void mgl_label(HMGL gr, char dir, const char *text, double pos, const char *opt)
-{ _Gr_->Label(dir,text,pos,opt); }
-void mgl_labelw(HMGL gr, char dir, const wchar_t *text, double pos, const char *opt)
-{ _Gr_->Labelw(dir,text,pos,opt); }
-//-----------------------------------------------------------------------------
-void mgl_colorbar(HMGL gr, const char *sch)
-{ _Gr_->Colorbar(sch); }
-void mgl_colorbar_ext(HMGL gr, const char *sch, double x, double y, double w, double h)
-{ _Gr_->Colorbar(sch,x,y,w,h); }
-void mgl_colorbar_val(HMGL gr, HCDT dat, const char *sch)
-{ _Gr_->Colorbar(dat,sch); }
-void mgl_colorbar_val_ext(HMGL gr, HCDT dat, const char *sch,double x, double y, double w, double h)
-{ _Gr_->Colorbar(dat,sch,x,y,w,h); }
-//-----------------------------------------------------------------------------
-void mgl_add_legend(HMGL gr, const char *text,const char *style)
-{ _Gr_->AddLegend(text,style); }
-void mgl_add_legendw(HMGL gr, const wchar_t *text,const char *style)
-{ _Gr_->AddLegend(text,style); }
-void mgl_clear_legend(HMGL gr)
-{ _Gr_->ClearLegend(); }
-void mgl_legend_pos(HMGL gr, double x, double y, const char *font, const char *opt)
-{ _Gr_->Legend(x,y,font,opt); }
-void mgl_legend(HMGL gr, int where, const char *font, const char *opt)
-{ _Gr_->Legend(where,font,opt); }
-void mgl_set_legend_marks(HMGL gr, int num)
-{ _Gr_->SetLegendMarks(num); }
-//-----------------------------------------------------------------------------
-uintptr_t mgl_create_graph_(int *width, int *height)
+ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g && gg) g->Combine(gg); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_set_tick_len(HMGL gr, double len, double stt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTickLen(len,stt); }
+void MGL_EXPORT mgl_set_axis_stl(HMGL gr, const char *stl, const char *tck, const char *sub)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetAxisStl(stl,tck,sub); }
+void MGL_EXPORT mgl_tune_ticks(HMGL gr, int tune, double pos)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTuneTicks(tune,pos); }
+void MGL_EXPORT mgl_adjust_ticks(HMGL gr, const char *dir)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AdjustTicks(dir,true); }
+void MGL_EXPORT mgl_set_ticks(HMGL gr, char dir, double d, int ns, double org)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTicks(dir,d,ns,org); }
+void MGL_EXPORT mgl_set_ticks_str(HMGL gr, char dir, const char *lbl, int add)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTicksVal(dir,lbl,add); }
+void MGL_EXPORT mgl_set_ticks_wcs(HMGL gr, char dir, const wchar_t *lbl, int add)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTicksVal(dir,lbl,add); }
+void MGL_EXPORT mgl_set_ticks_val(HMGL gr, char dir, HCDT val, const char *lbl, int add)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTicksVal(dir,val,lbl,add); }
+void MGL_EXPORT mgl_set_ticks_valw(HMGL gr, char dir, HCDT val, const wchar_t *lbl, int add)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTicksVal(dir,val,lbl,add); }
+void MGL_EXPORT mgl_set_tick_templ(HMGL gr, char dir, const char *templ)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTickTempl(dir,templ); }
+void MGL_EXPORT mgl_set_tick_templw(HMGL gr, char dir, const wchar_t *templ)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTickTempl(dir,templ); }
+void MGL_EXPORT mgl_set_ticks_time(HMGL gr, char dir, double d, const char *t)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTickTime(dir,d,t); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_box(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Box(); }
+void MGL_EXPORT mgl_box_str(HMGL gr, const char *col, int ticks)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Box(col,ticks); }
+void MGL_EXPORT mgl_axis(HMGL gr, const char *dir, const char *stl, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Axis(dir,stl,opt); }
+void MGL_EXPORT mgl_axis_grid(HMGL gr, const char *dir,const char *pen, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Grid(dir,pen,opt); }
+void MGL_EXPORT mgl_label(HMGL gr, char dir, const char *text, double pos, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Label(dir,text,pos,opt); }
+void MGL_EXPORT mgl_labelw(HMGL gr, char dir, const wchar_t *text, double pos, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Labelw(dir,text,pos,opt); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_colorbar(HMGL gr, const char *sch)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(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<mglCanvas *>(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<mglCanvas *>(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<mglCanvas *>(gr); if(g) g->Colorbar(dat,sch,x,y,w,h); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_add_legend(HMGL gr, const char *text,const char *style)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AddLegend(text,style); }
+void MGL_EXPORT mgl_add_legendw(HMGL gr, const wchar_t *text,const char *style)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->AddLegend(text,style); }
+void MGL_EXPORT mgl_clear_legend(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->ClearLegend(); }
+void MGL_EXPORT mgl_legend_pos(HMGL gr, double x, double y, const char *font, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Legend(x,y,font,opt); }
+void MGL_EXPORT mgl_legend(HMGL gr, int where, const char *font, const char *opt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Legend(where,font,opt); }
+void MGL_EXPORT mgl_set_legend_marks(HMGL gr, int num)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetLegendMarks(num); }
+//-----------------------------------------------------------------------------
+uintptr_t MGL_EXPORT mgl_create_graph_(int *width, int *height)
{ return uintptr_t(new mglCanvas(*width,*height)); }
-void mgl_delete_graph_(uintptr_t *gr) { delete _GR_; }
-void mgl_set_size_(uintptr_t *gr, int *width, int *height)
+void MGL_EXPORT mgl_delete_graph_(uintptr_t *gr) { delete _GR_; }
+void MGL_EXPORT mgl_set_size_(uintptr_t *gr, int *width, int *height)
{ _GR_->SetSize(*width,*height); }
-void mgl_set_def_param_(uintptr_t *gr) { _GR_->DefaultPlotParam(); }
-void mgl_combine_gr_(uintptr_t *gr, uintptr_t *in)
+void MGL_EXPORT mgl_set_def_param_(uintptr_t *gr) { _GR_->DefaultPlotParam(); }
+void MGL_EXPORT mgl_combine_gr_(uintptr_t *gr, uintptr_t *in)
{ _GR_->Combine((mglCanvas *)in); }
//-----------------------------------------------------------------------------
-void mgl_set_tick_len_(uintptr_t *gr, mreal *len, mreal *stt)
+void MGL_EXPORT mgl_set_tick_len_(uintptr_t *gr, mreal *len, mreal *stt)
{ _GR_->SetTickLen(*len, *stt); }
-void mgl_set_axis_stl_(uintptr_t *gr, const char *stl, const char *tck, const char *sub, int l,int m,int n)
+void MGL_EXPORT mgl_set_axis_stl_(uintptr_t *gr, const char *stl, const char *tck, const char *sub, int l,int m,int n)
{ char *a=new char[l+1]; memcpy(a,stl,l); a[l]=0;
char *t=new char[m+1]; memcpy(t,tck,m); t[m]=0;
char *s=new char[n+1]; memcpy(s,sub,n); s[n]=0;
_GR_->SetAxisStl(a,t,s); delete []a; delete []s; delete []t; }
-void mgl_adjust_ticks_(uintptr_t *gr, const char *dir, int l)
+void MGL_EXPORT mgl_adjust_ticks_(uintptr_t *gr, const char *dir, int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
_GR_->AdjustTicks(s); delete []s; }
-void mgl_set_ticks_(uintptr_t *gr, char *dir, mreal *d, int *ns, mreal *org, int)
+void MGL_EXPORT mgl_set_ticks_(uintptr_t *gr, char *dir, mreal *d, int *ns, mreal *org, int)
{ _GR_->SetTicks(*dir, *d, *ns, *org); }
-void mgl_set_ticks_str_(uintptr_t *gr, const char *dir, const char *lbl, int *add,int,int l)
+void MGL_EXPORT mgl_set_ticks_str_(uintptr_t *gr, const char *dir, const char *lbl, int *add,int,int l)
{ char *s=new char[l+1]; memcpy(s,lbl,l); s[l]=0;
_GR_->SetTicksVal(*dir,s,*add); delete []s; }
-void mgl_set_ticks_val_(uintptr_t *gr, const char *dir, uintptr_t *val, const char *lbl, int *add,int,int l)
+void MGL_EXPORT mgl_set_ticks_val_(uintptr_t *gr, const char *dir, uintptr_t *val, const char *lbl, int *add,int,int l)
{ char *s=new char[l+1]; memcpy(s,lbl,l); s[l]=0;
_GR_->SetTicksVal(*dir,_DA_(val),s,*add); delete []s; }
-void mgl_tune_ticks_(uintptr_t *gr, int *tune, mreal *fact_pos)
+void MGL_EXPORT mgl_tune_ticks_(uintptr_t *gr, int *tune, mreal *fact_pos)
{ _GR_->SetTuneTicks(*tune, *fact_pos); }
-void mgl_set_tick_templ_(uintptr_t *gr, const char *dir, const char *templ,int,int l)
+void MGL_EXPORT mgl_set_tick_templ_(uintptr_t *gr, const char *dir, const char *templ,int,int l)
{ char *s=new char[l+1]; memcpy(s,templ,l); s[l]=0;
_GR_->SetTickTempl(*dir,s); delete []s; }
-void mgl_set_ticks_time_(uintptr_t *gr, const char *dir, mreal *d, const char *t,int,int l)
+void MGL_EXPORT mgl_set_ticks_time_(uintptr_t *gr, const char *dir, mreal *d, const char *t,int,int l)
{ char *s=new char[l+1]; memcpy(s,t,l); s[l]=0;
_GR_->SetTickTime(*dir,*d,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_box_(uintptr_t *gr) { _GR_->Box(); }
-void mgl_box_str_(uintptr_t *gr, const char *col, int *ticks, int l)
+void MGL_EXPORT mgl_box_(uintptr_t *gr) { _GR_->Box(); }
+void MGL_EXPORT mgl_box_str_(uintptr_t *gr, const char *col, int *ticks, int l)
{ char *s=new char[l+1]; memcpy(s,col,l); s[l]=0;
_GR_->Box(s,*ticks); delete []s; }
-void mgl_axis_(uintptr_t *gr, const char *dir, const char *stl, const char *opt,int l,int n,int m)
+void MGL_EXPORT mgl_axis_(uintptr_t *gr, const char *dir, const char *stl, const char *opt,int l,int n,int m)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
char *p=new char[n+1]; memcpy(p,stl,l); p[n]=0;
char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0;
_GR_->Axis(s,p,o); delete []s; delete []p; delete []o; }
-void mgl_axis_grid_(uintptr_t *gr, const char *dir,const char *pen, const char *opt,int l,int n,int m)
+void MGL_EXPORT mgl_axis_grid_(uintptr_t *gr, const char *dir,const char *pen, const char *opt,int l,int n,int m)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
char *p=new char[n+1]; memcpy(p,pen,n); p[n]=0;
char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0;
_GR_->Grid(s,p,o); delete []s; delete []p; delete []o; }
- void mgl_label_(uintptr_t *gr, const char *dir, const char *text, mreal *pos, const char *opt,int,int l,int m)
+ void MGL_EXPORT mgl_label_(uintptr_t *gr, const char *dir, const char *text, mreal *pos, const char *opt,int,int l,int m)
{ char *s=new char[l+1]; memcpy(s,text,l); s[l]=0;
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_colorbar_(uintptr_t *gr, const char *sch,int l)
+void MGL_EXPORT mgl_colorbar_(uintptr_t *gr, const char *sch,int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
_GR_->Colorbar(s); delete []s; }
-void mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int l)
+void MGL_EXPORT mgl_colorbar_ext_(uintptr_t *gr, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
_GR_->Colorbar(s,*x,*y,*w,*h); delete []s; }
-void mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch,int l)
+void MGL_EXPORT mgl_colorbar_val_(uintptr_t *gr, uintptr_t *dat, const char *sch,int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
_GR_->Colorbar(_DA_(dat), s); delete []s; }
-void mgl_colorbar_val_ext_(uintptr_t *gr, uintptr_t *dat, const char *sch, mreal *x, mreal *y, mreal *w, mreal *h, int l)
+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 *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
_GR_->Colorbar(_DA_(dat),s,*x,*y,*w,*h); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_add_legend_(uintptr_t *gr, const char *text,const char *style,int l,int n)
+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;
char *f=new char[n+1]; memcpy(f,style,n); f[n]=0;
_GR_->AddLegend(s,f); delete []s; delete []f; }
-void mgl_clear_legend_(uintptr_t *gr) { if(gr) _GR_->ClearLegend(); }
-void mgl_legend_pos_(uintptr_t *gr, mreal *x, mreal *y, const char *font, const char *opt,int l,int m)
+void MGL_EXPORT mgl_clear_legend_(uintptr_t *gr) { if(gr) _GR_->ClearLegend(); }
+void MGL_EXPORT mgl_legend_pos_(uintptr_t *gr, mreal *x, mreal *y, const char *font, const char *opt,int l,int m)
{ char *s=new char[l+1]; memcpy(s,font,l); s[l]=0;
char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0;
_GR_->Legend(*x, *y, s, o); delete []s; delete []o; }
-void mgl_legend_(uintptr_t *gr, int *where, const char *font, const char *opt,int l,int m)
+void MGL_EXPORT mgl_legend_(uintptr_t *gr, int *where, const char *font, const char *opt,int l,int m)
{ char *s=new char[l+1]; memcpy(s,font,l); s[l]=0;
char *o=new char[m+1]; memcpy(o,opt,m); o[m]=0;
_GR_->Legend(*where, s, o); delete []s; delete []o; }
-void mgl_set_legend_marks_(uintptr_t *gr, int *num)
+void MGL_EXPORT mgl_set_legend_marks_(uintptr_t *gr, int *num)
{ _GR_->SetLegendMarks(*num); }
//-----------------------------------------------------------------------------
-void mgl_set_quality(HMGL gr, int qual) { _Gr_->SetQuality(qual); }
-void mgl_set_quality_(uintptr_t *gr, int *qual) { _GR_->SetQuality(*qual); }
-//-----------------------------------------------------------------------------
-void mgl_set_plotid(HMGL gr, const char *id) { _Gr_->PlotId = id; }
-void mgl_set_plotid_(uintptr_t *gr, const char *id,int l)
-{ char *s=new char[l+1]; memcpy(s,id,l); s[l]=0;
- _GR_->PlotId = s; delete []s; }
-//-----------------------------------------------------------------------------
-void mgl_mpi_send(HMGL gr, int id) { _Gr_->MPI_Send(id); }
-void mgl_mpi_recv(HMGL gr, int id) { _Gr_->MPI_Recv(id); }
-void mgl_mpi_send_(uintptr_t *gr, int *id) { mgl_mpi_send(_GR_, *id); }
-void mgl_mpi_recv_(uintptr_t *gr, int *id) { mgl_mpi_recv(_GR_, *id); }
-//-----------------------------------------------------------------------------
-void mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt) { _GR_->SetDelay(*dt); }
-void mgl_wnd_set_delay(HMGL gr, double dt) { _Gr_->SetDelay(dt); }
-//-----------------------------------------------------------------------------
-HMEX mgl_create_expr(const char *expr) { return new mglFormula(expr); }
-void mgl_delete_expr(HMEX ex) { delete ex; }
-double mgl_expr_eval(HMEX ex, double x, double y,double z)
+void MGL_EXPORT mgl_mpi_send(HMGL gr, int id)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->MPI_Send(id); }
+void MGL_EXPORT mgl_mpi_recv(HMGL gr, int id)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->MPI_Recv(id); }
+void MGL_EXPORT mgl_mpi_send_(uintptr_t *gr, int *id) { mgl_mpi_send(_GR_, *id); }
+void MGL_EXPORT mgl_mpi_recv_(uintptr_t *gr, int *id) { mgl_mpi_recv(_GR_, *id); }
+//-----------------------------------------------------------------------------
+void MGL_EXPORT mgl_wnd_set_delay(HMGL gr, double dt)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetDelay(dt); }
+double MGL_EXPORT mgl_wnd_get_delay(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); return g?g->GetDelay():0; }
+void MGL_EXPORT mgl_wnd_set_delay_(uintptr_t *gr, mreal *dt) { _GR_->SetDelay(*dt); }
+double MGL_EXPORT mgl_wnd_get_delay_(uintptr_t *gr) { return _GR_->GetDelay(); }
+//-----------------------------------------------------------------------------
+HMEX MGL_EXPORT mgl_create_expr(const char *expr) { return new mglFormula(expr); }
+void MGL_EXPORT mgl_delete_expr(HMEX ex) { delete ex; }
+double MGL_EXPORT mgl_expr_eval(HMEX ex, double x, double y,double z)
{ return ex->Calc(x,y,z); }
-double mgl_expr_eval_v(HMEX ex, mreal *var)
+double MGL_EXPORT mgl_expr_eval_v(HMEX ex, mreal *var)
{ return ex->Calc(var); }
-double mgl_expr_diff(HMEX ex, char dir, double x, double y,double z)
+double MGL_EXPORT mgl_expr_diff(HMEX ex, char dir, double x, double y,double z)
{ return ex->CalcD(dir,x,y,z); }
-double mgl_expr_diff_v(HMEX ex, char dir, mreal *var)
+double MGL_EXPORT mgl_expr_diff_v(HMEX ex, char dir, mreal *var)
{ return ex->CalcD(var, dir); }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_expr_(const char *expr, int l)
+uintptr_t MGL_EXPORT mgl_create_expr_(const char *expr, int l)
{ char *s=new char[l+1]; memcpy(s,expr,l); s[l]=0;
uintptr_t res = uintptr_t(mgl_create_expr(s));
delete []s; return res; }
-void mgl_delete_expr_(uintptr_t *ex) { mgl_delete_expr((HMEX)ex); }
-double mgl_eval_expr_(uintptr_t *ex, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_delete_expr_(uintptr_t *ex) { mgl_delete_expr((HMEX)ex); }
+double MGL_EXPORT mgl_eval_expr_(uintptr_t *ex, mreal *x, mreal *y, mreal *z)
{ return mgl_expr_eval((HMEX) ex, *x,*y,*z); }
-double mgl_diff_expr_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int)
+double MGL_EXPORT mgl_diff_expr_(uintptr_t *ex, const char *dir, mreal *x, mreal *y, mreal *z, int)
{ return mgl_expr_diff((HMEX) ex, *dir,*x,*y,*z); }
//-----------------------------------------------------------------------------
-void mgl_set_plotfactor(HMGL gr, double val)
-{ _Gr_->SetPlotFactor(val); }
-void mgl_set_plotfactor_(uintptr_t *gr, mreal *val)
+void MGL_EXPORT mgl_set_plotfactor(HMGL gr, double val)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetPlotFactor(val); }
+void MGL_EXPORT mgl_set_plotfactor_(uintptr_t *gr, mreal *val)
{ _GR_->SetPlotFactor(*val); }
//-----------------------------------------------------------------------------
-void mgl_set_tick_shift(HMGL gr, double sx, double sy, double sz, double sc)
-{ _Gr_->SetTickShift(mglPoint(sx,sy,sz,sc)); }
-void mgl_set_tick_shift_(uintptr_t *gr, mreal *sx, mreal *sy, mreal *sz, mreal *sc)
+void MGL_EXPORT mgl_set_tick_shift(HMGL gr, double sx, double sy, double sz, double sc)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->SetTickShift(mglPoint(sx,sy,sz,sc)); }
+void MGL_EXPORT mgl_set_tick_shift_(uintptr_t *gr, mreal *sx, mreal *sy, mreal *sz, mreal *sc)
{ _GR_->SetTickShift(mglPoint(*sx,*sy,*sz,*sc)); }
//-----------------------------------------------------------------------------
#if !MGL_HAVE_PNG
-void mgl_write_prc(HMGL gr, const char *fname,const char *descr, int make_pdf)
+void MGL_EXPORT mgl_write_prc(HMGL gr, const char *fname,const char *descr, int make_pdf)
{ mglGlobalMess += "PNG support was disabled. Please, enable it and rebuild MathGL.\n"; }
-void mgl_write_prc_(uintptr_t *graph, const char *fname,const char *descr, int *make_pdf,int lf,int ld)
+void MGL_EXPORT mgl_write_prc_(uintptr_t *graph, const char *fname,const char *descr, int *make_pdf,int lf,int ld)
{ mglGlobalMess += "PNG support was disabled. Please, enable it and rebuild MathGL.\n"; }
#endif
//-----------------------------------------------------------------------------
-void mgl_finish(HMGL gr) { _Gr_->Finish(); }
-void mgl_finish_(uintptr_t *gr) { _GR_->Finish(); }
+void MGL_EXPORT mgl_finish(HMGL gr)
+{ mglCanvas *g = dynamic_cast<mglCanvas *>(gr); if(g) g->Finish(); }
+void MGL_EXPORT mgl_finish_(uintptr_t *gr) { _GR_->Finish(); }
//-----------------------------------------------------------------------------
diff --git a/src/complex.cpp b/src/complex.cpp
index 9f4cee4..b130f7f 100644
--- a/src/complex.cpp
+++ b/src/complex.cpp
@@ -87,7 +87,7 @@ void mglStartThreadV(void *(*func)(void *), long n, dual *a, const void *b,
}
}
//-----------------------------------------------------------------------------
-void *mgl_csmth_x(void *par)
+MGL_NO_EXPORT void *mgl_csmth_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,d3,d5, nx=t->p[0];
@@ -112,7 +112,7 @@ void *mgl_csmth_x(void *par)
}
return 0;
}
-void *mgl_csmth_y(void *par)
+MGL_NO_EXPORT void *mgl_csmth_y(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,d3,d5, nx=t->p[0],ny=t->p[1];
@@ -137,7 +137,7 @@ void *mgl_csmth_y(void *par)
}
return 0;
}
-void *mgl_csmth_z(void *par)
+MGL_NO_EXPORT void *mgl_csmth_z(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,d3,d5, nn=t->p[0]*t->p[1], nz=t->n/nn;
@@ -162,7 +162,7 @@ void *mgl_csmth_z(void *par)
}
return 0;
}
-void mgl_datac_smooth(HADT d, const char *dirs, mreal )
+void MGL_EXPORT mgl_datac_smooth(HADT d, const char *dirs, mreal )
{
long Type = SMOOTH_QUAD_5;
if(!dirs || *dirs==0) dirs = "xyz";
@@ -194,11 +194,11 @@ void mgl_datac_smooth(HADT d, const char *dirs, mreal )
}
delete []b;
}
-void mgl_datac_smooth_(uintptr_t *d, const char *dir, mreal *delta,int l)
+void MGL_EXPORT mgl_datac_smooth_(uintptr_t *d, const char *dir, mreal *delta,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_smooth(_DC_,s,*delta); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_ccsum_z(void *par)
+MGL_NO_EXPORT void *mgl_ccsum_z(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -211,7 +211,7 @@ void *mgl_ccsum_z(void *par)
}
return 0;
}
-void *mgl_ccsum_y(void *par)
+MGL_NO_EXPORT void *mgl_ccsum_y(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -224,7 +224,7 @@ void *mgl_ccsum_y(void *par)
}
return 0;
}
-void *mgl_ccsum_x(void *par)
+MGL_NO_EXPORT void *mgl_ccsum_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -237,7 +237,7 @@ void *mgl_ccsum_x(void *par)
}
return 0;
}
-void mgl_datac_cumsum(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_cumsum(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -261,11 +261,11 @@ void mgl_datac_cumsum(HADT d, const char *dir)
}
delete []b;
}
-void mgl_datac_cumsum_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_cumsum_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_cumsum(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cint_z(void *par)
+MGL_NO_EXPORT void *mgl_cint_z(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -278,7 +278,7 @@ void *mgl_cint_z(void *par)
}
return 0;
}
-void *mgl_cint_y(void *par)
+MGL_NO_EXPORT void *mgl_cint_y(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -291,7 +291,7 @@ void *mgl_cint_y(void *par)
}
return 0;
}
-void *mgl_cint_x(void *par)
+MGL_NO_EXPORT void *mgl_cint_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -304,7 +304,7 @@ void *mgl_cint_x(void *par)
}
return 0;
}
-void mgl_datac_integral(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_integral(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -328,11 +328,11 @@ void mgl_datac_integral(HADT d, const char *dir)
}
delete []b;
}
-void mgl_datac_integral_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_integral_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_integral(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cdif_z(void *par)
+MGL_NO_EXPORT void *mgl_cdif_z(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -346,7 +346,7 @@ void *mgl_cdif_z(void *par)
}
return 0;
}
-void *mgl_cdif_y(void *par)
+MGL_NO_EXPORT void *mgl_cdif_y(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -361,7 +361,7 @@ void *mgl_cdif_y(void *par)
}
return 0;
}
-void *mgl_cdif_x(void *par)
+MGL_NO_EXPORT void *mgl_cdif_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -376,7 +376,7 @@ void *mgl_cdif_x(void *par)
}
return 0;
}
-void mgl_datac_diff(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_diff(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -399,11 +399,11 @@ void mgl_datac_diff(HADT d, const char *dir)
}
delete []b;
}
-void mgl_datac_diff_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_diff_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_diff(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cdif2_z(void *par)
+MGL_NO_EXPORT void *mgl_cdif2_z(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -416,7 +416,7 @@ void *mgl_cdif2_z(void *par)
}
return 0;
}
-void *mgl_cdif2_y(void *par)
+MGL_NO_EXPORT void *mgl_cdif2_y(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -429,7 +429,7 @@ void *mgl_cdif2_y(void *par)
}
return 0;
}
-void *mgl_cdif2_x(void *par)
+MGL_NO_EXPORT void *mgl_cdif2_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -442,7 +442,7 @@ void *mgl_cdif2_x(void *par)
}
return 0;
}
-void mgl_datac_diff2(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_diff2(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -465,22 +465,22 @@ void mgl_datac_diff2(HADT d, const char *dir)
}
delete []b;
}
-void mgl_datac_diff2_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_diff2_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_diff2(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_datac_swap(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_swap(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
if(strchr(dir,'z') && d->nz>1) mgl_datac_roll(d,'z',d->nz/2);
if(strchr(dir,'y') && d->ny>1) mgl_datac_roll(d,'y',d->ny/2);
if(strchr(dir,'x') && d->nx>1) mgl_datac_roll(d,'x',d->nx/2);
}
-void mgl_datac_swap_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_swap_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_swap(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_datac_roll(HADT dd, char dir, long num)
+void MGL_EXPORT mgl_datac_roll(HADT dd, char dir, long num)
{
long nx=dd->nx,ny=dd->ny,nz=dd->nz;
register long i,d;
@@ -515,10 +515,10 @@ void mgl_datac_roll(HADT dd, char dir, long num)
memcpy(a,b,nx*ny*nz*sizeof(dual)); delete []b;
}
}
-void mgl_datac_roll_(uintptr_t *d, const char *dir, int *num, int)
+void MGL_EXPORT mgl_datac_roll_(uintptr_t *d, const char *dir, int *num, int)
{ mgl_datac_roll(_DC_,*dir,*num); }
//-----------------------------------------------------------------------------
-void mgl_datac_mirror(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_mirror(HADT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz;
@@ -554,11 +554,11 @@ void mgl_datac_mirror(HADT d, const char *dir)
}
}
}
-void mgl_datac_mirror_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_mirror_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_mirror(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-dual mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dual *dz)
+dual MGL_EXPORT mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dual *dz)
{
long kx=long(x), ky=long(y), kz=long(z);
dual b0,b1;
@@ -600,15 +600,15 @@ dual mgl_datac_linear_ext(HCDT d, mreal x,mreal y,mreal z, dual *dx,dual *dy,dua
}
return b0 + z*(b1-b0);
}
-dual mgl_datac_linear(HCDT d, mreal x,mreal y,mreal z)
+dual MGL_EXPORT mgl_datac_linear(HCDT d, mreal x,mreal y,mreal z)
{ return mgl_datac_linear_ext(d, x,y,z, 0,0,0); }
//-----------------------------------------------------------------------------
-dual mgl_datac_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
+dual MGL_EXPORT mgl_datac_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
{ return mgl_datac_linear(_DA_(d),*x,*y,*z); }
-dual mgl_datac_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, dual *dx,dual *dy,dual *dz)
+dual MGL_EXPORT mgl_datac_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, dual *dx,dual *dy,dual *dz)
{ return mgl_datac_linear_ext(_DA_(d),*x,*y,*z,dx,dy,dz); }
//-----------------------------------------------------------------------------
-void mgl_datac_crop(HADT d, long n1, long n2, char dir)
+void MGL_EXPORT mgl_datac_crop(HADT d, long n1, long n2, char dir)
{
long nx=d->nx,ny=d->ny,nz=d->nz, nn;
register long i,k;
@@ -644,10 +644,10 @@ void mgl_datac_crop(HADT d, long n1, long n2, char dir)
break;
}
}
-void mgl_datac_crop_(uintptr_t *d, int *n1, int *n2, const char *dir,int)
+void MGL_EXPORT mgl_datac_crop_(uintptr_t *d, int *n1, int *n2, const char *dir,int)
{ mgl_datac_crop(_DC_,*n1,*n2,*dir); }
//-----------------------------------------------------------------------------
-void mgl_datac_insert(HADT d, char dir, long at, long num)
+void MGL_EXPORT mgl_datac_insert(HADT d, char dir, long at, long num)
{
if(num<1) return;
at = at<0 ? 0:at;
@@ -689,7 +689,7 @@ void mgl_datac_insert(HADT d, char dir, long at, long num)
}
}
//-----------------------------------------------------------------------------
-void mgl_datac_delete(HADT d, char dir, long at, long num)
+void MGL_EXPORT mgl_datac_delete(HADT d, char dir, long at, long num)
{
if(num<1 || at<0) return;
mglDataC b;
@@ -727,36 +727,36 @@ void mgl_datac_delete(HADT d, char dir, long at, long num)
}
}
//-----------------------------------------------------------------------------
-void mgl_datac_insert_(uintptr_t *d, const char *dir, int *at, int *num, int)
+void MGL_EXPORT mgl_datac_insert_(uintptr_t *d, const char *dir, int *at, int *num, int)
{ mgl_datac_insert(_DC_,*dir,*at,*num); }
-void mgl_datac_delete_(uintptr_t *d, const char *dir, int *at, int *num, int)
+void MGL_EXPORT mgl_datac_delete_(uintptr_t *d, const char *dir, int *at, int *num, int)
{ mgl_datac_delete(_DC_,*dir,*at,*num); }
//-----------------------------------------------------------------------------
-void mgl_datac_set_value(HADT dat, dual v, long i, long j, long k)
+void MGL_EXPORT mgl_datac_set_value(HADT dat, dual v, long i, long j, long k)
{
if(i>=0 && i<dat->nx && j>=0 && j<dat->ny && k>=0 && k<dat->nz)
dat->a[i+dat->nx*(j+dat->ny*k)]=v;
}
-void mgl_datac_set_value_(uintptr_t *d, dual *v, int *i, int *j, int *k)
+void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, dual *v, int *i, int *j, int *k)
{ mgl_datac_set_value(_DC_,*v,*i,*j,*k); }
//-----------------------------------------------------------------------------
-dual mgl_datac_get_value(HCDT dat, long i, long j, long k)
+dual MGL_EXPORT mgl_datac_get_value(HCDT dat, long i, long j, long k)
{
if(i<0 || i>=dat->GetNx() || j<0 || j>=dat->GetNy() || k<0 || k>=dat->GetNz())
return NAN;
const mglDataC *d = dynamic_cast<const mglDataC*>(dat);
- return d ? d->a[i+d->nx*(j+d->nz*k)] : dat->v(i,j,k);
+ return d ? d->a[i+d->nx*(j+d->nz*k)] : dual(dat->v(i,j,k),0);
}
-dual mgl_datac_get_value_(uintptr_t *d, int *i, int *j, int *k)
+dual MGL_EXPORT mgl_datac_get_value_(uintptr_t *d, int *i, int *j, int *k)
{ return mgl_datac_get_value(_DA_(d),*i,*j,*k); }
//-----------------------------------------------------------------------------
-dual *mgl_datac_data(HADT dat) { return dat->a; }
+MGL_EXPORT dual *mgl_datac_data(HADT dat) { return dat->a; }
//-----------------------------------------------------------------------------
-dual *mgl_datac_value(HADT dat, long i,long j,long k)
+MGL_EXPORT dual *mgl_datac_value(HADT dat, long i,long j,long k)
{ register long ii=i*dat->nx*(j+dat->ny*k);
return ii>=0 && ii<dat->GetNN() ? dat->a+ii : 0; }
//-----------------------------------------------------------------------------
-void mgl_datac_fft(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_fft(HADT d, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -797,11 +797,11 @@ void mgl_datac_fft(HADT d, const char *dir)
delete []a;
#endif
}
-void mgl_datac_fft_(uintptr_t *d, const char *dir, int l)
+void MGL_EXPORT mgl_datac_fft_(uintptr_t *d, const char *dir, int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_datac_fft(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_datac_hankel(HADT d, const char *dir)
+void MGL_EXPORT mgl_datac_hankel(HADT d, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -856,7 +856,7 @@ void mgl_datac_hankel(HADT d, const char *dir)
if(ai) { delete []ai; delete []af; gsl_dht_free(dht); }
#endif
}
-void mgl_datac_hankel_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_datac_hankel_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
-mgl_datac_hankel(_DC_,s); delete []s; }
+ mgl_datac_hankel(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
diff --git a/src/complex_io.cpp b/src/complex_io.cpp
index 84816b1..bb9f5f7 100644
--- a/src/complex_io.cpp
+++ b/src/complex_io.cpp
@@ -32,21 +32,21 @@
#endif
#define isn(ch) ((ch)=='\n')
-char *mgl_read_gz(gzFile fp);
+MGL_NO_EXPORT char *mgl_read_gz(gzFile fp);
//-----------------------------------------------------------------------------
-HADT mgl_create_datac() { return new mglDataC; }
-HADT mgl_create_datac_size(long nx, long ny, long nz){ return new mglDataC(nx,ny,nz); }
-HADT mgl_create_datac_file(const char *fname) { return new mglDataC(fname); }
-void mgl_delete_datac(HADT d) { if(d) delete d; }
+HADT MGL_EXPORT mgl_create_datac() { return new mglDataC; }
+HADT MGL_EXPORT mgl_create_datac_size(long nx, long ny, long nz){ return new mglDataC(nx,ny,nz); }
+HADT MGL_EXPORT mgl_create_datac_file(const char *fname) { return new mglDataC(fname); }
+void MGL_EXPORT mgl_delete_datac(HADT d) { if(d) delete d; }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_datac_()
+uintptr_t MGL_EXPORT mgl_create_datac_()
{ return uintptr_t(new mglDataC()); }
-uintptr_t mgl_create_datac_size_(int *nx, int *ny, int *nz)
+uintptr_t MGL_EXPORT mgl_create_datac_size_(int *nx, int *ny, int *nz)
{ return uintptr_t(new mglDataC(*nx,*ny,*nz)); }
-uintptr_t mgl_create_datac_file_(const char *fname,int l)
+uintptr_t MGL_EXPORT mgl_create_datac_file_(const char *fname,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
uintptr_t r = uintptr_t(new mglDataC(s)); delete []s; return r; }
-void mgl_delete_datac_(uintptr_t *d)
+void MGL_EXPORT mgl_delete_datac_(uintptr_t *d)
{ if(_DC_) delete _DC_; }
//-----------------------------------------------------------------------------
void mglFromStr(HADT d,char *buf,long NX,long NY,long NZ) // TODO: add multithreading read
@@ -87,7 +87,7 @@ void mglFromStr(HADT d,char *buf,long NX,long NY,long NZ) // TODO: add multithre
}
}
//-----------------------------------------------------------------------------
-void mgl_datac_set(HADT d, HCDT a)
+void MGL_EXPORT mgl_datac_set(HADT d, HCDT a)
{
if(!a) return;
const mglDataC *dd = dynamic_cast<const mglDataC *>(a); // faster for mglData
@@ -101,9 +101,9 @@ void mgl_datac_set(HADT d, HCDT a)
d->a[i+d->nx*(j+d->ny*k)] = a->v(i,j,k);
}
}
-void mgl_datac_set_(uintptr_t *d, uintptr_t *a) { mgl_datac_set(_DC_,_DA_(a)); }
+void MGL_EXPORT mgl_datac_set_(uintptr_t *d, uintptr_t *a) { mgl_datac_set(_DC_,_DA_(a)); }
//-----------------------------------------------------------------------------
-void mgl_datac_set_values(HADT d, const char *v,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_datac_set_values(HADT d, const char *v,long NX,long NY,long NZ)
{
if(NX<1 || NY <1 || NZ<1) return;
register long n=strlen(v)+1;
@@ -112,11 +112,11 @@ void mgl_datac_set_values(HADT d, const char *v,long NX,long NY,long NZ)
mglFromStr(d,buf,NX,NY,NZ);
delete []buf;
}
-void mgl_datac_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l)
+void MGL_EXPORT mgl_datac_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l)
{ char *s=new char[l+1]; memcpy(s,val,l); s[l]=0;
mgl_datac_set_values(_DC_,s,*nx,*ny,*nz); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_datac_set_vector(HADT d, gsl_vector *v)
+void MGL_EXPORT mgl_datac_set_vector(HADT d, gsl_vector *v)
{
#if MGL_HAVE_GSL
if(!v || v->size<1) return;
@@ -125,7 +125,7 @@ void mgl_datac_set_vector(HADT d, gsl_vector *v)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_datac_set_matrix(HADT d, gsl_matrix *m)
+void MGL_EXPORT mgl_datac_set_matrix(HADT d, gsl_matrix *m)
{
#if MGL_HAVE_GSL
if(!m || m->size1<1 || m->size2<1) return;
@@ -136,7 +136,7 @@ void mgl_datac_set_matrix(HADT d, gsl_matrix *m)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_datac_set_float(HADT d, const float *A,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_datac_set_float(HADT d, const float *A,long NX,long NY,long NZ)
{
if(NX<=0 || NY<=0 || NZ<=0) return;
mgl_datac_create(d, NX,NY,NZ); if(!A) return;
@@ -147,7 +147,7 @@ void mgl_datac_set_float(HADT d, const float *A,long NX,long NY,long NZ)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_datac_set_double(HADT d, const double *A,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_datac_set_double(HADT d, const double *A,long NX,long NY,long NZ)
{
if(NX<=0 || NY<=0 || NZ<=0) return;
mgl_datac_create(d, NX,NY,NZ); if(!A) return;
@@ -158,7 +158,7 @@ void mgl_datac_set_double(HADT d, const double *A,long NX,long NY,long NZ)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_datac_set_complex(HADT d, const dual *A,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_datac_set_complex(HADT d, const dual *A,long NX,long NY,long NZ)
{
if(NX<=0 || NY<=0 || NZ<=0) return;
mgl_datac_create(d, NX,NY,NZ); if(!A) return;
@@ -169,14 +169,14 @@ void mgl_datac_set_complex(HADT d, const dual *A,long NX,long NY,long NZ)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_datac_set_float_(uintptr_t *d, const float *A,int *NX,int *NY,int *NZ)
+void MGL_EXPORT mgl_datac_set_float_(uintptr_t *d, const float *A,int *NX,int *NY,int *NZ)
{ mgl_datac_set_float(_DC_,A,*NX,*NY,*NZ); }
-void mgl_datac_set_double_(uintptr_t *d, const double *A,int *NX,int *NY,int *NZ)
+void MGL_EXPORT mgl_datac_set_double_(uintptr_t *d, const double *A,int *NX,int *NY,int *NZ)
{ mgl_datac_set_double(_DC_,A,*NX,*NY,*NZ); }
-void mgl_datac_set_complex_(uintptr_t *d, const dual *A,int *NX,int *NY,int *NZ)
+void MGL_EXPORT mgl_datac_set_complex_(uintptr_t *d, const dual *A,int *NX,int *NY,int *NZ)
{ mgl_datac_set_complex(_DC_,A,*NX,*NY,*NZ); }
//-----------------------------------------------------------------------------
-void mgl_datac_rearrange(HADT d, long mx,long my,long mz)
+void MGL_EXPORT mgl_datac_rearrange(HADT d, long mx,long my,long mz)
{
if(mx<1) return; // wrong mx
if(my<1) { my = d->nx*d->ny*d->nz/mx; mz = 1; }
@@ -185,15 +185,15 @@ void mgl_datac_rearrange(HADT d, long mx,long my,long mz)
if(m==0 || m>d->nx*d->ny*d->nz) return; // too high desired dimensions
d->nx = mx; d->ny = my; d->nz = mz; d->NewId();
}
-void mgl_datac_rearrange_(uintptr_t *d, int *mx, int *my, int *mz)
+void MGL_EXPORT mgl_datac_rearrange_(uintptr_t *d, int *mx, int *my, int *mz)
{ mgl_datac_rearrange(_DC_,*mx,*my,*mz); }
//-----------------------------------------------------------------------------
-void mgl_datac_set_id(HADT d, const char *ids) { d->id = ids; }
-void mgl_datac_set_id_(uintptr_t *d, const char *eq,int l)
+void MGL_EXPORT mgl_datac_set_id(HADT d, const char *ids) { d->id = ids; }
+void MGL_EXPORT mgl_datac_set_id_(uintptr_t *d, const char *eq,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_datac_set_id(_DC_, s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_datac_save(HCDT d, const char *fname,long ns)
+void MGL_EXPORT mgl_datac_save(HCDT d, const char *fname,long ns)
{
const mglDataC *dd = dynamic_cast<const mglDataC*>(d);
if(!dd) { mgl_data_save(d,fname,ns); return; }
@@ -222,11 +222,11 @@ void mgl_datac_save(HCDT d, const char *fname,long ns)
}
fclose(fp);
}
-void mgl_datac_save_(uintptr_t *d, const char *fname,int *ns,int l)
+void MGL_EXPORT mgl_datac_save_(uintptr_t *d, const char *fname,int *ns,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
mgl_datac_save(_DC_,s,*ns); delete []s; }
//-----------------------------------------------------------------------------
-int mgl_datac_read(HADT d, const char *fname)
+int MGL_EXPORT mgl_datac_read(HADT d, const char *fname)
{
long l=1,m=1,k=1;
long nb,i;
@@ -279,11 +279,11 @@ int mgl_datac_read(HADT d, const char *fname)
mglFromStr(d,buf,k,m,l);
free(buf); return true;
}
-int mgl_datac_read_(uintptr_t *d, const char *fname,int l)
+int MGL_EXPORT mgl_datac_read_(uintptr_t *d, const char *fname,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_datac_read(_DC_, s); delete []s; return r; }
//-----------------------------------------------------------------------------
-void mgl_datac_create(HADT d,long mx,long my,long mz)
+void MGL_EXPORT mgl_datac_create(HADT d,long mx,long my,long mz)
{
d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1;
if(d->a && !d->link) delete [](d->a);
@@ -291,20 +291,20 @@ void mgl_datac_create(HADT d,long mx,long my,long mz)
d->id.clear(); d->link=false;
memset(d->a,0,d->nx*d->ny*d->nz*sizeof(dual));
}
-void mgl_datac_create_(uintptr_t *d, int *nx,int *ny,int *nz)
+void MGL_EXPORT mgl_datac_create_(uintptr_t *d, int *nx,int *ny,int *nz)
{ mgl_datac_create(_DC_,*nx,*ny,*nz); }
//-----------------------------------------------------------------------------
-void mgl_datac_link(HADT d, dual *A, long mx,long my,long mz)
+void MGL_EXPORT mgl_datac_link(HADT d, dual *A, long mx,long my,long mz)
{
if(!A) return;
if(!d->link && d->a) delete [](d->a);
d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1;
d->link=true; d->a=A; d->NewId();
}
-void mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz)
+void MGL_EXPORT mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz)
{ mgl_datac_link(_DC_,A,*nx,*ny,*nz); }
//-----------------------------------------------------------------------------
-int mgl_datac_read_dim(HADT d, const char *fname,long mx,long my,long mz)
+int MGL_EXPORT mgl_datac_read_dim(HADT d, const char *fname,long mx,long my,long mz)
{
if(mx<=0 || my<=0 || mz<=0) return false;
gzFile fp = gzopen(fname,"r");
@@ -314,11 +314,11 @@ int mgl_datac_read_dim(HADT d, const char *fname,long mx,long my,long mz)
mglFromStr(d,buf,mx,my,mz);
free(buf); return true;
}
-int mgl_datac_read_dim_(uintptr_t *d, const char *fname,int *mx,int *my,int *mz,int l)
+int MGL_EXPORT mgl_datac_read_dim_(uintptr_t *d, const char *fname,int *mx,int *my,int *mz,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_datac_read_dim(_DC_,s,*mx,*my,*mz); delete []s; return r; }
//-----------------------------------------------------------------------------
-int mgl_datac_read_mat(HADT d, const char *fname, long dim)
+int MGL_EXPORT mgl_datac_read_mat(HADT d, const char *fname, long dim)
{
if(dim<=0 || dim>3) return false;
gzFile fp = gzopen(fname,"r");
@@ -371,11 +371,11 @@ int mgl_datac_read_mat(HADT d, const char *fname, long dim)
mglFromStr(d,buf+j,nx,ny,nz);
free(buf); return true;
}
-int mgl_datac_read_mat_(uintptr_t *d, const char *fname,int *dim,int l)
+int MGL_EXPORT mgl_datac_read_mat_(uintptr_t *d, const char *fname,int *dim,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_datac_read_mat(_DC_,s,*dim); delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_cfill_x(void *par)
+MGL_NO_EXPORT void *mgl_cfill_x(void *par)
{
mglThreadC *t=(mglThreadC *)par;
register long i0, nx=t->p[0],ny=t->p[1];
@@ -389,7 +389,7 @@ void *mgl_cfill_x(void *par)
}
return 0;
}
-void mgl_datac_fill(HADT d, dual x1,dual x2,char dir)
+void MGL_EXPORT mgl_datac_fill(HADT d, dual x1,dual x2,char dir)
{
if(mgl_isnan(x2)) x2=x1;
if(dir<'x' || dir>'z') dir='x';
@@ -400,10 +400,10 @@ void mgl_datac_fill(HADT d, dual x1,dual x2,char dir)
if(dir=='z') b[1] *= d->nz>1 ? 1./(d->nz-1):0;
mglStartThreadC(mgl_cfill_x,0,d->nx*d->ny*d->nz,d->a,b,0,par,0,0,0,&dir);
}
-void mgl_datac_fill_(uintptr_t *d, dual *x1,dual *x2,const char *dir,int)
+void MGL_EXPORT mgl_datac_fill_(uintptr_t *d, dual *x1,dual *x2,const char *dir,int)
{ mgl_datac_fill(_DC_,*x1,*x2,*dir); }
//-----------------------------------------------------------------------------
-void mgl_datac_squeeze(HADT d, long rx,long ry,long rz,long smooth)
+void MGL_EXPORT mgl_datac_squeeze(HADT d, long rx,long ry,long rz,long smooth)
{
long kx,ky,kz,i,j,k;
long nx=d->nx, ny=d->ny, nz=d->nz;
@@ -432,10 +432,10 @@ void mgl_datac_squeeze(HADT d, long rx,long ry,long rz,long smooth)
if(!d->link) delete [](d->a);
d->a=b; d->nx = kx; d->ny = ky; d->nz = kz; d->NewId(); d->link=false;
}
-void mgl_datac_squeeze_(uintptr_t *d, int *rx,int *ry,int *rz,int *smooth)
+void MGL_EXPORT mgl_datac_squeeze_(uintptr_t *d, int *rx,int *ry,int *rz,int *smooth)
{ mgl_datac_squeeze(_DC_,*rx,*ry,*rz,*smooth); }
//-----------------------------------------------------------------------------
-void mgl_datac_extend(HADT d, long n1, long n2)
+void MGL_EXPORT mgl_datac_extend(HADT d, long n1, long n2)
{
long nx=d->nx, ny=d->ny, nz=d->nz;
if(nz>2 || n1==0) return;
@@ -469,10 +469,10 @@ void mgl_datac_extend(HADT d, long n1, long n2)
d->a=b; d->nx=mx; d->ny=my; d->nz=mz;
d->NewId(); d->link=false;
}
-void mgl_datac_extend_(uintptr_t *d, int *n1, int *n2)
+void MGL_EXPORT mgl_datac_extend_(uintptr_t *d, int *n1, int *n2)
{ mgl_datac_extend(_DC_,*n1,*n2); }
//-----------------------------------------------------------------------------
-void mgl_datac_transpose(HADT d, const char *dim)
+void MGL_EXPORT mgl_datac_transpose(HADT d, const char *dim)
{
long nx=d->nx, ny=d->ny, nz=d->nz;
dual *b=new dual[nx*ny*nz], *a=d->a;
@@ -512,11 +512,11 @@ void mgl_datac_transpose(HADT d, const char *dim)
n=d->nx; d->nx=nx; d->ny=ny; d->nz=nz;
if(nx!=n) d->NewId();
}
-void mgl_datac_transpose_(uintptr_t *d, const char *dim,int l)
+void MGL_EXPORT mgl_datac_transpose_(uintptr_t *d, const char *dim,int l)
{ char *s=new char[l+1]; memcpy(s,dim,l); s[l]=0;
mgl_datac_transpose(_DC_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cmodify(void *par)
+MGL_NO_EXPORT void *mgl_cmodify(void *par)
{
mglThreadC *t=(mglThreadC *)par;
const mglFormulaC *f = (const mglFormulaC *)(t->v);
@@ -528,11 +528,11 @@ void *mgl_cmodify(void *par)
for(i0=t->id;i0<t->n;i0+=mglNumThr)
{
i=i0%nx; j=((i0/nx)%ny); k=i0/(nx*ny);
- b[i0] = f->Calc(i*dx, j*dy, k*dz, b[i0], v?v[i0]:0, w?w[i0]:0);
+ b[i0] = f->Calc(i*dx, j*dy, k*dz, b[i0], v?v[i0]:dual(0,0), w?w[i0]:dual(0,0));
}
return 0;
}
-void mgl_datac_modify(HADT d, const char *eq,long dim)
+void MGL_EXPORT mgl_datac_modify(HADT d, const char *eq,long dim)
{
long nx=d->nx, ny=d->ny, nz=d->nz, par[3]={nx,ny,nz};
mglFormulaC f(eq);
@@ -548,11 +548,11 @@ void mgl_datac_modify(HADT d, const char *eq,long dim)
mglStartThreadC(mgl_cmodify,0,nx*par[1],d->a+nx*dim,0,0,par,&f);
}
}
-void mgl_datac_modify_(uintptr_t *d, const char *eq,int *dim,int l)
+void MGL_EXPORT mgl_datac_modify_(uintptr_t *d, const char *eq,int *dim,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_datac_modify(_DC_,s,*dim); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cmodify_gen(void *par)
+MGL_NO_EXPORT void *mgl_cmodify_gen(void *par)
{
mglThreadC *t=(mglThreadC *)par;
const mglFormulaC *f = (const mglFormulaC *)(t->v);
@@ -568,7 +568,7 @@ void *mgl_cmodify_gen(void *par)
}
return 0;
}
-void mgl_datac_modify_vw(HADT d, const char *eq,HCDT vdat,HCDT wdat)
+void MGL_EXPORT mgl_datac_modify_vw(HADT d, const char *eq,HCDT vdat,HCDT wdat)
{
const mglDataC *v = dynamic_cast<const mglDataC *>(vdat);
const mglDataC *w = dynamic_cast<const mglDataC *>(wdat);
@@ -582,11 +582,11 @@ void mgl_datac_modify_vw(HADT d, const char *eq,HCDT vdat,HCDT wdat)
else if(vdat) mglStartThreadV(mgl_cmodify_gen,nn,d->a,vdat,0,par,&f);
else mglStartThreadC(mgl_cmodify,0,nn,d->a,0,0,par,&f);
}
-void mgl_datac_modify_vw_(uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w,int l)
+void MGL_EXPORT mgl_datac_modify_vw_(uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_datac_modify_vw(_DC_,s,_DA_(v),_DA_(w)); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_cfill_f(void *par)
+MGL_NO_EXPORT void *mgl_cfill_f(void *par)
{
mglThreadC *t=(mglThreadC *)par;
const mglFormulaC *f = (const mglFormulaC *)(t->v);
@@ -597,11 +597,11 @@ void *mgl_cfill_f(void *par)
{
i=i0%nx; j=((i0/nx)%ny); k=i0/(nx*ny);
b[i0] = f->Calc(x[0]+mreal(i)*x[1], x[2]+mreal(j)*x[3], x[4]+mreal(k)*x[5],
- b[i0], v?v[i0]:0, w?w[i0]:0);
+ b[i0], v?v[i0]:dual(0,0), w?w[i0]:dual(0,0));
}
return 0;
}
-void *mgl_cfill_fgen(void *par)
+MGL_NO_EXPORT void *mgl_cfill_fgen(void *par)
{
mglThreadC *t=(mglThreadC *)par;
const mglFormulaC *f = (const mglFormulaC *)(t->v);
@@ -617,7 +617,7 @@ void *mgl_cfill_fgen(void *par)
}
return 0;
}
-void mgl_datac_fill_eq(HMGL gr, HADT d, const char *eq, HCDT vdat, HCDT wdat, const char *opt)
+void MGL_EXPORT mgl_datac_fill_eq(HMGL gr, HADT d, const char *eq, HCDT vdat, HCDT wdat, const char *opt)
{
const mglDataC *v = dynamic_cast<const mglDataC *>(vdat);
const mglDataC *w = dynamic_cast<const mglDataC *>(wdat);
@@ -638,12 +638,12 @@ void mgl_datac_fill_eq(HMGL gr, HADT d, const char *eq, HCDT vdat, HCDT wdat, co
else mglStartThreadC(mgl_cfill_f,0,nn,d->a,0,0,par,&f,cc);
gr->LoadState();
}
-void mgl_datac_fill_eq_(uintptr_t *gr, uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_datac_fill_eq_(uintptr_t *gr, uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_datac_fill_eq(_GR_,_DC_,s,_DA_(v),_DA_(w),o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-bool mgl_add_file(long &kx,long &ky, long &kz, dual *&b, mglDataC *d,bool as_slice)
+bool MGL_NO_EXPORT mgl_add_file(long &kx,long &ky, long &kz, dual *&b, mglDataC *d,bool as_slice)
{
if(as_slice && d->nz==1)
{
@@ -681,7 +681,7 @@ bool mgl_add_file(long &kx,long &ky, long &kz, dual *&b, mglDataC *d,bool as_sli
return true;
}
//-----------------------------------------------------------------------------
-int mgl_datac_read_range(HADT dat, const char *templ, double from, double to, double step, int as_slice)
+int MGL_EXPORT mgl_datac_read_range(HADT dat, const char *templ, double from, double to, double step, int as_slice)
{
mglDataC d;
double t = from;
@@ -703,17 +703,17 @@ int mgl_datac_read_range(HADT dat, const char *templ, double from, double to, do
sprintf(fname,templ,t);
if(mgl_datac_read(&d,fname))
if(!mgl_add_file(kx,ky,kz,b,&d,as_slice))
- return false;
+ { delete []fname; free(b); return false; }
}
dat->Set(b,kx,ky,kz);
- delete []fname; free(b);
+ delete []fname; free(b);
return true;
}
-int mgl_datac_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l)
+int MGL_EXPORT mgl_datac_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_datac_read_range(_DC_,s,*from,*to,*step,*as_slice); delete []s; return r; }
//-----------------------------------------------------------------------------
-int mgl_datac_read_all(HADT dat, const char *templ, int as_slice)
+int MGL_EXPORT mgl_datac_read_all(HADT dat, const char *templ, int as_slice)
{
#ifndef WIN32
mglDataC d;
@@ -748,11 +748,11 @@ int mgl_datac_read_all(HADT dat, const char *templ, int as_slice)
return false;
#endif
}
-int mgl_datac_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l)
+int MGL_EXPORT mgl_datac_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_datac_read_all(_DC_,s,*as_slice); delete []s; return r; }
//-----------------------------------------------------------------------------
-HMDT mgl_datac_real(HCDT d)
+HMDT MGL_EXPORT mgl_datac_real(HCDT d)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
mglData *r=new mglData(nx,ny,nz);
@@ -762,10 +762,10 @@ HMDT mgl_datac_real(HCDT d)
else r->Set(d);
return r;
}
-uintptr_t mgl_datac_real_(uintptr_t *d)
+uintptr_t MGL_EXPORT mgl_datac_real_(uintptr_t *d)
{ return uintptr_t(mgl_datac_real(_DC_)); }
//-----------------------------------------------------------------------------
-HMDT mgl_datac_imag(HCDT d)
+HMDT MGL_EXPORT mgl_datac_imag(HCDT d)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
mglData *r=new mglData(nx,ny,nz);
@@ -774,10 +774,10 @@ HMDT mgl_datac_imag(HCDT d)
if(dd) for(i=0;i<nx*ny*nz;i++) r->a[i] = imag(dd->a[i]);
return r;
}
-uintptr_t mgl_datac_imag_(uintptr_t *d)
+uintptr_t MGL_EXPORT mgl_datac_imag_(uintptr_t *d)
{ return uintptr_t(mgl_datac_imag(_DC_)); }
//-----------------------------------------------------------------------------
-HMDT mgl_datac_abs(HCDT d)
+HMDT MGL_EXPORT mgl_datac_abs(HCDT d)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
mglData *r=new mglData(nx,ny,nz);
@@ -787,10 +787,10 @@ HMDT mgl_datac_abs(HCDT d)
else for(i=0;i<nx*ny*nz;i++) r->a[i] = fabs(d->vthr(i));
return r;
}
-uintptr_t mgl_datac_abs_(uintptr_t *d)
+uintptr_t MGL_EXPORT mgl_datac_abs_(uintptr_t *d)
{ return uintptr_t(mgl_datac_abs(_DC_)); }
//-----------------------------------------------------------------------------
-HMDT mgl_datac_arg(HCDT d)
+HMDT MGL_EXPORT mgl_datac_arg(HCDT d)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
mglData *r=new mglData(nx,ny,nz);
@@ -799,20 +799,20 @@ HMDT mgl_datac_arg(HCDT d)
if(dd) for(i=0;i<nx*ny*nz;i++) r->a[i] = arg(dd->a[i]);
return r;
}
-uintptr_t mgl_datac_arg_(uintptr_t *d)
+uintptr_t MGL_EXPORT mgl_datac_arg_(uintptr_t *d)
{ return uintptr_t(mgl_datac_arg(_DC_)); }
//-----------------------------------------------------------------------------
-void mgl_datac_set_ri(HADT d, HCDT re, HCDT im)
+void MGL_EXPORT mgl_datac_set_ri(HADT d, HCDT re, HCDT im)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
d->Create(nx,ny,nz);
register long i;
for(i=0;i<nx*ny*nz;i++) d->a[i] = dual(re->vthr(i),im->vthr(i));
}
-void mgl_datac_set_ri_(uintptr_t *d, uintptr_t *re, uintptr_t *im)
+void MGL_EXPORT mgl_datac_set_ri_(uintptr_t *d, uintptr_t *re, uintptr_t *im)
{ mgl_datac_set_ri(_DC_,_DA_(re),_DA_(im)); }
//-----------------------------------------------------------------------------
-void mgl_datac_set_ap(HADT d, HCDT a, HCDT p)
+void MGL_EXPORT mgl_datac_set_ap(HADT d, HCDT a, HCDT p)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
d->Create(nx,ny,nz);
@@ -824,11 +824,11 @@ void mgl_datac_set_ap(HADT d, HCDT a, HCDT p)
d->a[i] = dual(aa*cos(pp), aa*sin(pp));
}
}
-void mgl_datac_set_ap_(uintptr_t *d, uintptr_t *a, uintptr_t *p)
+void MGL_EXPORT mgl_datac_set_ap_(uintptr_t *d, uintptr_t *a, uintptr_t *p)
{ mgl_datac_set_ap(_DC_,_DA_(a),_DA_(p)); }
//-----------------------------------------------------------------------------
#if MGL_HAVE_HDF5
-void mgl_datac_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
+void MGL_EXPORT mgl_datac_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
{
const mglDataC *d = dynamic_cast<const mglDataC *>(dat); // NOTE: only for mglDataC
if(!d) { mgl_data_save_hdf(dat,fname,data,rewrite); return; }
@@ -854,7 +854,7 @@ void mgl_datac_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
H5Dclose(hd); H5Sclose(hs); H5Fclose(hf);
}
//-----------------------------------------------------------------------------
-int mgl_datac_read_hdf(HADT d,const char *fname,const char *data)
+int MGL_EXPORT mgl_datac_read_hdf(HADT d,const char *fname,const char *data)
{
hid_t hf,hd,hs;
hsize_t dims[4];
@@ -883,17 +883,17 @@ int mgl_datac_read_hdf(HADT d,const char *fname,const char *data)
}
//-----------------------------------------------------------------------------
#else
-void mgl_datac_save_hdf(HCDT ,const char *,const char *,int )
+void MGL_EXPORT mgl_datac_save_hdf(HCDT ,const char *,const char *,int )
{ mglGlobalMess += "HDF5 support was disabled. Please, enable it and rebuild MathGL.\n"; }
-int mgl_datac_read_hdf(HADT ,const char *,const char *)
+int MGL_EXPORT mgl_datac_read_hdf(HADT ,const char *,const char *)
{ mglGlobalMess += "HDF5 support was disabled. Please, enable it and rebuild MathGL.\n"; return false;}
#endif
//-----------------------------------------------------------------------------
-int mgl_datac_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n)
+int MGL_EXPORT mgl_datac_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *t=new char[n+1]; memcpy(t,data,n); t[n]=0;
int r = mgl_datac_read_hdf(_DC_,s,t); delete []s; delete []t; return r; }
-void mgl_datac_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n)
+void MGL_EXPORT mgl_datac_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *t=new char[n+1]; memcpy(t,data,n); t[n]=0;
mgl_datac_save_hdf(_DC_,s,t,*rewrite); delete []s; delete []t; }
diff --git a/src/cont.cpp b/src/cont.cpp
index 250baab..f9bd325 100644
--- a/src/cont.cpp
+++ b/src/cont.cpp
@@ -17,7 +17,15 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+// NOTE: Borland before 2007 (i.e. < 0x0600) use <algorithm.h>, fter 0x0630 it use <algorithm>.
+// I don't find information about 2009, 2010 versions (i.e. 0x0610 and 0x0620).
+// May be condition below can be rewritten as (__CODEGEARC__ >= 0x0600)
+#if !defined(__BORLANDC__) || (__CODEGEARC__ >= 0x0630)
#include <algorithm>
+#else
+#include <algorithm.h>
+#endif
+
#include "mgl2/surf.h"
#include "mgl2/cont.h"
#include "mgl2/data.h"
@@ -28,7 +36,7 @@
// Text printing along a curve
//
//-----------------------------------------------------------------------------
-void mgl_string_curve(mglBase *gr,long f,long ,long *ff,long *nn,const wchar_t *text, const char *font, mreal size)
+void MGL_NO_EXPORT mgl_string_curve(mglBase *gr,long f,long ,long *ff,long *nn,const wchar_t *text, const char *font, mreal size)
{
if(f<0 || nn[f]==-1) return; // do nothing since there is no curve
if(!font) font="";
@@ -102,7 +110,7 @@ void mgl_string_curve(mglBase *gr,long f,long ,long *ff,long *nn,const wchar_t *
delete []wdt; delete []pt; delete []fnt;
}
//-----------------------------------------------------------------------------
-void mgl_textw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const wchar_t *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_textw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const wchar_t *text, const char *font, const char *opt)
{
long n=y->GetNx();
if(mgl_check_dim1(gr,x,y,z,0,"Text")) return;
@@ -127,7 +135,7 @@ void mgl_textw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const wchar_t *text, const ch
delete []ff; delete []nn;
}
//-----------------------------------------------------------------------------
-void mgl_textw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_textw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *font, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -136,7 +144,7 @@ void mgl_textw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *font
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx()), z(y->GetNx());
@@ -146,7 +154,7 @@ void mgl_textw_y(HMGL gr, HCDT y, const wchar_t *text, const char *font, const c
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_text_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const char *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_text_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const char *text, const char *font, const char *opt)
{
size_t s = mbstowcs(0,text,0)+1;
wchar_t *wcs = new wchar_t[s];
@@ -155,14 +163,14 @@ void mgl_text_xyz(HMGL gr, HCDT x, HCDT y, HCDT z,const char *text, const char *
delete []wcs;
}
//-----------------------------------------------------------------------------
-void mgl_text_xy(HMGL gr, HCDT x, HCDT y, const char *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_text_xy(HMGL gr, HCDT x, HCDT y, const char *text, const char *font, const char *opt)
{
mglData z(y->GetNx());
mreal zm = gr->AdjustZMin(); z.Fill(zm,zm);
mgl_text_xyz(gr,x,y,&z,text,font,opt);
}
//-----------------------------------------------------------------------------
-void mgl_text_y(HMGL gr, HCDT y, const char *text, const char *font, const char *opt)
+void MGL_EXPORT mgl_text_y(HMGL gr, HCDT y, const char *text, const char *font, const char *opt)
{
mglData x(y->GetNx()), z(y->GetNx());
x.Fill(gr->Min.x,gr->Max.x);
@@ -170,21 +178,21 @@ void mgl_text_y(HMGL gr, HCDT y, const char *text, const char *font, const char
mgl_text_xyz(gr,&x,y,&z,text,font,opt);
}
//-----------------------------------------------------------------------------
-void mgl_text_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z,const char *text,const char *font, const char *opt,int l,int n,int lo)
+void MGL_EXPORT mgl_text_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z,const char *text,const char *font, const char *opt,int l,int n,int lo)
{ char *s=new char[l+1]; memcpy(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,font,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_text_xyz(_GR_, _DA_(x),_DA_(y), _DA_(z), s, f, o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_text_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *font, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_text_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *font, const char *opt, int l,int n,int lo)
{ char *s=new char[l+1]; memcpy(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,font,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_text_xy(_GR_, _DA_(x),_DA_(y),s,f,o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_text_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *font, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_text_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *font, const char *opt, int l,int n,int lo)
{ char *s=new char[l+1]; memcpy(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,font,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
@@ -201,7 +209,7 @@ struct mglSegment
mglSegment(mglPoint q1,mglPoint q2) {p1=q1;p2=q2;next=prev=-1;}
};
// function for connecting arbitrary line segments
-/*void mgl_connect(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak)
+/*void MGL_NO_EXPORT mgl_connect(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak)
{
long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2 || x->GetNx()*x->GetNy()!=n*m || y->GetNx()*y->GetNy()!=n*m || z->GetNx()*z->GetNy()!=n*m)
@@ -327,7 +335,7 @@ long *mgl_cont_prep(mreal val, HCDT a,long ak, std::vector<mglPnt2> &kk)
}
//-----------------------------------------------------------------------------
// NOTE! All data MUST have the same size! Only first slice is used!
-void mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak)
+void MGL_EXPORT mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak)
{
long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2 || x->GetNx()*x->GetNy()!=n*m || y->GetNx()*y->GetNy()!=n*m || z->GetNx()*z->GetNy()!=n*m)
@@ -379,14 +387,14 @@ void mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, i
delete []nn; delete []ff;
}
//-----------------------------------------------------------------------------
-void mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *sch)
+void MGL_EXPORT mgl_cont_gen(HMGL gr, double val, HCDT a, HCDT x, HCDT y, HCDT z, const char *sch)
{
bool text=(mglchr(sch,'t'));
gr->SetPenPal(sch);
mgl_cont_gen(gr,val,a,x,y,z,gr->CDef,text,0);
}
//-----------------------------------------------------------------------------
-void mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Cont")) return;
@@ -425,7 +433,7 @@ void mgl_cont_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cont_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cont_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
{
register long n = z->GetNx(), m = z->GetNy();
if(m<2 || n<2) { gr->SetWarn(mglWarnLow,"Cont"); return; }
@@ -437,7 +445,7 @@ void mgl_cont_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cont_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -448,7 +456,7 @@ void mgl_cont_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cont(HMGL gr, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -459,23 +467,23 @@ void mgl_cont(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_xy_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_val(_GR_, _DA_(v), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -484,7 +492,7 @@ mgl_cont(_GR_, _DA_(a), s, o); delete []o; delete []s; }
// ContF series
//
//-----------------------------------------------------------------------------
-long mgl_add_pnt(HMGL gr, mreal d, HCDT x, HCDT y, HCDT z, long i1, long j1, long i2, long j2, mreal c, bool edge)
+long MGL_NO_EXPORT mgl_add_pnt(HMGL gr, mreal d, HCDT x, HCDT y, HCDT z, long i1, long j1, long i2, long j2, mreal c, bool edge)
{
long res=-1;
if(edge || (d>0 && d<1))
@@ -504,7 +512,7 @@ long mgl_add_pnt(HMGL gr, mreal d, HCDT x, HCDT y, HCDT z, long i1, long j1, lon
return res;
}
//-----------------------------------------------------------------------------
-void mgl_add_range(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, long di, long dj, mreal c, long &u1, long &u2, long ak, mreal v1, mreal v2)
+void MGL_NO_EXPORT mgl_add_range(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, long di, long dj, mreal c, long &u1, long &u2, long ak, mreal v1, mreal v2)
{
long i2=i1+di, j2=j1+dj;
@@ -516,7 +524,7 @@ void mgl_add_range(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, lo
if(d1>d2) { j2=u1; u1=u2; u2=j2; }
}
//-----------------------------------------------------------------------------
-void mgl_add_edges(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, long di, long dj, mreal c, long &u1, long &u2, long ak, mreal v1, mreal v2)
+void MGL_NO_EXPORT mgl_add_edges(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, long di, long dj, mreal c, long &u1, long &u2, long ak, mreal v1, mreal v2)
{
long i2=i1+di, j2=j1+dj;
u1 = u2 = -1;
@@ -528,7 +536,7 @@ void mgl_add_edges(HMGL gr, HCDT a, HCDT x, HCDT y, HCDT z, long i1, long j1, lo
u2 = mgl_add_pnt(gr,1,x,y,z,i1,j1,i2,j2,c,true);
}
//-----------------------------------------------------------------------------
-void mgl_contf_gen(HMGL gr, mreal v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak)
+void MGL_EXPORT mgl_contf_gen(HMGL gr, mreal v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak)
{
long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2 || x->GetNx()*x->GetNy()!=n*m || y->GetNx()*y->GetNy()!=n*m || z->GetNx()*z->GetNy()!=n*m)
@@ -588,13 +596,13 @@ void mgl_contf_gen(HMGL gr, mreal v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z,
delete []kk;
}
//-----------------------------------------------------------------------------
-void mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *c)
+void MGL_EXPORT mgl_contf_gen(HMGL gr, double v1, double v2, HCDT a, HCDT x, HCDT y, HCDT z, const char *c)
{
gr->SetPenPal(c);
mgl_contf_gen(gr,v1,v2,a,x,y,z,gr->CDef,0);
}
//-----------------------------------------------------------------------------
-void mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"ContF")) return;
@@ -630,7 +638,7 @@ void mgl_contf_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contf_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contf_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
{
register long n = z->GetNx(), m = z->GetNy();
if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"Cont"); return; }
@@ -642,7 +650,7 @@ void mgl_contf_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -652,7 +660,7 @@ void mgl_contf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contf(HMGL gr, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -662,24 +670,24 @@ void mgl_contf(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_xy_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_val(_GR_, _DA_(v), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -688,7 +696,7 @@ void mgl_contf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,in
// ContD series
//
//-----------------------------------------------------------------------------
-int mgl_get_ncol(const char *sch, char *res)
+int MGL_NO_EXPORT mgl_get_ncol(const char *sch, char *res)
{
register long i,j=0;
if(sch) for(i=0;sch[i]&&sch[i]!=':';i++) if(strchr(MGL_COLORS,sch[i]))
@@ -696,7 +704,7 @@ int mgl_get_ncol(const char *sch, char *res)
return j?j:strlen(MGL_DEF_PAL);
}
//-----------------------------------------------------------------------------
-void mgl_contd_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contd_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j=0,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"ContD")) return;
@@ -735,7 +743,7 @@ void mgl_contd_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contd_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contd_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
{
register long n = z->GetNx(), m = z->GetNy();
if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"ContD"); return; }
@@ -747,7 +755,7 @@ void mgl_contd_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contd_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contd_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData v(mgl_get_ncol(sch,0)+1);
@@ -756,7 +764,7 @@ void mgl_contd_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contd(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contd(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData v(mgl_get_ncol(sch,0)+1);
@@ -765,23 +773,23 @@ void mgl_contd(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contd_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contd_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contd_xy_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contd_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contd_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contd_val(_GR_, _DA_(v), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contd_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contd_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contd_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contd_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contd_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contd(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -791,7 +799,7 @@ void mgl_contd_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,in
//
//-----------------------------------------------------------------------------
// NOTE! All data MUST have the same size! Only first slice is used!
-void mgl_contv_gen(HMGL gr, mreal val, mreal dval, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak)
+void MGL_EXPORT mgl_contv_gen(HMGL gr, mreal val, mreal dval, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak)
{
long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2 || x->GetNx()*x->GetNy()!=n*m || y->GetNx()*y->GetNy()!=n*m || z->GetNx()*z->GetNy()!=n*m)
@@ -816,7 +824,7 @@ void mgl_contv_gen(HMGL gr, mreal val, mreal dval, HCDT a, HCDT x, HCDT y, HCDT
delete []nn; delete []ff;
}
//-----------------------------------------------------------------------------
-void mgl_contv_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contv_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"ContV")) return;
@@ -856,7 +864,7 @@ void mgl_contv_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contv_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contv_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
{
register long n = z->GetNx(), m = z->GetNy();
if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"Cont"); return; }
@@ -868,7 +876,7 @@ void mgl_contv_val(HMGL gr, HCDT v, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contv_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contv_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -879,7 +887,7 @@ void mgl_contv_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contv(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_contv(HMGL gr, HCDT z, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -890,23 +898,23 @@ void mgl_contv(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contv_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contv_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contv_xy_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contv_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contv_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contv_val(_GR_, _DA_(v), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contv_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contv_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contv_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contv_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contv_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contv(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -917,7 +925,7 @@ void mgl_contv_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,in
//-----------------------------------------------------------------------------
struct _mgl_slice { mglData x,y,z,a; };
//-----------------------------------------------------------------------------
-void mgl_get_slice(_mgl_slice &s, HCDT x, HCDT y, HCDT z, HCDT a, char dir, mreal d, bool both)
+void MGL_NO_EXPORT mgl_get_slice(_mgl_slice &s, HCDT x, HCDT y, HCDT z, HCDT a, char dir, mreal d, bool both)
{
register long i,j,i0,n=a->GetNx(),m=a->GetNy(),l=a->GetNz(), nx=1,ny=1,p;
@@ -994,7 +1002,7 @@ void mgl_get_slice(_mgl_slice &s, HCDT x, HCDT y, HCDT z, HCDT a, char dir, mrea
}
}
//-----------------------------------------------------------------------------
-void mgl_get_slice_md(_mgl_slice &s, const mglData *x, const mglData *y, const mglData *z, const mglData *a, char dir, mreal d, bool both)
+void MGL_NO_EXPORT mgl_get_slice_md(_mgl_slice &s, const mglData *x, const mglData *y, const mglData *z, const mglData *a, char dir, mreal d, bool both)
{
register long i,j,i0,i1,n=a->nx,m=a->ny,l=a->nz, nx=1,ny=1,p;
@@ -1071,7 +1079,7 @@ void mgl_get_slice_md(_mgl_slice &s, const mglData *x, const mglData *y, const m
}
}
//-----------------------------------------------------------------------------
-void mgl_cont3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_cont3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
bool both = mgl_isboth(x,y,z,a);
if(mgl_check_dim3(gr,both,x,y,z,a,0,"Cont3")) return;
@@ -1101,7 +1109,7 @@ void mgl_cont3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const ch
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cont3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_cont3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -1112,7 +1120,7 @@ void mgl_cont3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_cont3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -1123,7 +1131,7 @@ void mgl_cont3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, dou
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_cont3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -1134,24 +1142,24 @@ void mgl_cont3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont3_xyz_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont3_val(_GR_, _DA_(v), _DA_(a), s, *sVal, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont3(_GR_, _DA_(a), s, *sVal, o); delete []o; delete []s; }
@@ -1160,7 +1168,7 @@ void mgl_cont3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const
// Dens3 series
//
//-----------------------------------------------------------------------------
-void mgl_dens3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_dens3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
bool both = mgl_isboth(x,y,z,a);
if(mgl_check_dim3(gr,both,x,y,z,a,0,"Dens3")) return;
@@ -1182,7 +1190,7 @@ void mgl_dens3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, dou
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_dens3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_dens3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -1193,13 +1201,13 @@ void mgl_dens3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_dens3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dens3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens3(_GR_, _DA_(a), s, *sVal, o); delete []o; delete []s; }
@@ -1208,7 +1216,7 @@ mgl_dens3(_GR_, _DA_(a), s, *sVal, o); delete []o; delete []s; }
// Grid3 series
//
//-----------------------------------------------------------------------------
-void mgl_grid3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_grid3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
bool both = mgl_isboth(x,y,z,a);
if(mgl_check_dim3(gr,both,x,y,z,a,0,"Grid3")) return;
@@ -1230,7 +1238,7 @@ void mgl_grid3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, dou
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_grid3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_grid3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()), z(a->GetNz());
@@ -1241,13 +1249,13 @@ void mgl_grid3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_grid3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_grid3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grid3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_grid3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_grid3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grid3(_GR_, _DA_(a), s, *sVal, o); delete []o; delete []s; }
@@ -1256,7 +1264,7 @@ mgl_grid3(_GR_, _DA_(a), s, *sVal, o); delete []o; delete []s; }
// ContF3 series
//
//-----------------------------------------------------------------------------
-void mgl_contf3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_contf3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
bool both = mgl_isboth(x,y,z,a);
if(mgl_check_dim3(gr,both,x,y,z,a,0,"ContF3")) return;
@@ -1283,7 +1291,7 @@ void mgl_contf3_xyz_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, HCDT a, const c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contf3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_contf3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -1294,7 +1302,7 @@ void mgl_contf3_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sVal, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_contf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, double sVal, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -1304,7 +1312,7 @@ void mgl_contf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, do
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_contf3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?7:long(r+0.5);
@@ -1314,25 +1322,25 @@ void mgl_contf3(HMGL gr, HCDT a, const char *sch, double sVal, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf3_xyz_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf3_xyz_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf3_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf3_val(_GR_, _DA_(v), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_contf3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf3_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf3(_GR_, _DA_(a), s, *sVal, o);
@@ -1342,12 +1350,12 @@ delete []o; delete []s; }
// Axial series
//
//-----------------------------------------------------------------------------
-long mgl_find_prev(long i, long pc, long *nn)
+long MGL_NO_EXPORT mgl_find_prev(long i, long pc, long *nn)
{
for(long k=0;k<pc;k++) if(nn[k]==i) return k;
return -1;
}
-void mgl_axial_plot(mglBase *gr,long pc, mglPoint *ff, long *nn,char dir,mreal cc,int wire)
+void MGL_NO_EXPORT mgl_axial_plot(mglBase *gr,long pc, mglPoint *ff, long *nn,char dir,mreal cc,int wire)
{
mglPoint a(0,0,1),b,c,p,q1,q2;
if(dir=='x') a = mglPoint(1,0,0);
@@ -1391,7 +1399,7 @@ void mgl_axial_plot(mglBase *gr,long pc, mglPoint *ff, long *nn,char dir,mreal c
}
//-----------------------------------------------------------------------------
// NOTE! All data MUST have the same size! Only first slice is used!
-void mgl_axial_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, mreal c, char dir,long ak,int wire)
+void MGL_EXPORT mgl_axial_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, mreal c, char dir,long ak,int wire)
{
long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2 || x->GetNx()*x->GetNy()!=n*m || y->GetNx()*y->GetNy()!=n*m)
@@ -1485,7 +1493,7 @@ void mgl_axial_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, mreal c, char dir
delete []kk; delete []nn; delete []ff; delete []pp;
}
//-----------------------------------------------------------------------------
-void mgl_axial_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_axial_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Axial")) return;
@@ -1523,7 +1531,7 @@ void mgl_axial_xy_val(HMGL gr, HCDT v, HCDT x, HCDT y, HCDT z, const char *sch,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_axial_val(HMGL gr, HCDT v, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_axial_val(HMGL gr, HCDT v, HCDT a, const char *sch, const char *opt)
{
register long n=a->GetNx(), m=a->GetNy();
if(n<2 || m<2) { gr->SetWarn(mglWarnLow,"Axial"); return; }
@@ -1536,7 +1544,7 @@ void mgl_axial_val(HMGL gr, HCDT v, HCDT a, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_axial_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_axial_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?3:long(r+0.5);
@@ -1547,7 +1555,7 @@ void mgl_axial_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *sch, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_axial(HMGL gr, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_axial(HMGL gr, HCDT a, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = mgl_isnan(r)?3:long(r+0.5);
@@ -1558,23 +1566,23 @@ void mgl_axial(HMGL gr, HCDT a, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_axial_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_axial_xy_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_axial_xy_val(_GR_, _DA_(v), _DA_(x), _DA_(y), _DA_(a), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_axial_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_axial_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_axial_val(_GR_, _DA_(v), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_axial_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_axial_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_axial_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_axial_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_axial_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_axial(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -1583,7 +1591,7 @@ mgl_axial(_GR_, _DA_(a), s, o); delete []o; delete []s; }
// Torus series
//
//-----------------------------------------------------------------------------
-void mgl_torus(HMGL gr, HCDT r, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_torus(HMGL gr, HCDT r, HCDT z, const char *sch, const char *opt)
{
long i,j,n=r->GetNx();
if(n*r->GetNy()!=z->GetNx()*z->GetNy()) { gr->SetWarn(mglWarnDim,"Torus"); return; }
@@ -1621,7 +1629,7 @@ void mgl_torus(HMGL gr, HCDT r, HCDT z, const char *sch, const char *opt)
delete []nn; delete []pp;
}
//-----------------------------------------------------------------------------
-void mgl_torus_(uintptr_t *gr, uintptr_t *r, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_torus_(uintptr_t *gr, uintptr_t *r, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_torus(_GR_, _DA_(r), _DA_(z), s, o); delete []o; delete []s; }
diff --git a/src/crust.cpp b/src/crust.cpp
index 2877c19..aa8c417 100644
--- a/src/crust.cpp
+++ b/src/crust.cpp
@@ -25,7 +25,7 @@
// TriPlot series
//
//-----------------------------------------------------------------------------
-void mgl_triplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_triplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
long n = x->GetNx(), m = nums->GetNy();
if(mgl_check_trig(gr,nums,x,y,z,a,"TriPlot")) return;
@@ -102,10 +102,10 @@ void mgl_triplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_triplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_triplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{ mgl_triplot_xyzc(gr,nums,x,y,z,z,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_triplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt)
+void MGL_EXPORT mgl_triplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData z(x->GetNx());
@@ -114,19 +114,19 @@ void mgl_triplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const c
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_triplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_triplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_triplot_xyzc(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), _DA_(c), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_triplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_triplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_triplot_xyz(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_triplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_triplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_triplot_xy(_GR_, _DA_(nums), _DA_(x), _DA_(y), s, o); delete []o; delete []s; }
@@ -135,7 +135,7 @@ void mgl_triplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y,
// QuadPlot series
//
//-----------------------------------------------------------------------------
-void mgl_quadplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_quadplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
long n = x->GetNx(), m = nums->GetNy();
if(mgl_check_trig(gr,nums,x,y,z,a,"QuadPlot",4)) return;
@@ -220,10 +220,10 @@ void mgl_quadplot_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_quadplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_quadplot_xyz(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{ mgl_quadplot_xyzc(gr,nums,x,y,z,z,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_quadplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt)
+void MGL_EXPORT mgl_quadplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData z(x->GetNx()); z.Fill(gr->Min.z,gr->Min.z);
@@ -231,19 +231,19 @@ void mgl_quadplot_xy(HMGL gr, HCDT nums, HCDT x, HCDT y, const char *sch, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_quadplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_quadplot_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_quadplot_xyzc(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), _DA_(c), s, o);
delete []o; delete []s;}
//-----------------------------------------------------------------------------
-void mgl_quadplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_quadplot_xyz_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_quadplot_xyzc(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), _DA_(z), s, o);
delete []o; delete []s;}
//-----------------------------------------------------------------------------
-void mgl_quadplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_quadplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_quadplot_xy(_GR_, _DA_(nums), _DA_(x), _DA_(y), s, o); delete []o; delete []s; }
@@ -252,25 +252,7 @@ void mgl_quadplot_xy_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y
// TriCont series
//
//-----------------------------------------------------------------------------
-void mgl_tricont_line(HMGL gr, mreal val, long k1, long k2, long k3, HCDT x, HCDT y, HCDT z, HCDT a, bool zVal,mreal c)
-{
- mreal d1,d2;
- mglPoint p1,p2,n;
- d1 = mgl_d(val,a->v(k1),a->v(k2));
- d2 = mgl_d(val,a->v(k1),a->v(k3));
- if(d1<0 || d1>1 || d2<0 || d2>1) return;
- p1 = mglPoint(x->v(k1)*(1-d1)+x->v(k2)*d1, y->v(k1)*(1-d1)+y->v(k2)*d1,
- zVal?z->v(k1)*(1-d1)+z->v(k2)*d1:gr->Min.z);
- if(!gr->ScalePoint(p1,n)) return;
- p2 = mglPoint(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2,
- zVal?z->v(k1)*(1-d2)+z->v(k3)*d2:gr->Min.z);
- if(!gr->ScalePoint(p2,n)) return;
-
- k1 = gr->AddPnt(p1,c); k2 = gr->AddPnt(p2,c);
- gr->line_plot(k1,k2);
-}
-//-----------------------------------------------------------------------------
-void mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
long n = x->GetNx(), m = nums->GetNy();
if(mgl_check_trig(gr,nums,x,y,z,a,"TriCont")) return;
@@ -278,10 +260,12 @@ void mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT
long ss=gr->AddTexture(sch);
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("TriCont",cgid++);
- mreal val;
+ mreal val, c;
register long i,k;
long k1,k2,k3;
- bool zVal = (mglchr(sch,'_'));
+ bool zVal = !(mglchr(sch,'_'));
+ mreal d1,d2,d3;
+ mglPoint p1,p2,p3;
for(k=0;k<v->GetNx();k++) for(i=0;i<m;i++)
{
if(gr->Stop) return;
@@ -289,14 +273,36 @@ void mgl_tricont_xyzcv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT
k2 = long(nums->v(1,i)+0.1); if(k2<0 || k2>=n) continue;
k3 = long(nums->v(2,i)+0.1); if(k3<0 || k3>=n) continue;
val = v->v(k);
- mreal c = gr->GetC(ss,val);
- mgl_tricont_line(gr,val, k1,k2,k3,x,y,z,a,zVal,c);
- mgl_tricont_line(gr,val, k2,k1,k3,x,y,z,a,zVal,c);
- mgl_tricont_line(gr,val, k3,k2,k1,x,y,z,a,zVal,c);
+ c = gr->GetC(ss,val);
+
+ d1 = mgl_d(val,a->v(k1),a->v(k2));
+ p1 = mglPoint(x->v(k1)*(1-d1)+x->v(k2)*d1, y->v(k1)*(1-d1)+y->v(k2)*d1,
+ zVal?z->v(k1)*(1-d1)+z->v(k2)*d1:gr->Min.z);
+ d2 = mgl_d(val,a->v(k1),a->v(k3));
+ p2 = mglPoint(x->v(k1)*(1-d2)+x->v(k3)*d2, y->v(k1)*(1-d2)+y->v(k3)*d2,
+ zVal?z->v(k1)*(1-d2)+z->v(k3)*d2:gr->Min.z);
+ d3 = mgl_d(val,a->v(k2),a->v(k3));
+ p3 = mglPoint(x->v(k2)*(1-d3)+x->v(k3)*d3, y->v(k2)*(1-d3)+y->v(k3)*d3,
+ zVal?z->v(k2)*(1-d3)+z->v(k3)*d3:gr->Min.z);
+ if(d1>=0 && d1<=1 && d2>=0 && d2<=1)
+ {
+ k1 = gr->AddPnt(p1,c); k2 = gr->AddPnt(p2,c);
+ gr->line_plot(k1,k2);
+ }
+ else if(d1>=0 && d1<=1 && d3>=0 && d3<=1)
+ {
+ k1 = gr->AddPnt(p1,c); k2 = gr->AddPnt(p3,c);
+ gr->line_plot(k1,k2);
+ }
+ else if(d3>=0 && d3<=1 && d2>=0 && d2<=1)
+ {
+ k1 = gr->AddPnt(p3,c); k2 = gr->AddPnt(p2,c);
+ gr->line_plot(k1,k2);
+ }
}
}
//-----------------------------------------------------------------------------
-void mgl_tricont_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tricont_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long n = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -306,31 +312,31 @@ void mgl_tricont_xyzc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, HCDT a, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tricont_xyc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tricont_xyc(HMGL gr, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{ mgl_tricont_xyzc(gr,nums,x,y,z,z,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_tricont_xycv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tricont_xycv(HMGL gr, HCDT v, HCDT nums, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{ mgl_tricont_xyzcv(gr,v,nums,x,y,z,z,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_tricont_xyzcv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tricont_xyzcv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tricont_xyzcv(_GR_, _DA_(v), _DA_(nums), _DA_(x), _DA_(y), _DA_(z), _DA_(c), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tricont_xycv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tricont_xycv_(uintptr_t *gr, uintptr_t *v, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tricont_xycv(_GR_, _DA_(v), _DA_(nums), _DA_(x), _DA_(y), _DA_(z), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tricont_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_tricont_xyzc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tricont_xyzc(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), _DA_(c), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tricont_xyc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_tricont_xyc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tricont_xyc(_GR_, _DA_(nums), _DA_(x), _DA_(y), _DA_(z), s, o);
@@ -340,11 +346,17 @@ void mgl_tricont_xyc_(uintptr_t *gr, uintptr_t *nums, uintptr_t *x, uintptr_t *y
// Dots series
//
//-----------------------------------------------------------------------------
-void mgl_dots_a(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dots_a(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
- long n = x->GetNx();
- if(y->GetNx()!=n || z->GetNx()!=n || a->GetNx()!=n) { gr->SetWarn(mglWarnDim,"Dots"); return; }
+ long n = x->GetNN(), d, k=1;
+ if(x->GetNz()>1) k=3; else if(x->GetNy()>1) k=2;
+
+ if(y->GetNN()!=n || z->GetNN()!=n || a->GetNN()!=n) { gr->SetWarn(mglWarnDim,"Dots"); return; }
gr->SaveState(opt);
+
+ d = gr->MeshNum>0 ? mgl_ipow(gr->MeshNum+1,k) : n;
+ d = n>d ? n/d:1;
+
static int cgid=1; gr->StartGroup("Dots",cgid++);
char mk=gr->SetPenPal(sch);
long ss=gr->AddTexture(sch), pp;
@@ -352,25 +364,25 @@ void mgl_dots_a(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const
gr->Reserve(n);
mglPoint p;
- for(long i=0;i<n;i++)
+ for(long i=0;i<n;i+=d)
{
if(gr->Stop) return;
- p = mglPoint(x->v(i),y->v(i),z->v(i));
- pp = gr->AddPnt(p,gr->GetC(ss,a->v(i)));
+ p = mglPoint(x->vthr(i),y->vthr(i),z->vthr(i));
+ pp = gr->AddPnt(p,gr->GetC(ss,a->vthr(i)));
gr->mark_plot(pp, mk);
}
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_dots(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dots(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{ mgl_dots_a(gr, x, y, z, z, sch, opt); }
//-----------------------------------------------------------------------------
-void mgl_dots_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dots_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dots(_GR_, _DA_(x),_DA_(y),_DA_(z),s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dots_a_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dots_a_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dots_a(_GR_, _DA_(x),_DA_(y),_DA_(z),_DA_(a),s, o); delete []o; delete []s; }
@@ -379,8 +391,8 @@ void mgl_dots_a_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintpt
// mglTriangulation
//
//-----------------------------------------------------------------------------
-long mgl_crust(long n,mglPoint *pp,long **nn,mreal ff);
-HMDT mgl_triangulation_3d(HCDT x, HCDT y, HCDT z)
+long MGL_NO_EXPORT mgl_crust(long n,mglPoint *pp,long **nn,mreal ff);
+HMDT MGL_EXPORT mgl_triangulation_3d(HCDT x, HCDT y, HCDT z)
{ // TODO: should be used s-hull or q-hull
mglData *nums=new mglData;
long n = x->GetNx(), m;
@@ -400,7 +412,7 @@ HMDT mgl_triangulation_3d(HCDT x, HCDT y, HCDT z)
}
//-----------------------------------------------------------------------------
#include "s_hull/s_hull_pro.h"
-HMDT mgl_triangulation_2d(HCDT x, HCDT y)
+HMDT MGL_EXPORT mgl_triangulation_2d(HCDT x, HCDT y)
{
mglData *nums=new mglData;
register long n = x->GetNx(), m,i;
@@ -430,16 +442,16 @@ HMDT mgl_triangulation_2d(HCDT x, HCDT y)
return nums;
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_triangulation_3d_(uintptr_t *x, uintptr_t *y, uintptr_t *z)
+uintptr_t MGL_EXPORT mgl_triangulation_3d_(uintptr_t *x, uintptr_t *y, uintptr_t *z)
{ return uintptr_t(mgl_triangulation_3d(_DA_(x),_DA_(y),_DA_(z))); }
-uintptr_t mgl_triangulation_2d_(uintptr_t *x, uintptr_t *y)
+uintptr_t MGL_EXPORT mgl_triangulation_2d_(uintptr_t *x, uintptr_t *y)
{ return uintptr_t(mgl_triangulation_2d(_DA_(x),_DA_(y))); }
//-----------------------------------------------------------------------------
//
// DataGrid
//
//-----------------------------------------------------------------------------
-void *mgl_grid_t(void *par)
+MGL_NO_EXPORT void *mgl_grid_t(void *par)
{
mglThreadD *t=(mglThreadD *)par;
long nx=t->p[0],ny=t->p[1];
@@ -478,7 +490,7 @@ void *mgl_grid_t(void *par)
}
return 0;
}
-void mgl_data_grid(HMGL gr, HMDT d, HCDT xdat, HCDT ydat, HCDT zdat, const char *opt)
+void MGL_EXPORT mgl_data_grid(HMGL gr, HMDT d, HCDT xdat, HCDT ydat, HCDT zdat, const char *opt)
{ // NOTE: only for mglData
const mglData *x = dynamic_cast<const mglData *>(xdat);
const mglData *y = dynamic_cast<const mglData *>(ydat);
@@ -503,7 +515,7 @@ void mgl_data_grid(HMGL gr, HMDT d, HCDT xdat, HCDT ydat, HCDT zdat, const char
mglStartThread(mgl_grid_t,0,nn,d->a,xc,yc,par,0,nums->a,z->a);
gr->LoadState(); delete nums; delete []xc; delete []yc;
}
-void mgl_data_grid_(uintptr_t *gr, uintptr_t *d, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *opt,int lo)
+void MGL_EXPORT mgl_data_grid_(uintptr_t *gr, uintptr_t *d, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *opt,int lo)
{ char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_data_grid(_GR_,_DT_,_DA_(x),_DA_(y),_DA_(z),o); delete []o; }
//-----------------------------------------------------------------------------
@@ -511,7 +523,7 @@ void mgl_data_grid_(uintptr_t *gr, uintptr_t *d, uintptr_t *x, uintptr_t *y, uin
// Crust series
//
//-----------------------------------------------------------------------------
-void mgl_crust(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_crust(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
if(y->GetNx()!=x->GetNx() || z->GetNx()!=x->GetNx())
{ gr->SetWarn(mglWarnDim,"Crust"); return; }
@@ -520,12 +532,12 @@ void mgl_crust(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt
mgl_delete_data(nums);
}
//-----------------------------------------------------------------------------
-void mgl_crust_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_crust_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_crust(_GR_, _DA_(x),_DA_(y),_DA_(z),s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-long mgl_insert_trig(long i1,long i2,long i3,long **n)
+long MGL_NO_EXPORT mgl_insert_trig(long i1,long i2,long i3,long **n)
{
static long Cur=0,Max=0;
if(i1<0 || i2<0 || i3<0) return Cur;
@@ -541,7 +553,7 @@ long mgl_insert_trig(long i1,long i2,long i3,long **n)
*n = (long *)realloc(*n,Max*3*sizeof(long));
memset(*n+3*(Max-1024),0,3*1024*sizeof(long));
}
- long *nn = *n;
+ long *nn;
register long i,k1;
if(i1>i3) { k1=i1; i1=i3; i3=k1; } // simple sorting
if(i1>i2) { k1=i1; i1=i2; i2=k1; }
@@ -556,7 +568,7 @@ long mgl_insert_trig(long i1,long i2,long i3,long **n)
Cur++; return Cur;
}
//-----------------------------------------------------------------------------
-long mgl_get_next(long k1,long n,long *,long *set,mglPoint *qq)
+long MGL_NO_EXPORT mgl_get_next(long k1,long n,long *,long *set,mglPoint *qq)
{
long i,j=-1;
mreal r,rm=FLT_MAX;
@@ -569,7 +581,7 @@ long mgl_get_next(long k1,long n,long *,long *set,mglPoint *qq)
return j;
}
//-----------------------------------------------------------------------------
-long mgl_crust(long n,mglPoint *pp,long **nn,mreal ff)
+long MGL_NO_EXPORT mgl_crust(long n,mglPoint *pp,long **nn,mreal ff)
{ // TODO: update to normal algorithm
register long i,j;
register mreal r,rm,rs;
@@ -607,7 +619,7 @@ long mgl_crust(long n,mglPoint *pp,long **nn,mreal ff)
while((k2=mgl_get_next(k1,ii,ind,set,qq))>0)
{
set[k1]=1;
- m = mgl_insert_trig(i,ind[k1],ind[k2],nn);
+ mgl_insert_trig(i,ind[k1],ind[k2],nn);
k1 = k2;
}
m = mgl_insert_trig(i,ind[k1],ind[0],nn);
diff --git a/src/data.cpp b/src/data.cpp
index 9e11465..03461f6 100644
--- a/src/data.cpp
+++ b/src/data.cpp
@@ -17,10 +17,11 @@
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#include <time.h>
#include "mgl2/data.h"
#include "mgl2/eval.h"
-int mglNumThr=0;
+MGL_EXPORT int mglNumThr=0;
void mglFillP(long x,long y, const mreal *a,long nx,long ny,mreal _p[4][4]);
void mglFillP(long x, const mreal *a,long nx,mreal _p[4]);
void mglFillP5(long x,long y, const mreal *a,long nx,long ny,mreal _p[6][6]);
@@ -35,7 +36,7 @@ void mglFillP5(long x, const mreal *a,long nx,mreal _p[6]);
#elif defined(unix) || defined(__unix) || defined(__unix__)
#include <sys/sysinfo.h>
#endif
-void mgl_set_num_thr(int n)
+void MGL_EXPORT mgl_set_num_thr(int n)
{
#ifdef WIN32
SYSTEM_INFO systemInfo;
@@ -51,7 +52,7 @@ void mgl_set_num_thr(int n)
#endif
}
#else
-void mgl_set_num_thr(int) { mglNumThr = 1; }
+void MGL_EXPORT mgl_set_num_thr(int) { mglNumThr = 1; }
#endif
//-----------------------------------------------------------------------------
void mglStartThread(void *(*func)(void *), void (*post)(mglThreadD *,mreal *), long n,
@@ -126,8 +127,24 @@ double mgl_ipow(double x,int n)
if(n%2==1) t *= x;
return t;
}
+double mgl_ipow_(double *x,int *n) { return mgl_ipow(*x,*n); }
//-----------------------------------------------------------------------------
-void *mgl_smth_x(void *par)
+double mgl_get_time(const char *time, const char *fmt)
+{
+#if !defined(WIN32)
+ tm t;
+ strptime(time,fmt,&t);
+ return timegm(&t);
+#else
+ return NAN;
+#endif
+}
+double mgl_get_time_(const char *time, const char *fmt,int l,int m)
+{ char *s=new char[l+1]; memcpy(s,time,l); s[l]=0;
+ char *f=new char[m+1]; memcpy(f,fmt,m); f[m]=0;
+ double t=mgl_get_time(s,f); delete []s; delete []f; return t; }
+//-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_smth_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,d3,d5, nx=t->p[0];
@@ -153,7 +170,7 @@ void *mgl_smth_x(void *par)
}
return 0;
}
-void *mgl_smth_y(void *par)
+MGL_NO_EXPORT void *mgl_smth_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,d3,d5, nx=t->p[0],ny=t->p[1];
@@ -179,7 +196,7 @@ void *mgl_smth_y(void *par)
}
return 0;
}
-void *mgl_smth_z(void *par)
+MGL_NO_EXPORT void *mgl_smth_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,d3,d5, nn=t->p[0]*t->p[1], nz=t->n/nn;
@@ -205,7 +222,7 @@ void *mgl_smth_z(void *par)
}
return 0;
}
-void mgl_data_smooth(HMDT d, const char *dirs, mreal delta)
+void MGL_EXPORT mgl_data_smooth(HMDT d, const char *dirs, mreal delta)
{
long Type = SMOOTH_QUAD_5;
if(!dirs || *dirs==0) dirs = "xyz";
@@ -237,11 +254,11 @@ void mgl_data_smooth(HMDT d, const char *dirs, mreal delta)
}
delete []b;
}
-void mgl_data_smooth_(uintptr_t *d, const char *dir, mreal *delta,int l)
+void MGL_EXPORT mgl_data_smooth_(uintptr_t *d, const char *dir, mreal *delta,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_smooth(_DT_,s,*delta); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_csum_z(void *par)
+MGL_NO_EXPORT void *mgl_csum_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -254,7 +271,7 @@ void *mgl_csum_z(void *par)
}
return 0;
}
-void *mgl_csum_y(void *par)
+MGL_NO_EXPORT void *mgl_csum_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -267,7 +284,7 @@ void *mgl_csum_y(void *par)
}
return 0;
}
-void *mgl_csum_x(void *par)
+MGL_NO_EXPORT void *mgl_csum_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -280,7 +297,7 @@ void *mgl_csum_x(void *par)
}
return 0;
}
-void mgl_data_cumsum(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_cumsum(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -304,11 +321,11 @@ void mgl_data_cumsum(HMDT d, const char *dir)
}
delete []b;
}
-void mgl_data_cumsum_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_cumsum_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_cumsum(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_int_z(void *par)
+MGL_NO_EXPORT void *mgl_int_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -321,7 +338,7 @@ void *mgl_int_z(void *par)
}
return 0;
}
-void *mgl_int_y(void *par)
+MGL_NO_EXPORT void *mgl_int_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -334,7 +351,7 @@ void *mgl_int_y(void *par)
}
return 0;
}
-void *mgl_int_x(void *par)
+MGL_NO_EXPORT void *mgl_int_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -347,7 +364,7 @@ void *mgl_int_x(void *par)
}
return 0;
}
-void mgl_data_integral(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_integral(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -371,11 +388,11 @@ void mgl_data_integral(HMDT d, const char *dir)
}
delete []b;
}
-void mgl_data_integral_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_integral_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_integral(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_dif_z(void *par)
+MGL_NO_EXPORT void *mgl_dif_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -389,7 +406,7 @@ void *mgl_dif_z(void *par)
}
return 0;
}
-void *mgl_dif_y(void *par)
+MGL_NO_EXPORT void *mgl_dif_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -404,7 +421,7 @@ void *mgl_dif_y(void *par)
}
return 0;
}
-void *mgl_dif_x(void *par)
+MGL_NO_EXPORT void *mgl_dif_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -419,7 +436,7 @@ void *mgl_dif_x(void *par)
}
return 0;
}
-void mgl_data_diff(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_diff(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -442,11 +459,11 @@ void mgl_data_diff(HMDT d, const char *dir)
}
delete []b;
}
-void mgl_data_diff_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_diff_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_diff(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_dif2_z(void *par)
+MGL_NO_EXPORT void *mgl_dif2_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -459,7 +476,7 @@ void *mgl_dif2_z(void *par)
}
return 0;
}
-void *mgl_dif2_y(void *par)
+MGL_NO_EXPORT void *mgl_dif2_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -472,7 +489,7 @@ void *mgl_dif2_y(void *par)
}
return 0;
}
-void *mgl_dif2_x(void *par)
+MGL_NO_EXPORT void *mgl_dif2_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -485,7 +502,7 @@ void *mgl_dif2_x(void *par)
}
return 0;
}
-void mgl_data_diff2(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_diff2(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz,nn=nx*ny*nz;
@@ -508,22 +525,22 @@ void mgl_data_diff2(HMDT d, const char *dir)
}
delete []b;
}
-void mgl_data_diff2_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_diff2_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_diff2(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_swap(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_swap(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
if(strchr(dir,'z') && d->nz>1) mgl_data_roll(d,'z',d->nz/2);
if(strchr(dir,'y') && d->ny>1) mgl_data_roll(d,'y',d->ny/2);
if(strchr(dir,'x') && d->nx>1) mgl_data_roll(d,'x',d->nx/2);
}
-void mgl_data_swap_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_swap_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_swap(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_roll(HMDT dd, char dir, long num)
+void MGL_EXPORT mgl_data_roll(HMDT dd, char dir, long num)
{
long nx=dd->nx,ny=dd->ny,nz=dd->nz;
register long i,d;
@@ -558,10 +575,10 @@ void mgl_data_roll(HMDT dd, char dir, long num)
memcpy(a,b,nx*ny*nz*sizeof(mreal)); delete []b;
}
}
-void mgl_data_roll_(uintptr_t *d, const char *dir, int *num, int)
+void MGL_EXPORT mgl_data_roll_(uintptr_t *d, const char *dir, int *num, int)
{ mgl_data_roll(_DT_,*dir,*num); }
//-----------------------------------------------------------------------------
-void mgl_data_mirror(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_mirror(HMDT d, const char *dir)
{
if(!dir || *dir==0) return;
long nx=d->nx,ny=d->ny,nz=d->nz;
@@ -597,11 +614,11 @@ void mgl_data_mirror(HMDT d, const char *dir)
}
}
}
-void mgl_data_mirror_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_mirror_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_mirror(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_clean(HMDT d, long id)
+void MGL_EXPORT mgl_data_clean(HMDT d, long id)
{
if(id<0 || id+1>d->nx) return;
register long i,j,k,n=d->nx,m=d->ny;
@@ -620,9 +637,9 @@ void mgl_data_clean(HMDT d, long id)
memcpy(a,b,n*j*sizeof(mreal)); d->ny = j;
delete []b;
}
-void mgl_data_clean_(uintptr_t *d, int *id) { mgl_data_clean(_DT_,*id); }
+void MGL_EXPORT mgl_data_clean_(uintptr_t *d, int *id) { mgl_data_clean(_DT_,*id); }
//-----------------------------------------------------------------------------
-void *mgl_solve_x(void *par)
+MGL_NO_EXPORT void *mgl_solve_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long l,i,i0,j,k, nx=t->p[0], ny=t->p[1], nz=t->p[2], n1=t->p[3]?nx-1:1, nn=t->n;
@@ -670,7 +687,7 @@ void *mgl_solve_x(void *par)
}
return 0;
}
-void *mgl_solve_y(void *par)
+MGL_NO_EXPORT void *mgl_solve_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long l,i,i0,j,k, nx=t->p[0], ny=t->p[1], nz=t->p[2], n1=t->p[3]?ny-1:1, nn=t->n;
@@ -718,7 +735,7 @@ void *mgl_solve_y(void *par)
}
return 0;
}
-void *mgl_solve_z(void *par)
+MGL_NO_EXPORT void *mgl_solve_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long l,i,i0,j,k, nx=t->p[0], ny=t->p[1], nz=t->p[2], n1=t->p[3]?nz-1:1, nn=t->n;
@@ -766,7 +783,7 @@ void *mgl_solve_z(void *par)
}
return 0;
}
-HMDT mgl_data_solve(HCDT dat, mreal val, char dir, HCDT i0, int norm)
+HMDT MGL_EXPORT mgl_data_solve(HCDT dat, mreal val, char dir, HCDT i0, int norm)
{
const mglData *i = dynamic_cast<const mglData *>(i0);
const mglData *d = dynamic_cast<const mglData *>(dat);
@@ -794,7 +811,7 @@ HMDT mgl_data_solve(HCDT dat, mreal val, char dir, HCDT i0, int norm)
return r;
}
//-----------------------------------------------------------------------------
-mreal mgl_data_solve_1d(HCDT d, mreal val, int spl, long i0)
+mreal MGL_EXPORT mgl_data_solve_1d(HCDT d, mreal val, int spl, long i0)
{
mreal x=0, y1, y2, a, a0, dx=0,dy,dz, da = 1e-5*(val?fabs(val):1);
long nx = d->GetNx();
@@ -832,7 +849,7 @@ mreal mgl_data_solve_1d(HCDT d, mreal val, int spl, long i0)
return NAN;
}
//-----------------------------------------------------------------------------
-mreal mgl_data_linear_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz)
+mreal MGL_EXPORT mgl_data_linear_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz)
{
long kx=long(x), ky=long(y), kz=long(z);
mreal b0,b1;
@@ -875,34 +892,34 @@ mreal mgl_data_linear_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,m
return b0 + z*(b1-b0);
}
//-----------------------------------------------------------------------------
-mreal mgl_data_linear(HCDT d, mreal x,mreal y,mreal z)
+mreal MGL_EXPORT mgl_data_linear(HCDT d, mreal x,mreal y,mreal z)
{ return mgl_data_linear_ext(d, x,y,z, 0,0,0); }
//-----------------------------------------------------------------------------
-mreal mgl_data_spline(HCDT d, mreal x,mreal y,mreal z)
+mreal MGL_EXPORT mgl_data_spline(HCDT d, mreal x,mreal y,mreal z)
{
const mglData *dd=dynamic_cast<const mglData *>(d);
if(!d) return 0; // NOTE: don't support general arrays
return mglSpline3(dd->a,dd->nx,dd->ny,dd->nz,x,y,z,0,0,0);
}
//-----------------------------------------------------------------------------
-mreal mgl_data_spline_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz)
+mreal MGL_EXPORT mgl_data_spline_ext(HCDT d, mreal x,mreal y,mreal z, mreal *dx,mreal *dy,mreal *dz)
{
const mglData *dd=dynamic_cast<const mglData *>(d);
if(!d) return 0; // NOTE: don't support general arrays
return mglSpline3(dd->a,dd->nx,dd->ny,dd->nz,x,y,z,dx,dy,dz);
}
//-----------------------------------------------------------------------------
-mreal mgl_data_spline_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
+mreal MGL_EXPORT mgl_data_spline_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
{ return mgl_data_spline(_DA_(d),*x,*y,*z); }
-mreal mgl_data_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
+mreal MGL_EXPORT mgl_data_linear_(uintptr_t *d, mreal *x,mreal *y,mreal *z)
{ return mgl_data_linear(_DA_(d),*x,*y,*z); }
-mreal mgl_data_spline_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz)
+mreal MGL_EXPORT mgl_data_spline_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz)
{ return mgl_data_spline_ext(_DA_(d),*x,*y,*z,dx,dy,dz); }
-mreal mgl_data_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz)
+mreal MGL_EXPORT mgl_data_linear_ext_(uintptr_t *d, mreal *x,mreal *y,mreal *z, mreal *dx,mreal *dy,mreal *dz)
{ return mgl_data_linear_ext(_DA_(d),*x,*y,*z,dx,dy,dz); }
-mreal mgl_data_solve_1d_(uintptr_t *d, mreal *val, int *spl, int *i0)
+mreal MGL_EXPORT mgl_data_solve_1d_(uintptr_t *d, mreal *val, int *spl, int *i0)
{ return mgl_data_solve_1d(_DA_(d),*val, *spl, *i0); }
-uintptr_t mgl_data_solve_(uintptr_t *d, mreal *val, const char *dir, uintptr_t *i0, int *norm,int)
+uintptr_t MGL_EXPORT mgl_data_solve_(uintptr_t *d, mreal *val, const char *dir, uintptr_t *i0, int *norm,int)
{ return uintptr_t(mgl_data_solve(_DA_(d),*val, *dir, _DA_(i0), *norm)); }
//-----------------------------------------------------------------------------
mreal mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z,mreal *dx, mreal *dy, mreal *dz)
@@ -930,7 +947,15 @@ mreal mglSpline3(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mr
else if(nz>3 && kz==nz-2) { kk=2; }
for(long k=0;k<4;k++)
{
- if(kz+k-kk<nz) mglFillP(kx, ky, a+(kz+k-kk)*nx*ny, nx, ny, _p);
+ if(kz+k-kk<nz && kz+k-kk>=0)
+ mglFillP(kx, ky, a+(kz+k-kk)*nx*ny, nx, ny, _p);
+ else
+ {
+ memset(_p[0],0,4*sizeof(mreal));
+ memset(_p[1],0,4*sizeof(mreal));
+ memset(_p[2],0,4*sizeof(mreal));
+ memset(_p[3],0,4*sizeof(mreal));
+ }
for(i=0,fx=1;i<4;i++)
{
for(j=0,fy=1;j<4;j++)
@@ -1137,7 +1162,7 @@ void mglFillP(long x, const mreal *a,long nx,mreal _p[4])
_p[3]=s[0]+s[1]+2*(f[0]-f[1]);
}
//-----------------------------------------------------------------------------
-void mgl_data_crop(HMDT d, long n1, long n2, char dir)
+void MGL_EXPORT mgl_data_crop(HMDT d, long n1, long n2, char dir)
{
long nx=d->nx,ny=d->ny,nz=d->nz, nn;
register long i,k;
@@ -1173,10 +1198,10 @@ void mgl_data_crop(HMDT d, long n1, long n2, char dir)
break;
}
}
-void mgl_data_crop_(uintptr_t *d, int *n1, int *n2, const char *dir,int)
+void MGL_EXPORT mgl_data_crop_(uintptr_t *d, int *n1, int *n2, const char *dir,int)
{ mgl_data_crop(_DT_,*n1,*n2,*dir); }
//-----------------------------------------------------------------------------
-mreal mgl_data_last(HCDT d, const char *cond, long *i, long *j, long *k)
+mreal MGL_EXPORT mgl_data_last(HCDT d, const char *cond, long *i, long *j, long *k)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
if(!cond) cond = "u";
@@ -1194,12 +1219,12 @@ mreal mgl_data_last(HCDT d, const char *cond, long *i, long *j, long *k)
*i = i0%nx; *j = (i0/nx)%ny; *k = i0/(nx*ny);
return i0>=0 ? d->vthr(i0) : NAN; // NOTE: Return NAN if false
}
-mreal mgl_data_last_(uintptr_t *d, const char *cond, int *i, int *j, int *k, int l)
-{ long ii,jj,kk; char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
+mreal MGL_EXPORT mgl_data_last_(uintptr_t *d, const char *cond, int *i, int *j, int *k, int l)
+{ long ii=*i,jj=*j,kk=*k; char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
mreal res = mgl_data_last(_DT_,s,&ii,&jj,&kk); *i=ii; *j=jj; *k=kk;
delete []s; return res; }
//-----------------------------------------------------------------------------
-mreal mgl_data_first(HCDT d, const char *cond, long *i, long *j, long *k)
+mreal MGL_EXPORT mgl_data_first(HCDT d, const char *cond, long *i, long *j, long *k)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
if(!cond) cond = "u";
@@ -1217,12 +1242,12 @@ mreal mgl_data_first(HCDT d, const char *cond, long *i, long *j, long *k)
*i = i0%nx; *j = (i0/nx)%ny; *k = i0/(nx*ny);
return i0<nx*ny*nz ? d->vthr(i0) : NAN; // NOTE: Return NAN if false
}
-mreal mgl_data_first_(uintptr_t *d, const char *cond, int *i, int *j, int *k, int l)
-{ long ii,jj,kk; char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
+mreal MGL_EXPORT mgl_data_first_(uintptr_t *d, const char *cond, int *i, int *j, int *k, int l)
+{ long ii=*i,jj=*j,kk=*k; char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
mreal res = mgl_data_first(_DT_,s,&ii,&jj,&kk); *i=ii; *j=jj; *k=kk;
delete []s; return res; }
//-----------------------------------------------------------------------------
-long mgl_data_find(HCDT d, const char *cond, char dir, long i, long j, long k)
+long MGL_EXPORT mgl_data_find(HCDT d, const char *cond, char dir, long i, long j, long k)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
register long m=-1;
@@ -1237,11 +1262,11 @@ long mgl_data_find(HCDT d, const char *cond, char dir, long i, long j, long k)
if(eq.Calc(x,y,m/(nz-1.),d->v(i,j,m))) break;
return m;
}
-int mgl_data_find_(uintptr_t *d, const char *cond, char *dir, int *i, int *j, int *k, int l, int)
+int MGL_EXPORT mgl_data_find_(uintptr_t *d, const char *cond, char *dir, int *i, int *j, int *k, int l, int)
{ char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
int res = mgl_data_find(_DT_,s,*dir,*i,*j,*k); delete []s; return res; }
//-----------------------------------------------------------------------------
-int mgl_data_find_any(HCDT d, const char *cond)
+int MGL_EXPORT mgl_data_find_any(HCDT d, const char *cond)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
register long i,j,k;
@@ -1256,11 +1281,11 @@ int mgl_data_find_any(HCDT d, const char *cond)
}
return cc;
}
-int mgl_data_find_any_(uintptr_t *d, const char *cond, int l)
+int MGL_EXPORT mgl_data_find_any_(uintptr_t *d, const char *cond, int l)
{ char *s=new char[l+1]; memcpy(s,cond,l); s[l]=0;
int res = mgl_data_find_any(_DT_,s); delete []s; return res; }
//-----------------------------------------------------------------------------
-mreal mgl_data_momentum_val(HCDT dd, char dir, mreal *x, mreal *w, mreal *s, mreal *k)
+mreal MGL_EXPORT mgl_data_momentum_val(HCDT dd, char dir, mreal *x, mreal *w, mreal *s, mreal *k)
{
long nx=dd->GetNx(),ny=dd->GetNy(),nz=dd->GetNz();
mreal i0=0,i1=0,i2=0,i3=0,i4=0,d,t,v;
@@ -1349,12 +1374,12 @@ mreal mgl_data_momentum_val(HCDT dd, char dir, mreal *x, mreal *w, mreal *s, mre
if(k) *k=i4/(i0*3);
return i0;
}
-mreal mgl_data_momentum_val_(uintptr_t *d, char *dir, mreal *m, mreal *w, mreal *s, mreal *k,int)
+mreal MGL_EXPORT mgl_data_momentum_val_(uintptr_t *d, char *dir, mreal *m, mreal *w, mreal *s, mreal *k,int)
{ mreal mm,ww,ss,kk,aa;
aa = mgl_data_momentum_val(_DT_,*dir,&mm,&ww,&ss,&kk);
*m=mm; *w=ww; *s=ss; *k=kk; return aa; }
//-----------------------------------------------------------------------------
-void mgl_data_norm_slice(HMDT d, mreal v1,mreal v2,char dir,long keep_en,long sym)
+void MGL_EXPORT mgl_data_norm_slice(HMDT d, mreal v1,mreal v2,char dir,long keep_en,long sym)
{
long nx=d->nx, ny=d->ny, nz=d->nz;
mreal *a=d->a;
@@ -1425,10 +1450,10 @@ void mgl_data_norm_slice(HMDT d, mreal v1,mreal v2,char dir,long keep_en,long sy
}
memcpy(d->a, b.a, nx*ny*nz*sizeof(mreal));
}
-void mgl_data_norm_slice_(uintptr_t *d, mreal *v1,mreal *v2,char *dir,int *keep_en,int *sym,int )
+void MGL_EXPORT mgl_data_norm_slice_(uintptr_t *d, mreal *v1,mreal *v2,char *dir,int *keep_en,int *sym,int )
{ mgl_data_norm_slice(_DT_,*v1,*v2,*dir,*keep_en,*sym); }
//-----------------------------------------------------------------------------
-const char *mgl_data_info(HCDT d) // NOTE: Not thread safe function!
+MGL_EXPORT const char *mgl_data_info(HCDT d) // NOTE: Not thread safe function!
{
static char buf[512];
char s[128]; buf[0]=0;
@@ -1448,7 +1473,7 @@ const char *mgl_data_info(HCDT d) // NOTE: Not thread safe function!
return buf;
}
//-----------------------------------------------------------------------------
-void mgl_data_insert(HMDT d, char dir, long at, long num)
+void MGL_EXPORT mgl_data_insert(HMDT d, char dir, long at, long num)
{
if(num<1) return;
at = at<0 ? 0:at;
@@ -1490,7 +1515,7 @@ void mgl_data_insert(HMDT d, char dir, long at, long num)
}
}
//-----------------------------------------------------------------------------
-void mgl_data_delete(HMDT d, char dir, long at, long num)
+void MGL_EXPORT mgl_data_delete(HMDT d, char dir, long at, long num)
{
if(num<1 || at<0) return;
mglData b;
@@ -1528,12 +1553,12 @@ void mgl_data_delete(HMDT d, char dir, long at, long num)
}
}
//-----------------------------------------------------------------------------
-void mgl_data_insert_(uintptr_t *d, const char *dir, int *at, int *num, int)
+void MGL_EXPORT mgl_data_insert_(uintptr_t *d, const char *dir, int *at, int *num, int)
{ mgl_data_insert(_DT_,*dir,*at,*num); }
-void mgl_data_delete_(uintptr_t *d, const char *dir, int *at, int *num, int)
+void MGL_EXPORT mgl_data_delete_(uintptr_t *d, const char *dir, int *at, int *num, int)
{ mgl_data_delete(_DT_,*dir,*at,*num); }
//-----------------------------------------------------------------------------
-mreal mgl_spline5(mreal y1[5], mreal y2[5], long n1, long n2, mreal d, mreal &dy)
+mreal MGL_EXPORT mgl_spline5(mreal y1[5], mreal y2[5], long n1, long n2, mreal d, mreal &dy)
{
mreal a1[4], a2[4], f0,d0,t0,f1,d1,t1, b[6];
a1[0] = -(3*y1[4]-16*y1[3]+36*y1[2]-48*y1[1]+25*y1[0])/12;
@@ -1555,7 +1580,7 @@ mreal mgl_spline5(mreal y1[5], mreal y2[5], long n1, long n2, mreal d, mreal &dy
return b[0] + d*(b[1]+d*(b[2]+d*(b[3]+d*(b[4]+d*b[5]))));
}
//-----------------------------------------------------------------------------
-mreal mgl_spline3(mreal y1[3], mreal y2[3], long n1, long n2, mreal d, mreal &dy)
+mreal MGL_EXPORT mgl_spline3(mreal y1[3], mreal y2[3], long n1, long n2, mreal d, mreal &dy)
{
mreal a1[2], a2[2], f0,d0,d1,f1, b[4];
a1[0] = -(y1[2]-4*y1[1]+3*y1[0])/2;
@@ -1589,7 +1614,7 @@ mreal mgl_spline3(mreal y1[3], mreal y2[3], long n1, long n2, mreal d, mreal &dy
}*/
//-----------------------------------------------------------------------------
#define omod(x,y) (y)*((x)>0?int((x)/(y)+0.5):int((x)/(y)-0.5))
-void mgl_omod(mreal *a, mreal da, int nx, int n)
+void MGL_NO_EXPORT mgl_omod(mreal *a, mreal da, int nx, int n)
{
register long i,ii;
bool qq=true;
@@ -1611,28 +1636,28 @@ void mgl_omod(mreal *a, mreal da, int nx, int n)
}
}
//-----------------------------------------------------------------------------
-void *mgl_sew_z(void *par)
+MGL_NO_EXPORT void *mgl_sew_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nz=t->p[2], nn=t->n;
for(i=t->id;i<nn;i+=mglNumThr) mgl_omod(t->a+i, t->b[0], nz, nn);
return 0;
}
-void *mgl_sew_y(void *par)
+MGL_NO_EXPORT void *mgl_sew_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0], ny=t->p[1], nn=t->n;
for(i=t->id;i<nn;i+=mglNumThr) mgl_omod(t->a+(i%nx)+nx*ny*(i/nx), t->b[0], ny, nx);
return 0;
}
-void *mgl_sew_x(void *par)
+MGL_NO_EXPORT void *mgl_sew_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0], nn=t->n;
for(i=t->id;i<nn;i+=mglNumThr) mgl_omod(t->a+i*nx, t->b[0], nx, 1);
return 0;
}
-void mgl_data_sew(HMDT d, const char *dirs, mreal delta)
+void MGL_EXPORT mgl_data_sew(HMDT d, const char *dirs, mreal delta)
{
if(!dirs || *dirs==0) return;
long nx=d->nx, ny=d->ny, nz=d->nz;
@@ -1642,11 +1667,11 @@ void mgl_data_sew(HMDT d, const char *dirs, mreal delta)
if(strchr(dirs,'y') && ny>1) mglStartThread(mgl_sew_y,0,nz*nx,d->a,&da,0,p);
if(strchr(dirs,'z') && nz>1) mglStartThread(mgl_sew_z,0,nx*ny,d->a,&da,0,p);
}
-void mgl_data_sew_(uintptr_t *d, const char *dirs, mreal *da, int l)
+void MGL_EXPORT mgl_data_sew_(uintptr_t *d, const char *dirs, mreal *da, int l)
{ char *s=new char[l+1]; memcpy(s,dirs,l); s[l]=0;
mgl_data_sew(_DT_,s,*da); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_put_val(HMDT d, mreal val, long xx, long yy, long zz)
+void MGL_EXPORT mgl_data_put_val(HMDT d, mreal val, long xx, long yy, long zz)
{
register long nx=d->nx, ny=d->ny, nz=d->nz;
if(xx>=nx || yy>=ny || zz>=nz) return;
@@ -1662,7 +1687,7 @@ void mgl_data_put_val(HMDT d, mreal val, long xx, long yy, long zz)
else a[xx+nx*(yy+zz*ny)] = val;
}
//-----------------------------------------------------------------------------
-void mgl_data_put_dat(HMDT d, HCDT v, long xx, long yy, long zz)
+void MGL_EXPORT mgl_data_put_dat(HMDT d, HCDT v, long xx, long yy, long zz)
{
register long nx=d->nx, ny=d->ny, nz=d->nz;
if(xx>=nx || yy>=ny || zz>=nz) return;
@@ -1726,12 +1751,12 @@ void mgl_data_put_dat(HMDT d, HCDT v, long xx, long yy, long zz)
else a[xx+nx*(yy+ny*zz)] = vv;
}
//-----------------------------------------------------------------------------
-void mgl_data_put_val_(uintptr_t *d, mreal *val, int *i, int *j, int *k)
+void MGL_EXPORT mgl_data_put_val_(uintptr_t *d, mreal *val, int *i, int *j, int *k)
{ mgl_data_put_val(_DT_,*val, *i,*j,*k); }
-void mgl_data_put_dat_(uintptr_t *d, uintptr_t *val, int *i, int *j, int *k)
+void MGL_EXPORT mgl_data_put_dat_(uintptr_t *d, uintptr_t *val, int *i, int *j, int *k)
{ mgl_data_put_dat(_DT_,_DA_(val), *i,*j,*k); }
//-----------------------------------------------------------------------------
-void *mgl_diff_3(void *par)
+MGL_NO_EXPORT void *mgl_diff_3(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, i0, nx=t->p[0], ny=t->p[1], nz=t->p[2], nn=t->n;
@@ -1807,7 +1832,7 @@ void *mgl_diff_3(void *par)
}
return 0;
}
-void *mgl_diff_2(void *par)
+MGL_NO_EXPORT void *mgl_diff_2(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, i0,i1, nx=t->p[0], ny=t->p[1], nn=t->n, same=t->p[2];
@@ -1857,7 +1882,7 @@ void *mgl_diff_2(void *par)
}
return 0;
}
-void *mgl_diff_1(void *par)
+MGL_NO_EXPORT void *mgl_diff_1(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,i0,i1, nx=t->p[0], nn=t->n, same=t->p[1];
@@ -1885,7 +1910,7 @@ void *mgl_diff_1(void *par)
}
return 0;
}
-void mgl_data_diff_par(HMDT d, HCDT v1, HCDT v2, HCDT v3)
+void MGL_EXPORT mgl_data_diff_par(HMDT d, HCDT v1, HCDT v2, HCDT v3)
{ // NOTE: only for mglData!!!
const mglData *x = dynamic_cast<const mglData *>(v1);
const mglData *y = dynamic_cast<const mglData *>(v2);
@@ -1909,29 +1934,29 @@ void mgl_data_diff_par(HMDT d, HCDT v1, HCDT v2, HCDT v3)
}
memcpy(d->a,b,nn*sizeof(mreal)); delete []b;
}
-void mgl_data_diff_par_(uintptr_t *d, uintptr_t *v1, uintptr_t *v2, uintptr_t *v3)
+void MGL_EXPORT mgl_data_diff_par_(uintptr_t *d, uintptr_t *v1, uintptr_t *v2, uintptr_t *v3)
{ mgl_data_diff_par(_DT_,_DA_(v1),_DA_(v2),_DA_(v3)); }
//-----------------------------------------------------------------------------
-void mgl_data_set_value(HMDT dat, mreal v, long i, long j, long k)
+void MGL_EXPORT mgl_data_set_value(HMDT dat, mreal v, long i, long j, long k)
{ if(i>=0 && i<dat->nx && j>=0 && j<dat->ny && k>=0 && k<dat->nz) dat->a[i+dat->nx*(j+dat->ny*k)]=v; }
-void mgl_data_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k)
+void MGL_EXPORT mgl_data_set_value_(uintptr_t *d, mreal *v, int *i, int *j, int *k)
{ mgl_data_set_value(_DT_,*v,*i,*j,*k); }
//-----------------------------------------------------------------------------
-mreal mgl_data_get_value(HCDT dat, long i, long j, long k)
+mreal MGL_EXPORT mgl_data_get_value(HCDT dat, long i, long j, long k)
{ return (i>=0 && i<dat->GetNx() && j>=0 && j<dat->GetNy() && k>=0 && k<dat->GetNz()) ? dat->v(i,j,k):NAN; }
-mreal mgl_data_get_value_(uintptr_t *d, int *i, int *j, int *k)
+mreal MGL_EXPORT mgl_data_get_value_(uintptr_t *d, int *i, int *j, int *k)
{ return mgl_data_get_value(_DA_(d),*i,*j,*k); }
//-----------------------------------------------------------------------------
-mreal *mgl_data_data(HMDT dat) { return dat->a; }
+MGL_EXPORT mreal *mgl_data_data(HMDT dat) { return dat->a; }
//-----------------------------------------------------------------------------
-mreal *mgl_data_value(HMDT dat, long i,long j,long k)
+MGL_EXPORT mreal *mgl_data_value(HMDT dat, long i,long j,long k)
{ register long ii=i*dat->nx*(j+dat->ny*k);
return ii>=0 && ii<dat->GetNN() ? dat->a+ii : 0; }
//-----------------------------------------------------------------------------
-long mgl_data_get_nx(HCDT dat) { return dat->GetNx(); }
-long mgl_data_get_ny(HCDT dat) { return dat->GetNy(); }
-long mgl_data_get_nz(HCDT dat) { return dat->GetNz(); }
-long mgl_data_get_nx_(uintptr_t *d) { return _DA_(d)->GetNx(); }
-long mgl_data_get_ny_(uintptr_t *d) { return _DA_(d)->GetNy(); }
-long mgl_data_get_nz_(uintptr_t *d) { return _DA_(d)->GetNz(); }
+long MGL_EXPORT mgl_data_get_nx(HCDT dat) { return dat->GetNx(); }
+long MGL_EXPORT mgl_data_get_ny(HCDT dat) { return dat->GetNy(); }
+long MGL_EXPORT mgl_data_get_nz(HCDT dat) { return dat->GetNz(); }
+long MGL_EXPORT mgl_data_get_nx_(uintptr_t *d) { return _DA_(d)->GetNx(); }
+long MGL_EXPORT mgl_data_get_ny_(uintptr_t *d) { return _DA_(d)->GetNy(); }
+long MGL_EXPORT mgl_data_get_nz_(uintptr_t *d) { return _DA_(d)->GetNz(); }
//-----------------------------------------------------------------------------
diff --git a/src/data_io.cpp b/src/data_io.cpp
index 976e7f7..b663cfa 100644
--- a/src/data_io.cpp
+++ b/src/data_io.cpp
@@ -40,19 +40,19 @@
//#define isn(ch) ((ch)<' ' && (ch)!='\t')
#define isn(ch) ((ch)=='\n')
//-----------------------------------------------------------------------------
-HMDT mgl_create_data() { return new mglData; }
-HMDT mgl_create_data_size(long nx, long ny, long nz){ return new mglData(nx,ny,nz); }
-HMDT mgl_create_data_file(const char *fname) { return new mglData(fname); }
-void mgl_delete_data(HMDT d) { if(d) delete d; }
+HMDT MGL_EXPORT mgl_create_data() { return new mglData; }
+HMDT MGL_EXPORT mgl_create_data_size(long nx, long ny, long nz){ return new mglData(nx,ny,nz); }
+HMDT MGL_EXPORT mgl_create_data_file(const char *fname) { return new mglData(fname); }
+void MGL_EXPORT mgl_delete_data(HMDT d) { if(d) delete d; }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_data_()
+uintptr_t MGL_EXPORT mgl_create_data_()
{ return uintptr_t(new mglData()); }
-uintptr_t mgl_create_data_size_(int *nx, int *ny, int *nz)
+uintptr_t MGL_EXPORT mgl_create_data_size_(int *nx, int *ny, int *nz)
{ return uintptr_t(new mglData(*nx,*ny,*nz)); }
-uintptr_t mgl_create_data_file_(const char *fname,int l)
+uintptr_t MGL_EXPORT mgl_create_data_file_(const char *fname,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
uintptr_t r = uintptr_t(new mglData(s)); delete []s; return r; }
-void mgl_delete_data_(uintptr_t *d)
+void MGL_EXPORT mgl_delete_data_(uintptr_t *d)
{ if(_DT_) delete _DT_; }
//-----------------------------------------------------------------------------
void mglFromStr(HMDT d,char *buf,long NX,long NY,long NZ) // TODO: add multithreading read
@@ -87,7 +87,7 @@ void mglFromStr(HMDT d,char *buf,long NX,long NY,long NZ) // TODO: add multithre
}
}
//-----------------------------------------------------------------------------
-void mgl_data_set(HMDT d, HCDT a)
+void MGL_EXPORT mgl_data_set(HMDT d, HCDT a)
{
if(!a) return;
const mglData *dd = dynamic_cast<const mglData *>(a); // faster for mglData
@@ -101,9 +101,9 @@ void mgl_data_set(HMDT d, HCDT a)
d->a[i+d->nx*(j+d->ny*k)] = a->v(i,j,k);
}
}
-void mgl_data_set_(uintptr_t *d, uintptr_t *a) { mgl_data_set(_DT_,_DA_(a)); }
+void MGL_EXPORT mgl_data_set_(uintptr_t *d, uintptr_t *a) { mgl_data_set(_DT_,_DA_(a)); }
//-----------------------------------------------------------------------------
-void mgl_data_set_values(HMDT d, const char *v,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_data_set_values(HMDT d, const char *v,long NX,long NY,long NZ)
{
if(NX<1 || NY <1 || NZ<1) return;
register long n=strlen(v)+1;
@@ -112,11 +112,11 @@ void mgl_data_set_values(HMDT d, const char *v,long NX,long NY,long NZ)
mglFromStr(d,buf,NX,NY,NZ);
delete []buf;
}
-void mgl_data_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l)
+void MGL_EXPORT mgl_data_set_values_(uintptr_t *d, const char *val, int *nx, int *ny, int *nz, int l)
{ char *s=new char[l+1]; memcpy(s,val,l); s[l]=0;
mgl_data_set_values(_DT_,s,*nx,*ny,*nz); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_set_vector(HMDT d, gsl_vector *v)
+void MGL_EXPORT mgl_data_set_vector(HMDT d, gsl_vector *v)
{
#if MGL_HAVE_GSL
if(!v || v->size<1) return;
@@ -125,7 +125,7 @@ void mgl_data_set_vector(HMDT d, gsl_vector *v)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_matrix(HMDT d, gsl_matrix *m)
+void MGL_EXPORT mgl_data_set_matrix(HMDT d, gsl_matrix *m)
{
#if MGL_HAVE_GSL
if(!m || m->size1<1 || m->size2<1) return;
@@ -136,7 +136,7 @@ void mgl_data_set_matrix(HMDT d, gsl_matrix *m)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_float(HMDT d, const float *A,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_data_set_float(HMDT d, const float *A,long NX,long NY,long NZ)
{
if(NX<=0 || NY<=0 || NZ<=0) return;
mgl_data_create(d, NX,NY,NZ); if(!A) return;
@@ -147,7 +147,7 @@ void mgl_data_set_float(HMDT d, const float *A,long NX,long NY,long NZ)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_double(HMDT d, const double *A,long NX,long NY,long NZ)
+void MGL_EXPORT mgl_data_set_double(HMDT d, const double *A,long NX,long NY,long NZ)
{
if(NX<=0 || NY<=0 || NZ<=0) return;
mgl_data_create(d, NX,NY,NZ); if(!A) return;
@@ -158,7 +158,7 @@ void mgl_data_set_double(HMDT d, const double *A,long NX,long NY,long NZ)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_float2(HMDT d, const float **A,long N1,long N2)
+void MGL_EXPORT mgl_data_set_float2(HMDT d, const float **A,long N1,long N2)
{
if(N1<=0 || N2<=0) return;
mgl_data_create(d, N2,N1,1); if(!A) return;
@@ -169,7 +169,7 @@ void mgl_data_set_float2(HMDT d, const float **A,long N1,long N2)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_double2(HMDT d, const double **A,long N1,long N2)
+void MGL_EXPORT mgl_data_set_double2(HMDT d, const double **A,long N1,long N2)
{
if(N1<=0 || N2<=0) return;
mgl_data_create(d, N2,N1,1); if(!A) return;
@@ -180,7 +180,7 @@ void mgl_data_set_double2(HMDT d, const double **A,long N1,long N2)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_float3(HMDT d, const float ***A,long N1,long N2,long N3)
+void MGL_EXPORT mgl_data_set_float3(HMDT d, const float ***A,long N1,long N2,long N3)
{
if(N1<=0 || N2<=0 || N3<=0) return;
mgl_data_create(d, N3,N2,N1); if(!A) return;
@@ -193,7 +193,7 @@ void mgl_data_set_float3(HMDT d, const float ***A,long N1,long N2,long N3)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_double3(HMDT d, const double ***A,long N1,long N2,long N3)
+void MGL_EXPORT mgl_data_set_double3(HMDT d, const double ***A,long N1,long N2,long N3)
{
if(N1<=0 || N2<=0 || N3<=0) return;
mgl_data_create(d, N3,N2,N1); if(!A) return;
@@ -206,24 +206,24 @@ void mgl_data_set_double3(HMDT d, const double ***A,long N1,long N2,long N3)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_set_float1_(uintptr_t *d, const float *A,int *NX)
+void MGL_EXPORT mgl_data_set_float1_(uintptr_t *d, const float *A,int *NX)
{ mgl_data_set_float(_DT_,A,*NX,1,1); }
-void mgl_data_set_double1_(uintptr_t *d, const double *A,int *NX)
+void MGL_EXPORT mgl_data_set_double1_(uintptr_t *d, const double *A,int *NX)
{ mgl_data_set_double(_DT_,A,*NX,1,1); }
-void mgl_data_set_float_(uintptr_t *d, const float *A,int *NX,int *NY,int *NZ)
+void MGL_EXPORT mgl_data_set_float_(uintptr_t *d, const float *A,int *NX,int *NY,int *NZ)
{ mgl_data_set_float(_DT_,A,*NX,*NY,*NZ); }
-void mgl_data_set_double_(uintptr_t *d, const double *A,int *NX,int *NY,int *NZ)
+void MGL_EXPORT mgl_data_set_double_(uintptr_t *d, const double *A,int *NX,int *NY,int *NZ)
{ mgl_data_set_double(_DT_,A,*NX,*NY,*NZ); }
-void mgl_data_set_float2_(uintptr_t *d, const float *A,int *N1,int *N2)
+void MGL_EXPORT mgl_data_set_float2_(uintptr_t *d, const float *A,int *N1,int *N2)
{ mgl_data_set_float(_DT_,A,*N1,*N2,1); }
-void mgl_data_set_double2_(uintptr_t *d, const double *A,int *N1,int *N2)
+void MGL_EXPORT mgl_data_set_double2_(uintptr_t *d, const double *A,int *N1,int *N2)
{ mgl_data_set_double(_DT_,A,*N1,*N2,1); }
-void mgl_data_set_float3_(uintptr_t *d, const float *A,int *N1,int *N2,int *N3)
+void MGL_EXPORT mgl_data_set_float3_(uintptr_t *d, const float *A,int *N1,int *N2,int *N3)
{ mgl_data_set_float(_DT_,A,*N1,*N2,*N3); }
-void mgl_data_set_double3_(uintptr_t *d, const double *A,int *N1,int *N2,int *N3)
+void MGL_EXPORT mgl_data_set_double3_(uintptr_t *d, const double *A,int *N1,int *N2,int *N3)
{ mgl_data_set_double(_DT_,A,*N1,*N2,*N3); }
//-----------------------------------------------------------------------------
-void mgl_data_rearrange(HMDT d, long mx,long my,long mz)
+void MGL_EXPORT mgl_data_rearrange(HMDT d, long mx,long my,long mz)
{
if(mx<1) return; // wrong mx
if(my<1) { my = d->nx*d->ny*d->nz/mx; mz = 1; }
@@ -232,15 +232,15 @@ void mgl_data_rearrange(HMDT d, long mx,long my,long mz)
if(m==0 || m>d->nx*d->ny*d->nz) return; // too high desired dimensions
d->nx = mx; d->ny = my; d->nz = mz; d->NewId();
}
-void mgl_data_rearrange_(uintptr_t *d, int *mx, int *my, int *mz)
+void MGL_EXPORT mgl_data_rearrange_(uintptr_t *d, int *mx, int *my, int *mz)
{ mgl_data_rearrange(_DT_,*mx,*my,*mz); }
//-----------------------------------------------------------------------------
-void mgl_data_set_id(HMDT d, const char *ids) { d->id = ids; }
-void mgl_data_set_id_(uintptr_t *d, const char *eq,int l)
+void MGL_EXPORT mgl_data_set_id(HMDT d, const char *ids) { d->id = ids; }
+void MGL_EXPORT mgl_data_set_id_(uintptr_t *d, const char *eq,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_data_set_id(_DT_, s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_save(HCDT d, const char *fname,long ns)
+void MGL_EXPORT mgl_data_save(HCDT d, const char *fname,long ns)
{
FILE *fp;
fp = fopen(fname,"w");
@@ -267,11 +267,11 @@ void mgl_data_save(HCDT d, const char *fname,long ns)
}
fclose(fp);
}
-void mgl_data_save_(uintptr_t *d, const char *fname,int *ns,int l)
+void MGL_EXPORT mgl_data_save_(uintptr_t *d, const char *fname,int *ns,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
mgl_data_save(_DT_,s,*ns); delete []s; }
//-----------------------------------------------------------------------------
-char *mgl_read_gz(gzFile fp)
+MGL_NO_EXPORT char *mgl_read_gz(gzFile fp)
{
long size=1024,n=0,m;
char *buf=(char*)malloc(size);
@@ -283,7 +283,7 @@ char *mgl_read_gz(gzFile fp)
return buf;
}
//-----------------------------------------------------------------------------
-int mgl_data_read(HMDT d, const char *fname)
+int MGL_EXPORT mgl_data_read(HMDT d, const char *fname)
{
long l=1,m=1,k=1;
long nb,i;
@@ -336,11 +336,11 @@ int mgl_data_read(HMDT d, const char *fname)
mglFromStr(d,buf,k,m,l);
free(buf); return true;
}
-int mgl_data_read_(uintptr_t *d, const char *fname,int l)
+int MGL_EXPORT mgl_data_read_(uintptr_t *d, const char *fname,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_data_read(_DT_, s); delete []s; return r; }
//-----------------------------------------------------------------------------
-void mgl_data_create(HMDT d,long mx,long my,long mz)
+void MGL_EXPORT mgl_data_create(HMDT d,long mx,long my,long mz)
{
d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1;
if(d->a && !d->link) delete [](d->a);
@@ -348,20 +348,20 @@ void mgl_data_create(HMDT d,long mx,long my,long mz)
d->id.clear(); d->link=false;
memset(d->a,0,d->nx*d->ny*d->nz*sizeof(mreal));
}
-void mgl_data_create_(uintptr_t *d, int *nx,int *ny,int *nz)
+void MGL_EXPORT mgl_data_create_(uintptr_t *d, int *nx,int *ny,int *nz)
{ mgl_data_create(_DT_,*nx,*ny,*nz); }
//-----------------------------------------------------------------------------
-void mgl_data_link(HMDT d, mreal *A, long mx,long my,long mz)
+void MGL_EXPORT mgl_data_link(HMDT d, mreal *A, long mx,long my,long mz)
{
if(!A) return;
if(!d->link && d->a) delete [](d->a);
d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1;
d->link=true; d->a=A; d->NewId();
}
-void mgl_data_link_(uintptr_t *d, mreal *A, int *nx,int *ny,int *nz)
+void MGL_EXPORT mgl_data_link_(uintptr_t *d, mreal *A, int *nx,int *ny,int *nz)
{ mgl_data_link(_DT_,A,*nx,*ny,*nz); }
//-----------------------------------------------------------------------------
-int mgl_data_read_dim(HMDT d, const char *fname,long mx,long my,long mz)
+int MGL_EXPORT mgl_data_read_dim(HMDT d, const char *fname,long mx,long my,long mz)
{
if(mx<=0 || my<=0 || mz<=0) return false;
gzFile fp = gzopen(fname,"r");
@@ -371,11 +371,11 @@ int mgl_data_read_dim(HMDT d, const char *fname,long mx,long my,long mz)
mglFromStr(d,buf,mx,my,mz);
free(buf); return true;
}
-int mgl_data_read_dim_(uintptr_t *d, const char *fname,int *mx,int *my,int *mz,int l)
+int MGL_EXPORT mgl_data_read_dim_(uintptr_t *d, const char *fname,int *mx,int *my,int *mz,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_data_read_dim(_DT_,s,*mx,*my,*mz); delete []s; return r; }
//-----------------------------------------------------------------------------
-int mgl_data_read_mat(HMDT d, const char *fname, long dim)
+int MGL_EXPORT mgl_data_read_mat(HMDT d, const char *fname, long dim)
{
if(dim<=0 || dim>3) return false;
gzFile fp = gzopen(fname,"r");
@@ -433,11 +433,11 @@ int mgl_data_read_mat(HMDT d, const char *fname, long dim)
mglFromStr(d,buf+j,nx,ny,nz);
free(buf); return true;
}
-int mgl_data_read_mat_(uintptr_t *d, const char *fname,int *dim,int l)
+int MGL_EXPORT mgl_data_read_mat_(uintptr_t *d, const char *fname,int *dim,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_data_read_mat(_DT_,s,*dim); delete []s; return r; }
//-----------------------------------------------------------------------------
-mreal mgl_data_max(HCDT d)
+mreal MGL_EXPORT mgl_data_max(HCDT d)
{
register mreal m=-1e10, v;
register long nn=d->GetNN();
@@ -448,9 +448,9 @@ mreal mgl_data_max(HCDT d)
{ v = d->vthr(i); if(!mgl_isnan(v)) m = m>v ? m:v; }
return m;
}
-mreal mgl_data_max_(uintptr_t *d) { return mgl_data_max(_DT_); }
+mreal MGL_EXPORT mgl_data_max_(uintptr_t *d) { return mgl_data_max(_DT_); }
//-----------------------------------------------------------------------------
-mreal mgl_data_min(HCDT d)
+mreal MGL_EXPORT mgl_data_min(HCDT d)
{
register mreal m=1e10, v;
register long nn=d->GetNN();
@@ -461,9 +461,9 @@ mreal mgl_data_min(HCDT d)
{ v = d->vthr(i); if(!mgl_isnan(v)) m = m<v ? m:v; }
return m;
}
-mreal mgl_data_min_(uintptr_t *d) { return mgl_data_min(_DT_); }
+mreal MGL_EXPORT mgl_data_min_(uintptr_t *d) { return mgl_data_min(_DT_); }
//-----------------------------------------------------------------------------
-mreal mgl_data_max_int(HCDT d, long *i, long *j, long *k)
+mreal MGL_EXPORT mgl_data_max_int(HCDT d, long *i, long *j, long *k)
{
register mreal m=-1e10, v;
long nx=d->GetNx(), ny=d->GetNy(), nn=d->GetNN();
@@ -475,11 +475,11 @@ mreal mgl_data_max_int(HCDT d, long *i, long *j, long *k)
}
return m;
}
-mreal mgl_data_max_int_(uintptr_t *d, int *i, int *j, int *k)
+mreal MGL_EXPORT mgl_data_max_int_(uintptr_t *d, int *i, int *j, int *k)
{ long ii,jj,kk; mreal res=mgl_data_max_int(_DT_,&ii,&jj,&kk);
*i=ii; *j=jj; *k=kk; return res; }
//-----------------------------------------------------------------------------
-mreal mgl_data_min_int(HCDT d, long *i, long *j, long *k)
+mreal MGL_EXPORT mgl_data_min_int(HCDT d, long *i, long *j, long *k)
{
register mreal m=1e10, v;
long nx=d->GetNx(), ny=d->GetNy(), nn=d->GetNN();
@@ -491,11 +491,11 @@ mreal mgl_data_min_int(HCDT d, long *i, long *j, long *k)
}
return m;
}
-mreal mgl_data_min_int_(uintptr_t *d, int *i, int *j, int *k)
+mreal MGL_EXPORT mgl_data_min_int_(uintptr_t *d, int *i, int *j, int *k)
{ long ii,jj,kk; mreal res=mgl_data_min_int(_DT_,&ii,&jj,&kk);
*i=ii; *j=jj; *k=kk; return res; }
//-----------------------------------------------------------------------------
-mreal mgl_data_max_real(HCDT d, mreal *x, mreal *y, mreal *z)
+mreal MGL_EXPORT mgl_data_max_real(HCDT d, mreal *x, mreal *y, mreal *z)
{
long im=-1,jm=-1,km=-1;
long nx=d->GetNx(), ny=d->GetNy(), nz=d->GetNz();
@@ -526,10 +526,10 @@ mreal mgl_data_max_real(HCDT d, mreal *x, mreal *y, mreal *z)
}
return m;
}
-mreal mgl_data_max_real_(uintptr_t *d, mreal *x, mreal *y, mreal *z)
+mreal MGL_EXPORT mgl_data_max_real_(uintptr_t *d, mreal *x, mreal *y, mreal *z)
{ return mgl_data_max_real(_DT_,x,y,z); }
//-----------------------------------------------------------------------------
-mreal mgl_data_min_real(HCDT d, mreal *x, mreal *y, mreal *z)
+mreal MGL_EXPORT mgl_data_min_real(HCDT d, mreal *x, mreal *y, mreal *z)
{
long im=-1,jm=-1,km=-1;
long nx=d->GetNx(), ny=d->GetNy(), nz=d->GetNz();
@@ -560,10 +560,10 @@ mreal mgl_data_min_real(HCDT d, mreal *x, mreal *y, mreal *z)
}
return m;
}
-mreal mgl_data_min_real_(uintptr_t *d, mreal *x, mreal *y, mreal *z)
+mreal MGL_EXPORT mgl_data_min_real_(uintptr_t *d, mreal *x, mreal *y, mreal *z)
{ return mgl_data_min_real(_DT_,x,y,z); }
//-----------------------------------------------------------------------------
-void *mgl_fill_x(void *par)
+MGL_NO_EXPORT void *mgl_fill_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i0, nx=t->p[0],ny=t->p[1];
@@ -577,7 +577,7 @@ void *mgl_fill_x(void *par)
}
return 0;
}
-void mgl_data_fill(HMDT d, mreal x1,mreal x2,char dir)
+void MGL_EXPORT mgl_data_fill(HMDT d, mreal x1,mreal x2,char dir)
{
if(mgl_isnan(x2)) x2=x1;
if(dir<'x' || dir>'z') dir='x';
@@ -588,10 +588,10 @@ void mgl_data_fill(HMDT d, mreal x1,mreal x2,char dir)
if(dir=='z') b[1] *= d->nz>1 ? 1./(d->nz-1):0;
mglStartThread(mgl_fill_x,0,d->nx*d->ny*d->nz,d->a,b,0,par,0,0,0,&dir);
}
-void mgl_data_fill_(uintptr_t *d, mreal *x1,mreal *x2,const char *dir,int)
+void MGL_EXPORT mgl_data_fill_(uintptr_t *d, mreal *x1,mreal *x2,const char *dir,int)
{ mgl_data_fill(_DT_,*x1,*x2,*dir); }
//-----------------------------------------------------------------------------
-void mgl_data_norm(HMDT d, mreal v1,mreal v2,long sym,long dim)
+void MGL_EXPORT mgl_data_norm(HMDT d, mreal v1,mreal v2,long sym,long dim)
{
long i,s,nn=d->nx*d->ny*d->nz;
mreal a1=1e20,a2=-1e20,v,*a=d->a;
@@ -612,10 +612,10 @@ void mgl_data_norm(HMDT d, mreal v1,mreal v2,long sym,long dim)
for(i=s;i<nn;i++) // normalize
a[i] = v1 + (v2-v1)*(a[i]-a1)/(a2-a1);
}
-void mgl_data_norm_(uintptr_t *d, mreal *v1,mreal *v2,int *sym,int *dim)
+void MGL_EXPORT mgl_data_norm_(uintptr_t *d, mreal *v1,mreal *v2,int *sym,int *dim)
{ mgl_data_norm(_DT_,*v1,*v2,*sym,*dim); }
//-----------------------------------------------------------------------------
-void mgl_data_squeeze(HMDT d, long rx,long ry,long rz,long smooth)
+void MGL_EXPORT mgl_data_squeeze(HMDT d, long rx,long ry,long rz,long smooth)
{
long kx,ky,kz,i,j,k;
long nx=d->nx, ny=d->ny, nz=d->nz;
@@ -644,10 +644,10 @@ void mgl_data_squeeze(HMDT d, long rx,long ry,long rz,long smooth)
if(!d->link) delete [](d->a);
d->a=b; d->nx = kx; d->ny = ky; d->nz = kz; d->NewId(); d->link=false;
}
-void mgl_data_squeeze_(uintptr_t *d, int *rx,int *ry,int *rz,int *smooth)
+void MGL_EXPORT mgl_data_squeeze_(uintptr_t *d, int *rx,int *ry,int *rz,int *smooth)
{ mgl_data_squeeze(_DT_,*rx,*ry,*rz,*smooth); }
//-----------------------------------------------------------------------------
-void mgl_data_extend(HMDT d, long n1, long n2)
+void MGL_EXPORT mgl_data_extend(HMDT d, long n1, long n2)
{
long nx=d->nx, ny=d->ny, nz=d->nz;
if(nz>2 || n1==0) return;
@@ -681,10 +681,10 @@ void mgl_data_extend(HMDT d, long n1, long n2)
d->a=b; d->nx=mx; d->ny=my; d->nz=mz;
d->NewId(); d->link=false;
}
-void mgl_data_extend_(uintptr_t *d, int *n1, int *n2)
+void MGL_EXPORT mgl_data_extend_(uintptr_t *d, int *n1, int *n2)
{ mgl_data_extend(_DT_,*n1,*n2); }
//-----------------------------------------------------------------------------
-void mgl_data_transpose(HMDT d, const char *dim)
+void MGL_EXPORT mgl_data_transpose(HMDT d, const char *dim)
{
long nx=d->nx, ny=d->ny, nz=d->nz;
mreal *b=new mreal[nx*ny*nz], *a=d->a;
@@ -724,11 +724,11 @@ void mgl_data_transpose(HMDT d, const char *dim)
n=d->nx; d->nx=nx; d->ny=ny; d->nz=nz;
if(nx!=n) d->NewId();
}
-void mgl_data_transpose_(uintptr_t *d, const char *dim,int l)
+void MGL_EXPORT mgl_data_transpose_(uintptr_t *d, const char *dim,int l)
{ char *s=new char[l+1]; memcpy(s,dim,l); s[l]=0;
mgl_data_transpose(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_modify(void *par)
+MGL_NO_EXPORT void *mgl_modify(void *par)
{
mglThreadD *t=(mglThreadD *)par;
const mglFormula *f = (const mglFormula *)(t->v);
@@ -743,7 +743,7 @@ void *mgl_modify(void *par)
}
return 0;
}
-void mgl_data_modify(HMDT d, const char *eq,long dim)
+void MGL_EXPORT mgl_data_modify(HMDT d, const char *eq,long dim)
{
long nx=d->nx, ny=d->ny, nz=d->nz, par[3]={nx,ny,nz};
mglFormula f(eq);
@@ -759,11 +759,11 @@ void mgl_data_modify(HMDT d, const char *eq,long dim)
mglStartThread(mgl_modify,0,nx*par[1],d->a+nx*dim,0,0,par,&f);
}
}
-void mgl_data_modify_(uintptr_t *d, const char *eq,int *dim,int l)
+void MGL_EXPORT mgl_data_modify_(uintptr_t *d, const char *eq,int *dim,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_data_modify(_DT_,s,*dim); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_modify_gen(void *par)
+MGL_NO_EXPORT void *mgl_modify_gen(void *par)
{
mglThreadV *t=(mglThreadV *)par;
const mglFormula *f = (const mglFormula *)(t->v);
@@ -778,7 +778,7 @@ void *mgl_modify_gen(void *par)
}
return 0;
}
-void mgl_data_modify_vw(HMDT d, const char *eq,HCDT vdat,HCDT wdat)
+void MGL_EXPORT mgl_data_modify_vw(HMDT d, const char *eq,HCDT vdat,HCDT wdat)
{
const mglData *v = dynamic_cast<const mglData *>(vdat);
const mglData *w = dynamic_cast<const mglData *>(wdat);
@@ -792,11 +792,11 @@ void mgl_data_modify_vw(HMDT d, const char *eq,HCDT vdat,HCDT wdat)
else if(vdat) mglStartThreadV(mgl_modify_gen,nn,d->a,vdat,0,par,&f);
else mglStartThread(mgl_modify,0,nn,d->a,0,0,par,&f);
}
-void mgl_data_modify_vw_(uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w,int l)
+void MGL_EXPORT mgl_data_modify_vw_(uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
mgl_data_modify_vw(_DT_,s,_DA_(v),_DA_(w)); delete []s; }
//-----------------------------------------------------------------------------
-void *mgl_fill_f(void *par)
+MGL_NO_EXPORT void *mgl_fill_f(void *par)
{
mglThreadD *t=(mglThreadD *)par;
const mglFormula *f = (const mglFormula *)(t->v);
@@ -810,7 +810,7 @@ void *mgl_fill_f(void *par)
}
return 0;
}
-void *mgl_fill_fgen(void *par)
+MGL_NO_EXPORT void *mgl_fill_fgen(void *par)
{
mglThreadD *t=(mglThreadD *)par;
const mglFormula *f = (const mglFormula *)(t->v);
@@ -825,7 +825,7 @@ void *mgl_fill_fgen(void *par)
}
return 0;
}
-void mgl_data_fill_eq(HMGL gr, HMDT d, const char *eq, HCDT vdat, HCDT wdat, const char *opt)
+void MGL_EXPORT mgl_data_fill_eq(HMGL gr, HMDT d, const char *eq, HCDT vdat, HCDT wdat, const char *opt)
{
const mglData *v = dynamic_cast<const mglData *>(vdat);
const mglData *w = dynamic_cast<const mglData *>(wdat);
@@ -845,13 +845,13 @@ void mgl_data_fill_eq(HMGL gr, HMDT d, const char *eq, HCDT vdat, HCDT wdat, con
else mglStartThread(mgl_fill_f,0,nn,d->a,0,0,par,&f,xx);
gr->LoadState();
}
-void mgl_data_fill_eq_(uintptr_t *gr, uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_data_fill_eq_(uintptr_t *gr, uintptr_t *d, const char *eq, uintptr_t *v, uintptr_t *w, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_data_fill_eq(_GR_,_DT_,s,_DA_(v),_DA_(w),o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
#if MGL_HAVE_HDF4
-int mgl_data_read_hdf4(HMDT d,const char *fname,const char *data)
+int MGL_EXPORT mgl_data_read_hdf4(HMDT d,const char *fname,const char *data)
{
int32 sd = SDstart(fname,DFACC_READ), nn, i;
if(sd==-1) return false; // is not a HDF4 file
@@ -889,12 +889,12 @@ int mgl_data_read_hdf4(HMDT d,const char *fname,const char *data)
return true;
}
#else
-int mgl_data_read_hdf4(HMDT ,const char *,const char *)
+int MGL_EXPORT mgl_data_read_hdf4(HMDT ,const char *,const char *)
{ mglGlobalMess += "HDF4 support was disabled. Please, enable it and rebuild MathGL.\n"; return false; }
#endif
//-----------------------------------------------------------------------------
#if MGL_HAVE_HDF5
-void mgl_data_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
+void MGL_EXPORT mgl_data_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
{
const mglData *d = dynamic_cast<const mglData *>(dat); // NOTE: only for mglData
if(!d) { mglData d(dat); mgl_data_save_hdf(&d,fname,data,rewrite); return; }
@@ -920,7 +920,7 @@ void mgl_data_save_hdf(HCDT dat,const char *fname,const char *data,int rewrite)
H5Dclose(hd); H5Sclose(hs); H5Fclose(hf);
}
//-----------------------------------------------------------------------------
-int mgl_data_read_hdf(HMDT d,const char *fname,const char *data)
+int MGL_EXPORT mgl_data_read_hdf(HMDT d,const char *fname,const char *data)
{
hid_t hf,hd,hs;
hsize_t dims[3];
@@ -948,7 +948,7 @@ int mgl_data_read_hdf(HMDT d,const char *fname,const char *data)
H5Sclose(hs); H5Dclose(hd); H5Fclose(hf); return true;
}
//-----------------------------------------------------------------------------
-int mgl_datas_hdf(const char *fname, char *buf, long size)
+int MGL_EXPORT mgl_datas_hdf(const char *fname, char *buf, long size)
{
hid_t hf,hg,hd,ht;
if(!buf || size<1) return 0;
@@ -975,24 +975,24 @@ int mgl_datas_hdf(const char *fname, char *buf, long size)
return i;
}
#else
-void mgl_data_save_hdf(HCDT ,const char *,const char *,int )
+void MGL_EXPORT mgl_data_save_hdf(HCDT ,const char *,const char *,int )
{ mglGlobalMess += "HDF5 support was disabled. Please, enable it and rebuild MathGL.\n"; }
-int mgl_datas_hdf(const char *, char *, long )
+int MGL_EXPORT mgl_datas_hdf(const char *, char *, long )
{ mglGlobalMess += "HDF5 support was disabled. Please, enable it and rebuild MathGL.\n"; return 0;}
-int mgl_data_read_hdf(HMDT ,const char *,const char *)
+int MGL_EXPORT mgl_data_read_hdf(HMDT ,const char *,const char *)
{ mglGlobalMess += "HDF5 support was disabled. Please, enable it and rebuild MathGL.\n"; return false;}
#endif
//-----------------------------------------------------------------------------
-int mgl_data_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n)
+int MGL_EXPORT mgl_data_read_hdf_(uintptr_t *d, const char *fname, const char *data,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *t=new char[n+1]; memcpy(t,data,n); t[n]=0;
int r = mgl_data_read_hdf(_DT_,s,t); delete []s; delete []t; return r; }
-void mgl_data_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n)
+void MGL_EXPORT mgl_data_save_hdf_(uintptr_t *d, const char *fname, const char *data, int *rewrite,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *t=new char[n+1]; memcpy(t,data,n); t[n]=0;
mgl_data_save_hdf(_DT_,s,t,*rewrite); delete []s; delete []t; }
//-----------------------------------------------------------------------------
-bool mgl_add_file(long &kx,long &ky, long &kz, mreal *&b, mglData *d,bool as_slice)
+bool MGL_EXPORT mgl_add_file(long &kx,long &ky, long &kz, mreal *&b, mglData *d,bool as_slice)
{
if(as_slice && d->nz==1)
{
@@ -1030,7 +1030,7 @@ bool mgl_add_file(long &kx,long &ky, long &kz, mreal *&b, mglData *d,bool as_sli
return true;
}
//-----------------------------------------------------------------------------
-int mgl_data_read_range(HMDT dat, const char *templ, double from, double to, double step, int as_slice)
+int MGL_EXPORT mgl_data_read_range(HMDT dat, const char *templ, double from, double to, double step, int as_slice)
{
mglData d;
mreal t = from, *b;
@@ -1051,17 +1051,17 @@ int mgl_data_read_range(HMDT dat, const char *templ, double from, double to, dou
sprintf(fname,templ,t);
if(mgl_data_read(&d,fname))
if(!mgl_add_file(kx,ky,kz,b,&d,as_slice))
- return false;
+ { delete []fname; free(b); return false; }
}
dat->Set(b,kx,ky,kz);
- delete []fname; free(b);
+ delete []fname; free(b);
return true;
}
-int mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l)
+int MGL_EXPORT mgl_data_read_range_(uintptr_t *d, const char *fname, mreal *from, mreal *to, mreal *step, int *as_slice,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_data_read_range(_DT_,s,*from,*to,*step,*as_slice); delete []s; return r; }
//-----------------------------------------------------------------------------
-int mgl_data_read_all(HMDT dat, const char *templ, int as_slice)
+int MGL_EXPORT mgl_data_read_all(HMDT dat, const char *templ, int as_slice)
{
#ifndef WIN32
mglData d;
@@ -1096,7 +1096,7 @@ int mgl_data_read_all(HMDT dat, const char *templ, int as_slice)
return false;
#endif
}
-int mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l)
+int MGL_EXPORT mgl_data_read_all_(uintptr_t *d, const char *fname, int *as_slice,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
int r = mgl_data_read_all(_DT_,s,*as_slice); delete []s; return r; }
//-----------------------------------------------------------------------------
diff --git a/src/data_new.cpp b/src/data_new.cpp
index 1d33492..2841ffb 100644
--- a/src/data_new.cpp
+++ b/src/data_new.cpp
@@ -19,6 +19,7 @@
***************************************************************************/
#include <ctype.h>
#include "mgl2/data.h"
+#include "mgl2/eval.h"
#if MGL_HAVE_GSL
#include <gsl/gsl_fft_complex.h>
@@ -26,7 +27,7 @@
#include <gsl/gsl_sf.h>
#endif
//-----------------------------------------------------------------------------
-void mgl_data_envelop(HMDT d, char dir)
+void MGL_EXPORT mgl_data_envelop(HMDT d, char dir)
{
#if MGL_HAVE_GSL
register long i,j,k,i0;
@@ -82,10 +83,10 @@ void mgl_data_envelop(HMDT d, char dir)
delete []b;
#endif
}
-void mgl_data_envelop_(uintptr_t *d, const char *dir, int)
+void MGL_EXPORT mgl_data_envelop_(uintptr_t *d, const char *dir, int)
{ mgl_data_envelop(_DT_,*dir); }
//-----------------------------------------------------------------------------
-HMDT mgl_data_trace(HCDT d)
+HMDT MGL_EXPORT mgl_data_trace(HCDT d)
{
long nx=d->GetNx(),ny=d->GetNy(),nz=d->GetNz();
mglData *r=new mglData(nx);
@@ -95,10 +96,10 @@ HMDT mgl_data_trace(HCDT d)
else for(i=0;i<nx;i++) r->a[i] = d->v(i);
return r;
}
-uintptr_t mgl_data_trace_(uintptr_t *d)
+uintptr_t MGL_EXPORT mgl_data_trace_(uintptr_t *d)
{ return uintptr_t(mgl_data_trace(_DT_)); }
//-----------------------------------------------------------------------------
-HMDT mgl_data_subdata_ext(HCDT d, HCDT xx, HCDT yy, HCDT zz)
+HMDT MGL_EXPORT mgl_data_subdata_ext(HCDT d, HCDT xx, HCDT yy, HCDT zz)
{
long n=0,m=0,l=0,i,j,k,i0;
mreal x,y,z;
@@ -178,19 +179,19 @@ HMDT mgl_data_subdata_ext(HCDT d, HCDT xx, HCDT yy, HCDT zz)
return r;
}
//-----------------------------------------------------------------------------
-HMDT mgl_data_subdata(HCDT d, long xx,long yy,long zz)
+HMDT MGL_EXPORT mgl_data_subdata(HCDT d, long xx,long yy,long zz)
{
mglData x,y,z;
x.a[0]=xx; y.a[0]=yy; z.a[0]=zz;
return mgl_data_subdata_ext(d,&x,&y,&z);
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_data_subdata_(uintptr_t *d, int *xx,int *yy,int *zz)
+uintptr_t MGL_EXPORT mgl_data_subdata_(uintptr_t *d, int *xx,int *yy,int *zz)
{ return uintptr_t(mgl_data_subdata(_DT_,*xx,*yy,*zz)); }
-uintptr_t mgl_data_subdata_ext_(uintptr_t *d, uintptr_t *xx, uintptr_t *yy, uintptr_t *zz)
+uintptr_t MGL_EXPORT mgl_data_subdata_ext_(uintptr_t *d, uintptr_t *xx, uintptr_t *yy, uintptr_t *zz)
{ return uintptr_t(mgl_data_subdata_ext(_DT_,_DA_(xx),_DA_(yy),_DA_(zz))); }
//-----------------------------------------------------------------------------
-void *mgl_column(void *par)
+MGL_NO_EXPORT void *mgl_column(void *par)
{
mglThreadD *t=(mglThreadD *)par;
const mglFormula *f = (const mglFormula *)t->v;
@@ -207,7 +208,7 @@ void *mgl_column(void *par)
}
return 0;
}
-HMDT mgl_data_column(HCDT dat, const char *eq)
+HMDT MGL_EXPORT mgl_data_column(HCDT dat, const char *eq)
{ // NOTE: only for mglData (for speeding up)
long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
mglFormula f(eq);
@@ -216,12 +217,12 @@ HMDT mgl_data_column(HCDT dat, const char *eq)
if(d) mglStartThread(mgl_column,0,ny*nz,r->a,d->a,0,&nx,&f,0,0,d->id.c_str());
return r;
}
-uintptr_t mgl_data_column_(uintptr_t *d, const char *eq,int l)
+uintptr_t MGL_EXPORT mgl_data_column_(uintptr_t *d, const char *eq,int l)
{ char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
uintptr_t r = uintptr_t(mgl_data_column(_DT_,s));
delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_resize(void *par)
+MGL_NO_EXPORT void *mgl_resize(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k,i0, nx=t->p[0]+0.1, ny=t->p[1]+0.1;
@@ -235,7 +236,7 @@ void *mgl_resize(void *par)
}
return 0;
}
-HMDT mgl_data_resize_box(HCDT dat, long mx,long my,long mz, mreal x1,mreal x2, mreal y1,mreal y2, mreal z1,mreal z2)
+HMDT MGL_EXPORT mgl_data_resize_box(HCDT dat, long mx,long my,long mz, mreal x1,mreal x2, mreal y1,mreal y2, mreal z1,mreal z2)
{ // NOTE: only for mglData (for speeding up)
mx = mx<1 ? 1:mx; my = my<1 ? 1:my; mz = mz<1 ? 1:mz;
mglData *r=new mglData(mx,my,mz);
@@ -250,14 +251,14 @@ HMDT mgl_data_resize_box(HCDT dat, long mx,long my,long mz, mreal x1,mreal x2, m
mglStartThread(mgl_resize,0,mx*my*mz,r->a,d->a,par,nn);
return r;
}
-HMDT mgl_data_resize(HCDT d, long mx,long my,long mz)
+HMDT MGL_EXPORT mgl_data_resize(HCDT d, long mx,long my,long mz)
{ return mgl_data_resize_box(d, mx,my,mz,0,1,0,1,0,1); }
-uintptr_t mgl_data_resize_(uintptr_t *d, int *mx,int *my,int *mz)
+uintptr_t MGL_EXPORT mgl_data_resize_(uintptr_t *d, int *mx,int *my,int *mz)
{ return uintptr_t(mgl_data_resize(_DT_,*mx,*my,*mz)); }
-uintptr_t mgl_data_resize_box_(uintptr_t *d, int *mx,int *my,int *mz, mreal *x1,mreal *x2, mreal *y1,mreal *y2, mreal *z1,mreal *z2)
+uintptr_t MGL_EXPORT mgl_data_resize_box_(uintptr_t *d, int *mx,int *my,int *mz, mreal *x1,mreal *x2, mreal *y1,mreal *y2, mreal *z1,mreal *z2)
{ return uintptr_t(mgl_data_resize_box(_DT_,*mx,*my,*mz,*x1,*x2,*y1,*y2,*z1,*z2)); }
//-----------------------------------------------------------------------------
-void *mgl_combine(void *par)
+MGL_NO_EXPORT void *mgl_combine(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i0, nx=t->p[0];
@@ -266,7 +267,7 @@ void *mgl_combine(void *par)
for(i0=t->id;i0<t->n;i0+=mglNumThr) b[i0] = c[i0%nx]*d[i0/nx];
return 0;
}
-HMDT mgl_data_combine(HCDT d1, HCDT d2)
+HMDT MGL_EXPORT mgl_data_combine(HCDT d1, HCDT d2)
{ // NOTE: only for mglData (for speeding up)
const mglData *a=dynamic_cast<const mglData *>(d1);
const mglData *b=dynamic_cast<const mglData *>(d2);
@@ -281,10 +282,10 @@ HMDT mgl_data_combine(HCDT d1, HCDT d2)
mglStartThread(mgl_combine,0,n1*n2,r->a,a->a,b->a,&n1);
return r;
}
-uintptr_t mgl_data_combine_(uintptr_t *a, uintptr_t *b)
+uintptr_t MGL_EXPORT mgl_data_combine_(uintptr_t *a, uintptr_t *b)
{ return uintptr_t(mgl_data_combine(_DA_(a),_DA_(b))); }
//-----------------------------------------------------------------------------
-void *mgl_sum_z(void *par)
+MGL_NO_EXPORT void *mgl_sum_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -297,7 +298,7 @@ void *mgl_sum_z(void *par)
}
return 0;
}
-void *mgl_sum_y(void *par)
+MGL_NO_EXPORT void *mgl_sum_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -311,7 +312,7 @@ void *mgl_sum_y(void *par)
}
return 0;
}
-void *mgl_sum_x(void *par)
+MGL_NO_EXPORT void *mgl_sum_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -325,7 +326,7 @@ void *mgl_sum_x(void *par)
}
return 0;
}
-HMDT mgl_data_sum(HCDT dat, const char *dir)
+HMDT MGL_EXPORT mgl_data_sum(HCDT dat, const char *dir)
{
if(!dir || *dir==0) return 0;
long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
@@ -356,11 +357,11 @@ HMDT mgl_data_sum(HCDT dat, const char *dir)
memcpy(r->a,b,p[0]*p[1]*p[2]*sizeof(mreal));
delete []b; delete []c; return r;
}
-uintptr_t mgl_data_sum_(uintptr_t *d, const char *dir,int l)
+uintptr_t MGL_EXPORT mgl_data_sum_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
uintptr_t r=uintptr_t(mgl_data_sum(_DT_,s)); delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_max_z(void *par)
+MGL_NO_EXPORT void *mgl_max_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -370,7 +371,7 @@ void *mgl_max_z(void *par)
for(j=1,b[i]=a[i];j<nz;j++) if(b[i]<a[i+nn*j]) b[i] = a[i+nn*j];
return 0;
}
-void *mgl_max_y(void *par)
+MGL_NO_EXPORT void *mgl_max_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -383,7 +384,7 @@ void *mgl_max_y(void *par)
}
return 0;
}
-void *mgl_max_x(void *par)
+MGL_NO_EXPORT void *mgl_max_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -396,7 +397,7 @@ void *mgl_max_x(void *par)
}
return 0;
}
-HMDT mgl_data_max_dir(HCDT dat, const char *dir)
+HMDT MGL_EXPORT mgl_data_max_dir(HCDT dat, const char *dir)
{
if(!dir || *dir==0) return 0;
long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
@@ -427,11 +428,11 @@ HMDT mgl_data_max_dir(HCDT dat, const char *dir)
memcpy(r->a,b,p[0]*p[1]*p[2]*sizeof(mreal));
delete []b; delete []c; return r;
}
-uintptr_t mgl_data_max_dir_(uintptr_t *d, const char *dir,int l)
+uintptr_t MGL_EXPORT mgl_data_max_dir_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
uintptr_t r=uintptr_t(mgl_data_max_dir(_DT_,s)); delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_min_z(void *par)
+MGL_NO_EXPORT void *mgl_min_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j, nz=t->p[2], nn=t->n;
@@ -441,7 +442,7 @@ void *mgl_min_z(void *par)
for(j=1,b[i]=a[i];j<nz;j++) if(b[i]>a[i+nn*j]) b[i] = a[i+nn*j];
return 0;
}
-void *mgl_min_y(void *par)
+MGL_NO_EXPORT void *mgl_min_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], ny=t->p[1], nn=t->n;
@@ -454,7 +455,7 @@ void *mgl_min_y(void *par)
}
return 0;
}
-void *mgl_min_x(void *par)
+MGL_NO_EXPORT void *mgl_min_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k, nx=t->p[0], nn=t->n;
@@ -467,7 +468,7 @@ void *mgl_min_x(void *par)
}
return 0;
}
-HMDT mgl_data_min_dir(HCDT dat, const char *dir)
+HMDT MGL_EXPORT mgl_data_min_dir(HCDT dat, const char *dir)
{
if(!dir || *dir==0) return 0;
long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
@@ -498,11 +499,11 @@ HMDT mgl_data_min_dir(HCDT dat, const char *dir)
memcpy(r->a,b,p[0]*p[1]*p[2]*sizeof(mreal));
delete []b; delete []c; return r;
}
-uintptr_t mgl_data_min_dir_(uintptr_t *d, const char *dir,int l)
+uintptr_t MGL_EXPORT mgl_data_min_dir_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
uintptr_t r=uintptr_t(mgl_data_min_dir(_DT_,s)); delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_mom_z(void *par)
+MGL_NO_EXPORT void *mgl_mom_z(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k,ii;
@@ -524,7 +525,7 @@ void *mgl_mom_z(void *par)
}
return 0;
}
-void *mgl_mom_y(void *par)
+MGL_NO_EXPORT void *mgl_mom_y(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k,ii;
@@ -546,7 +547,7 @@ void *mgl_mom_y(void *par)
}
return 0;
}
-void *mgl_mom_x(void *par)
+MGL_NO_EXPORT void *mgl_mom_x(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k,ii;
@@ -568,7 +569,7 @@ void *mgl_mom_x(void *par)
}
return 0;
}
-HMDT mgl_data_momentum(HCDT dat, char dir, const char *how)
+HMDT MGL_EXPORT mgl_data_momentum(HCDT dat, char dir, const char *how)
{ // NOTE: only for mglData (for speeding up)
long nx=dat->GetNx(),ny=dat->GetNy(),nz=dat->GetNz();
const mglData *d=dynamic_cast<const mglData *>(dat);
@@ -584,12 +585,12 @@ HMDT mgl_data_momentum(HCDT dat, char dir, const char *how)
{ b->Create(nz); mglStartThread(mgl_mom_z,0,nz,b->a,d->a,0,p,&eq); }
return b;
}
-uintptr_t mgl_data_momentum_(uintptr_t *d, char *dir, const char *how, int,int l)
+uintptr_t MGL_EXPORT mgl_data_momentum_(uintptr_t *d, char *dir, const char *how, int,int l)
{ char *s=new char[l+1]; memcpy(s,how,l); s[l]=0;
uintptr_t r=uintptr_t(mgl_data_momentum(_DT_,*dir, s));
delete []s; return r; }
//-----------------------------------------------------------------------------
-void *mgl_eval(void *par)
+MGL_NO_EXPORT void *mgl_eval(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0], ny=t->p[1], nz=t->p[2], n1=t->p[3], nn=t->n;
@@ -603,7 +604,7 @@ void *mgl_eval(void *par)
}
return 0;
}
-void *mgl_eval_s(void *par)
+MGL_NO_EXPORT void *mgl_eval_s(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0], ny=t->p[1], nz=t->p[2], n1=t->p[3], nn=t->n;
@@ -618,7 +619,7 @@ void *mgl_eval_s(void *par)
}
return 0;
}
-HMDT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm)
+HMDT MGL_EXPORT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm)
{
mglData *r=new mglData;
const mglData *d=dynamic_cast<const mglData *>(dat);
@@ -636,10 +637,10 @@ HMDT mgl_data_evaluate(HCDT dat, HCDT idat, HCDT jdat, HCDT kdat, int norm)
else mglStartThread(mgl_eval_s,0,n,r->a,0,i->a,p,dat,j?j->a:0,k?k->a:0);
return r;
}
-uintptr_t mgl_data_evaluate_(uintptr_t *d, uintptr_t *idat, uintptr_t *jdat, uintptr_t *kdat, int *norm)
+uintptr_t MGL_EXPORT mgl_data_evaluate_(uintptr_t *d, uintptr_t *idat, uintptr_t *jdat, uintptr_t *kdat, int *norm)
{ return uintptr_t(mgl_data_evaluate(_DT_,_DA_(idat),_DA_(jdat),_DA_(kdat),*norm)); }
//-----------------------------------------------------------------------------
-void mgl_data_fourier(HMDT re, HMDT im, const char *dir)
+void MGL_EXPORT mgl_data_fourier(HMDT re, HMDT im, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -690,11 +691,11 @@ void mgl_data_fourier(HMDT re, HMDT im, const char *dir)
delete []a;
#endif
}
-void mgl_data_fourier_(uintptr_t *re, uintptr_t *im, const char *dir, int l)
+void MGL_EXPORT mgl_data_fourier_(uintptr_t *re, uintptr_t *im, const char *dir, int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_fourier(_DM_(re),_DM_(im),s); delete []s; }
//-----------------------------------------------------------------------------
-HMDT mgl_data_stfa(HCDT re, HCDT im, long dn, char dir)
+HMDT MGL_EXPORT mgl_data_stfa(HCDT re, HCDT im, long dn, char dir)
{
mglData *d=new mglData;
#if MGL_HAVE_GSL
@@ -764,10 +765,10 @@ HMDT mgl_data_stfa(HCDT re, HCDT im, long dn, char dir)
#endif
return d;
}
-uintptr_t mgl_data_stfa_(uintptr_t *re, uintptr_t *im, int *dn, char *dir, int)
+uintptr_t MGL_EXPORT mgl_data_stfa_(uintptr_t *re, uintptr_t *im, int *dn, char *dir, int)
{ return uintptr_t(mgl_data_stfa(_DA_(re),_DA_(im),*dn,*dir)); }
//-----------------------------------------------------------------------------
-void mgl_data_fill_sample(HMDT d, const char *how)
+void MGL_EXPORT mgl_data_fill_sample(HMDT d, const char *how)
{
if(!how || *how==0) return;
bool xx = strchr(how,'x');
@@ -789,11 +790,11 @@ void mgl_data_fill_sample(HMDT d, const char *how)
}
for(i=1;i<d->ny*d->nz;i++) memcpy(aa+i*n,aa,n*sizeof(mreal));
}
-void mgl_data_fill_sample_(uintptr_t *d, const char *how,int l)
+void MGL_EXPORT mgl_data_fill_sample_(uintptr_t *d, const char *how,int l)
{ char *s=new char[l+1]; memcpy(s,how,l); s[l]=0;
mgl_data_fill_sample(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_hankel(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_hankel(HMDT d, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -841,11 +842,11 @@ void mgl_data_hankel(HMDT d, const char *dir)
if(ai) { delete []ai; delete []af; gsl_dht_free(dht); }
#endif
}
-void mgl_data_hankel_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_hankel_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_hankel(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_cosfft(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_cosfft(HMDT d, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -900,11 +901,11 @@ void mgl_data_cosfft(HMDT d, const char *dir)
gsl_fft_complex_wavetable_free(wt); }
#endif
}
-void mgl_data_cosfft_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_cosfft_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_cosfft(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_data_sinfft(HMDT d, const char *dir)
+void MGL_EXPORT mgl_data_sinfft(HMDT d, const char *dir)
{
#if MGL_HAVE_GSL
if(!dir || *dir==0) return;
@@ -959,11 +960,11 @@ void mgl_data_sinfft(HMDT d, const char *dir)
gsl_fft_complex_wavetable_free(wt); }
#endif
}
-void mgl_data_sinfft_(uintptr_t *d, const char *dir,int l)
+void MGL_EXPORT mgl_data_sinfft_(uintptr_t *d, const char *dir,int l)
{ char *s=new char[l+1]; memcpy(s,dir,l); s[l]=0;
mgl_data_sinfft(_DT_,s); delete []s; }
//-----------------------------------------------------------------------------
-HMDT mgl_transform_a(HCDT am, HCDT ph, const char *tr)
+HMDT MGL_EXPORT mgl_transform_a(HCDT am, HCDT ph, const char *tr)
{
long nx = am->GetNx(), ny = am->GetNy(), nz = am->GetNz();
if(nx*ny*nz != ph->GetNx()*ph->GetNy()*ph->GetNz() || !tr || tr[0]==0)
@@ -980,7 +981,7 @@ HMDT mgl_transform_a(HCDT am, HCDT ph, const char *tr)
return mgl_transform(&re, &im, tr);
}
//-----------------------------------------------------------------------------
-HMDT mgl_transform(HCDT re, HCDT im, const char *tr)
+HMDT MGL_EXPORT mgl_transform(HCDT re, HCDT im, const char *tr)
{
if(!tr || *tr==0) return 0;
long nx = re->GetNx(), ny = re->GetNy(), nz = re->GetNz();
@@ -1036,16 +1037,16 @@ HMDT mgl_transform(HCDT re, HCDT im, const char *tr)
return d;
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_transform_a_(uintptr_t *am, uintptr_t *ph, const char *tr, int l)
+uintptr_t MGL_EXPORT mgl_transform_a_(uintptr_t *am, uintptr_t *ph, const char *tr, int l)
{ char *s=new char[l+1]; memcpy(s,tr,l); s[l]=0;
uintptr_t res = uintptr_t(mgl_transform_a(_DA_(am),_DA_(ph),s));
delete []s; return res; }
-uintptr_t mgl_transform_(uintptr_t *re, uintptr_t *im, const char *tr, int l)
+uintptr_t MGL_EXPORT mgl_transform_(uintptr_t *re, uintptr_t *im, const char *tr, int l)
{ char *s=new char[l+1]; memcpy(s,tr,l); s[l]=0;
uintptr_t res = uintptr_t(mgl_transform(_DA_(re),_DA_(im),s));
delete []s; return res; }
//-----------------------------------------------------------------------------
-void *mgl_eqmul(void *par)
+MGL_NO_EXPORT void *mgl_eqmul(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0];
@@ -1054,7 +1055,7 @@ void *mgl_eqmul(void *par)
for(i=t->id;i<t->n;i+=mglNumThr) b[i] *= a[i%nx];
return 0;
}
-void mgl_data_mul_dat(HMDT d, HCDT a)
+void MGL_EXPORT mgl_data_mul_dat(HMDT d, HCDT a)
{
long n, nx=d->nx, ny=d->ny, nz=d->nz;
const mglData *b = dynamic_cast<const mglData *>(a);
@@ -1071,13 +1072,13 @@ void mgl_data_mul_dat(HMDT d, HCDT a)
d->a[i+nx*(j+ny*k)] *= a->v(i,j,k);
}
//-----------------------------------------------------------------------------
-void mgl_data_mul_num(HMDT d, mreal a)
+void MGL_EXPORT mgl_data_mul_num(HMDT d, mreal a)
{
long n=1, nx=d->nx, ny=d->ny, nz=d->nz; mreal aa=a;
mglStartThread(mgl_eqmul,0,nx*ny*nz,d->a,&aa,0,&n);
}
//-----------------------------------------------------------------------------
-void *mgl_eqdiv(void *par)
+MGL_NO_EXPORT void *mgl_eqdiv(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0];
@@ -1086,7 +1087,7 @@ void *mgl_eqdiv(void *par)
for(i=t->id;i<t->n;i+=mglNumThr) b[i] /= a[i%nx];
return 0;
}
-void mgl_data_div_dat(HMDT d, HCDT a)
+void MGL_EXPORT mgl_data_div_dat(HMDT d, HCDT a)
{
long n, nx=d->nx, ny=d->ny, nz=d->nz;
const mglData *b = dynamic_cast<const mglData *>(a);
@@ -1103,13 +1104,13 @@ void mgl_data_div_dat(HMDT d, HCDT a)
d->a[i+nx*(j+ny*k)] /= a->v(i,j,k);
}
//-----------------------------------------------------------------------------
-void mgl_data_div_num(HMDT d, mreal a)
+void MGL_EXPORT mgl_data_div_num(HMDT d, mreal a)
{
long n=1, nx=d->nx, ny=d->ny, nz=d->nz; mreal aa=a;
mglStartThread(mgl_eqdiv,0,nx*ny*nz,d->a,&aa,0,&n);
}
//-----------------------------------------------------------------------------
-void *mgl_eqadd(void *par)
+MGL_NO_EXPORT void *mgl_eqadd(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0];
@@ -1118,7 +1119,7 @@ void *mgl_eqadd(void *par)
for(i=t->id;i<t->n;i+=mglNumThr) b[i] += a[i%nx];
return 0;
}
-void mgl_data_add_dat(HMDT d, HCDT a)
+void MGL_EXPORT mgl_data_add_dat(HMDT d, HCDT a)
{
long n, nx=d->nx, ny=d->ny, nz=d->nz;
const mglData *b = dynamic_cast<const mglData *>(a);
@@ -1135,13 +1136,13 @@ void mgl_data_add_dat(HMDT d, HCDT a)
d->a[i+nx*(j+ny*k)] += a->v(i,j,k);
}
//-----------------------------------------------------------------------------
-void mgl_data_add_num(HMDT d, mreal a)
+void MGL_EXPORT mgl_data_add_num(HMDT d, mreal a)
{
long n=1, nx=d->nx, ny=d->ny, nz=d->nz; mreal aa=a;
mglStartThread(mgl_eqadd,0,nx*ny*nz,d->a,&aa,0,&n);
}
//-----------------------------------------------------------------------------
-void *mgl_eqsub(void *par)
+MGL_NO_EXPORT void *mgl_eqsub(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i, nx=t->p[0];
@@ -1150,7 +1151,7 @@ void *mgl_eqsub(void *par)
for(i=t->id;i<t->n;i+=mglNumThr) b[i] -= a[i%nx];
return 0;
}
-void mgl_data_sub_dat(HMDT d, HCDT a)
+void MGL_EXPORT mgl_data_sub_dat(HMDT d, HCDT a)
{
long n, nx=d->nx, ny=d->ny, nz=d->nz;
const mglData *b = dynamic_cast<const mglData *>(a);
@@ -1167,22 +1168,22 @@ void mgl_data_sub_dat(HMDT d, HCDT a)
d->a[i+nx*(j+ny*k)] -= a->v(i,j,k);
}
//-----------------------------------------------------------------------------
-void mgl_data_sub_num(HMDT d, mreal a)
+void MGL_EXPORT mgl_data_sub_num(HMDT d, mreal a)
{
long n=1, nx=d->nx, ny=d->ny, nz=d->nz; mreal aa=a;
mglStartThread(mgl_eqsub,0,nx*ny*nz,d->a,&aa,0,&n);
}
//-----------------------------------------------------------------------------
-void mgl_data_mul_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_mul_dat(_DT_, _DA_(b)); }
-void mgl_data_div_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_div_dat(_DT_, _DA_(b)); }
-void mgl_data_add_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_add_dat(_DT_, _DA_(b)); }
-void mgl_data_sub_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_sub_dat(_DT_, _DA_(b)); }
-void mgl_data_mul_num_(uintptr_t *d, mreal *b) { mgl_data_mul_num(_DT_, *b); }
-void mgl_data_div_num_(uintptr_t *d, mreal *b) { mgl_data_div_num(_DT_, *b); }
-void mgl_data_add_num_(uintptr_t *d, mreal *b) { mgl_data_add_num(_DT_, *b); }
-void mgl_data_sub_num_(uintptr_t *d, mreal *b) { mgl_data_sub_num(_DT_, *b); }
+void MGL_EXPORT mgl_data_mul_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_mul_dat(_DT_, _DA_(b)); }
+void MGL_EXPORT mgl_data_div_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_div_dat(_DT_, _DA_(b)); }
+void MGL_EXPORT mgl_data_add_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_add_dat(_DT_, _DA_(b)); }
+void MGL_EXPORT mgl_data_sub_dat_(uintptr_t *d, uintptr_t *b) { mgl_data_sub_dat(_DT_, _DA_(b)); }
+void MGL_EXPORT mgl_data_mul_num_(uintptr_t *d, mreal *b) { mgl_data_mul_num(_DT_, *b); }
+void MGL_EXPORT mgl_data_div_num_(uintptr_t *d, mreal *b) { mgl_data_div_num(_DT_, *b); }
+void MGL_EXPORT mgl_data_add_num_(uintptr_t *d, mreal *b) { mgl_data_add_num(_DT_, *b); }
+void MGL_EXPORT mgl_data_sub_num_(uintptr_t *d, mreal *b) { mgl_data_sub_num(_DT_, *b); }
//-----------------------------------------------------------------------------
-void mgl_hist_p(mglThreadD *t,mreal *a)
+void MGL_NO_EXPORT mgl_hist_p(mglThreadD *t,mreal *a)
{
register long i,j,n=t[0].p[0];
mreal *b;
@@ -1194,7 +1195,7 @@ void mgl_hist_p(mglThreadD *t,mreal *a)
delete []b;
}
}
-void *mgl_hist_1(void *par)
+MGL_NO_EXPORT void *mgl_hist_1(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,k, nn=t->n, n = t->p[0];
@@ -1208,7 +1209,7 @@ void *mgl_hist_1(void *par)
}
t->a = b; return 0;
}
-void *mgl_hist_2(void *par)
+MGL_NO_EXPORT void *mgl_hist_2(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,k, nn=t->n, n = t->p[0];
@@ -1230,7 +1231,7 @@ void *mgl_hist_2(void *par)
}
t->a = b; return 0;
}
-HMDT mgl_data_hist(HCDT dat, long n, mreal v1, mreal v2, long nsub)
+HMDT MGL_EXPORT mgl_data_hist(HCDT dat, long n, mreal v1, mreal v2, long nsub)
{
mglData *b=new mglData; // NOTE: For mglData only!
const mglData *d = dynamic_cast<const mglData *>(dat);
@@ -1244,7 +1245,7 @@ HMDT mgl_data_hist(HCDT dat, long n, mreal v1, mreal v2, long nsub)
return b;
}
//-----------------------------------------------------------------------------
-HMDT mgl_data_hist_w(HCDT dat, HCDT weight, long n, mreal v1, mreal v2, long nsub)
+HMDT MGL_EXPORT mgl_data_hist_w(HCDT dat, HCDT weight, long n, mreal v1, mreal v2, long nsub)
{
mglData *b=new mglData; // NOTE: For mglData only!
const mglData *d = dynamic_cast<const mglData *>(dat);
@@ -1260,9 +1261,9 @@ HMDT mgl_data_hist_w(HCDT dat, HCDT weight, long n, mreal v1, mreal v2, long nsu
return b;
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_data_hist_(uintptr_t *d, int *n, mreal *v1, mreal *v2, int *nsub)
+uintptr_t MGL_EXPORT mgl_data_hist_(uintptr_t *d, int *n, mreal *v1, mreal *v2, int *nsub)
{ return uintptr_t(mgl_data_hist(_DT_,*n,*v1,*v2,*nsub)); }
-uintptr_t mgl_data_hist_w_(uintptr_t *d, uintptr_t *w, int *n, mreal *v1, mreal *v2, int *nsub)
+uintptr_t MGL_EXPORT mgl_data_hist_w_(uintptr_t *d, uintptr_t *w, int *n, mreal *v1, mreal *v2, int *nsub)
{ return uintptr_t(mgl_data_hist_w(_DT_,_DA_(w),*n,*v1,*v2,*nsub)); }
//-----------------------------------------------------------------------------
mreal mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mreal z)
@@ -1304,13 +1305,13 @@ mreal mglLinear(const mreal *a, long nx, long ny, long nz, mreal x, mreal y, mre
return b;
}
//-----------------------------------------------------------------------------
-long mgl_idx_var;
-int mgl_cmd_idx(const void *a, const void *b)
+long MGL_NO_EXPORT mgl_idx_var;
+int MGL_NO_EXPORT mgl_cmd_idx(const void *a, const void *b)
{
mreal *aa = (mreal *)a, *bb = (mreal *)b;
return (aa[mgl_idx_var]>bb[mgl_idx_var] ? 1:(aa[mgl_idx_var]<bb[mgl_idx_var]?-1:0) );
}
-void mgl_data_sort(HMDT dat, long idx, long idy)
+void MGL_EXPORT mgl_data_sort(HMDT dat, long idx, long idy)
{
mglData *d = dynamic_cast<mglData *>(dat);
if(!d || idx>=d->nx || idx<0) return;
@@ -1321,6 +1322,6 @@ void mgl_data_sort(HMDT dat, long idx, long idy)
else qsort(d->a, d->nz, d->ny*d->nx*sizeof(mreal), mgl_cmd_idx);
}
//-----------------------------------------------------------------------------
-void mgl_data_sort_(uintptr_t *d, int *idx, int *idy)
+void MGL_EXPORT mgl_data_sort_(uintptr_t *d, int *idx, int *idy)
{ mgl_data_sort(_DT_,*idx,*idy); }
//-----------------------------------------------------------------------------
diff --git a/src/data_png.cpp b/src/data_png.cpp
index 5cb6153..6c527b3 100644
--- a/src/data_png.cpp
+++ b/src/data_png.cpp
@@ -22,7 +22,7 @@
#include <png.h>
#endif
//-----------------------------------------------------------------------------
-long mgl_col_dif(unsigned char *c1,unsigned char *c2,bool sum)
+long MGL_NO_EXPORT mgl_col_dif(unsigned char *c1,unsigned char *c2,bool sum)
{
long res,d1=abs(long(c1[0])-long(c2[0])),
d2=abs(long(c1[1])-long(c2[1])),d3=abs(long(c1[2])-long(c2[2]));
@@ -31,7 +31,7 @@ long mgl_col_dif(unsigned char *c1,unsigned char *c2,bool sum)
return res;
}
//-----------------------------------------------------------------------------
-unsigned char *mgl_create_scheme(const char *scheme,long &num)
+MGL_NO_EXPORT unsigned char *mgl_create_scheme(const char *scheme,long &num)
{
unsigned char *c=0,*cc=new unsigned char[3*strlen(scheme)+3];
long nc=1,np=0;
@@ -64,7 +64,7 @@ unsigned char *mgl_create_scheme(const char *scheme,long &num)
return c;
}
//-----------------------------------------------------------------------------
-void mgl_data_import(HMDT d, const char *fname, const char *scheme,mreal v1,mreal v2)
+void MGL_EXPORT mgl_data_import(HMDT d, const char *fname, const char *scheme,mreal v1,mreal v2)
{
#if MGL_HAVE_PNG
if(v1>=v2) return;
@@ -112,7 +112,7 @@ void mgl_data_import(HMDT d, const char *fname, const char *scheme,mreal v1,mrea
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_export(HCDT dd, const char *fname, const char *scheme,mreal v1,mreal v2,long ns)
+void MGL_EXPORT mgl_data_export(HCDT dd, const char *fname, const char *scheme,mreal v1,mreal v2,long ns)
{
#if MGL_HAVE_PNG
register long i,j,k;
@@ -152,12 +152,12 @@ void mgl_data_export(HCDT dd, const char *fname, const char *scheme,mreal v1,mre
delete []c;
FILE *fp = fopen(fname, "wb");
- if (!fp) return;
+ if (!fp) { free(p); free(d); return; }
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0);
- if (!png_ptr) { fclose(fp); return; }
+ if (!png_ptr) { free(p); free(d); fclose(fp); return; }
png_infop info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr)
- { png_destroy_write_struct(&png_ptr,0); fclose(fp); return; }
+ { png_destroy_write_struct(&png_ptr,0); free(p); free(d); fclose(fp); return; }
png_init_io(png_ptr, fp);
png_set_filter(png_ptr, 0, PNG_ALL_FILTERS);
png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
@@ -173,14 +173,14 @@ void mgl_data_export(HCDT dd, const char *fname, const char *scheme,mreal v1,mre
#endif
}
//-----------------------------------------------------------------------------
-void mgl_data_export_(uintptr_t *d, const char *fname, const char *scheme,mreal *v1,mreal *v2,int *ns,int l,int n)
+void MGL_EXPORT mgl_data_export_(uintptr_t *d, const char *fname, const char *scheme,mreal *v1,mreal *v2,int *ns,int l,int n)
{
char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,scheme,n); f[n]=0;
mgl_data_export(_DT_,s,f,*v1,*v2,*ns);
delete []s; delete []f;
}
-void mgl_data_import_(uintptr_t *d, const char *fname, const char *scheme,mreal *v1,mreal *v2,int l,int n)
+void MGL_EXPORT mgl_data_import_(uintptr_t *d, const char *fname, const char *scheme,mreal *v1,mreal *v2,int l,int n)
{
char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,scheme,n); f[n]=0;
diff --git a/src/def_font.cpp b/src/def_font.cpp
index cfd080d..e2b5de1 100644
--- a/src/def_font.cpp
+++ b/src/def_font.cpp
@@ -1,6 +1,7 @@
-unsigned mgl_numg=411, mgl_cur=243136;
-float mgl_fact=35.7143;
-long mgl_gen_fnt[411][6] = {
+#include "mgl2/define.h"
+unsigned MGL_EXPORT mgl_numg=411, mgl_cur=243136;
+float MGL_EXPORT mgl_fact=35.7143;
+long MGL_EXPORT mgl_gen_fnt[411][6] = {
{0x21,166,41,0,39,164},
{0x22,204,43,398,38,570},
{0x23,250,33,798,32,930},
@@ -413,7 +414,7 @@ long mgl_gen_fnt[411][6] = {
{0x226f,342,20,242874,19,242954},
{0x27c2,346,8,243068,6,243100}
};
-short mgl_buf_fnt[243136] = {
+short MGL_EXPORT mgl_buf_fnt[243136] = {
88,88,94,88,117,278,117,282,118,286,118,297,117,311,113,322,108,331,101,336,92,338,81,336,74,331,69,323,66,312,65,300,65,289,66,284,66,278,16383,16383,118,21,116,30,113,37,107,43,100,47,92,49,83,47,76,43,70,37,66,30,65,22,66,13,70,6,75,0,82,-2,91,-3,100,-2,107,0,113,6,116,13,118,21,150,215,154,243,158,268,162,289,165,306,166,318,165,324,162,330,157,334,151,337,145,338,138,337,132,334,127,330,124,324,123,316,124,307,126,291,129,270,134,244,139,215,16383,16383,65,215,70,243,75,268,78,289,80,306,81,318,80,324,77,330,73,334,67,337,60,338,53,337,47,334,42,330,40,324,39,316,39,307,42,291,45,270,
107,43,107,0,113,37,113,37,107,0,113,6,113,37,113,6,116,30,116,30,113,6,116,13,116,30,116,13,118,21,65,22,66,13,66,30,66,30,66,13,70,6,66,30,70,6,70,37,70,37,70,6,75,0,70,37,75,0,76,43,76,43,75,0,82,-2,76,43,82,-2,83,47,83,47,82,-2,91,-3,83,47,91,-3,92,49,92,49,91,-3,100,-2,92,49,100,-2,100,47,100,47,100,-2,107,0,100,47,107,0,107,43,118,297,117,311,117,278,118,297,117,278,117,282,118,297,117,282,118,286,118,297,118,286,118,290,118,297,118,290,118,294,117,278,117,311,113,322,117,278,113,322,108,331,117,278,108,331,101,336,117,278,101,336,94,88,92,338,81,336,88,88,92,338,88,88,94,88,92,338,94,88,101,336,66,284,66,278,69,323,69,323,66,278,88,88,69,323,88,88,74,331,74,331,88,88,81,336,66,312,65,300,65,297,66,312,65,297,65,293,66,312,65,293,65,289,66,312,65,289,66,284,66,312,66,284,69,323,
150,215,154,243,158,268,162,289,165,306,166,318,165,324,162,330,157,334,151,337,145,338,138,337,132,334,127,330,124,324,123,316,124,307,126,291,129,270,134,244,139,215,16383,16383,65,215,70,243,75,268,78,289,80,306,81,318,80,324,77,330,73,334,67,337,60,338,53,337,47,334,42,330,40,324,39,316,39,307,42,291,45,270,50,244,55,215,248,203,248,230,200,230,214,331,185,331,171,230,104,230,119,331,90,331,75,230,17,230,17,203,71,203,60,136,3,136,3,108,56,108,40,0,69,0,85,108,152,108,137,0,166,0,181,108,235,108,235,136,185,136,195,203,16383,16383,166,203,156,136,89,136,100,203,132,319,154,314,172,304,186,291,197,273,205,250,213,250,213,305,202,314,189,321,
diff --git a/src/eval.cpp b/src/eval.cpp
index 01216b0..8c2982f 100644
--- a/src/eval.cpp
+++ b/src/eval.cpp
@@ -20,6 +20,7 @@
#include <time.h>
#include <ctype.h>
+#include "mgl2/data_cf.h"
#include "mgl2/eval.h"
#if MGL_HAVE_GSL
@@ -124,19 +125,14 @@ EQ_CL, // Clausen function
#define M_PI 3.14159265358979323846
#endif
//-----------------------------------------------------------------------------
-extern "C"{
-void mgl_srnd(long seed);
-double mgl_rnd();
-double mgl_ipow(double x,int n);
-}
int mglFormula::Error=0;
bool mglCheck(char *str,int n);
int mglFindInText(char *str,const char *lst);
//-----------------------------------------------------------------------------
#if MGL_HAVE_GSL
-gsl_rng *mgl_rng=0; // NOTE: should be deleted by gsl_rng_free() but I don't know where :(
+MGL_NO_EXPORT gsl_rng *mgl_rng=0; // NOTE: should be deleted by gsl_rng_free() but I don't know where :(
#endif
-void mgl_srnd(long seed)
+void MGL_EXPORT mgl_srnd(long seed)
{
#if MGL_HAVE_GSL
if(mgl_rng==0)
@@ -149,7 +145,9 @@ void mgl_srnd(long seed)
srand(seed);
#endif
}
-double mgl_rnd()
+void MGL_EXPORT mgl_srnd_(int *seed) { mgl_srnd(*seed); }
+//-----------------------------------------------------------------------------
+double MGL_EXPORT mgl_rnd()
{
#if MGL_HAVE_GSL
if(mgl_rng==0)
@@ -164,6 +162,7 @@ double mgl_rnd()
return rand()/(RAND_MAX-1.);
#endif
}
+double MGL_EXPORT mgl_rnd_() { return mgl_rnd(); }
//-----------------------------------------------------------------------------
mglFormula::~mglFormula()
{
@@ -458,37 +457,37 @@ mreal mglFormula::CalcD(const mreal var[MGL_VS], char diff) const
return CalcDIn(diff-'a', var);
}
//-----------------------------------------------------------------------------
-double cand(double a,double b) {return a&&b?1:0;}
-double cor(double a,double b) {return a||b?1:0;}
-double ceq(double a,double b) {return a==b?1:0;}
-double clt(double a,double b) {return a<b?1:0;}
-double cgt(double a,double b) {return a>b?1:0;}
-double add(double a,double b) {return a+b;}
-double sub(double a,double b) {return a-b;}
-double mul(double a,double b) {return a&&b?a*b:0;}
-double div(double a,double b) {return b?a/b:NAN;}
-double ipw(double a,double b) {return fabs(b-int(b))<1e-5 ? mgl_ipow(a,int(b)) : pow(a,b);}
-double llg(double a,double b) {return log(a)/log(b);}
+double MGL_NO_EXPORT cand(double a,double b) {return a&&b?1:0;}
+double MGL_NO_EXPORT cor(double a,double b) {return a||b?1:0;}
+double MGL_NO_EXPORT ceq(double a,double b) {return a==b?1:0;}
+double MGL_NO_EXPORT clt(double a,double b) {return a<b?1:0;}
+double MGL_NO_EXPORT cgt(double a,double b) {return a>b?1:0;}
+double MGL_NO_EXPORT add(double a,double b) {return a+b;}
+double MGL_NO_EXPORT sub(double a,double b) {return a-b;}
+double MGL_NO_EXPORT mul(double a,double b) {return a&&b?a*b:0;}
+double MGL_NO_EXPORT div(double a,double b) {return b?a/b:NAN;}
+double MGL_NO_EXPORT ipw(double a,double b) {return fabs(b-int(b))<1e-5 ? mgl_ipow(a,int(b)) : pow(a,b);}
+double MGL_NO_EXPORT llg(double a,double b) {return log(a)/log(b);}
#if MGL_HAVE_GSL
-double gslEllE(double a,double b) {return gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE);}
-double gslEllF(double a,double b) {return gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE);}
-double gslLegP(double a,double b) {return gsl_sf_legendre_Pl(int(a),b);}
-double gslEllEc(double a) {return gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE);}
-double gslEllFc(double a) {return gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE);}
-double gslAi(double a) {return gsl_sf_airy_Ai(a,GSL_PREC_SINGLE);}
-double gslBi(double a) {return gsl_sf_airy_Bi(a,GSL_PREC_SINGLE);}
-double gslAi_d(double a) {return gsl_sf_airy_Ai_deriv(a,GSL_PREC_SINGLE);}
-double gslBi_d(double a) {return gsl_sf_airy_Bi_deriv(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslEllE(double a,double b) {return gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslEllF(double a,double b) {return gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslLegP(double a,double b) {return gsl_sf_legendre_Pl(int(a),b);}
+double MGL_NO_EXPORT gslEllEc(double a) {return gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslEllFc(double a) {return gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslAi(double a) {return gsl_sf_airy_Ai(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslBi(double a) {return gsl_sf_airy_Bi(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslAi_d(double a) {return gsl_sf_airy_Ai_deriv(a,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslBi_d(double a) {return gsl_sf_airy_Bi_deriv(a,GSL_PREC_SINGLE);}
#endif
-double sgn(double a) {return a<0 ? -1:(a>0?1:0);}
-double stp(double a) {return a>0 ? 1:0;}
-double arg(double a,double b) { return atan2(b,a); }
-double mgz1(double) {return 0;}
-double mgz2(double,double) {return 0;}
+double MGL_NO_EXPORT sgn(double a) {return a<0 ? -1:(a>0?1:0);}
+double MGL_NO_EXPORT stp(double a) {return a>0 ? 1:0;}
+double MGL_NO_EXPORT arg(double a,double b) { return atan2(b,a); }
+double MGL_NO_EXPORT mgz1(double) {return 0;}
+double MGL_NO_EXPORT mgz2(double,double) {return 0;}
#ifdef WIN32
-double asinh(double x) { return log(x+sqrt(x*x+1.)); }
-double acosh(double x) { return x>1 ? log(x+sqrt(x*x-1.)) : NAN; }
-double atanh(double x) { return fabs(x)<1 ? log((1.+x)/(1.-x))/2 : NAN; }
+double MGL_NO_EXPORT asinh(double x) { return log(x+sqrt(x*x+1.)); }
+double MGL_NO_EXPORT acosh(double x) { return x>1 ? log(x+sqrt(x*x-1.)) : NAN; }
+double MGL_NO_EXPORT atanh(double x) { return fabs(x)<1 ? log((1.+x)/(1.-x))/2 : NAN; }
#endif
//-----------------------------------------------------------------------------
typedef double (*func_1)(double);
@@ -569,50 +568,50 @@ mreal mglFormula::CalcIn(const mreal *a1) const
return NAN;
}
//-----------------------------------------------------------------------------
-double mgp(double ,double ) {return 1;}
-double mgm(double ,double ) {return -1;}
-double mul1(double ,double b) {return b;}
-double mul2(double a,double ) {return a;}
-double div1(double ,double b) {return b?1/b:NAN;}
-double div2(double a,double b) {return b?-a/(b*b):NAN;}
-double ipw1(double a,double b) {return b*(fabs(b-int(b))<1e-5 ? mgl_ipow(a,int(b-1)) : pow(a,b-1));}
-double pow1(double a,double b) {return b*pow(a,b-1);}
-double pow2(double a,double b) {return log(a)*pow(a,b);}
-double llg1(double a,double b) {return 1/(a*log(b));}
-double llg2(double a,double b) {return -log(a)/(b*log(b)*log(b));}
-double cos_d(double a) {return -sin(a);}
-double tan_d(double a) {return 1./(cos(a)*cos(a));}
-double asin_d(double a) {return 1./sqrt(1.-a*a);}
-double acos_d(double a) {return -1./sqrt(1.-a*a);}
-double atan_d(double a) {return 1./(1.+a*a);}
-double tanh_d(double a) {return 1./(cosh(a)*cosh(a));}
-double atanh_d(double a){return 1./(1.-a*a);}
-double asinh_d(double a){return 1./sqrt(1.+a*a);}
-double acosh_d(double a){return 1./sqrt(a*a-1.);}
-double sqrt_d(double a) {return 0.5/sqrt(a);}
-double log10_d(double a){return M_LN10/a;}
-double log_d(double a) {return 1./a;}
-double erf_d(double a) {return 2*exp(-a*a)/sqrt(M_PI);}
-double dilog_d(double a){return log(a)/(1.-a);}
-double ei_d(double a) {return exp(a)/a;}
-double si_d(double a) {return a?sin(a)/a:1;}
-double ci_d(double a) {return cos(a)/a;}
-double exp3_d(double a) {return exp(-a*a*a);}
-double e1_d(double a) {return exp(-a)/a;}
-double sinc_d(double a) {return a ? (cos(M_PI*a)/a-sin(M_PI*a)/(M_PI*a*a)) : 0;}
+double MGL_NO_EXPORT mgp(double ,double ) {return 1;}
+double MGL_NO_EXPORT mgm(double ,double ) {return -1;}
+double MGL_NO_EXPORT mul1(double ,double b) {return b;}
+double MGL_NO_EXPORT mul2(double a,double ) {return a;}
+double MGL_NO_EXPORT div1(double ,double b) {return b?1/b:NAN;}
+double MGL_NO_EXPORT div2(double a,double b) {return b?-a/(b*b):NAN;}
+double MGL_NO_EXPORT ipw1(double a,double b) {return b*(fabs(b-int(b))<1e-5 ? mgl_ipow(a,int(b-1)) : pow(a,b-1));}
+double MGL_NO_EXPORT pow1(double a,double b) {return b*pow(a,b-1);}
+double MGL_NO_EXPORT pow2(double a,double b) {return log(a)*pow(a,b);}
+double MGL_NO_EXPORT llg1(double a,double b) {return 1/(a*log(b));}
+double MGL_NO_EXPORT llg2(double a,double b) {return -log(a)/(b*log(b)*log(b));}
+double MGL_NO_EXPORT cos_d(double a) {return -sin(a);}
+double MGL_NO_EXPORT tan_d(double a) {return 1./(cos(a)*cos(a));}
+double MGL_NO_EXPORT asin_d(double a) {return 1./sqrt(1.-a*a);}
+double MGL_NO_EXPORT acos_d(double a) {return -1./sqrt(1.-a*a);}
+double MGL_NO_EXPORT atan_d(double a) {return 1./(1.+a*a);}
+double MGL_NO_EXPORT tanh_d(double a) {return 1./(cosh(a)*cosh(a));}
+double MGL_NO_EXPORT atanh_d(double a){return 1./(1.-a*a);}
+double MGL_NO_EXPORT asinh_d(double a){return 1./sqrt(1.+a*a);}
+double MGL_NO_EXPORT acosh_d(double a){return 1./sqrt(a*a-1.);}
+double MGL_NO_EXPORT sqrt_d(double a) {return 0.5/sqrt(a);}
+double MGL_NO_EXPORT log10_d(double a){return M_LN10/a;}
+double MGL_NO_EXPORT log_d(double a) {return 1./a;}
+double MGL_NO_EXPORT erf_d(double a) {return 2*exp(-a*a)/sqrt(M_PI);}
+double MGL_NO_EXPORT dilog_d(double a){return log(a)/(1.-a);}
+double MGL_NO_EXPORT ei_d(double a) {return exp(a)/a;}
+double MGL_NO_EXPORT si_d(double a) {return a?sin(a)/a:1;}
+double MGL_NO_EXPORT ci_d(double a) {return cos(a)/a;}
+double MGL_NO_EXPORT exp3_d(double a) {return exp(-a*a*a);}
+double MGL_NO_EXPORT e1_d(double a) {return exp(-a)/a;}
+double MGL_NO_EXPORT sinc_d(double a) {return a ? (cos(M_PI*a)/a-sin(M_PI*a)/(M_PI*a*a)) : 0;}
#if MGL_HAVE_GSL
-double e2_d(double a) {return -gsl_sf_expint_E1(a);}
-double gslJnuD(double a,double b) {return 0.5*(gsl_sf_bessel_Jnu(a-1,b)-gsl_sf_bessel_Jnu(a+1,b));}
-double gslYnuD(double a,double b) {return 0.5*(gsl_sf_bessel_Ynu(a-1,b)-gsl_sf_bessel_Ynu(a+1,b));}
-double gslKnuD(double a,double b) {return -(a*gsl_sf_bessel_Knu(a,b)/b +gsl_sf_bessel_Knu(a-1,b));}
-double gslInuD(double a,double b) {return -(a*gsl_sf_bessel_Inu(a,b)/b -gsl_sf_bessel_Inu(a-1,b));}
-double gslEllE1(double a,double b) {return sqrt(1.-sin(a)*sin(a)*b);}
-double gslEllE2(double a,double b) {return (gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE) - gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE))/(2.*b);}
-double gslEllF1(double a,double b) {return 1./sqrt(1.-sin(a)*sin(a)*b);}
-double gslEllF2(double a,double b) {return (gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE) - gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE)*(1.-b))/(2*b*(1.-b)) - sin(2.*a)/(sqrt(1.-sin(a)*sin(a)*b)*2.*(1.-b));}
-double gslE_d(double a) {return (gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE) - gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE))/(2.*a);}
-double gslK_d(double a) {return (gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE) - (1.-a)*gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE))/(2.*a*(1.-a));}
-double gamma_d(double a) {return gsl_sf_psi(a)*gsl_sf_gamma(a);}
+double MGL_NO_EXPORT e2_d(double a) {return -gsl_sf_expint_E1(a);}
+double MGL_NO_EXPORT gslJnuD(double a,double b) {return 0.5*(gsl_sf_bessel_Jnu(a-1,b)-gsl_sf_bessel_Jnu(a+1,b));}
+double MGL_NO_EXPORT gslYnuD(double a,double b) {return 0.5*(gsl_sf_bessel_Ynu(a-1,b)-gsl_sf_bessel_Ynu(a+1,b));}
+double MGL_NO_EXPORT gslKnuD(double a,double b) {return -(a*gsl_sf_bessel_Knu(a,b)/b +gsl_sf_bessel_Knu(a-1,b));}
+double MGL_NO_EXPORT gslInuD(double a,double b) {return -(a*gsl_sf_bessel_Inu(a,b)/b -gsl_sf_bessel_Inu(a-1,b));}
+double MGL_NO_EXPORT gslEllE1(double a,double b) {return sqrt(1.-sin(a)*sin(a)*b);}
+double MGL_NO_EXPORT gslEllE2(double a,double b) {return (gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE) - gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE))/(2.*b);}
+double MGL_NO_EXPORT gslEllF1(double a,double b) {return 1./sqrt(1.-sin(a)*sin(a)*b);}
+double MGL_NO_EXPORT gslEllF2(double a,double b) {return (gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE) - gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE)*(1.-b))/(2*b*(1.-b)) - sin(2.*a)/(sqrt(1.-sin(a)*sin(a)*b)*2.*(1.-b));}
+double MGL_NO_EXPORT gslE_d(double a) {return (gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE) - gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE))/(2.*a);}
+double MGL_NO_EXPORT gslK_d(double a) {return (gsl_sf_ellint_Ecomp(a,GSL_PREC_SINGLE) - (1.-a)*gsl_sf_ellint_Kcomp(a,GSL_PREC_SINGLE))/(2.*a*(1.-a));}
+double MGL_NO_EXPORT gamma_d(double a) {return gsl_sf_psi(a)*gsl_sf_gamma(a);}
#endif
//-----------------------------------------------------------------------------
// evaluation of derivative of embedded (included) expressions
@@ -681,7 +680,7 @@ mreal mglFormula::CalcDIn(int id, const mreal *a1) const
}
//-----------------------------------------------------------------------------
// Check braces correctness
-bool mglCheck(char *str,int n)
+bool MGL_NO_EXPORT mglCheck(char *str,int n)
{
register long s = 0,i;
for(i=0;i<n;i++)
@@ -694,7 +693,7 @@ bool mglCheck(char *str,int n)
}
//-----------------------------------------------------------------------------
// Try to find one of symbols lst in the string str
-int mglFindInText(char *str,const char *lst)
+int MGL_NO_EXPORT mglFindInText(char *str,const char *lst)
{
register long l=0,r=0,i;//,j,len=strlen(lst);
for(i=strlen(str)-1;i>=0;i--)
diff --git a/src/evalc.cpp b/src/evalc.cpp
index a8042e6..1265b96 100644
--- a/src/evalc.cpp
+++ b/src/evalc.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_evalc.cpp is part of Math Graphic Library
+ * evalc.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -18,18 +18,13 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <time.h>
+#include "mgl2/data_cf.h"
#include "mgl2/evalc.h"
#include "mgl2/addon.h"
#if MGL_HAVE_GSL
#include <gsl/gsl_sf.h>
#endif
//-----------------------------------------------------------------------------
-extern "C"{
-void mgl_srnd(long seed);
-double mgl_rnd();
-double mgl_ipow(double x,int n);
-}
-//-----------------------------------------------------------------------------
// constants for expression parsing
enum{
EQ_NUM=0, // a variable substitution
@@ -219,34 +214,34 @@ dual mglFormulaC::Calc(const dual var[MGL_VS]) const
return CalcIn(var);
}
//-----------------------------------------------------------------------------
-dual addc(dual a,dual b) {return a+b;}
-dual subc(dual a,dual b) {return a-b;}
-dual mulc(dual a,dual b) {return a*b;}
-dual divc(dual a,dual b) {return a/b;}
-dual ipwc(dual a,dual b) {return mgl_ipowc(a,int(b.real()));}
-dual powc(dual a,dual b) {return exp(b*log(a)); }
-dual llgc(dual a,dual b) {return log(a)/log(b); }
-dual expi(dual a) { return exp(dual(0,1)*a); }
-dual expi(double a) { return dual(cos(a),sin(a)); }
+dual MGL_NO_EXPORT addc(dual a,dual b) {return a+b;}
+dual MGL_NO_EXPORT subc(dual a,dual b) {return a-b;}
+dual MGL_NO_EXPORT mulc(dual a,dual b) {return a*b;}
+dual MGL_NO_EXPORT divc(dual a,dual b) {return a/b;}
+dual MGL_NO_EXPORT ipwc(dual a,dual b) {return mgl_ipowc(a,int(b.real()));}
+dual MGL_NO_EXPORT powc(dual a,dual b) {return exp(b*log(a)); }
+dual MGL_NO_EXPORT llgc(dual a,dual b) {return log(a)/log(b); }
+dual MGL_NO_EXPORT expi(dual a) { return exp(dual(0,1)*a); }
+dual MGL_NO_EXPORT expi(double a) { return dual(cos(a),sin(a)); }
//-----------------------------------------------------------------------------
-dual ic = dual(0,1);
-dual asinhc(dual x) { return log(x+sqrt(x*x+mreal(1))); }
-dual acoshc(dual x) { return log(x+sqrt(x*x-mreal(1))); }
-dual atanhc(dual x) { return log((mreal(1)+x)/(mreal(1)-x))/mreal(2); }
-dual sinc(dual x) { return sin(x); }
-dual cosc(dual x) { return cos(x); }
-dual tanc(dual x) { return tan(x); }
-dual sinhc(dual x) { return sinh(x); }
-dual coshc(dual x) { return cosh(x); }
-dual tanhc(dual x) { return tanh(x); }
-dual asinc(dual x) { return log(ic*x+sqrt(mreal(1)-x*x))/ic; }
-dual acosc(dual x) { return log(x+sqrt(x*x-mreal(1)))/ic; }
-dual atanc(dual x) { return log((ic-x)/(ic+x))/(mreal(2)*ic); }
-dual expc(dual x) { return exp(x); }
-dual sqrtc(dual x) { return sqrt(x); }
-dual logc(dual x) { return log(x); }
-dual absc(dual x) { return abs(x); }
-dual lgc(dual x) { return log10(x);}
+dual MGL_NO_EXPORT ic = dual(0,1);
+dual MGL_NO_EXPORT asinhc(dual x) { return log(x+sqrt(x*x+mreal(1))); }
+dual MGL_NO_EXPORT acoshc(dual x) { return log(x+sqrt(x*x-mreal(1))); }
+dual MGL_NO_EXPORT atanhc(dual x) { return log((mreal(1)+x)/(mreal(1)-x))/mreal(2); }
+dual MGL_NO_EXPORT sinc(dual x) { return sin(x); }
+dual MGL_NO_EXPORT cosc(dual x) { return cos(x); }
+dual MGL_NO_EXPORT tanc(dual x) { return tan(x); }
+dual MGL_NO_EXPORT sinhc(dual x) { return sinh(x); }
+dual MGL_NO_EXPORT coshc(dual x) { return cosh(x); }
+dual MGL_NO_EXPORT tanhc(dual x) { return tanh(x); }
+dual MGL_NO_EXPORT asinc(dual x) { return log(ic*x+sqrt(mreal(1)-x*x))/ic; }
+dual MGL_NO_EXPORT acosc(dual x) { return log(x+sqrt(x*x-mreal(1)))/ic; }
+dual MGL_NO_EXPORT atanc(dual x) { return log((ic-x)/(ic+x))/(mreal(2)*ic); }
+dual MGL_NO_EXPORT expc(dual x) { return exp(x); }
+dual MGL_NO_EXPORT sqrtc(dual x) { return sqrt(x); }
+dual MGL_NO_EXPORT logc(dual x) { return log(x); }
+dual MGL_NO_EXPORT absc(dual x) { return abs(x); }
+dual MGL_NO_EXPORT lgc(dual x) { return log10(x);}
//-----------------------------------------------------------------------------
typedef dual (*func_1)(dual);
typedef dual (*func_2)(dual, dual);
@@ -274,7 +269,7 @@ dual mglFormulaC::CalcIn(const dual *a1) const
return Res;
}
//-----------------------------------------------------------------------------
-dual mgl_ipowc(dual x,int n)
+dual MGL_EXPORT mgl_ipowc(dual x,int n)
{
dual t;
if(n==2) return x*x;
diff --git a/src/evalp.cpp b/src/evalp.cpp
index 1d28324..31d4a97 100644
--- a/src/evalp.cpp
+++ b/src/evalp.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_evalp.cpp is part of Math Graphic Library
+ * evalp.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -25,11 +25,8 @@
#include <gsl/gsl_errno.h>
#endif
//-----------------------------------------------------------------------------
-void mgl_wcstrim(wchar_t *str);
-void mgl_wcslwr(wchar_t *str);
-void mgl_wcstombs(char *dst, const wchar_t *src, int size);
int mglFormulaError;
-mglData mglFormulaCalc(const wchar_t *string, mglParser *arg);
+mglData MGL_NO_EXPORT mglFormulaCalc(const wchar_t *string, mglParser *arg);
//-----------------------------------------------------------------------------
mglData mglApplyOper(const wchar_t *a1, const wchar_t *a2, mglParser *arg, double (*func)(double,double))
{
@@ -80,26 +77,26 @@ int mglFindInText(wchar_t *str,const char *lst)
return -1;
}
//-----------------------------------------------------------------------------
-double cand(double a,double b);// {return a&&b?1:0;}
-double cor(double a,double b);// {return a||b?1:0;}
-double ceq(double a,double b);// {return a==b?1:0;}
-double clt(double a,double b);// {return a<b?1:0;}
-double cgt(double a,double b);// {return a>b?1:0;}
-double add(double a,double b);// {return a+b;}
-double sub(double a,double b);// {return a-b;}
-double mul(double a,double b);// {return a&&b?a*b:0;}
-double div(double a,double b);// {return b?a/b:NAN;}
-double ipw(double a,double b);// {return mgl_ipow(a,int(b));}
-double llg(double a,double b);// {return log(a)/log(b);}
-//double asinh(double x);// { return log(x+sqrt(x*x+1)); }
-//double acosh(double x);// { return x>1 ? log(x+sqrt(x*x-1)) : NAN; }
-//double atanh(double x);// { return fabs(x)<1 ? log((1+x)/(1-x))/2 : NAN; }
-double gslEllE(double a,double b);// {return gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE);}
-double gslEllF(double a,double b);// {return gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE);}
-double gslLegP(double a,double b);// {return gsl_sf_legendre_Pl(int(a),b);}
+double MGL_NO_EXPORT cand(double a,double b);// {return a&&b?1:0;}
+double MGL_NO_EXPORT cor(double a,double b);// {return a||b?1:0;}
+double MGL_NO_EXPORT ceq(double a,double b);// {return a==b?1:0;}
+double MGL_NO_EXPORT clt(double a,double b);// {return a<b?1:0;}
+double MGL_NO_EXPORT cgt(double a,double b);// {return a>b?1:0;}
+double MGL_NO_EXPORT add(double a,double b);// {return a+b;}
+double MGL_NO_EXPORT sub(double a,double b);// {return a-b;}
+double MGL_NO_EXPORT mul(double a,double b);// {return a&&b?a*b:0;}
+double MGL_NO_EXPORT div(double a,double b);// {return b?a/b:NAN;}
+double MGL_NO_EXPORT ipw(double a,double b);// {return mgl_ipow(a,int(b));}
+double MGL_NO_EXPORT llg(double a,double b);// {return log(a)/log(b);}
+//double MGL_NO_EXPORT asinh(double x);// { return log(x+sqrt(x*x+1)); }
+//double MGL_NO_EXPORT acosh(double x);// { return x>1 ? log(x+sqrt(x*x-1)) : NAN; }
+//double MGL_NO_EXPORT atanh(double x);// { return fabs(x)<1 ? log((1+x)/(1-x))/2 : NAN; }
+double MGL_NO_EXPORT gslEllE(double a,double b);// {return gsl_sf_ellint_E(a,b,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslEllF(double a,double b);// {return gsl_sf_ellint_F(a,b,GSL_PREC_SINGLE);}
+double MGL_NO_EXPORT gslLegP(double a,double b);// {return gsl_sf_legendre_Pl(int(a),b);}
//-----------------------------------------------------------------------------
// It seems that standard wcstombs() have a bug. So, I replace by my own.
-void mgl_wcstombs(char *dst, const wchar_t *src, int size)
+void MGL_EXPORT mgl_wcstombs(char *dst, const wchar_t *src, int size)
{
register int j;
for(j=0;j<size-1 && src[j]!=0;j++)
@@ -112,7 +109,7 @@ void mgl_wcstombs(char *dst, const wchar_t *src, int size)
// NOTE: In any case where number is required the mglData::a[0] is used.
// String flag is binary 0x1 -> 'x', 0x2 -> 'y', 0x4 -> 'z'
// NOTE: the speed is not a goal (mglFormula is faster). It is true interpreter!
-mglData mglFormulaCalc(const wchar_t *string, mglParser *arg)
+mglData MGL_NO_EXPORT mglFormulaCalc(const wchar_t *string, mglParser *arg)
{
#if MGL_HAVE_GSL
gsl_set_error_handler_off();
@@ -637,7 +634,7 @@ mglData mglFormulaCalc(const wchar_t *string, mglParser *arg)
delete []str; return res;
}
//-----------------------------------------------------------------------------
-void mgl_wcslwr(wchar_t *str)
+void MGL_EXPORT mgl_wcslwr(wchar_t *str)
{
for(size_t k=0;k<wcslen(str);k++) // ������� ��������� �������
str[k] = (str[k]>='A' && str[k]<='Z') ? str[k]+'a'-'A' : str[k];
diff --git a/src/exec.cpp b/src/exec.cpp
index 0a95568..9abaa37 100644
--- a/src/exec.cpp
+++ b/src/exec.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_exec.cpp is part of Math Graphic Library
+ * exec.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -28,14 +28,14 @@
#define iint(x) floor((x)+0.5)
wchar_t *mgl_str_copy(const char *s);
//-----------------------------------------------------------------------------
-int mgls_addlegend(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_addlegend(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ss")) gr->AddLegend(a[0].w.c_str(),a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_addto(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_addto(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) *(a[0].d) += *(a[1].d);
@@ -43,7 +43,7 @@ int mgls_addto(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_sort(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_sort(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Sort(a[1].v, -1);
@@ -51,7 +51,7 @@ int mgls_sort(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_alpha(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_alpha(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Alpha(true);
@@ -59,28 +59,28 @@ int mgls_alpha(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_plotid(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_plotid(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->SetPlotId(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_alphadef(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_alphadef(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetAlphaDef(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ambient(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ambient(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetAmbient(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_area(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_area(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Area(*(a[0].d),"",opt);
@@ -92,7 +92,7 @@ int mgls_area(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_aspect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_aspect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->Aspect(a[0].v, a[1].v, 1);
@@ -100,7 +100,7 @@ int mgls_aspect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_axial(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_axial(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Axial(*(a[0].d),"",opt);
@@ -110,7 +110,7 @@ int mgls_axial(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_axis(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_axis(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"")) gr->Axis("xyz","",opt);
@@ -122,7 +122,7 @@ int mgls_axis(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ball(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ball(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->Mark(mglPoint(a[0].v,a[1].v,NAN),"r.");
@@ -132,7 +132,7 @@ int mgls_ball(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_box(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_box(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Box();
@@ -141,7 +141,7 @@ int mgls_box(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_bars(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_bars(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Bars(*(a[0].d), "",opt);
@@ -153,7 +153,7 @@ int mgls_bars(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_barh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_barh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Barh(*(a[0].d), "",opt);
@@ -163,7 +163,7 @@ int mgls_barh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cones(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_cones(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Cones(*(a[0].d), "",opt);
@@ -175,7 +175,7 @@ int mgls_cones(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_belt(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_belt(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Belt(*(a[0].d),"",opt);
@@ -185,7 +185,7 @@ int mgls_belt(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_boxs(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_boxs(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Boxs(*(a[0].d),"",opt);
@@ -195,7 +195,7 @@ int mgls_boxs(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_beam(mglGraph *gr, long , mglArg *a, const char *k, const char *) // NOTE beam can be made obsolete ???
+int MGL_NO_EXPORT mgls_beam(mglGraph *gr, long , mglArg *a, const char *k, const char *) // NOTE beam can be made obsolete ???
{
int res=0;
if(!strcmp(k,"ddddn"))
@@ -215,21 +215,21 @@ int mgls_beam(mglGraph *gr, long , mglArg *a, const char *k, const char *) // N
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_clearlegend(mglGraph *gr, long , mglArg *, const char *k, const char *)
+int MGL_NO_EXPORT mgls_clearlegend(mglGraph *gr, long , mglArg *, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->ClearLegend();
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_clf(mglGraph *gr, long , mglArg *, const char *k, const char *)
+int MGL_NO_EXPORT mgls_clf(mglGraph *gr, long , mglArg *, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Clf();
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_chart(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_chart(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Chart(*(a[0].d), "",opt);
@@ -237,7 +237,7 @@ int mgls_chart(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cloud(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_cloud(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Cloud(*(a[0].d),"",opt);
@@ -247,7 +247,7 @@ int mgls_cloud(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_crange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_crange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) gr->SetRange('c',*(a[0].d));
@@ -256,28 +256,28 @@ int mgls_crange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_crop(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_crop(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dnns")) a[0].d->Crop(iint(a[1].v),iint(a[2].v),a[3].s.c_str()[0]);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_clean(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_clean(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Clean(iint(a[1].v));
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cumsum(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_cumsum(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->CumSum(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_curve(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_curve(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnnnnn"))
@@ -303,7 +303,7 @@ int mgls_curve(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cut(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_cut(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetCut(a[0].v != 0);
@@ -313,7 +313,7 @@ int mgls_cut(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_crust(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_crust(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd")) gr->Crust(*(a[0].d),*(a[1].d),*(a[2].d),"",opt);
@@ -321,7 +321,7 @@ int mgls_crust(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_colorbar(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_colorbar(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Colorbar();
@@ -338,7 +338,7 @@ int mgls_colorbar(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_copy(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_copy(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) a[0].d->Set(*(a[1].d));
@@ -348,7 +348,7 @@ int mgls_copy(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_cont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Cont(*(a[0].d),"",opt);
@@ -362,7 +362,7 @@ int mgls_cont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contv(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contv(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContV(*(a[0].d),"",opt);
@@ -376,7 +376,7 @@ int mgls_contv(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContF(*(a[0].d),"",opt);
@@ -390,7 +390,7 @@ int mgls_contf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contd(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contd(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContD(*(a[0].d),"",opt);
@@ -404,7 +404,7 @@ int mgls_contd(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cont3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_cont3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Cont3(*(a[0].d), "", -1,opt);
@@ -422,7 +422,7 @@ int mgls_cont3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContF3(*(a[0].d), "", -1,opt);
@@ -440,7 +440,7 @@ int mgls_contf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContX(*(a[0].d),"",NAN,opt);
@@ -449,7 +449,7 @@ int mgls_contx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contfx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contfx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContFX(*(a[0].d),"",NAN,opt);
@@ -458,7 +458,7 @@ int mgls_contfx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_conty(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_conty(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContY(*(a[0].d),"",NAN,opt);
@@ -467,7 +467,7 @@ int mgls_conty(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contfy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contfy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContFY(*(a[0].d),"",NAN,opt);
@@ -476,7 +476,7 @@ int mgls_contfy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContZ(*(a[0].d),"",NAN,opt);
@@ -485,7 +485,7 @@ int mgls_contz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_contfz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_contfz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->ContFZ(*(a[0].d),"",NAN,opt);
@@ -494,7 +494,7 @@ int mgls_contfz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cone(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_cone(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnnnn")) gr->Cone(mglPoint(a[0].v,a[1].v,a[2].v), mglPoint(a[3].v,a[4].v,a[5].v), a[6].v);
@@ -504,7 +504,7 @@ int mgls_cone(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ellipse(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ellipse(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn"))
@@ -518,7 +518,7 @@ int mgls_ellipse(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_circle(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_circle(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnn")) gr->Circle(mglPoint(a[0].v,a[1].v, NAN), a[2].v);
@@ -528,7 +528,7 @@ int mgls_circle(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_rhomb(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_rhomb(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn"))
@@ -542,7 +542,7 @@ int mgls_rhomb(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_dens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_dens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Dens(*(a[0].d),"",opt);
@@ -552,7 +552,7 @@ int mgls_dens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_dens3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_dens3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Dens3(*(a[0].d),"",-1,opt);
@@ -564,7 +564,7 @@ int mgls_dens3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_densx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_densx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->DensX(*(a[0].d),"",NAN,opt);
@@ -573,7 +573,7 @@ int mgls_densx(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_densy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_densy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->DensY(*(a[0].d),"",NAN,opt);
@@ -582,7 +582,7 @@ int mgls_densy(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_densz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_densz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->DensZ(*(a[0].d),"",NAN,opt);
@@ -591,7 +591,7 @@ int mgls_densz(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_divto(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_divto(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) *(a[0].d) /= *(a[1].d);
@@ -599,7 +599,7 @@ int mgls_divto(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_multo(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_multo(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) *(a[0].d) *= *(a[1].d);
@@ -607,7 +607,7 @@ int mgls_multo(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_subto(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_subto(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) *(a[0].d) -= *(a[1].d);
@@ -615,7 +615,7 @@ int mgls_subto(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_dots(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_dots(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd")) gr->Dots(*(a[0].d),*(a[1].d),*(a[2].d),"",opt);
@@ -625,7 +625,7 @@ int mgls_dots(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_diff(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_diff(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Diff(a[1].s.c_str());
@@ -634,14 +634,14 @@ int mgls_diff(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_diff2(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_diff2(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Diff2(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_drop(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_drop(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn"))
@@ -663,7 +663,7 @@ int mgls_drop(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_dew(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_dew(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Dew(*(a[0].d),*(a[1].d),"",opt);
@@ -673,7 +673,7 @@ int mgls_dew(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fall(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fall(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Fall(*(a[0].d),"",opt);
@@ -683,7 +683,7 @@ int mgls_fall(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_mesh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_mesh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Mesh(*(a[0].d),"",opt);
@@ -693,7 +693,7 @@ int mgls_mesh(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Surf(*(a[0].d),"",opt);
@@ -703,7 +703,7 @@ int mgls_surf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surfc(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surfc(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->SurfC(*(a[0].d),*(a[1].d),"",opt);
@@ -713,7 +713,7 @@ int mgls_surfc(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->SurfA(*(a[0].d),*(a[1].d),"",opt);
@@ -723,7 +723,7 @@ int mgls_surfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_flow(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_flow(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Flow(*(a[0].d),*(a[1].d),"",opt);
@@ -756,7 +756,7 @@ int mgls_flow(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_grad(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_grad(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Grad(*(a[0].d), "",opt);
@@ -768,7 +768,7 @@ int mgls_grad(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fill(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fill(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dnn")) a[0].d->Fill(a[1].v,a[2].v);
@@ -779,14 +779,14 @@ int mgls_fill(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fillsample(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_fillsample(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->FillSample(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fog(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_fog(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->Fog(a[0].v);
@@ -794,7 +794,7 @@ int mgls_fog(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_font(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_font(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->SetFontDef(a[0].s.c_str());
@@ -803,7 +803,7 @@ int mgls_font(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_loadfont(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_loadfont(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"") || (!strcmp(k,"s") && a[0].s[0]==0)) gr->RestoreFont();
@@ -811,7 +811,7 @@ int mgls_loadfont(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_grid(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_grid(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"")) gr->Grid("xyzt", "B",opt);
@@ -820,7 +820,7 @@ int mgls_grid(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_grid2(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_grid2(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Grid(*(a[0].d),"",opt);
@@ -830,7 +830,7 @@ int mgls_grid2(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_grid3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_grid3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Grid3(*(a[0].d),"",-1,opt);
@@ -842,7 +842,7 @@ int mgls_grid3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_light(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_light(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Light(true);
@@ -864,7 +864,7 @@ int mgls_light(mglGraph *gr, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_line(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_line(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn"))
@@ -878,7 +878,7 @@ int mgls_line(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_errbox(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_errbox(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn"))
@@ -892,7 +892,7 @@ int mgls_errbox(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_legend(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_legend(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"")) gr->Legend(3, "#", opt);
@@ -903,21 +903,21 @@ int mgls_legend(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_barwidth(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_barwidth(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetBarWidth(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_legendmarks(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_legendmarks(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetLegendMarks(iint(a[0].v));
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_modify(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_modify(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Modify(a[1].s.c_str());
@@ -927,42 +927,42 @@ int mgls_modify(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_max(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_max(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) *(a[0].d) = a[1].d->Max(a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_min(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_min(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) *(a[0].d) = a[1].d->Min(a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_sum(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_sum(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) *(a[0].d) = a[1].d->Sum(a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_meshnum(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_meshnum(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetMeshNum(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_facenum(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_facenum(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetFaceNum(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_quality(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_quality(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->SetQuality();
@@ -970,14 +970,14 @@ int mgls_quality(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_marksize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_marksize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetMarkSize(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_mark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_mark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Mark(*(a[0].d), *(a[1].d), "",opt);
@@ -989,7 +989,7 @@ int mgls_mark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_map(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_map(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Map(*(a[0].d),*(a[1].d),"",opt);
@@ -999,7 +999,7 @@ int mgls_map(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_read(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_read(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
bool rr=true;
@@ -1011,7 +1011,7 @@ int mgls_read(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_readmat(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_readmat(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
bool rr=true;
@@ -1022,7 +1022,7 @@ int mgls_readmat(mglGraph *gr, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_readall(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_readall(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
bool rr=true;
@@ -1036,24 +1036,23 @@ int mgls_readall(mglGraph *gr, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_readhdf(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_readhdf(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dss")) a[0].d->ReadHDF(a[1].s.c_str(), a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_savehdf(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_savehdf(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dss")) a[0].d->SaveHDF(a[1].s.c_str(), a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_rect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_rect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
- long i;
if(!strcmp(k,"nnnn"))
gr->Face(mglPoint(a[0].v,a[1].v,NAN), mglPoint(a[0].v,a[3].v,NAN),
mglPoint(a[2].v,a[1].v,NAN), mglPoint(a[2].v,a[3].v,NAN));
@@ -1076,7 +1075,7 @@ int mgls_rect(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_face(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_face(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnnnnn"))
@@ -1094,7 +1093,7 @@ int mgls_face(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_resize(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_resize(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddn")) *(a[0].d) = a[1].d->Resize(iint(a[2].v), 1, 1);
@@ -1103,7 +1102,7 @@ int mgls_resize(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_rotate(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_rotate(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->Rotate(a[0].v, a[1].v, 0);
@@ -1112,14 +1111,14 @@ int mgls_rotate(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_rotatetext(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_rotatetext(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetRotatedText(a[0].v!=0);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tuneticks(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_tuneticks(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTuneTicks(a[0].v!=0);
@@ -1127,7 +1126,7 @@ int mgls_tuneticks(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ticktime(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ticktime(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->SetTicksTime(a[0].s[0]);
@@ -1136,14 +1135,14 @@ int mgls_ticktime(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_save(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_save(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Save(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_smooth(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_smooth(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) a[0].d->Smooth();
@@ -1151,21 +1150,21 @@ int mgls_smooth(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_swap(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_swap(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Swap(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_idset(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_idset(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->SetColumnId(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_stem(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_stem(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Stem(*(a[0].d),"",opt);
@@ -1177,7 +1176,7 @@ int mgls_stem(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_step(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_step(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Step(*(a[0].d),"",opt);
@@ -1189,7 +1188,7 @@ int mgls_step(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_plot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_plot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Plot(*(a[0].d),"",opt);
@@ -1201,7 +1200,7 @@ int mgls_plot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tape(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tape(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Tape(*(a[0].d),"",opt);
@@ -1213,7 +1212,7 @@ int mgls_tape(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_boxplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_boxplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->BoxPlot(*(a[0].d),"",opt);
@@ -1223,7 +1222,7 @@ int mgls_boxplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_candle(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_candle(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Candle(*(a[0].d),"",opt);
@@ -1239,7 +1238,7 @@ int mgls_candle(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_radar(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_radar(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Radar(*(a[0].d),"",opt);
@@ -1247,7 +1246,7 @@ int mgls_radar(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_squeeze(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_squeeze(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Squeeze(iint(a[1].v));
@@ -1257,7 +1256,7 @@ int mgls_squeeze(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_stfad(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_stfad(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dddn"))
@@ -1267,7 +1266,7 @@ int mgls_stfad(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_setsize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_setsize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn") && a[1].v>1 && a[0].v>1)
@@ -1275,7 +1274,7 @@ int mgls_setsize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_sphere(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_sphere(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnn")) gr->Sphere(mglPoint(a[0].v,a[1].v), a[2].v);
@@ -1285,7 +1284,7 @@ int mgls_sphere(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_stfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_stfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddn"))
@@ -1299,7 +1298,7 @@ int mgls_stfa(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Surf3(*(a[0].d),"",opt);
@@ -1313,7 +1312,7 @@ int mgls_surf3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surf3c(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surf3c(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Surf3C(*(a[0].d),*(a[1].d),"",opt);
@@ -1331,7 +1330,7 @@ int mgls_surf3c(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_surf3a(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_surf3a(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Surf3A(*(a[0].d),*(a[1].d),"",opt);
@@ -1349,7 +1348,7 @@ int mgls_surf3a(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_subplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_subplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnn")) gr->SubPlot(iint(a[0].v), iint(a[1].v), iint(a[2].v));
@@ -1358,7 +1357,7 @@ int mgls_subplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_multiplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_multiplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn"))
@@ -1368,7 +1367,7 @@ int mgls_multiplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_title(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_title(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->Title(a[0].w.c_str());
@@ -1377,14 +1376,14 @@ int mgls_title(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_column(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_column(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) *(a[0].d) = a[1].d->Column(a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_subdata(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_subdata(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddn")) *(a[0].d) = a[1].d->SubData(iint(a[2].v));
@@ -1394,14 +1393,14 @@ int mgls_subdata(mglGraph *, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_trace(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_trace(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dd")) *(a[0].d) = a[1].d->Trace();
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tile(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tile(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Tile(*(a[0].d),"",opt);
@@ -1411,7 +1410,7 @@ int mgls_tile(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tiles(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tiles(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->TileS(*(a[0].d),*(a[1].d),"",opt);
@@ -1421,7 +1420,7 @@ int mgls_tiles(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_text(mglGraph *gr, long , mglArg *a, const char *k, const char *opt) // NOTE don't use options -- Puts can be part of group
+int MGL_NO_EXPORT mgls_text(mglGraph *gr, long , mglArg *a, const char *k, const char *opt) // NOTE don't use options -- Puts can be part of group
{
int res=0;
if(!strcmp(k,"nns")) gr->Putsw(mglPoint(a[0].v,a[1].v,NAN),a[2].w.c_str());
@@ -1445,7 +1444,7 @@ int mgls_text(mglGraph *gr, long , mglArg *a, const char *k, const char *opt) /
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_torus(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_torus(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Torus(*(a[0].d),*(a[1].d),"",opt);
@@ -1453,35 +1452,35 @@ int mgls_torus(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_transptype(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_transptype(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTranspType(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fourier(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_fourier(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) mglFourier(*(a[0].d),*(a[1].d),a[2].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_transform(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_transform(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dsdd")) *(a[0].d) = mglTransform(*(a[2].d),*(a[3].d),a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_transforma(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_transforma(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dsdd")) *(a[0].d) = mglTransformA(*(a[2].d),*(a[3].d),a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tube(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tube(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dn"))
@@ -1511,7 +1510,7 @@ int mgls_tube(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_textmark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_textmark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ds")) gr->TextMark(*(a[0].d),a[1].w.c_str(),"",opt);
@@ -1525,7 +1524,7 @@ int mgls_textmark(mglGraph *gr, long , mglArg *a, const char *k, const char *opt
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_triplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_triplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd")) gr->TriPlot(*(a[0].d),*(a[1].d),*(a[2].d),"",opt);
@@ -1537,7 +1536,7 @@ int mgls_triplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_quadplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_quadplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd")) gr->QuadPlot(*(a[0].d),*(a[1].d),*(a[2].d),"",opt);
@@ -1549,7 +1548,7 @@ int mgls_quadplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tricont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tricont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dddd"))
@@ -1567,14 +1566,14 @@ int mgls_tricont(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ternary(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ternary(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->Ternary(int(a[0].v));
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_transpose(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_transpose(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) a[0].d->Transpose();
@@ -1582,7 +1581,7 @@ int mgls_transpose(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_vect(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_vect(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Vect(*(a[0].d),*(a[1].d),"",opt);
@@ -1596,7 +1595,7 @@ int mgls_vect(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_vect3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_vect3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd"))
@@ -1614,7 +1613,7 @@ int mgls_vect3(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_traj(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_traj(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dddd"))
@@ -1628,7 +1627,7 @@ int mgls_traj(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_xlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_xlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->Label('x', a[0].w.c_str(), 1, opt);
@@ -1636,7 +1635,7 @@ int mgls_xlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ylabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_ylabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->Label('y', a[0].w.c_str(), 1, opt);
@@ -1644,7 +1643,7 @@ int mgls_ylabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_zlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_zlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->Label('z', a[0].w.c_str(), 1, opt);
@@ -1652,7 +1651,7 @@ int mgls_zlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->Label('t', a[0].w.c_str(), 1, opt);
@@ -1660,7 +1659,7 @@ int mgls_tlabel(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_label(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_label(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ds")) gr->Label(*(a[0].d), a[1].w.c_str(), "",opt);
@@ -1672,7 +1671,7 @@ int mgls_label(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_table(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_table(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"d")) gr->Table(*(a[0].d), L"", "#|",opt);
@@ -1684,7 +1683,7 @@ int mgls_table(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_xrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_xrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) gr->SetRange('x',*(a[0].d));
@@ -1693,7 +1692,7 @@ int mgls_xrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_yrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_yrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) gr->SetRange('y',*(a[0].d));
@@ -1702,7 +1701,7 @@ int mgls_yrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_zrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_zrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) gr->SetRange('z',*(a[0].d));
@@ -1711,7 +1710,7 @@ int mgls_zrange(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_xtick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_xtick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTicks('x', a[0].v);
@@ -1734,7 +1733,7 @@ int mgls_xtick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ytick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ytick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTicks('y', a[0].v);
@@ -1757,7 +1756,7 @@ int mgls_ytick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ztick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ztick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTicks('z', a[0].v);
@@ -1780,7 +1779,7 @@ int mgls_ztick(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_error(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_error(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Error(*(a[0].d),*(a[1].d), "",opt);
@@ -1792,7 +1791,7 @@ int mgls_error(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_extend(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_extend(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Extend(iint(a[1].v));
@@ -1800,7 +1799,7 @@ int mgls_extend(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_datas(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_datas(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s"))
@@ -1813,7 +1812,7 @@ int mgls_datas(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_info(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_info(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) gr->SetWarn(-1,a[0].d->PrintInfo());
@@ -1823,14 +1822,14 @@ int mgls_info(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_integrate(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_integrate(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Integral(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_inplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_inplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn")) gr->InPlot(a[0].v, a[1].v, a[2].v, a[3].v);
@@ -1838,7 +1837,7 @@ int mgls_inplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_columnplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_columnplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->ColumnPlot(iint(a[0].v), iint(a[1].v));
@@ -1846,7 +1845,7 @@ int mgls_columnplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_gridplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_gridplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnn")) gr->GridPlot(iint(a[0].v), iint(a[1].v), iint(a[2].v));
@@ -1854,14 +1853,14 @@ int mgls_gridplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_stickplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_stickplot(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn")) gr->StickPlot(iint(a[0].v), iint(a[1].v), a[2].v, a[3].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_pipe(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_pipe(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Pipe(*(a[0].d),*(a[1].d),"",0.05,opt);
@@ -1888,7 +1887,7 @@ int mgls_pipe(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_origin(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_origin(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->SetOrigin(a[0].v,a[1].v,NAN);
@@ -1896,7 +1895,7 @@ int mgls_origin(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_norm(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_norm(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dnn")) a[0].d->Norm(a[1].v,a[2].v);
@@ -1905,7 +1904,7 @@ int mgls_norm(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_hist(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_hist(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddd")) *(a[0].d) = gr->Hist(*(a[1].d), *(a[2].d),opt);
@@ -1918,35 +1917,35 @@ int mgls_hist(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_mirror(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_mirror(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Mirror(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_hankel(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_hankel(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Hankel(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_sinfft(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_sinfft(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->SinFFT(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_cosfft(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_cosfft(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->CosFFT(a[1].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_new(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_new(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Create(iint(a[1].v));
@@ -1964,7 +1963,7 @@ int mgls_new(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_var(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_var(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dnn"))
@@ -1974,7 +1973,7 @@ int mgls_var(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_chdir(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_chdir(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s"))
@@ -1982,14 +1981,14 @@ int mgls_chdir(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_perspective(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_perspective(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->Perspective(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_facex(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_facex(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn")) gr->FaceX(mglPoint(a[0].v, a[1].v, a[2].v), a[3].v, a[4].v);
@@ -1998,7 +1997,7 @@ int mgls_facex(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_facey(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_facey(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn")) gr->FaceY(mglPoint(a[0].v, a[1].v, a[2].v), a[3].v, a[4].v);
@@ -2007,7 +2006,7 @@ int mgls_facey(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_facez(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_facez(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnnn")) gr->FaceZ(mglPoint(a[0].v, a[1].v, a[2].v), a[3].v, a[4].v);
@@ -2016,7 +2015,7 @@ int mgls_facez(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_normsl(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_normsl(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dnn")) a[0].d->NormSl(a[1].v, a[2].v);
@@ -2026,7 +2025,7 @@ int mgls_normsl(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_momentum(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_momentum(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dds")) *(a[0].d) = a[1].d->Momentum('z', a[2].s.c_str());
@@ -2034,7 +2033,7 @@ int mgls_momentum(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fit(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fit(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dddddssd"))
@@ -2056,7 +2055,7 @@ int mgls_fit(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fits(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fits(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"ddddddssd"))
@@ -2078,7 +2077,7 @@ int mgls_fits(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_putsfit(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_putsfit(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->PutsFit(mglPoint(a[0].v,a[1].v));
@@ -2093,14 +2092,14 @@ int mgls_putsfit(mglGraph *gr, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_arrowsize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_arrowsize(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetArrowSize(a[0].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_rearrange(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_rearrange(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Rearrange(iint(a[1].v));
@@ -2109,7 +2108,7 @@ int mgls_rearrange(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ctick(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ctick(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->SetTickTempl('c',a[0].w.c_str());
@@ -2117,7 +2116,7 @@ int mgls_ctick(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->FPlot(a[0].s.c_str(), "",opt);
@@ -2127,7 +2126,7 @@ int mgls_fplot(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fsurf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_fsurf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"s")) gr->FSurf(a[0].s.c_str(), "",opt);
@@ -2137,7 +2136,7 @@ int mgls_fsurf(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, const char *) // NOTE don't use options -- Puts can be part of group
+int MGL_NO_EXPORT mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, const char *) // NOTE don't use options -- Puts can be part of group
{
int res=0;
char buf[1024];
@@ -2185,7 +2184,7 @@ int mgls_fgets(mglGraph *gr, long , mglArg *a, const char *k, const char *) //
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_import(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_import(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dss")) a[0].d->Import(a[1].s.c_str(), a[2].s.c_str());
@@ -2193,7 +2192,7 @@ int mgls_import(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_export(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_export(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dss")) a[0].d->Export(a[1].s.c_str(), a[2].s.c_str());
@@ -2201,7 +2200,7 @@ int mgls_export(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_write(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_write(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->WriteFrame("", "MathGL");
@@ -2209,7 +2208,7 @@ int mgls_write(mglGraph *gr, long , mglArg *a, const char *k, const char *)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_region(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_region(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Region(*(a[0].d),*(a[1].d),"",opt);
@@ -2219,7 +2218,7 @@ int mgls_region(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_envelop(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_envelop(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) a[0].d->Envelop();
@@ -2227,7 +2226,7 @@ int mgls_envelop(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_sew(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_sew(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"d")) a[0].d->Sew();
@@ -2236,7 +2235,7 @@ int mgls_sew(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_evaluate(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_evaluate(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddd")) *(a[0].d) = a[1].d->Evaluate(*(a[2].d));
@@ -2248,7 +2247,7 @@ int mgls_evaluate(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_solve(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_solve(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddns")) *(a[0].d) = a[1].d->Solve(a[2].v, a[3].s[0]);
@@ -2258,7 +2257,7 @@ int mgls_solve(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_put(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_put(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dn")) a[0].d->Put(a[1].v);
@@ -2272,21 +2271,21 @@ int mgls_put(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_palette(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_palette(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"s")) gr->SetPalette(a[0].s.c_str());
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_combine(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_combine(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddd")) *(a[0].d) = a[1].d->Combine(*(a[2].d));
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_pde(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_pde(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dsdd"))
@@ -2298,7 +2297,7 @@ int mgls_pde(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_qo2d(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_qo2d(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dsddd"))
@@ -2312,7 +2311,21 @@ int mgls_qo2d(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ray(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_qo3d(mglGraph *, long , mglArg *a, const char *k, const char *)
+{
+ int res=0;
+ if(!strcmp(k,"dsddd"))
+ *(a[0].d) = mglData(true, mgl_qo3d_solve(a[1].s.c_str(), a[2].d, a[3].d, a[4].d, 1,100, 0,0,0));
+ else if(!strcmp(k,"dsdddn"))
+ *(a[0].d) = mglData(true, mgl_qo3d_solve(a[1].s.c_str(), a[2].d, a[3].d, a[4].d, a[5].v,100, 0,0,0));
+ else if(!strcmp(k,"dsdddnn"))
+ *(a[0].d) = mglData(true, mgl_qo3d_solve(a[1].s.c_str(), a[2].d, a[3].d, a[4].d, a[5].v,a[6].v, 0,0,0));
+ else if(!strcmp(k,"dsdddnnddd"))
+ *(a[0].d) = mglData(true, mgl_qo3d_solve(a[1].s.c_str(), a[2].d, a[3].d, a[4].d, a[5].v,a[6].v, a[7].d,a[8].d,a[9].d));
+ else res = 1; return res;
+}
+//-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgls_ray(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dsnnnn"))
@@ -2326,7 +2339,7 @@ int mgls_ray(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_jacobian(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_jacobian(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddd")) *(a[0].d) = mglJacobian(*(a[1].d), *(a[2].d));
@@ -2334,7 +2347,7 @@ int mgls_jacobian(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_tens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_tens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dd")) gr->Tens(*(a[0].d),*(a[1].d), "",opt);
@@ -2346,7 +2359,7 @@ int mgls_tens(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
return res;
}
//-----------------------------------------------------------------------------
-int mgls_ticklen(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ticklen(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"n")) gr->SetTickLen(a[0].v);
@@ -2354,7 +2367,7 @@ int mgls_ticklen(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_axisstl(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_axisstl(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->SetAxisStl();
@@ -2364,7 +2377,7 @@ int mgls_axisstl(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_ranges(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_ranges(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn")) gr->SetRanges(a[0].v,a[1].v, a[2].v,a[3].v);
@@ -2375,7 +2388,7 @@ int mgls_ranges(mglGraph *gr, long n, mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_adjust(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_adjust(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"")) gr->Adjust();
@@ -2383,7 +2396,7 @@ int mgls_adjust(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_insert(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_insert(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Insert(a[1].s.c_str()[0]);
@@ -2392,7 +2405,7 @@ int mgls_insert(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_delete(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_delete(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ds")) a[0].d->Delete(a[1].s.c_str()[0]);
@@ -2401,21 +2414,21 @@ int mgls_delete(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_roll(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_roll(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"dsn")) a[0].d->Roll(a[1].s.c_str()[0], iint(a[2].v));
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_datagrid(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
+int MGL_NO_EXPORT mgls_datagrid(mglGraph *gr, long , mglArg *a, const char *k, const char *opt)
{
int res=0;
if(!strcmp(k,"dddd")) gr->DataGrid(*(a[0].d), *(a[1].d), *(a[2].d), *(a[3].d),opt);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_triangulate(mglGraph *, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_triangulate(mglGraph *, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"ddd"))
@@ -2425,7 +2438,7 @@ int mgls_triangulate(mglGraph *, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_view(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_view(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->View(a[0].v, a[1].v);
@@ -2433,14 +2446,14 @@ int mgls_view(mglGraph *gr, long , mglArg *a, const char *k, const char *)
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_zoom(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_zoom(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nnnn")) gr->Zoom(a[0].v, a[1].v, a[2].v, a[3].v);
else res = 1; return res;
}
//-----------------------------------------------------------------------------
-int mgls_zoomaxis(mglGraph *gr, long , mglArg *a, const char *k, const char *)
+int MGL_NO_EXPORT mgls_zoomaxis(mglGraph *gr, long , mglArg *a, const char *k, const char *)
{
int res=0;
if(!strcmp(k,"nn")) gr->ZoomAxis(mglPoint(a[0].v), mglPoint(a[1].v));
@@ -2607,7 +2620,8 @@ mglCommand mgls_base_cmd[] = {
{"plotid","Set default filename","plotid 'name'", mgls_plotid ,2},
{"put","Put value (numeric or array) to given data element","put Dat val [i j k] | Dat Val [i j k]", mgls_put ,3},
{"putsfit","Print fitted formula","putsfit x y ['pre' 'font' size]|x y z ['pre' 'font' size]", mgls_putsfit ,15},
- {"qo2d","Solve PDE in accompanied coordinates","qo2d Res 'ham' IniRe IniIm Ray [r k0 Xout Yout]", mgls_qo2d ,4},
+ {"qo2d","Solve PDE in accompanied coordinates for 2d case","qo2d Res 'ham' IniRe IniIm Ray [r k0 Xout Yout]", mgls_qo2d ,4},
+ {"qo3d","Solve PDE in accompanied coordinates for 3d case","qo3d Res 'ham' IniRe IniIm Ray [r k0 Xout Yout Zout]", mgls_qo3d ,4},
{"quadplot","Draw surface of quadrangles","quadplot Idat Xdat Ydat ['fmt']|Idat Xdat Ydat Zdat ['fmt']|Idat Xdat Ydat Zdat Cdat ['fmt'] ", mgls_quadplot ,0},
{"quality","Set plot quality","quality [val]", mgls_quality ,2},
{"radar","Draw radar chart","radar Rdat ['fmt']", mgls_radar ,7},
diff --git a/src/export.cpp b/src/export.cpp
index 82a9de0..e34305f 100644
--- a/src/export.cpp
+++ b/src/export.cpp
@@ -32,8 +32,12 @@ extern "C" {
#include <jpeglib.h>
}
#endif
+
+#if MGL_HAVE_GIF
+#include <gif_lib.h>
+#endif
//-----------------------------------------------------------------------------
-int mgl_pnga_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_pnga_save(const char *fname, int w, int h, unsigned char **p)
{
#if MGL_HAVE_PNG
bool fl = strcmp(fname,"-");
@@ -67,7 +71,7 @@ int mgl_pnga_save(const char *fname, int w, int h, unsigned char **p)
#endif
}
//-----------------------------------------------------------------------------
-int mgl_png_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_png_save(const char *fname, int w, int h, unsigned char **p)
{
#if MGL_HAVE_PNG
bool fl = strcmp(fname,"-");
@@ -101,7 +105,7 @@ int mgl_png_save(const char *fname, int w, int h, unsigned char **p)
#endif
}
//-----------------------------------------------------------------------------
-int mgl_bmp_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_bmp_save(const char *fname, int w, int h, unsigned char **p)
{
bool fl = strcmp(fname,"-");
FILE *fp = fl ? fopen(fname, "wb") : stdout;
@@ -133,7 +137,7 @@ int mgl_bmp_save(const char *fname, int w, int h, unsigned char **p)
return 0;
}
//-----------------------------------------------------------------------------
-int mgl_tga_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_tga_save(const char *fname, int w, int h, unsigned char **p)
{
bool fl = strcmp(fname,"-");
FILE *fp = fl ? fopen(fname, "wb") : stdout;
@@ -158,7 +162,7 @@ int mgl_tga_save(const char *fname, int w, int h, unsigned char **p)
return 0;
}
//-----------------------------------------------------------------------------
-int mgl_jpeg_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_jpeg_save(const char *fname, int w, int h, unsigned char **p)
{
#if MGL_HAVE_JPEG
struct jpeg_compress_struct cinfo;
@@ -188,7 +192,7 @@ int mgl_jpeg_save(const char *fname, int w, int h, unsigned char **p)
#endif
}
//-----------------------------------------------------------------------------
-void mgl_printf(void *fp, bool gz, const char *str, ...)
+void MGL_NO_EXPORT mgl_printf(void *fp, bool gz, const char *str, ...)
{
char buf[512];
va_list lst;
@@ -199,7 +203,7 @@ void mgl_printf(void *fp, bool gz, const char *str, ...)
else fprintf((FILE *)fp, "%s", buf);
}
//---------------------------------------------------------------------------
-int mgl_bps_save(const char *fname, int w, int h, unsigned char **p)
+int MGL_NO_EXPORT mgl_bps_save(const char *fname, int w, int h, unsigned char **p)
{
time_t now; time(&now);
register long i,j;
@@ -223,7 +227,7 @@ int mgl_bps_save(const char *fname, int w, int h, unsigned char **p)
return 0;
}
//-----------------------------------------------------------------------------
-int mgl_gif_save(const char *fname, int w, int h, unsigned char **l)
+int MGL_NO_EXPORT mgl_gif_save(const char *fname, int w, int h, unsigned char **l)
{
#if MGL_HAVE_GIF
#if GIFLIB_MAJOR>=5
@@ -398,7 +402,7 @@ void mglCanvas::DelFrame(long i)
#define _GR_ ((mglCanvas *)(*gr))
#define _Gr_ ((mglCanvas *)(gr))
//-----------------------------------------------------------------------------
-void mgl_write_png(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_png(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f,true);
@@ -410,12 +414,12 @@ void mgl_write_png(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_png_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_png_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_png(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_png_solid(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_png_solid(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f);
@@ -427,12 +431,12 @@ void mgl_write_png_solid(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_png_solid_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_png_solid_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_png_solid(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_jpg(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_jpg(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f);
@@ -444,12 +448,12 @@ void mgl_write_jpg(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_jpg_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_jpg_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_jpg(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_tga(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_tga(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f,true);
@@ -461,12 +465,12 @@ void mgl_write_tga(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_tga_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_tga_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_tga(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_bmp(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_bmp(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f);
@@ -478,12 +482,12 @@ void mgl_write_bmp(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_bmp_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_bmp_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_bmp(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_bps(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_bps(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f);
@@ -495,12 +499,12 @@ void mgl_write_bps(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_bps_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_bps_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_bps(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_write_gif(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_gif(HMGL gr, const char *fname,const char *)
{
long w,h; unsigned char *f=0, **p=0;
p =_Gr_->GetRGBLines(w,h,f);
@@ -512,21 +516,21 @@ void mgl_write_gif(HMGL gr, const char *fname,const char *)
free(p); if(f) free(f);
}
}
-void mgl_write_gif_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_gif_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_gif(_GR_,s,f); delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_start_gif(HMGL gr, const char *fname,int ms)
+void MGL_EXPORT mgl_start_gif(HMGL gr, const char *fname,int ms)
{ _Gr_->StartGIF(fname,ms); }
-void mgl_start_gif_(uintptr_t *gr, const char *fname,int *ms,int l)
+void MGL_EXPORT mgl_start_gif_(uintptr_t *gr, const char *fname,int *ms,int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
mgl_start_gif(_GR_,s,*ms); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_close_gif(HMGL gr) { _Gr_->CloseGIF(); }
-void mgl_close_gif_(uintptr_t *gr) { mgl_close_gif(_GR_); }
+void MGL_EXPORT mgl_close_gif(HMGL gr) { _Gr_->CloseGIF(); }
+void MGL_EXPORT mgl_close_gif_(uintptr_t *gr) { mgl_close_gif(_GR_); }
//-----------------------------------------------------------------------------
-void mgl_write_frame(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_frame(HMGL gr, const char *fname,const char *descr)
{
char buf[64];
if(!fname || !fname[0])
@@ -551,7 +555,7 @@ void mgl_write_frame(HMGL gr, const char *fname,const char *descr)
if(!strcmp(fname+len-4,".off")) mgl_write_off(gr,fname,descr,0);
// if(!strcmp(fname+len-4,".x3d")) mgl_write_x3d(gr,fname,descr,1);
}
-void mgl_write_frame_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_frame_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_frame(_GR_,s,f); delete []s; delete []f;}
@@ -560,7 +564,7 @@ void mgl_write_frame_(uintptr_t *gr, const char *fname,const char *descr,int l,i
#include <io.h>
#include <direct.h>
#endif
-void mgl_show_image(HMGL gr, const char *viewer, int keep)
+void MGL_EXPORT mgl_show_image(HMGL gr, const char *viewer, int keep)
{
char fname[128], *cmd = new char [128];
sprintf(fname,"%s.png", tmpnam(NULL));
@@ -589,7 +593,7 @@ void mgl_show_image(HMGL gr, const char *viewer, int keep)
if(system(cmd)==-1) printf("Error to call external viewer\n");
delete []cmd;
}
-void mgl_show_image_(uintptr_t *gr, const char *viewer, int *keep, int l)
+void MGL_EXPORT mgl_show_image_(uintptr_t *gr, const char *viewer, int *keep, int l)
{ char *s=new char[l+1]; memcpy(s,viewer,l); s[l]=0;
mgl_show_image(_GR_,s,*keep); delete []s; }
//-----------------------------------------------------------------------------
diff --git a/src/export_2d.cpp b/src/export_2d.cpp
index efe51da..4987e46 100644
--- a/src/export_2d.cpp
+++ b/src/export_2d.cpp
@@ -30,7 +30,7 @@
#define _Gr_ ((mglCanvas *)(gr))
void mgl_printf(void *fp, bool gz, const char *str, ...);
//-----------------------------------------------------------------------------
-const char *mgl_get_dash(unsigned short d, mreal w)
+MGL_NO_EXPORT const char *mgl_get_dash(unsigned short d, mreal w)
{
static char b[32];
static std::string s;
@@ -52,7 +52,7 @@ const char *mgl_get_dash(unsigned short d, mreal w)
return s.c_str();
}
//-----------------------------------------------------------------------------
-bool mgl_is_same(HMGL gr, const mglPrim &pr,mreal wp,mglColor cp,int st)
+bool MGL_NO_EXPORT mgl_is_same(HMGL gr, const mglPrim &pr,mreal wp,mglColor cp,int st)
{
if(abs(pr.type)!=1) return false;
if(pr.w>=1 && wp!=pr.w) return false;
@@ -62,7 +62,7 @@ bool mgl_is_same(HMGL gr, const mglPrim &pr,mreal wp,mglColor cp,int st)
return (cp==c);
}
//-----------------------------------------------------------------------------
-void put_line(HMGL gr, void *fp, bool gz, long i, mreal wp, mglColor cp,int st, const char *ifmt, const char *nfmt, bool neg, mreal fc)
+void MGL_NO_EXPORT put_line(HMGL gr, void *fp, bool gz, long i, mreal wp, mglColor cp,int st, const char *ifmt, const char *nfmt, bool neg, mreal fc)
{
long n1=gr->GetPrm(i).n1, n2=gr->GetPrm(i).n2;
if(n1>n2) { n1=gr->GetPrm(i).n2; n2=gr->GetPrm(i).n1; }
@@ -131,7 +131,7 @@ void put_line(HMGL gr, void *fp, bool gz, long i, mreal wp, mglColor cp,int st,
//-----------------------------------------------------------------------------
//put_desc(fp,"%c%c%c_%04x {", "np %d %d mt %d %d ll %d %d ll cp fill\n",
//"np %d %d mt ", "%d %d ll ", "cp dr\n", "} def")
-void put_desc(HMGL gr, void *fp, bool gz, const char *pre, const char *ln1, const char *ln2, const char *ln3, const char *suf)
+void MGL_NO_EXPORT put_desc(HMGL gr, void *fp, bool gz, const char *pre, const char *ln1, const char *ln2, const char *ln3, const char *suf)
{
register long i,j,n;
wchar_t *g;
@@ -202,7 +202,7 @@ mglColor mglCanvas::GetColor(const mglPrim &p)
return mglColor(res[0]/255.,res[1]/255.,res[2]/255.,res[3]/255.);
}
//-----------------------------------------------------------------------------
-void mgl_write_eps(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_eps(HMGL gr, const char *fname,const char *descr)
{
if(!fname || *fname==0) return;
if(gr->GetPrmNum()<1) return;
@@ -292,7 +292,7 @@ void mgl_write_eps(HMGL gr, const char *fname,const char *descr)
{
mreal x0 = p1.x,y0 = p1.y;
sprintf(str,"%.2g lw %.2g %.2g %.2g rgb ", 50*q.s*q.w>1?50*q.s*q.w:1, cp.r,cp.g,cp.b);
- wp=1;
+ wp=1; // NOTE: this may renew line style if a mark inside!
if(q.s!=qs_old)
{
mgl_printf(fp, gz, "/ss {%g} def\n",q.s);
@@ -349,11 +349,13 @@ void mgl_write_eps(HMGL gr, const char *fname,const char *descr)
if(sd && sd[0]) mgl_printf(fp, gz, "%s [%s] %g sd dr\n",str,sd,q.w*q.s);
else mgl_printf(fp, gz, "%s d0 dr\n",str);
}
- else if(q.type==4 && !mgl_isnan(q.w)) // glyph
+ else if(q.type==4) // glyph
{
+ float phi = gr->GetGlyphPhi(gr->GetPnt(q.n2),q.w);
+ if(mgl_isnan(phi)) continue;
mreal ss = q.s/2, xx = p1.u, yy = p1.v, zz = q.p;
mgl_printf(fp, gz, "gsave\t%g %g translate %g %g scale %g rotate %s\n",
- p1.x, p1.y, ss, ss, -q.w, str);
+ p1.x, p1.y, ss, ss, -phi, str);
if(q.n3&8) // this is "line"
{
mreal dy = 0.004,f=fabs(zz);
@@ -376,12 +378,12 @@ void mgl_write_eps(HMGL gr, const char *fname,const char *descr)
mgl_printf(fp, gz, "\nshowpage\n%%%%EOF\n");
if(strcmp(fname,"-")) { if(gz) gzclose((gzFile)fp); else fclose((FILE *)fp); }
}
-void mgl_write_eps_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_eps_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_eps(_GR_,s,d); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_write_svg(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_svg(HMGL gr, const char *fname,const char *descr)
{
if(!fname || *fname==0) return;
if(gr->GetPrmNum()<1) return;
@@ -501,12 +503,14 @@ void mgl_write_svg(HMGL gr, const char *fname,const char *descr)
mgl_printf(fp, gz, "<g fill=\"#%02x%02x%02x\" opacity=\"%g\">\n", int(255*cp.r),int(255*cp.g),int(255*cp.b),cp.a);
mgl_printf(fp, gz, "<path d=\"M %g %g L %g %g L %g %g L %g %g Z\"/> </g>\n", p1.x, hh-p1.y, p2.x, hh-p2.y, p4.x, hh-p4.y, p3.x, hh-p3.y);
}
- else if(q.type==4 && !mgl_isnan(q.w))
+ else if(q.type==4)
{
+ float phi = gr->GetGlyphPhi(gr->GetPnt(q.n2),q.w);
+ if(mgl_isnan(phi)) continue;
mreal ss = q.s/2, xx = p1.u, yy = p1.v, zz = q.p;
if(q.n3&8) // this is "line"
{
- mgl_printf(fp, gz, "<g transform=\"translate(%g,%g) scale(%.3g,%.3g) rotate(%g)\"", p1.x, hh-p1.y, ss, -ss, -q.w);
+ mgl_printf(fp, gz, "<g transform=\"translate(%g,%g) scale(%.3g,%.3g) rotate(%g)\"", p1.x, hh-p1.y, ss, -ss, -phi);
if(q.n3&4)
mgl_printf(fp, gz, " stroke=\"#%02x%02x%02x\">", int(255*cp.r),int(255*cp.g),int(255*cp.b));
else
@@ -532,14 +536,14 @@ void mgl_write_svg(HMGL gr, const char *fname,const char *descr)
mgl_printf(fp, gz, "</g></svg>");
if(strcmp(fname,"-")) { if(gz) gzclose((gzFile)fp); else fclose((FILE *)fp); }
}
-void mgl_write_svg_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_svg_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_svg(_GR_,s,d); delete []s; delete []d; }
//-----------------------------------------------------------------------------
/// Color names easely parsed by LaTeX
struct mglSVGName { const char *name; mreal r,g,b; };
-mglSVGName mgl_names[]={{"AliceBlue",.94,.972,1},
+MGL_NO_EXPORT mglSVGName mgl_names[]={{"AliceBlue",.94,.972,1},
{"Apricot", 0.984, 0.725, 0.51},
{"Aquamarine", 0, 0.71, 0.745},
{"Bittersweet", 0.753, 0.31, 0.0902},
@@ -618,7 +622,7 @@ mglSVGName mgl_names[]={{"AliceBlue",.94,.972,1},
{"yellow", 1,1,0},
{"",-1,-1,-1}};
//-----------------------------------------------------------------------------
-const char *mglColorName(mglColor c) // return closest SVG color
+MGL_NO_EXPORT const char *mglColorName(mglColor c) // return closest SVG color
{
register long i;
register mreal d, dm=10;
@@ -631,7 +635,7 @@ const char *mglColorName(mglColor c) // return closest SVG color
return name;
}
//-----------------------------------------------------------------------------
-void mgl_write_tex(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_tex(HMGL gr, const char *fname,const char *descr)
{
if(gr->GetPrmNum()<1) return;
_Gr_->clr(MGL_FINISHED); _Gr_->Finish(false);
diff --git a/src/export_3d.cpp b/src/export_3d.cpp
index 9fe45ba..3eef724 100644
--- a/src/export_3d.cpp
+++ b/src/export_3d.cpp
@@ -23,9 +23,9 @@
#undef _GR_
#define _GR_ ((mglCanvas *)(*gr))
#define _Gr_ ((mglCanvas *)(gr))
-int mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
-int mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
-void mgl_printf(void *fp, bool gz, const char *str, ...);
+int MGL_NO_EXPORT mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
+int MGL_NO_EXPORT mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
+void MGL_NO_EXPORT mgl_printf(void *fp, bool gz, const char *str, ...);
//-----------------------------------------------------------------------------
void mglTexture::GetRGBA(unsigned char *f) const
{
@@ -46,7 +46,7 @@ void mglTexture::GetRGBA(unsigned char *f) const
}
}
//-----------------------------------------------------------------------------
-void mgl_obj_glyph_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp)
+void MGL_EXPORT mgl_obj_glyph_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp)
{
mreal f = q.p/2, dx=p.u/2, dy=p.v/2, x,y;
mreal c=q.s*cos(q.w*M_PI/180), s=-q.s*sin(q.w*M_PI/180);
@@ -117,9 +117,9 @@ void mgl_obj_glyph_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp)
}
//-----------------------------------------------------------------------------
/* M.Vidassov take/move it into src/obj.cpp */
-void mgl_obj_prim_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp, mreal size)
+void MGL_EXPORT mgl_obj_prim_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp, mreal size)
{
- char type = q.n4; mreal ss=size*0.35;
+ char type = q.n4; mreal ss=size;
register long i=q.n1+1,j;
register long n1=q.n1+1,n2=q.n2+1,n3=q.n3+1,n4=q.n4+1;
switch(q.type)
@@ -281,7 +281,7 @@ void mgl_obj_prim_old(HMGL gr, const mglPrim &q, const mglPnt &p, FILE *fp, mrea
}
}
//-----------------------------------------------------------------------------
-void mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png)
+void MGL_EXPORT mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png)
{
if(gr->GetPrmNum()==0) return; // nothing to do
register size_t i,j;
@@ -320,7 +320,7 @@ void mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png
for(j=0;j<p.size();j++)
{
const mglPrim &q=gr->GetPrm(p[j]);
- mgl_obj_prim_old(gr, q, gr->GetPnt(q.n1), fp, q.s*gr->FontFactor());
+ mgl_obj_prim_old(gr, q, gr->GetPnt(q.n1), fp, q.s);
}
gr->Grp[i].p.clear(); // we don't need indexes anymore
}
@@ -350,12 +350,12 @@ void mgl_write_obj_old(HMGL gr, const char *fname,const char *descr, int use_png
else mgl_tga_save(tname,256,256*j,pbuf);
free(pbuf); delete []buf; delete []tname;
}
-void mgl_write_obj_old_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int l,int n)
+void MGL_EXPORT mgl_write_obj_old_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_obj_old(_GR_,s,d,*use_png); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_write_stl(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_stl(HMGL gr, const char *fname,const char *descr)
{
if(gr->GetPrmNum()==0) return; // nothing to do
FILE *fp = fopen(fname,"wt");
@@ -400,12 +400,12 @@ void mgl_write_stl(HMGL gr, const char *fname,const char *descr)
fprintf(fp,"endsolid %s",(descr && *descr)?descr:"mathgl");
fclose(fp);
}
-void mgl_write_stl_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_stl_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_stl(_GR_,s,d); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_write_xyz(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_xyz(HMGL gr, const char *fname,const char *descr)
{
if(gr->GetPrmNum()==0) return; // nothing to do
@@ -438,12 +438,12 @@ void mgl_write_xyz(HMGL gr, const char *fname,const char *descr)
}
fclose(fp); fclose(ff); delete []tname;
}
-void mgl_write_xyz_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_xyz_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_xyz(_GR_,s,d); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_write_off(HMGL gr, const char *fname,const char *descr, int colored)
+void MGL_EXPORT mgl_write_off(HMGL gr, const char *fname,const char *descr, int colored)
{
register long i,nf=0;
for(i=0;i<gr->GetPrmNum();i++) // find number of faces
@@ -499,18 +499,11 @@ void mgl_write_off(HMGL gr, const char *fname,const char *descr, int colored)
}
fclose(fp);
}
-void mgl_write_off_(uintptr_t *gr, const char *fname,const char *descr,int *colored,int l,int n)
+void MGL_EXPORT mgl_write_off_(uintptr_t *gr, const char *fname,const char *descr,int *colored,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_off(_GR_,s,d,*colored); delete []s; delete []d; }
//-----------------------------------------------------------------------------
-void mgl_write_idtf(HMGL /*gr*/, const char */*fname*/,const char */*descr*/)
-{ /*_Gr_->WriteIDTF(fname,descr);*/ } // TODO: Add idtf support later
-void mgl_write_idtf_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
-{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
- char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
- mgl_write_idtf(_GR_,s,f); delete []s; delete []f; }
-//-----------------------------------------------------------------------------
bool mglCanvas::WriteJSON(const char *fname)
{
bool fl = strcmp(fname,"-");
@@ -583,9 +576,9 @@ bool mglCanvas::WriteJSON(const char *fname)
return false;
}
//-----------------------------------------------------------------------------
-void mgl_write_json(HMGL gr, const char *fname,const char *)
+void MGL_EXPORT mgl_write_json(HMGL gr, const char *fname,const char *)
{ _Gr_->WriteJSON(fname); }
-void mgl_write_json_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_json_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_json(_GR_,s,f); delete []s; delete []f; }
@@ -636,9 +629,9 @@ bool mglCanvas::ExportMGLD(const char *fname, const char *descr)
return false;
}
//-----------------------------------------------------------------------------
-void mgl_export_mgld(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_export_mgld(HMGL gr, const char *fname,const char *descr)
{ _Gr_->ExportMGLD(fname, descr); }
-void mgl_export_mgld_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_export_mgld_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_export_mgld(_GR_,s,f); delete []s; delete []f; }
@@ -724,13 +717,13 @@ bool mglCanvas::ImportMGLD(const char *fname, bool add)
delete []buf; fclose(fp); return false;
}
//-----------------------------------------------------------------------------
-void mgl_import_mgld(HMGL gr, const char *fname, int add)
+void MGL_EXPORT mgl_import_mgld(HMGL gr, const char *fname, int add)
{ _Gr_->ImportMGLD(fname, add); }
-void mgl_import_mgld_(uintptr_t *gr, const char *fname, int *add, int l)
+void MGL_EXPORT mgl_import_mgld_(uintptr_t *gr, const char *fname, int *add, int l)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
mgl_import_mgld(_GR_,s,*add); delete []s; }
//-----------------------------------------------------------------------------
-/*void mgl_xgl_prim(const mglPrim &q, const mglPnt &p, FILE *fp, mreal size)
+/*void MGL_EXPORT mgl_xgl_prim(const mglPrim &q, const mglPnt &p, FILE *fp, mreal size)
{
char type = q.n4; mreal ss=size*0.35;
register long i=q.n1,j;
@@ -960,14 +953,14 @@ void mglCanvas::WriteXGL(const char *fname,const char *descr)
fprintf(fp,"</WORLD>"); fclose(fp); delete []pg;
}
//-----------------------------------------------------------------------------
-void mgl_write_xgl(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_xgl(HMGL gr, const char *fname,const char *descr)
{ _Gr_->WriteXGL(fname,descr); }
-void mgl_write_xgl_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_xgl_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_xgl(_GR_,s,d); delete []s; delete []d; }*/
//-----------------------------------------------------------------------------
-void mgl_x3d_mdef(HMGL gr, void *fp, bool gz)
+void MGL_EXPORT mgl_x3d_mdef(HMGL gr, void *fp, bool gz)
{
bool m_p=false,m_x=false,m_d=false,m_v=false,m_t=false,
m_s=false,m_a=false,m_o=false,m_T=false,
@@ -1015,7 +1008,7 @@ void mgl_x3d_mdef(HMGL gr, void *fp, bool gz)
mgl_printf(fp, gz, "\n");
}
//-----------------------------------------------------------------------------
-void mgl_x3d_prim(const mglPrim &q, const mglPnt &p, const long *pnt, void *fp,bool gz, mreal size)
+void MGL_EXPORT mgl_x3d_prim(const mglPrim &q, const mglPnt &p, const long *pnt, void *fp,bool gz, mreal size)
{
// <ProtoInstance name='EmissiveMaterial'/>
/* if(q.type==0) // mark
@@ -1102,7 +1095,7 @@ void mgl_x3d_prim(const mglPrim &q, const mglPnt &p, const long *pnt, void *fp,b
}*/
}
//-----------------------------------------------------------------------------
-void mgl_write_x3d(HMGL gr, const char *fname,const char *descr)
+void MGL_EXPORT mgl_write_x3d(HMGL gr, const char *fname,const char *descr)
{
if(gr->GetPrmNum()<1) return;
time_t now; time(&now);
@@ -1179,7 +1172,7 @@ void mgl_write_x3d(HMGL gr, const char *fname,const char *descr)
mgl_printf(fp, gz, "</Scene>\n");
if(gz) gzclose((gzFile)fp); else fclose((FILE *)fp);
}
-void mgl_write_x3d_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
+void MGL_EXPORT mgl_write_x3d_(uintptr_t *gr, const char *fname,const char *descr,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,descr,n); d[n]=0;
mgl_write_x3d(_GR_,s,d); delete []s; delete []d; }
diff --git a/src/fit.cpp b/src/fit.cpp
index cf2f494..8694448 100644
--- a/src/fit.cpp
+++ b/src/fit.cpp
@@ -31,7 +31,7 @@
int mglFitPnts=100; ///< Number of output points in fitting
char mglFitRes[1024]; ///< Last fitted formula
//-----------------------------------------------------------------------------
-void mgl_puts_fit(HMGL gr, double x, double y, double z, const char *pre, const char *font, double size)
+void MGL_EXPORT mgl_puts_fit(HMGL gr, double x, double y, double z, const char *pre, const char *font, double size)
{
long n = strlen(mglFitRes)+(pre?strlen(pre):0)+1;
char *buf = new char[n];
@@ -40,7 +40,7 @@ void mgl_puts_fit(HMGL gr, double x, double y, double z, const char *pre, const
mgl_puts(gr,x,y,z,buf,font,size);
delete []buf;
}
-void mgl_puts_fit_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, const char *prefix, const char *font, mreal *size, int l, int n)
+void MGL_EXPORT mgl_puts_fit_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, const char *prefix, const char *font, mreal *size, int l, int n)
{
char *s=new char[l+1]; memcpy(s,prefix,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,font,n); d[n]=0;
@@ -79,7 +79,7 @@ int mgl_fit__f (const gsl_vector *x, void *data, gsl_vector *f)
return GSL_SUCCESS;
}
//-----------------------------------------------------------------------------
-int mgl_fit__df (const gsl_vector * x, void *data, gsl_matrix * J)
+int MGL_NO_EXPORT mgl_fit__df (const gsl_vector * x, void *data, gsl_matrix * J)
{
mglFitData *fd = (mglFitData *)data;
register long i,j;
@@ -96,7 +96,7 @@ int mgl_fit__df (const gsl_vector * x, void *data, gsl_matrix * J)
return GSL_SUCCESS;
}
//-----------------------------------------------------------------------------
-int mgl_fit__fdf (const gsl_vector * x, void *data, gsl_vector * f, gsl_matrix * J)
+int MGL_NO_EXPORT mgl_fit__fdf (const gsl_vector * x, void *data, gsl_vector * f, gsl_matrix * J)
{
mgl_fit__f(x, data, f);
mgl_fit__df(x, data, J);
@@ -105,7 +105,7 @@ int mgl_fit__fdf (const gsl_vector * x, void *data, gsl_vector * f, gsl_matrix *
#endif
//-----------------------------------------------------------------------------
/// GSL based fitting procedure for formula/arguments specified by string
-mreal mgl_fit_base(mglFitData *fd, mreal *ini)
+mreal MGL_NO_EXPORT mgl_fit_base(mglFitData *fd, mreal *ini)
{
#if MGL_HAVE_GSL
register long i,m=fd->m,n=fd->n,iter=0;
@@ -171,7 +171,7 @@ void mglPrepareFitEq(mglBase *gr,mreal chi, const char *eq, const char *var, mre
mglFitRes[k]=0;
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_1(HMGL gr, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_1(HMGL gr, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx()); x.Fill(gr->Min.x, gr->Max.x);
@@ -179,7 +179,7 @@ HMDT mgl_fit_1(HMGL gr, HCDT y, const char *eq, const char *var, HMDT ini, const
return mgl_fit_xys(gr,&x,y,&s,eq,var,ini,0);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_2(HMGL gr, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_2(HMGL gr, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()); x.Fill(gr->Min.x, gr->Max.x);
@@ -188,7 +188,7 @@ HMDT mgl_fit_2(HMGL gr, HCDT z, const char *eq, const char *var, HMDT ini, const
return mgl_fit_xyzs(gr,&x,&y,z,&s,eq,var,ini,0);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_3(HMGL gr, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_3(HMGL gr, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()); x.Fill(gr->Min.x, gr->Max.x);
@@ -198,32 +198,32 @@ HMDT mgl_fit_3(HMGL gr, HCDT a, const char *eq, const char *var, HMDT ini, const
return mgl_fit_xyzas(gr,&x,&y,&z,a,&s,eq,var,ini,0);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xy(HMGL gr, HCDT x, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xy(HMGL gr, HCDT x, HCDT y, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData s(y); s.Fill(1,1);
return mgl_fit_xys(gr,x,y,&s,eq,var,ini,opt);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData s(z); s.Fill(1,1);
return mgl_fit_xyzs(gr,x,y,z,&s,eq,var,ini,opt);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xyza(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xyza(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData s(a); s.Fill(1,1);
return mgl_fit_xyzas(gr,x,y,z,a,&s,eq,var,ini,opt);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_ys(HMGL gr, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_ys(HMGL gr, HCDT y, HCDT s, const char *eq, const char *var, HMDT ini, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx()); x.Fill(gr->Min.x, gr->Max.x);
return mgl_fit_xys(gr,&x,y,s,eq,var,ini,0);
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xys(HMGL gr, HCDT xx, HCDT yy, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xys(HMGL gr, HCDT xx, HCDT yy, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData *fit=new mglData;
long m = yy->GetNx();
@@ -267,7 +267,7 @@ HMDT mgl_fit_xys(HMGL gr, HCDT xx, HCDT yy, HCDT ss, const char *eq, const char
delete fd.eq; gr->LoadState(); return fit;
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xyzs(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xyzs(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData *fit=new mglData;
long m=zz->GetNx(),n=zz->GetNy();
@@ -318,7 +318,7 @@ HMDT mgl_fit_xyzs(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT ss, const char *eq, c
delete fd.eq; gr->LoadState(); return fit;
}
//-----------------------------------------------------------------------------
-HMDT mgl_fit_xyzas(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT aa, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
+HMDT MGL_EXPORT mgl_fit_xyzas(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT aa, HCDT ss, const char *eq, const char *var, HMDT ini, const char *opt)
{
mglData *fit=new mglData;
register long i,j,k,i0;
@@ -370,7 +370,7 @@ HMDT mgl_fit_xyzas(HMGL gr, HCDT xx, HCDT yy, HCDT zz, HCDT aa, HCDT ss, const c
delete fd.eq; gr->LoadState(); return fit;
}
//-----------------------------------------------------------------------------
-HMDT mgl_hist_x(HMGL gr, HCDT x, HCDT a, const char *opt)
+HMDT MGL_EXPORT mgl_hist_x(HMGL gr, HCDT x, HCDT a, const char *opt)
{
long nn=a->GetNx()*a->GetNy()*a->GetNz();
if(nn!=x->GetNx()*x->GetNy()*x->GetNz())
@@ -396,7 +396,7 @@ HMDT mgl_hist_x(HMGL gr, HCDT x, HCDT a, const char *opt)
gr->LoadState(); return res;
}
//-----------------------------------------------------------------------------
-HMDT mgl_hist_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *opt)
+HMDT MGL_EXPORT mgl_hist_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *opt)
{
long nn=a->GetNx()*a->GetNy()*a->GetNz();
if(nn!=x->GetNx()*x->GetNy()*x->GetNz() || nn!=y->GetNx()*y->GetNy()*y->GetNz())
@@ -425,7 +425,7 @@ HMDT mgl_hist_xy(HMGL gr, HCDT x, HCDT y, HCDT a, const char *opt)
gr->LoadState(); return res;
}
//-----------------------------------------------------------------------------
-HMDT mgl_hist_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *opt)
+HMDT MGL_EXPORT mgl_hist_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *opt)
{
long nn=a->GetNx()*a->GetNy()*a->GetNz();
if(nn!=x->GetNx()*x->GetNy()*x->GetNz() || nn!=y->GetNx()*y->GetNy()*y->GetNz() || nn!=z->GetNx()*z->GetNy()*z->GetNz())
@@ -459,22 +459,22 @@ HMDT mgl_hist_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *opt)
gr->LoadState(); return res;
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_hist_x_(uintptr_t* gr, uintptr_t* x, uintptr_t* a, const char *opt, int lo)
+uintptr_t MGL_EXPORT mgl_hist_x_(uintptr_t* gr, uintptr_t* x, uintptr_t* a, const char *opt, int lo)
{ char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
uintptr_t r = (uintptr_t)mgl_hist_x(_GR_, _DA_(x), _DA_(a), o);
delete []o; return r; }
-uintptr_t mgl_hist_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* a, const char *opt, int lo)
+uintptr_t MGL_EXPORT mgl_hist_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* a, const char *opt, int lo)
{ char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
uintptr_t r = (uintptr_t)mgl_hist_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), o);
delete []o; return r; }
-uintptr_t mgl_hist_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *opt, int lo)
+uintptr_t MGL_EXPORT mgl_hist_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *opt, int lo)
{ char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
uintptr_t r = (uintptr_t)mgl_hist_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), o);
delete []o; return r; }
//-----------------------------------------------------------------------------
-const char *mgl_get_fit(HMGL ) { return mglFitRes; }
+MGL_EXPORT const char *mgl_get_fit(HMGL ) { return mglFitRes; }
//-----------------------------------------------------------------------------
-uintptr_t mgl_fit_1_(uintptr_t* gr, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_1_(uintptr_t* gr, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -482,7 +482,7 @@ uintptr_t mgl_fit_1_(uintptr_t* gr, uintptr_t* y, const char *eq, const char *va
uintptr_t r = (uintptr_t)mgl_fit_1(_GR_, _DA_(y), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_2_(uintptr_t* gr, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_2_(uintptr_t* gr, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -490,7 +490,7 @@ uintptr_t mgl_fit_2_(uintptr_t* gr, uintptr_t* z, const char *eq, const char *va
uintptr_t r = (uintptr_t)mgl_fit_2(_GR_, _DA_(z), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_3_(uintptr_t* gr, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_3_(uintptr_t* gr, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -498,7 +498,7 @@ uintptr_t mgl_fit_3_(uintptr_t* gr, uintptr_t* a, const char *eq, const char *va
uintptr_t r = (uintptr_t)mgl_fit_3(_GR_, _DA_(a), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -506,7 +506,7 @@ uintptr_t mgl_fit_xy_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, const char *eq,
uintptr_t r = (uintptr_t)mgl_fit_xy(_GR_, _DA_(x), _DA_(y), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -514,7 +514,7 @@ uintptr_t mgl_fit_xyz_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z,
uintptr_t r = (uintptr_t)mgl_fit_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xyza_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xyza_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -522,7 +522,7 @@ uintptr_t mgl_fit_xyza_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z,
uintptr_t r = (uintptr_t)mgl_fit_xyza(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_ys_(uintptr_t* gr, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_ys_(uintptr_t* gr, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -530,7 +530,7 @@ uintptr_t mgl_fit_ys_(uintptr_t* gr, uintptr_t* y, uintptr_t* ss, const char *eq
uintptr_t r = (uintptr_t)mgl_fit_ys(_GR_, _DA_(y), _DA_(ss), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xys_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xys_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -538,7 +538,7 @@ uintptr_t mgl_fit_xys_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* ss,
uintptr_t r = (uintptr_t)mgl_fit_xys(_GR_, _DA_(x), _DA_(y), _DA_(ss), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xyzs_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xyzs_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
@@ -546,7 +546,7 @@ uintptr_t mgl_fit_xyzs_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z,
uintptr_t r = (uintptr_t)mgl_fit_xyzs(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ss), s, d, _DM_(ini), o);
delete []o; delete []s; delete []d; return r;
}
-uintptr_t mgl_fit_xyzas_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
+uintptr_t MGL_EXPORT mgl_fit_xyzas_(uintptr_t* gr, uintptr_t* x, uintptr_t* y, uintptr_t* z, uintptr_t* a, uintptr_t* ss, const char *eq, const char *var, uintptr_t *ini, const char *opt, int l, int n, int lo)
{
char *s=new char[l+1]; memcpy(s,eq,l); s[l]=0;
char *d=new char[n+1]; memcpy(d,var,n); d[n]=0;
diff --git a/src/font.cpp b/src/font.cpp
index 894472b..9ef672a 100644
--- a/src/font.cpp
+++ b/src/font.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_font.cpp is part of Math Graphic Library
+ * font.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -230,11 +230,11 @@ long mglFont::Internal(unsigned s) const
}
//-----------------------------------------------------------------------------
/// Table of acents and its UTF8 codes
-mglTeXsymb mgl_act_symb[] = {
+MGL_NO_EXPORT mglTeXsymb mgl_act_symb[] = {
{0x02c6, L"hat"}, {0x02dc, L"tilde"}, {0x02d9, L"dot"}, {0x00a8, L"ddot"}, {0x20db, L"dddot"}, {0x20dc, L"ddddot"}, {0x02ca, L"acute"}, {0x02c7, L"check"}, {0x02cb, L"grave"}, {0x20d7, L"vec"}, {0x02c9, L"bar"}, {0x02d8, L"breve"},
/*end*/{0, L"\0"}};
//-----------------------------------------------------------------------------
-int mgl_tex_symb_cmp(const void *a, const void *b)
+int MGL_NO_EXPORT mgl_tex_symb_cmp(const void *a, const void *b)
{
const mglTeXsymb *aa = (const mglTeXsymb *)a;
const mglTeXsymb *bb = (const mglTeXsymb *)b;
@@ -325,7 +325,8 @@ void mglFont::Convert(const wchar_t *str, unsigned *res) const
else if(ch=='@') res[j++] = MGL_FONT_UPPER|MGL_FONT_LOWER;
else if(ch=='{') res[j++] = unsigned(-3);
else if(ch=='}') res[j++] = unsigned(-4);
- else if(ch=='#') res[j++] = MGL_COLOR_MASK + (0xff & str[++i]);
+ else if(ch=='#' && str[i+1]>' ')
+ res[j++] = MGL_COLOR_MASK + (0xff & str[++i]);
else res[j++] = ch; // It is just symbol
}
res[j] = 0;
@@ -636,7 +637,7 @@ bool mglFont::read_data(const char *fname, float *ff, short *wdt, short *lnum,
lnum[j] = tmpnl; posl[j] = tmppl+cur;
tnum[j] = tmpnt; post[j] = tmppt+cur;
}
- for(j=i=0;i<int(s);i++)
+ for(i=0;i<int(s);i++)
{
for(j=0;j<256;j++)
{ str[j] = ch = gzgetc(fp); if(ch<=' ') break; }
@@ -675,7 +676,7 @@ bool mglFont::read_main(const char *fname, unsigned &cur)
numl[0][i] = tmpnl; ln[0][i] = tmppl;
numt[0][i] = tmpnt; tr[0][i] = tmppt;
}
- for(j=i=0;i<int(s);i++)
+ for(i=0;i<int(s);i++)
{
for(j=0;j<256;j++)
{ str[j] = ch = gzgetc(fp); if(ch<=' ') break; }
diff --git a/src/obj.cpp b/src/obj.cpp
index ba22e18..46ee9b0 100644
--- a/src/obj.cpp
+++ b/src/obj.cpp
@@ -23,9 +23,9 @@
#undef _GR_
#define _GR_ ((mglCanvas *)(*gr))
#define _Gr_ ((mglCanvas *)(gr))
-int mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
-int mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
-void mgl_printf(void *fp, bool gz, const char *str, ...);
+int MGL_NO_EXPORT mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
+int MGL_NO_EXPORT mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
+void MGL_NO_EXPORT mgl_printf(void *fp, bool gz, const char *str, ...);
//-----------------------------------------------------------------------------
#include <climits>
#include <cassert>
@@ -406,7 +406,7 @@ static size_t power_of_two(size_t input)
}
-void mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png)
+void MGL_EXPORT mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png)
{
if(gr->GetPrmNum()==0) return; // nothing to do
@@ -521,9 +521,9 @@ void mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png)
case 0:
if (gr->GetPnt(q.n1).a > mgl_min_a) {
const mglPnt p = gr->GetPnt(q.n1) - p0;
- const mreal size = q.s*gr->FontFactor();
+ const mreal size = q.s;
const char type = q.n4;
- mreal ss=size*0.35;
+ mreal ss=size;
const mglColor c(p.r, p.g, p.b, p.a);
if(!strchr("xsSoO",type)) ss *= 1.1;
@@ -808,7 +808,7 @@ void mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png)
size_t pnti[21];
for(size_t k=0;k<=20;k++)
pnti[k]=vertexcoords.addVertexCoords(p.x+ss*cos(k*M_PI/10),p.y+ss*sin(k*M_PI/10),p.z);
- for(size_t k=0;k<=20;k++) {
+ for(size_t k=0;k<20;k++) {
grp.addTriangle(pnti[k], ti, pnti[k+1], ti, cpi, ti);
}
}
@@ -966,7 +966,7 @@ void mgl_write_obj(HMGL gr, const char *fname,const char *descr, int use_png)
delete []tname;
}
-void mgl_write_obj_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int l,int n)
+void MGL_EXPORT mgl_write_obj_(uintptr_t *gr, const char *fname,const char *descr, int *use_png,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]='\0';
char *d=new char[n+1]; memcpy(d,descr,n); d[n]='\0';
mgl_write_obj(_GR_,s,d,*use_png); delete []s; delete []d; }
diff --git a/src/opengl.cpp b/src/opengl.cpp
index 825eb2e..233e7cc 100644
--- a/src/opengl.cpp
+++ b/src/opengl.cpp
@@ -11,10 +11,10 @@
#include <algorithm>
//-----------------------------------------------------------------------------
/// Create mglGraph object in OpenGL mode.
-HMGL mgl_create_graph_gl()
+HMGL MGL_EXPORT mgl_create_graph_gl()
{ return new mglCanvasGL; }
/// Create mglGraph object in OpenGL mode.
-uintptr_t mgl_create_graph_gl_()
+uintptr_t MGL_EXPORT mgl_create_graph_gl_()
{ return uintptr_t(new mglCanvasGL); }
//-----------------------------------------------------------------------------
mglCanvasGL::mglCanvasGL() : mglCanvas(1,1) {}
@@ -160,7 +160,7 @@ void mglCanvasGL::View(mreal TetX,mreal TetY,mreal TetZ)
//-----------------------------------------------------------------------------
void mglCanvasGL::Fog(mreal d, mreal)
{
- if(d>0) // TODO: Check fog to OpenGL mode
+ if(d>0)
{
float back[4]={BDef[0]/255.f,BDef[1]/255.f,BDef[2]/255.f,BDef[3]/255.f};
glFogf(GL_FOG_MODE,GL_EXP);
diff --git a/src/other.cpp b/src/other.cpp
index 0f092ef..ed2d512 100644
--- a/src/other.cpp
+++ b/src/other.cpp
@@ -27,7 +27,7 @@
// DensX, DensY, DensZ series
//
//-----------------------------------------------------------------------------
-void mgl_dens_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_dens_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -58,7 +58,7 @@ void mgl_dens_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
mgl_surfc_xy(gr,&xx,&yy,&zz,a,sch,0);
}
//-----------------------------------------------------------------------------
-void mgl_dens_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_dens_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -89,7 +89,7 @@ void mgl_dens_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
mgl_surfc_xy(gr,&xx,&yy,&zz,a,sch,0);
}
//-----------------------------------------------------------------------------
-void mgl_dens_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_dens_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -119,18 +119,18 @@ void mgl_dens_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
mgl_surfc_xy(gr,&xx,&yy,&zz,a,sch,0);
}
//-----------------------------------------------------------------------------
-void mgl_dens_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens_x(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dens_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{
char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens_y(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dens_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{
char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
@@ -140,8 +140,8 @@ void mgl_dens_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const
// ContX, ContY, ContZ series
//
//-----------------------------------------------------------------------------
-void mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak);
-void mgl_cont_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_gen(HMGL gr, mreal val, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, int text,long ak);
+void MGL_EXPORT mgl_cont_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -182,7 +182,7 @@ void mgl_cont_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cont_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -223,7 +223,7 @@ void mgl_cont_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cont_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -263,7 +263,7 @@ void mgl_cont_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cont_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -273,7 +273,7 @@ void mgl_cont_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -283,7 +283,7 @@ void mgl_cont_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_cont_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -293,32 +293,32 @@ void mgl_cont_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cont_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_x(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_y(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_z(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_x_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_x_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_x_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_y_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_y_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_y_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cont_z_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cont_z_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cont_z_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s; }
@@ -327,8 +327,8 @@ void mgl_cont_z_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch,
// ContFX, ContFY, ContFZ series
//
//-----------------------------------------------------------------------------
-void mgl_contf_gen(HMGL gr, mreal v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak);
-void mgl_contf_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_gen(HMGL gr, mreal v1, mreal v2, HCDT a, HCDT x, HCDT y, HCDT z, mreal c, long ak);
+void MGL_EXPORT mgl_contf_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -366,7 +366,7 @@ void mgl_contf_x_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contf_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -404,7 +404,7 @@ void mgl_contf_y_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contf_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const char *opt)
{
register long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
if(mgl_isnan(sv)) sv = gr->GetOrgX('x');
@@ -441,7 +441,7 @@ void mgl_contf_z_val(HMGL gr, HCDT v, HCDT a, const char *sch, double sv, const
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_contf_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -450,7 +450,7 @@ void mgl_contf_x(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -459,7 +459,7 @@ void mgl_contf_y(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
+void MGL_EXPORT mgl_contf_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
{
mreal r = gr->SaveState(opt);
long Num = (mgl_isnan(r) || r<=0) ? 7:long(r+0.5);
@@ -468,32 +468,32 @@ void mgl_contf_z(HMGL gr, HCDT a, const char *sch, double sv, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_contf_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_x_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_x(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
/// Draw several contour plots for data a at y = *sv
-void mgl_contf_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_y_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_y(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
/// Draw several contour plots for data a at z = *sv
-void mgl_contf_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_z_(uintptr_t *gr, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_z(_GR_, _DA_(a), s, *sv, o); delete []o; delete []s; }
/// Draw contour plots for data a at x = *sv
-void mgl_contf_x_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_x_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_x_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s;}
/// Draw contour plots for data a at y = *sv
-void mgl_contf_y_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_y_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_y_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s;}
/// Draw contour plots for data a at z = *sv
-void mgl_contf_z_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_contf_z_val_(uintptr_t *gr, uintptr_t *v, uintptr_t *a, const char *sch, mreal *sv, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_contf_z_val(_GR_, _DA_(v), _DA_(a), s, *sv, o); delete []o; delete []s;}
diff --git a/src/parser.cpp b/src/parser.cpp
index ee71736..f836869 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -28,8 +28,8 @@ wchar_t *wcstokw32(wchar_t *wcs, const wchar_t *delim) { return wcstok(wcs,delim
#else
#include <unistd.h>
#endif
-void (*mgl_ask_func)(const wchar_t *, wchar_t *)=0;
-void mgl_ask_gets(const wchar_t *quest, wchar_t *res)
+MGL_EXPORT void (*mgl_ask_func)(const wchar_t *, wchar_t *)=0;
+void MGL_EXPORT mgl_ask_gets(const wchar_t *quest, wchar_t *res)
{ printf("%ls\n",quest); if(!fgetws(res,1024,stdin)) *res=0; }
//-----------------------------------------------------------------------------
mglFunc::mglFunc(const mglFunc &f)
@@ -82,7 +82,7 @@ void mglParser::ScanFunc(const wchar_t *line)
func.push_back(mglFunc(num-1, line+i));
}
//-----------------------------------------------------------------------------
-wchar_t *mgl_str_copy(const char *s)
+MGL_NO_EXPORT wchar_t *mgl_str_copy(const char *s)
{
wchar_t *str = new wchar_t[strlen(s)+1];
register long i;
@@ -91,7 +91,7 @@ wchar_t *mgl_str_copy(const char *s)
return str;
}
//-----------------------------------------------------------------------------
-int mgl_cmd_cmp(const void *a, const void *b)
+int MGL_NO_EXPORT mgl_cmd_cmp(const void *a, const void *b)
{
const mglCommand *aa = (const mglCommand *)a;
const mglCommand *bb = (const mglCommand *)b;
@@ -384,8 +384,24 @@ void mglParser::FillArg(mglGraph *gr, int k, wchar_t **arg, mglArg *a)
if(arg[n][0]=='|') a[n-1].type = -1;
else if(arg[n][0]=='\'')
{ // this is string (simplest case)
- a[n-1].type = 1; arg[n][wcslen(arg[n])-1] = 0;
- a[n-1].w = arg[n]+1; arg[n][wcslen(arg[n])] = '\'';
+ a[n-1].type = 1;
+ wchar_t *w=arg[n],ch,*f,buf[32];
+ long i,l,ll=wcslen(w);
+ for(l=i=1;i<ll;i++)
+ {
+ if(w[i]=='\'')
+ {
+ if(i==ll-1) continue;
+ i++; f = w+i;
+ for(;i<ll && w[i]!='\'';i++);
+ ch=w[i]; w[i]=0;
+ if(*f==',') f++;
+ if(*f==0) continue;
+ mglData d = mglFormulaCalc(f, this); w[i]=ch;
+ mglprintf(buf,32,L"%g",d.a[0]); a[n-1].w += buf;
+ }
+ else a[n-1].w += w[i];
+ }
}
else if(arg[n][0]=='{')
{ // this is temp data
@@ -449,7 +465,7 @@ int mglParser::PreExec(mglGraph *, long k, wchar_t **arg, mglArg *a)
}
if(ch=='|' && t==1) { nx = j>nx ? j:nx; j=0; ny++; }
}
- v = AddVar(arg[1]); n=1;
+ v = AddVar(arg[1]);
if(t==1) nx = j>nx ? j:nx;
if(t==1) // list of numeric values
{
@@ -996,90 +1012,90 @@ void mglParser::AddCommand(mglCommand *cmd, int mc)
Cmd = buf;
}
//-----------------------------------------------------------------------------
-HMPR mgl_create_parser() { return new mglParser; }
-void mgl_delete_parser(HMPR p) { delete p; }
-void mgl_parser_add_param(HMPR p, int id, const char *str) { p->AddParam(id,str); }
-void mgl_parser_add_paramw(HMPR p, int id, const wchar_t *str) { p->AddParam(id,str); }
-HMDT mgl_parser_add_var(HMPR p, const char *name) { mglVar *v=p->AddVar(name); return v; }
-HMDT mgl_parser_find_var(HMPR p, const char *name) { mglVar *v=p->FindVar(name); return v; }
-void mgl_parser_del_var(HMPR p, const char *name) { p->DeleteVar(name); }
-HMDT mgl_parser_add_varw(HMPR p, const wchar_t *name) { mglVar *v=p->AddVar(name); return v; }
-HMDT mgl_parser_find_varw(HMPR p, const wchar_t *name) { mglVar *v=p->FindVar(name); return v; }
-void mgl_parser_del_varw(HMPR p, const wchar_t *name) { p->DeleteVar(name); }
-int mgl_parse_line(HMGL gr, HMPR p, const char *str, int pos)
+HMPR MGL_EXPORT mgl_create_parser() { return new mglParser; }
+void MGL_EXPORT mgl_delete_parser(HMPR p) { delete p; }
+void MGL_EXPORT mgl_parser_add_param(HMPR p, int id, const char *str) { p->AddParam(id,str); }
+void MGL_EXPORT mgl_parser_add_paramw(HMPR p, int id, const wchar_t *str) { p->AddParam(id,str); }
+HMDT MGL_EXPORT mgl_parser_add_var(HMPR p, const char *name) { mglVar *v=p->AddVar(name); return v; }
+HMDT MGL_EXPORT mgl_parser_find_var(HMPR p, const char *name) { mglVar *v=p->FindVar(name); return v; }
+void MGL_EXPORT mgl_parser_del_var(HMPR p, const char *name) { p->DeleteVar(name); }
+HMDT MGL_EXPORT mgl_parser_add_varw(HMPR p, const wchar_t *name) { mglVar *v=p->AddVar(name); return v; }
+HMDT MGL_EXPORT mgl_parser_find_varw(HMPR p, const wchar_t *name) { mglVar *v=p->FindVar(name); return v; }
+void MGL_EXPORT mgl_parser_del_varw(HMPR p, const wchar_t *name) { p->DeleteVar(name); }
+int MGL_EXPORT mgl_parse_line(HMGL gr, HMPR p, const char *str, int pos)
{ return p->Parse(gr, str, pos); }
-int mgl_parse_linew(HMGL gr, HMPR p, const wchar_t *str, int pos)
+int MGL_EXPORT mgl_parse_linew(HMGL gr, HMPR p, const wchar_t *str, int pos)
{ return p->Parse(gr, str, pos); }
-void mgl_parse_text(HMGL gr, HMPR p, const char *str)
+void MGL_EXPORT mgl_parse_text(HMGL gr, HMPR p, const char *str)
{ p->Execute(gr, str); }
-void mgl_parse_textw(HMGL gr, HMPR p, const wchar_t *str)
+void MGL_EXPORT mgl_parse_textw(HMGL gr, HMPR p, const wchar_t *str)
{ p->Execute(gr, str); }
-void mgl_parse_file(HMGL gr, HMPR p, FILE *fp, int print)
+void MGL_EXPORT mgl_parse_file(HMGL gr, HMPR p, FILE *fp, int print)
{ p->Execute(gr,fp,print); }
-void mgl_parser_restore_once(HMPR p) { p->RestoreOnce(); }
-void mgl_parser_stop(HMPR p) { p->Stop = true; }
-void mgl_parser_allow_setsize(HMPR p, int a) { p->AllowSetSize= a; }
-void mgl_parser_allow_file_io(HMPR p, int a) { p->AllowFileIO = a; }
+void MGL_EXPORT mgl_parser_restore_once(HMPR p) { p->RestoreOnce(); }
+void MGL_EXPORT mgl_parser_stop(HMPR p) { p->Stop = true; }
+void MGL_EXPORT mgl_parser_allow_setsize(HMPR p, int a) { p->AllowSetSize= a; }
+void MGL_EXPORT mgl_parser_allow_file_io(HMPR p, int a) { p->AllowFileIO = a; }
//-----------------------------------------------------------------------------
#define _PR_ ((mglParser *)(*p))
-uintptr_t mgl_create_parser_() { return uintptr_t(new mglParser); }
-void mgl_delete_parser_(uintptr_t* p) { delete _PR_; }
-void mgl_parser_add_param_(uintptr_t* p, int *id, const char *str, int l)
+uintptr_t MGL_EXPORT mgl_create_parser_() { return uintptr_t(new mglParser); }
+void MGL_EXPORT mgl_delete_parser_(uintptr_t* p) { delete _PR_; }
+void MGL_EXPORT mgl_parser_add_param_(uintptr_t* p, int *id, const char *str, int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
_PR_->AddParam(*id, s); delete []s; }
/*===!!! NOTE !!! You must not delete obtained data arrays !!!===============*/
-uintptr_t mgl_parser_add_var_(uintptr_t* p, const char *name, int l)
+uintptr_t MGL_EXPORT mgl_parser_add_var_(uintptr_t* p, const char *name, int l)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
mglVar *v=_PR_->AddVar(s); delete []s; return uintptr_t(v); }
/*===!!! NOTE !!! You must not delete obtained data arrays !!!===============*/
-uintptr_t mgl_parser_find_var_(uintptr_t* p, const char *name, int l)
+uintptr_t MGL_EXPORT mgl_parser_find_var_(uintptr_t* p, const char *name, int l)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
mglVar *v=_PR_->FindVar(s); delete []s; return uintptr_t(v); }
-void mgl_del_var_(uintptr_t* p, const char *name, int l)
+void MGL_EXPORT mgl_del_var_(uintptr_t* p, const char *name, int l)
{ char *s=new char[l+1]; memcpy(s,name,l); s[l]=0;
_PR_->DeleteVar(s); delete []s; }
-int mgl_parse_line_(uintptr_t* gr, uintptr_t* p, const char *str, int *pos, int l)
+int MGL_EXPORT mgl_parse_line_(uintptr_t* gr, uintptr_t* p, const char *str, int *pos, int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
int r = _PR_->Parse(_GR_, s, *pos); delete []s; return r; }
-void mgl_parse_text_(uintptr_t* gr, uintptr_t* p, const char *str, int l)
+void MGL_EXPORT mgl_parse_text_(uintptr_t* gr, uintptr_t* p, const char *str, int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
_PR_->Execute(_GR_, s); delete []s; }
-void mgl_parser_restore_once_(uintptr_t* p) { _PR_->RestoreOnce(); }
-void mgl_parser_allow_setsize_(uintptr_t* p, int *a) { _PR_->AllowSetSize= *a; }
-void mgl_parser_allow_file_io_(uintptr_t* p, int *a) { _PR_->AllowFileIO = *a; }
-void mgl_parser_stop_(uintptr_t* p) { _PR_->Stop = true; }
+void MGL_EXPORT mgl_parser_restore_once_(uintptr_t* p) { _PR_->RestoreOnce(); }
+void MGL_EXPORT mgl_parser_allow_setsize_(uintptr_t* p, int *a) { _PR_->AllowSetSize= *a; }
+void MGL_EXPORT mgl_parser_allow_file_io_(uintptr_t* p, int *a) { _PR_->AllowFileIO = *a; }
+void MGL_EXPORT mgl_parser_stop_(uintptr_t* p) { _PR_->Stop = true; }
//-----------------------------------------------------------------------------
-long mgl_use_parser(HMPR pr, int inc)
+long MGL_EXPORT mgl_use_parser(HMPR pr, int inc)
{ pr->InUse+=inc; return pr->InUse; }
-long mgl_use_parser_(uintptr_t *p, int *inc)
+long MGL_EXPORT mgl_use_parser_(uintptr_t *p, int *inc)
{ _PR_->InUse+=*inc; return _PR_->InUse; }
//---------------------------------------------------------------------------
-int mgl_parser_cmd_type(HMPR pr, const char *name)
+int MGL_EXPORT mgl_parser_cmd_type(HMPR pr, const char *name)
{
mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->type + 1 : 0;
}
-int mgl_parser_cmd_type_(uintptr_t* p, const char *str, int l)
+int MGL_EXPORT mgl_parser_cmd_type_(uintptr_t* p, const char *str, int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
l = mgl_parser_cmd_type(_PR_, s); delete []s; return l; }
//---------------------------------------------------------------------------
-const char *mgl_parser_cmd_desc(HMPR pr, const char *name)
+MGL_EXPORT const char *mgl_parser_cmd_desc(HMPR pr, const char *name)
{
mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->desc : 0;
}
-const char *mgl_parser_cmd_frmt(HMPR pr, const char *name)
+MGL_EXPORT const char *mgl_parser_cmd_frmt(HMPR pr, const char *name)
{
mglCommand *cmd = pr->FindCommand(name);
return cmd ? cmd->form : 0;
}
//---------------------------------------------------------------------------
-const char *mgl_parser_cmd_name(HMPR pr, long id)
+MGL_EXPORT const char *mgl_parser_cmd_name(HMPR pr, long id)
{ return (id<mgl_parser_cmd_num(pr) && id>=0) ? pr->Cmd[id].name:""; }
-long mgl_parser_cmd_num(HMPR pr)
+long MGL_EXPORT mgl_parser_cmd_num(HMPR pr)
{ register long i=0; while(pr->Cmd[i].name[0]) i++; return i; }
//---------------------------------------------------------------------------
-HMDT mgl_parser_calc(HMPR pr, const char *formula)
+HMDT MGL_EXPORT mgl_parser_calc(HMPR pr, const char *formula)
{
size_t s = mbstowcs(0,formula,0)+1;
wchar_t *wcs = new wchar_t[s];
@@ -1087,12 +1103,12 @@ HMDT mgl_parser_calc(HMPR pr, const char *formula)
HMDT d = mgl_parser_calcw(pr,wcs);
delete []wcs; return d;
}
-HMDT mgl_parser_calcw(HMPR pr, const wchar_t *formula)
+HMDT MGL_EXPORT mgl_parser_calcw(HMPR pr, const wchar_t *formula)
{ mglData *d = new mglData(mglFormulaCalc(formula,pr)); return d; }
-uintptr_t mgl_parser_calc_(uintptr_t *p, const char *str,int l)
+uintptr_t MGL_EXPORT mgl_parser_calc_(uintptr_t *p, const char *str,int l)
{ char *s=new char[l+1]; memcpy(s,str,l); s[l]=0;
uintptr_t d = (uintptr_t)mgl_parser_calc(_PR_, s); delete []s; return d; }
//---------------------------------------------------------------------------
-void mgl_parser_del_all(HMPR p) { p->DeleteAll(); }
-void mgl_parser_del_all_(uintptr_t *p) { _PR_->DeleteAll(); }
+void MGL_EXPORT mgl_parser_del_all(HMPR p) { p->DeleteAll(); }
+void MGL_EXPORT mgl_parser_del_all_(uintptr_t *p) { _PR_->DeleteAll(); }
//---------------------------------------------------------------------------
diff --git a/src/pde.cpp b/src/pde.cpp
index ae646c7..4442218 100644
--- a/src/pde.cpp
+++ b/src/pde.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_pde.cpp is part of Math Graphic Library
+ * pde.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -18,6 +18,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "mgl2/data.h"
+#include "mgl2/eval.h"
#include <complex>
#define dual std::complex<double>
#define GAMMA 0.1
@@ -33,7 +34,7 @@ struct mgl_pde_ham
mreal xx,yy,xs,ys,dx,dy,dq,dp,zz;
double dd;
};
-void *mgl_pde_hprep(void *par)
+MGL_NO_EXPORT void *mgl_pde_hprep(void *par)
{
mglThreadD *t=(mglThreadD *)par;
const mgl_pde_ham *f = (const mgl_pde_ham *)t->v;
@@ -74,7 +75,7 @@ void *mgl_pde_hprep(void *par)
return 0;
}
// Solve equation du/dz = ham(p,q,x,y,z,|u|)[u] where p=d/dx, q=d/dy. At this moment simplified form of ham is supported: ham = f(p,q,z) + g(x,y,z,'u'), where variable 'u'=|u| (for allowing solve nonlinear problems). You may specify imaginary part like ham = p^2 + i*x*(x>0) but only if dependence on variable 'i' is linear (i.e. ham = hre+i*him).
-HMDT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz, mreal k0, const char *opt)
+HMDT MGL_EXPORT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz, mreal k0, const char *opt)
{
gr->SaveState(opt);
mglPoint Min=gr->Min, Max=gr->Max;
@@ -131,9 +132,13 @@ HMDT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz,
for(k=1;k<nz;k++)
{
if(gr->Stop)
- { delete []a; delete []dmp; delete []hxy; delete []hxv;
+ {
+ gsl_fft_complex_workspace_free(wsx); gsl_fft_complex_wavetable_free(wtx);
+ gsl_fft_complex_workspace_free(wsy); gsl_fft_complex_wavetable_free(wty);
+ delete []a; delete []dmp; delete []hxy; delete []hxv;
delete []huy; delete []huv; delete []hx; delete []hy;
- delete []hu; delete []hv; delete res; return 0; }
+ delete []hu; delete []hv; return 0;
+ }
tmp.zz = Min.z+dz*k;
memset(hxy,0,4*nx*ny*sizeof(dual)); memset(hxv,0,4*nx*ny*sizeof(dual));
memset(huv,0,4*nx*ny*sizeof(dual)); memset(huy,0,4*nx*ny*sizeof(dual));
@@ -176,7 +181,7 @@ HMDT mgl_pde_solve(HMGL gr, const char *ham, HCDT ini_re, HCDT ini_im, mreal dz,
}
//-----------------------------------------------------------------------------
// Solve GO ray equation like dr/dt = d ham/dp, dp/dt = -d ham/dr where ham = ham(x,y,z,p,q,v,t) and px=p, py=q, pz=v. The starting point (at t=0) is r0, p0. Result is array of {x,y,z,p,q,v,t}
-HMDT mgl_ray_trace(const char *ham, mreal x0, mreal y0, mreal z0, mreal px, mreal py, mreal pz, mreal dt, mreal tmax)
+HMDT MGL_EXPORT mgl_ray_trace(const char *ham, mreal x0, mreal y0, mreal z0, mreal px, mreal py, mreal pz, mreal dt, mreal tmax)
{
mglData *res=new mglData;
if(tmax<dt) return res; // nothing to do
@@ -228,92 +233,106 @@ HMDT mgl_ray_trace(const char *ham, mreal x0, mreal y0, mreal z0, mreal px, mrea
//-----------------------------------------------------------------------------
struct mgl_ap
{
- double x0,y0,x1,y1; // vectors {l, g1, g2}
- double t1,ch,q1,pt,dt,d1; // theta_{1,2}, chi, q_{1,2}, p_t, dtau, dq_{1,2}
+ double x0,y0,z0,x1,y1,z1,x2,y2,z2; // vectors {l, g1, g2}
+ double t1,t2,ch,q1,q2,pt,dt,d1,d2; // theta_{1,2}, chi, q_{1,2}, p_t, dtau, dq_{1,2}
mgl_ap() { memset(this,0,sizeof(mgl_ap)); }
};
//-----------------------------------------------------------------------------
-void mgl_init_ra(int n, const mreal *r, mgl_ap *ra) // prepare some intermediate data for mglPDE2d
+void MGL_NO_EXPORT mgl_init_ra(int n, const mreal *r, mgl_ap *ra) // prepare some intermediate data for QO (3d case)
{
register double tt;
tt = hypot(r[7]-r[0], r[8]-r[1]);
- ra[0].x1 = (r[8]-r[1])/tt;
- ra[0].y1 = (r[0]-r[7])/tt;
+ if(tt)
+ {
+ ra[0].x1 = (r[8]-r[1])/tt;
+ ra[0].y1 = (r[0]-r[7])/tt;
+ ra[0].z1 = 0;
+ }
+ else { ra[0].x1 = ra[0].y1 = 0; ra[0].z1 = 1; }
+ ra[0].x0 = r[7] - r[0]; ra[0].y0 = r[8] - r[1]; ra[0].z0 = r[9] - r[2];
+ tt = sqrt(ra[0].x0*ra[0].x0 + ra[0].y0*ra[0].y0 + ra[0].z0*ra[0].z0);
+ ra[0].x0 /= tt; ra[0].y0 /= tt; ra[0].z0 /= tt;
+ ra[0].x2 = ra[0].y1*ra[0].z0 - ra[0].y0*ra[0].z1; // vector g_2
+ ra[0].y2 = ra[0].z1*ra[0].x0 - ra[0].z0*ra[0].x1;
+ ra[0].z2 = ra[0].x1*ra[0].y0 - ra[0].x0*ra[0].y1;
register long i;
for(i=1;i<n;i++) // NOTE: no parallel due to dependence on prev point!
{
ra[i].dt = r[6+7*i] - r[7*i-1];
ra[i].x0 = r[7*i] - r[7*i-7]; // NOTE: very rough formulas
ra[i].y0 = r[7*i+1] - r[7*i-6]; // for corresponding with dt one
- tt = sqrt(ra[i].x0*ra[i].x0 + ra[i].y0*ra[i].y0);
- ra[i].x0 /= tt; ra[i].y0 /= tt;
+ ra[i].z0 = r[7*i+2] - r[7*i-5]; // for corresponding with dt one
+ tt = sqrt(ra[i].x0*ra[i].x0 + ra[i].y0*ra[i].y0 + ra[i].z0*ra[i].z0);
+ ra[i].x0 /= tt; ra[i].y0 /= tt; ra[i].z0 /= tt;
ra[i].ch = tt/ra[i].dt;
- tt = ra[i].x0*ra[i-1].x1 + ra[i].y0*ra[i-1].y1;
+ tt = ra[i].x0*ra[i-1].x1 + ra[i].y0*ra[i-1].y1 + ra[i].z0*ra[i-1].z1;
ra[i].x1 = ra[i-1].x1 - tt*ra[i].x0; // vector g_1
ra[i].y1 = ra[i-1].y1 - tt*ra[i].y0;
+ ra[i].z1 = ra[i-1].z1 - tt*ra[i].z0;
ra[i].t1 = tt/(ra[i].dt*ra[i].ch);
- tt = sqrt(ra[i].x1*ra[i].x1 + ra[i].y1*ra[i].y1);
- ra[i].x1 /= tt; ra[i].y1 /= tt;
+ tt = sqrt(ra[i].x1*ra[i].x1 + ra[i].y1*ra[i].y1 + ra[i].z1*ra[i].z1);
+ ra[i].x1 /= tt; ra[i].y1 /= tt; ra[i].z1 /= tt; // norm for reducing numeric error
+ ra[i].x2 = ra[i].y1*ra[i].z0 - ra[i].y0*ra[i].z1; // vector g_2
+ ra[i].y2 = ra[i].z1*ra[i].x0 - ra[i].z0*ra[i].x1;
+ ra[i].z2 = ra[i].x1*ra[i].y0 - ra[i].x0*ra[i].y1;
+ tt = ra[i].x0*ra[i-1].x2 + ra[i].y0*ra[i-1].y2 + ra[i].z0*ra[i-1].z2;
+ ra[i].t2 = tt/(ra[i].dt*ra[i].ch);
// other parameters
- ra[i].pt = r[7*i+3]*ra[i].x0 + r[7*i+4]*ra[i].y0;
- ra[i].q1 = r[7*i+3]*ra[i].x1 + r[7*i+4]*ra[i].y1;
+ ra[i].pt = r[7*i+3]*ra[i].x0 + r[7*i+4]*ra[i].y0 + r[7*i+5]*ra[i].z0;
+ ra[i].q1 = r[7*i+3]*ra[i].x1 + r[7*i+4]*ra[i].y1 + r[7*i+5]*ra[i].z1;
+ ra[i].q2 = r[7*i+3]*ra[i].x2 + r[7*i+4]*ra[i].y2 + r[7*i+5]*ra[i].z2;
ra[i].d1 = (ra[i].q1-ra[i-1].q1)/(ra[i].dt*ra[i].ch);
+ ra[i].d2 = (ra[i].q2-ra[i-1].q2)/(ra[i].dt*ra[i].ch);
}
memcpy(ra,ra+1,sizeof(mgl_ap)); // setup zero point
- ra[0].pt = r[3]*ra[0].x0 + r[4]*ra[0].y0;
- ra[0].q1 = r[3]*ra[0].x1 + r[4]*ra[0].y1;
+ ra[0].pt = r[3]*ra[0].x0 + r[4]*ra[0].y0 + r[5]*ra[0].z0;
+ ra[0].q1 = r[3]*ra[0].x1 + r[4]*ra[0].y1 + r[5]*ra[0].z1;
+ ra[0].q2 = r[3]*ra[0].x2 + r[4]*ra[0].y2 + r[5]*ra[0].z2;
}
//-----------------------------------------------------------------------------
+//
+// QO2d series
+//
+//-----------------------------------------------------------------------------
struct mgl_qo2d_ham
{
dual *hx, *hu, *a, h0;
- double *ru, *rx, *dmp;
- mreal *r, dr, dk, pt0;
+ double *dmp;
+ mreal *r, dr, dk;
mgl_ap *ra;
- mglFormula *h;
+ dual (*ham)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par);
+ void *par;
};
-void *mgl_qo2d_hprep(void *par)
+//-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_qo2d_hprep(void *par)
{
mglThreadD *t=(mglThreadD *)par;
- const mgl_qo2d_ham *f = (const mgl_qo2d_ham *)t->v;
+ mgl_qo2d_ham *f = (mgl_qo2d_ham *)t->v;
mgl_ap *ra = f->ra;
- mglFormula *h = f->h;
+
const mreal *r = f->r;
- mreal var[MGL_VS], pt0=f->pt0, tt, x1, hh;
- memset(var,0,MGL_VS*sizeof(mreal));
+ mreal tt, x1, hh;
register long i, nx=t->n;
for(i=t->id;i<nx;i+=mglNumThr)
{
// x terms
- x1 = (2*i-nx+1)*f->dr;
- var['x'-'a'] = r[0] + ra->x1*x1; // new coordiantes
- var['y'-'a'] = r[1] + ra->y1*x1;
- hh = 1 - ra->t1*x1; hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
+ x1 = (2*i-nx+1)*f->dr; hh = 1 - ra->t1*x1;
+ hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
tt = (ra->pt + ra->d1*x1)/hh - ra->pt;
- var['p'-'a'] = r[3] + ra->x0*tt; // new momentums
- var['q'-'a'] = r[4] + ra->y0*tt; var['u'-'a'] = abs(f->a[i]);
- f->rx[i] = (h->CalcD(var,'p')*ra->x0 + h->CalcD(var,'q')*ra->y0)/ra->ch;
- f->hx[i] = dual(h->Calc(var), -h->CalcD(var,'i'));
+ f->hx[i] = f->ham(abs(f->a[i]), r[0]+ra->x1*x1, r[1]+ra->y1*x1, r[3]+ra->x0*tt, r[4]+ra->y0*tt, f->par) - f->h0/2.;
// u-y terms
x1 = f->dk/2*(i<nx/2 ? i:i-nx);
- var['x'-'a'] = r[0]; var['y'-'a'] = r[1];
- var['p'-'a'] = r[3] + ra->x1*x1; // new momentums
- var['q'-'a'] = r[4] + ra->y1*x1; var['u'-'a'] = 0;
- f->ru[i] = (h->CalcD(var,'p')*ra->x0 + h->CalcD(var,'q')*ra->y0)/ra->ch;
- f->hu[i] = dual(h->Calc(var), -h->CalcD(var,'i'));
+ f->hu[i] = f->ham(0, r[0], r[1], r[3]+ra->x1*x1, r[4]+ra->y1*x1, f->par) - f->h0/2.;
- f->rx[i] = f->rx[i]>0.3*pt0 ? f->rx[i] : 0.3*pt0;
- f->hx[i] = (f->hx[i]-f->h0/2.)/f->rx[i];
if(imag(f->hx[i])>0) f->hx[i] = f->hx[i].real();
- f->ru[i] = f->ru[i]>0.3*pt0 ? f->ru[i] : 0.3*pt0;
- f->hu[i] = (f->hu[i]-f->h0/2.)/f->ru[i];
if(imag(f->hu[i])>0) f->hu[i] = f->hu[i].real();
// add boundary conditions for x-direction
f->hx[i] -= dual(0,f->dmp[i]);
}
return 0;
}
-HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mreal r, mreal k0, HMDT xx, HMDT yy)
+//-----------------------------------------------------------------------------
+HMDT MGL_EXPORT mgl_qo2d_func(dual (*ham)(mreal u, mreal x, mreal y, mreal px, mreal py, void *par), void *par, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mreal r, mreal k0, HMDT xx, HMDT yy)
{
mglData *res=new mglData;
const mglData *ray=dynamic_cast<const mglData *>(ray_dat); // NOTE: Ray must be mglData!
@@ -322,14 +341,12 @@ HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mre
if(nx<2 || ini_im->GetNx()!=nx || nt<2) return res;
mgl_data_create(res,nx,nt,1);
#if MGL_HAVE_GSL
- dual *a=new dual[2*nx], *hu=new dual[2*nx], *hx=new dual[2*nx], h0;
- double *ru=new double[2*nx], *rx=new double[2*nx], *dmp=new double[2*nx],
- *pu=new double[2*nx], *px=new double[2*nx];
+ dual *a=new dual[2*nx], *hu=new dual[2*nx], *hx=new dual[2*nx];
+ double *dmp=new double[2*nx];
mgl_ap *ra = new mgl_ap[nt]; mgl_init_ra(ray->ny, ray->a, ra); // ray
register int i;
- mglFormula h(ham);
- mreal var[MGL_VS], dr = r/(nx-1), dk = M_PI*(nx-1)/(k0*r*nx), tt, x1, hh, B1, pt0;
- memset(var,0,MGL_VS*sizeof(mreal));
+
+ mreal dr = r/(nx-1), dk = M_PI*(nx-1)/(k0*r*nx), tt, x1, hh, B1, pt0;
memset(dmp,0,2*nx*sizeof(double));
for(i=0;i<nx/2;i++) // prepare damping
@@ -337,15 +354,14 @@ HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mre
x1 = (nx/2-i)/(nx/2.);
dmp[2*nx-1-i] = dmp[i] = 30*GAMMA*x1*x1/k0;
}
- for(i=0;i<nx;i++) a[i+nx/2] = dual(ini_re->v(i),ini_im->v(i)); // ini
- for(i=0;i<2*nx;i++) { rx[i] = ru[i] = 1; }
+ for(i=0;i<nx;i++) a[i+nx/2] = dual(ini_re->v(i),ini_im->v(i)); // init
gsl_fft_complex_wavetable *wtx = gsl_fft_complex_wavetable_alloc(2*nx);
gsl_fft_complex_workspace *wsx = gsl_fft_complex_workspace_alloc(2*nx);
if(xx && yy) { xx->Create(nx,nt); yy->Create(nx,nt); }
- mgl_qo2d_ham tmp;
- tmp.hx=hx; tmp.rx=rx; tmp.hu=hu; tmp.ru=ru; tmp.dmp=dmp;
- tmp.dr=dr; tmp.dk=dk; tmp.h=&h; tmp.a=a;
+ mgl_qo2d_ham tmp; // parameters for Hamiltonian calculation
+ tmp.hx=hx; tmp.hu=hu; tmp.dmp=dmp; tmp.par=par;
+ tmp.dr=dr; tmp.dk=dk; tmp.ham=ham; tmp.a=a;
// start calculation
for(int k=0;k<nt;k++)
{
@@ -354,22 +370,21 @@ HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mre
if(xx && yy) for(i=0;i<nx;i++) // prepare xx, yy
{
x1 = (2*i-nx+1)*dr;
- xx->a[i+k*nx] = ray->a[7*k] + ra[k].x1*x1; // new coordiantes
+ xx->a[i+k*nx] = ray->a[7*k] + ra[k].x1*x1; // new coordinates
yy->a[i+k*nx] = ray->a[7*k+1] + ra[k].y1*x1;
}
- memcpy(px,rx,2*nx*sizeof(double));
- memcpy(pu,ru,2*nx*sizeof(double));
+ tmp.r=ray->a+7*k; tmp.ra=ra+k;
hh = ra[k].pt*(1/sqrt(sqrt(1.041))-1); // 0.041=0.45^4 -- minimal value of h
- var['x'-'a'] = ray->a[7*k]; var['y'-'a'] = ray->a[7*k+1];
- var['p'-'a'] = ray->a[7*k+3] + ra[k].x0*hh;
- var['q'-'a'] = ray->a[7*k+4] + ra[k].y0*hh; var['u'-'a'] = 0;
- h0 = dual(h.Calc(var), -h.CalcD(var,'i'));
- pt0 = (h.CalcD(var,'p')*ra[k].x0 + h.CalcD(var,'q')*ra[k].y0)/ra[k].ch;
-
- tmp.h0=h0; tmp.pt0=pt0; tmp.r=ray->a+7*k; tmp.ra=ra+k;
+ tmp.h0 = ham(0, tmp.r[0], tmp.r[1], tmp.r[3]+ra[k].x0*hh, tmp.r[4]+ra[k].x0*hh, par);
mglStartThread(mgl_qo2d_hprep,0,2*nx,0,0,0,0,&tmp);
+ // Step for field
+ dual dt = dual(0, -ra[k].dt*k0);
+ for(i=0;i<2*nx;i++) a[i] *= exp(hx[i]*dt);
+ gsl_fft_complex_transform((double *)a, 1, 2*nx, wtx, wsx, forward);
+ for(i=0;i<2*nx;i++) a[i] *= exp(hu[i]*dt)/(2.*nx);
+ gsl_fft_complex_transform((double *)a, 1, 2*nx, wtx, wsx, backward);
- // Calculate B1
+/* // Calculate B1 // TODO make more general scheme later!!!
hh = ra[k].pt*(1/sqrt(sqrt(1.041))-1);
var['x'-'a'] = ray->a[7*k]; // new coordiantes
var['y'-'a'] = ray->a[7*k+1];
@@ -384,29 +399,230 @@ HMDT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mre
var['q'-'a'] = ray->a[7*k+4] + ra[k].y0*hh;
B1 = h.CalcD(var,'p')*ra[k].x1 + h.CalcD(var,'q')*ra[k].y1;
B1 = (B1-tt)/dr;
- // Step for field
- dual dt = dual(0, -ra[k].dt*k0);
- for(i=0;i<2*nx;i++) a[i] *= exp(hx[i]*dt);
- gsl_fft_complex_transform((double *)a, 1, 2*nx, wtx, wsx, forward);
- for(i=0;i<2*nx;i++) a[i] *= exp(hu[i]*dt)/(2.*nx);
- gsl_fft_complex_transform((double *)a, 1, 2*nx, wtx, wsx, backward);
double a1=0, a2=0;
for(i=0;i<2*nx;i++) a1 += norm(a[i]);
hx[0] = hx[2*nx-1] = 0.;
for(i=1;i<2*nx-1;i++) hx[i] = (B1*ra[k].dt*(i-nx))*(a[i+1]-a[i-1]);
for(i=0;i<2*nx;i++) { a[i] += hx[i]; a2 += norm(a[i]); }
a1 = sqrt(a1/a2);
- for(i=0;i<2*nx;i++) a[i] *= a1;
+ for(i=0;i<2*nx;i++) a[i] *= a1;*/
}
gsl_fft_complex_workspace_free(wsx);
gsl_fft_complex_wavetable_free(wtx);
delete []a; delete []hu; delete []hx; delete []ra; delete []dmp;
- delete []rx; delete []ru; delete []px; delete []pu;
#endif
return res;
}
//-----------------------------------------------------------------------------
-void *mgl_jacob2(void *par)
+dual MGL_NO_EXPORT mgl_ham2d(mreal u, mreal x, mreal y, mreal px, mreal py, void *par)
+{
+ mglFormula *h = (mglFormula *)par;
+ mreal var[MGL_VS]; memset(var,0,MGL_VS*sizeof(mreal));
+ var['x'-'a'] = x; var['y'-'a'] = y; var['u'-'a'] = u;
+ var['p'-'a'] = px; var['q'-'a'] = py;
+ return dual(h->Calc(var), -h->CalcD(var,'i'));
+}
+//-----------------------------------------------------------------------------
+HMDT MGL_EXPORT mgl_qo2d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mreal r, mreal k0, HMDT xx, HMDT yy)
+{
+ mglFormula h(ham);
+ return mgl_qo2d_func(mgl_ham2d, &h, ini_re, ini_im, ray_dat, r, k0, xx, yy);
+}
+//-----------------------------------------------------------------------------
+//
+// QO2d series
+//
+//-----------------------------------------------------------------------------
+struct mgl_qo3d_ham
+{
+ dual *hxy, *huv, *hxv, *huy, *a;
+ dual *hx, *hy, *hu, *hv, h0;
+ double *dmp;
+ mreal *r, dr, dk;
+ mgl_ap *ra;
+ dual (*ham)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par);
+ void *par;
+};
+//-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_qo3d_hprep(void *par)
+{
+ mglThreadD *t=(mglThreadD *)par;
+ mgl_qo3d_ham *f = (mgl_qo3d_ham *)t->v;
+ mgl_ap *ra = f->ra;
+
+ const mreal *r = f->r;
+ mreal tt, x1, x2, hh;
+ register long ii,i,j, nx=t->n;
+ for(ii=t->id;ii<nx*nx;ii+=mglNumThr)
+ {
+ i = ii%nx; j = ii/nx;
+ // x-y terms
+ x1 = (2*i-nx+1)*f->dr; x2 = (2*j-nx+1)*f->dr; hh = 1-ra->t1*x1-ra->t2*x2;
+ hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
+ tt = (ra->pt + ra->d1*x1 + ra->d2*x2)/hh - ra->pt;
+ f->hxy[ii] = f->ham(abs(f->a[i]), r[0]+ra->x1*x1+ra->x2*x2, r[1]+ra->y1*x1+ra->y2*x2, r[2]+ra->z1*x1+ra->z2*x2, r[3]+ra->x0*tt, r[4]+ra->y0*tt, r[5]+ra->z0*tt, f->par);
+ // x-v terms
+ x1 = (2*i-nx+1)*f->dr; x2 = f->dk/2*(j<nx/2 ? j:j-nx); hh = 1-ra->t1*x1;
+ hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
+ tt = (ra->pt + ra->d1*x1)/hh - ra->pt;
+ f->hxv[ii] = f->ham(0, r[0]+ra->x1*x1, r[1]+ra->y1*x1, r[2]+ra->z1*x1, r[3]+ra->x0*tt+ra->x2*x2, r[4]+ra->y0*tt+ra->y2*x2, r[5]+ra->z0*tt+ra->z2*x2, f->par);
+ // u-y terms
+ x1 = f->dk/2*(i<nx/2 ? i:i-nx); x2 = (2*j-nx+1)*f->dr; hh = 1-ra->t2*x2;
+ hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
+ tt = (ra->pt + ra->d2*x2)/hh - ra->pt;
+ f->huy[ii] = f->ham(0, r[0]+ra->x2*x2, r[1]+ra->y2*x2, r[2]+ra->z2*x2, r[3]+ra->x1*x1+ra->x0*tt, r[4]+ra->y1*x1+ra->y0*tt, r[5]+ra->z1*x1+ra->z0*tt, f->par);
+ // u-y terms
+ x1 = f->dk/2*(i<nx/2 ? i:i-nx); x2 = f->dk/2*(j<nx/2 ? j:j-nx);
+ f->huv[ii] = f->ham(0, r[0], r[1], r[2], r[3]+ra->x1*x1+ra->x2*x2, r[4]+ra->y1*x1+ra->y2*x2, r[5]+ra->z1*x1+ra->z2*x2, f->par);
+ }
+ return 0;
+}
+//-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_qo3d_post(void *par)
+{
+ mglThreadD *t=(mglThreadD *)par;
+ mgl_qo3d_ham *f = (mgl_qo3d_ham *)t->v;
+
+ register long ii,i,j, nx=t->n;
+ for(ii=t->id;ii<nx*nx;ii+=mglNumThr)
+ {
+ i = ii%nx; j = ii/nx;
+ f->hxy[ii] -= (f->hx[i]+f->hy[j]-f->h0/2.)/2.;
+ if(imag(f->hxy[ii])>0) f->hxy[ii] = f->hxy[ii].real();
+ f->hxv[ii] -= (f->hx[i]+f->hv[j]-f->h0/2.)/2.;
+ if(imag(f->hxv[ii])>0) f->hxv[ii] = f->hxv[ii].real();
+ f->huy[ii] -= (f->hu[i]+f->hy[j]-f->h0/2.)/2.;
+ if(imag(f->huy[ii])>0) f->huy[ii] = f->huy[ii].real();
+ f->huv[ii] -= (f->hu[i]+f->hv[j]-f->h0/2.)/2.;
+ if(imag(f->huv[ii])>0) f->huv[ii] = f->huv[ii].real();
+ // add boundary conditions for x-direction
+ f->hxy[ii] -= dual(0,f->dmp[ii]);
+ }
+ return 0;
+}
+//-----------------------------------------------------------------------------
+HMDT MGL_EXPORT mgl_qo3d_func(dual (*ham)(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par), void *par, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mreal r, mreal k0, HMDT xx, HMDT yy, HMDT zz)
+{
+ mglData *res=new mglData;
+ const mglData *ray=dynamic_cast<const mglData *>(ray_dat); // NOTE: Ray must be mglData!
+ if(!ray) return res;
+ int nx=ini_re->GetNx(), nt=ray->ny; // NOTE: only square grids are supported now (for simplicity)
+ if(nx<2 || ini_re->GetNx()!=nx || ini_im->GetNx()*ini_im->GetNy()!=nx*nx || nt<2) return res;
+ mgl_data_create(res,nx,nx,nt);
+#if MGL_HAVE_GSL
+ dual *a=new dual[4*nx*nx], *huv=new dual[4*nx*nx], *hxy=new dual[4*nx*nx], *huy=new dual[4*nx*nx], *hxv=new dual[4*nx*nx];
+ dual *hu=new dual[2*nx], *hx=new dual[2*nx], *hy=new dual[2*nx], *hv=new dual[2*nx];
+ mreal *dmp=new mreal[4*nx*nx];
+ mgl_ap *ra = new mgl_ap[nt];
+ mgl_init_ra(ray->ny, ray->a, ra); // prepare ray
+ register int i,j,ii;
+
+ mreal dr = r/(nx-1), dk = M_PI*(nx-1)/(k0*r*nx), tt, x1, x2, hh, B1, pt0;
+
+ memset(dmp,0,4*nx*nx*sizeof(mreal));
+ for(i=0;i<nx/2;i++) for(j=0;j<nx/2;j++) // prepare damping
+ {
+ x1 = (nx/2-i)/(nx/2.); x2 = (nx/2-j)/(nx/2.);
+ dmp[2*nx-1-i] = dmp[i] = 30*GAMMA*x1*x1/k0;
+ dmp[(2*nx-1-j)*2*nx] += 30*GAMMA*x2*x2/k0;
+ dmp[j*2*nx] += 30*GAMMA*x2*x2/k0;
+ }
+ for(i=0;i<nx;i++) for(j=0;j<nx;j++) // init
+ a[i+nx/2+2*nx*(j+nx/2)] = dual(ini_re->v(i,j),ini_im->v(i,j));
+ gsl_fft_complex_wavetable *wtx = gsl_fft_complex_wavetable_alloc(2*nx);
+ gsl_fft_complex_workspace *wsx = gsl_fft_complex_workspace_alloc(2*nx);
+ if(xx && yy && zz) { xx->Create(nx,nx,nt); yy->Create(nx,nx,nt); zz->Create(nx,nx,nt); }
+
+ mgl_qo3d_ham tmp; // parameters for Hamiltonian calculation
+ tmp.hxy=hxy; tmp.hx=hx; tmp.huv=huv; tmp.hu=hu;
+ tmp.huy=huy; tmp.hy=hy; tmp.hxv=hxv; tmp.hv=hv;
+ tmp.dmp=dmp; tmp.par=par;
+ tmp.dr=dr; tmp.dk=dk; tmp.ham=ham; tmp.a=a;
+ // start calculation
+ for(int k=0;k<nt;k++)
+ {
+ for(i=0;i<nx;i++) for(j=0;j<nx;j++) // "save"
+ res->a[i+nx*(j+k*nx)]=abs(a[i+nx/2+2*nx*(j+nx/2)])*sqrt(ra[0].ch/ra[k].ch);
+ if(xx && yy && zz) for(i=0;i<nx;i++) for(j=0;j<nx;j++) // prepare xx, yy, zz
+ {
+ x1 = (2*i-nx+1)*dr; x2 = (2*j-nx+1)*dr;
+ xx->a[i+nx*(j+k*nx)] = ray->a[7*k] + ra[k].x1*x1 + ra[k].x2*x2; // new coordinates
+ yy->a[i+nx*(j+k*nx)] = ray->a[7*k+1] + ra[k].y1*x1 + ra[k].y2*x2;
+ zz->a[i+nx*(j+k*nx)] = ray->a[7*k+2] + ra[k].z1*x1 + ra[k].z2*x2;
+ }
+ tmp.r=ray->a+7*k; tmp.ra=ra+k;
+ mglStartThread(mgl_qo3d_hprep,0,2*nx,0,0,0,0,&tmp); tmp.h0 = huv[0];
+ for(i=0;i<2*nx;i++) // fill intermediate arrays
+ {
+ tmp.hx[i] = hxv[i]; tmp.hy[i] = huy[i*2*nx];
+ tmp.hv[i] = huv[i]; tmp.hu[i] = huv[i*2*nx];
+ }
+ mglStartThread(mgl_qo3d_post,0,2*nx,0,0,0,0,&tmp);
+ // Step for field
+ dual dt = dual(0, -ra[k].dt*k0); // TODO: this part can be paralleled
+ for(i=0;i<4*nx*nx;i++) a[i] *= exp(hxy[i]*dt); // x-y
+ for(i=0;i<2*nx;i++) // x->u
+ gsl_fft_complex_transform((double *)(a+i*2*nx), 1, 2*nx, wtx, wsx, forward);
+ for(i=0;i<4*nx*nx;i++) a[i] *= exp(huy[i]*dt); // u-y
+ for(i=0;i<2*nx;i++) // y->v
+ gsl_fft_complex_transform((double *)(a+i), 2*nx, 2*nx, wtx, wsx, forward);
+ for(i=0;i<4*nx*nx;i++) a[i] *= exp(huv[i]*dt)/(4.*nx*nx); // u-v
+ for(i=0;i<2*nx;i++) // u->x
+ gsl_fft_complex_transform((double *)(a+i*2*nx), 1, 2*nx, wtx, wsx, backward);
+ for(i=0;i<4*nx*nx;i++) a[i] *= exp(hxv[i]*dt); // x-v
+ for(i=0;i<2*nx;i++) // v->y
+ gsl_fft_complex_transform((double *)(a+i), 2*nx, 2*nx, wtx, wsx, backward);
+
+/* // Calculate B1 // TODO make more general scheme later!!!
+ hh = ra[k].pt*(1/sqrt(sqrt(1.041))-1);
+ var['x'-'a'] = ray->a[7*k]; // new coordiantes
+ var['y'-'a'] = ray->a[7*k+1];
+ var['p'-'a'] = ray->a[7*k+3] + ra[k].x0*hh; // new momentums
+ var['q'-'a'] = ray->a[7*k+4] + ra[k].y0*hh;
+ tt = h.CalcD(var,'p')*ra[k].x1 + h.CalcD(var,'q')*ra[k].y1;
+ var['x'-'a'] = ray->a[7*k] + ra[k].x1*dr; // new coordiantes
+ var['y'-'a'] = ray->a[7*k+1] + ra[k].y1*dr;
+ hh = 1 - ra[k].t1*dr; hh = sqrt(sqrt(0.041+hh*hh*hh*hh));
+ hh = (ra[k].ch*ra[k].pt + ra[k].d1*dr)/(hh*ra[k].ch) - ra[k].pt;
+ var['p'-'a'] = ray->a[7*k+3] + ra[k].x0*hh; // new momentums
+ var['q'-'a'] = ray->a[7*k+4] + ra[k].y0*hh;
+ B1 = h.CalcD(var,'p')*ra[k].x1 + h.CalcD(var,'q')*ra[k].y1;
+ B1 = (B1-tt)/dr;
+ double a1=0, a2=0;
+ for(i=0;i<2*nx;i++) a1 += norm(a[i]);
+ hx[0] = hx[2*nx-1] = 0.;
+ for(i=1;i<2*nx-1;i++) hx[i] = (B1*ra[k].dt*(i-nx))*(a[i+1]-a[i-1]);
+ for(i=0;i<2*nx;i++) { a[i] += hx[i]; a2 += norm(a[i]); }
+ a1 = sqrt(a1/a2);
+ for(i=0;i<2*nx;i++) a[i] *= a1;*/
+ }
+ gsl_fft_complex_workspace_free(wsx);
+ gsl_fft_complex_wavetable_free(wtx);
+ delete []a;
+ delete []ra;
+ delete []dmp;
+ delete []huv; delete []hxy; delete []hxv; delete []huy;
+ delete []hu; delete []hx; delete []hv; delete []hy;
+#endif
+ return res;
+}
+//-----------------------------------------------------------------------------
+dual MGL_NO_EXPORT mgl_ham3d(mreal u, mreal x, mreal y, mreal z, mreal px, mreal py, mreal pz, void *par)
+{
+ mglFormula *h = (mglFormula *)par;
+ mreal var[MGL_VS]; memset(var,0,MGL_VS*sizeof(mreal));
+ var['x'-'a'] = x; var['y'-'a'] = y; var['z'-'a'] = z; var['u'-'a'] = u;
+ var['p'-'a'] = px; var['q'-'a'] = py; var['v'-'a'] = pz;
+ return dual(h->Calc(var), -h->CalcD(var,'i'));
+}
+//-----------------------------------------------------------------------------
+HMDT MGL_EXPORT mgl_qo3d_solve(const char *ham, HCDT ini_re, HCDT ini_im, HCDT ray_dat, mreal r, mreal k0, HMDT xx, HMDT yy, HMDT zz)
+{
+ mglFormula h(ham);
+ return mgl_qo3d_func(mgl_ham3d, &h, ini_re, ini_im, ray_dat, r, k0, xx, yy, zz);
+}
+//-----------------------------------------------------------------------------
+MGL_NO_EXPORT void *mgl_jacob2(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,i0,ip,im,jp,jm, nx=t->p[0], ny=t->p[1];
@@ -423,7 +639,7 @@ void *mgl_jacob2(void *par)
}
return 0;
}
-HMDT mgl_jacobian_2d(HCDT x, HCDT y)
+HMDT MGL_EXPORT mgl_jacobian_2d(HCDT x, HCDT y)
{
int nx = x->GetNx(), ny=x->GetNy();
mglData *r=new mglData;
@@ -451,7 +667,7 @@ HMDT mgl_jacobian_2d(HCDT x, HCDT y)
return r;
}
//-----------------------------------------------------------------------------
-void *mgl_jacob3(void *par)
+MGL_NO_EXPORT void *mgl_jacob3(void *par)
{
mglThreadD *t=(mglThreadD *)par;
register long i,j,k,i0,ip,im,jp,jm,kp,km, nx=t->p[0], ny=t->p[1], nz=t->p[2];
@@ -472,7 +688,7 @@ void *mgl_jacob3(void *par)
}
return 0;
}
-HMDT mgl_jacobian_3d(HCDT x, HCDT y, HCDT z)
+HMDT MGL_EXPORT mgl_jacobian_3d(HCDT x, HCDT y, HCDT z)
{
int nx = x->GetNx(), ny=x->GetNy(), nz=x->GetNz(), nn = nx*ny*nz;
mglData *r=new mglData;
@@ -509,21 +725,25 @@ HMDT mgl_jacobian_3d(HCDT x, HCDT y, HCDT z)
return r;
}
//-----------------------------------------------------------------------------
-uintptr_t mgl_pde_solve_(uintptr_t* gr, const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, mreal *dz, mreal *k0, const char *opt, int l, int lo)
+uintptr_t MGL_EXPORT mgl_pde_solve_(uintptr_t* gr, const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, mreal *dz, mreal *k0, const char *opt, int l, int lo)
{ char *s=new char[l+1]; memcpy(s,ham,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
uintptr_t res = uintptr_t(mgl_pde_solve(_GR_, s, _DA_(ini_re), _DA_(ini_im), *dz, *k0, o));
delete []o; delete []s; return res; }
-uintptr_t mgl_ray_trace_(const char *ham, mreal *x0, mreal *y0, mreal *z0, mreal *px, mreal *py, mreal *pz, mreal *dt, mreal *tmax,int l)
+uintptr_t MGL_EXPORT mgl_ray_trace_(const char *ham, mreal *x0, mreal *y0, mreal *z0, mreal *px, mreal *py, mreal *pz, mreal *dt, mreal *tmax,int l)
{ char *s=new char[l+1]; memcpy(s,ham,l); s[l]=0;
uintptr_t res = uintptr_t(mgl_ray_trace(s, *x0,*y0,*z0, *px,*py,*pz, *dt,*tmax));
delete []s; return res; }
-uintptr_t mgl_qo2d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, int l)
+uintptr_t MGL_EXPORT mgl_qo2d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, int l)
{ char *s=new char[l+1]; memcpy(s,ham,l); s[l]=0;
uintptr_t res = uintptr_t(mgl_qo2d_solve(s, _DA_(ini_re), _DA_(ini_im), _DA_(ray), *r, *k0, _DM_(xx), _DM_(yy)));
delete []s; return res; }
-uintptr_t mgl_jacobian_2d_(uintptr_t* x, uintptr_t* y)
+uintptr_t MGL_EXPORT mgl_qo3d_solve_(const char *ham, uintptr_t* ini_re, uintptr_t* ini_im, uintptr_t* ray, mreal *r, mreal *k0, uintptr_t* xx, uintptr_t* yy, uintptr_t* zz, int l)
+{ char *s=new char[l+1]; memcpy(s,ham,l); s[l]=0;
+ uintptr_t res = uintptr_t(mgl_qo3d_solve(s, _DA_(ini_re), _DA_(ini_im), _DA_(ray), *r, *k0, _DM_(xx), _DM_(yy), _DM_(zz)));
+ delete []s; return res; }
+uintptr_t MGL_EXPORT mgl_jacobian_2d_(uintptr_t* x, uintptr_t* y)
{ return uintptr_t(mgl_jacobian_2d(_DA_(x), _DA_(y))); }
-uintptr_t mgl_jacobian_3d_(uintptr_t* x, uintptr_t* y, uintptr_t* z)
+uintptr_t MGL_EXPORT mgl_jacobian_3d_(uintptr_t* x, uintptr_t* y, uintptr_t* z)
{ return uintptr_t(mgl_jacobian_3d(_DA_(x), _DA_(y), _DA_(z))); }
//-----------------------------------------------------------------------------
diff --git a/src/pixel.cpp b/src/pixel.cpp
index b3a8856..9e0f136 100644
--- a/src/pixel.cpp
+++ b/src/pixel.cpp
@@ -182,8 +182,7 @@ void mglCanvas::CalcScr(mglPoint p, int *xs, int *ys) const
mglPoint mglCanvas::CalcScr(mglPoint p) const
{ int x,y; CalcScr(p,&x,&y); return mglPoint(x,y); }
//-----------------------------------------------------------------------------
-//mglCanvas *mgl_tmp_gr;
-int mgl_type_prior[8]={1,2,4,5, 0,3,0, 7};
+MGL_NO_EXPORT int mgl_type_prior[8]={1,2,4,5, 0,3,0, 7};
bool operator<(const mglPrim &a, const mglPrim &b)
{
register int t1 = mgl_type_prior[a.type], t2 = mgl_type_prior[b.type];
@@ -202,7 +201,7 @@ bool operator>(const mglPrim &a, const mglPrim &b)
return a.n3 < b.n3;
}
//-----------------------------------------------------------------------------
-void *mgl_canvas_thr(void *par)
+MGL_NO_EXPORT void *mgl_canvas_thr(void *par)
{ mglThreadG *t=(mglThreadG *)par; (t->gr->*(t->f))(t->id, t->n, t->p); return NULL; }
void mglStartThread(void (mglCanvas::*func)(size_t i, size_t n, const void *p), mglCanvas *gr, size_t n, const void *p=NULL)
{
@@ -299,6 +298,7 @@ void mglCanvas::pxl_primdr(size_t id, size_t , const void *)
for(i=0;i<Prm.size();i++)
{
+ if(Stop) return;
const mglPrim &p=Prm[i];
d.PDef = p.n3; d.pPos = p.s;
d.ObjId = p.id; d.PenWidth=p.w;
@@ -352,7 +352,7 @@ void mglCanvas::Clf(mglColor Back)
Txt.clear(); Txt.reserve(3);
MGL_PUSH(Txt,mglTexture(MGL_DEF_PAL,-1),mutexTxt);
- MGL_PUSH(Txt,mglTexture("BbcyrR",1),mutexTxt);
+ MGL_PUSH(Txt,mglTexture(MGL_DEF_SCH,1),mutexTxt);
if(Back==0) Back = 'w';
if((Flag&3)==2) Back = 'k';
@@ -390,6 +390,7 @@ void mglCanvas::Combine(const mglCanvas *gr)
#define TAG_DATA_C 1
void mglCanvas::MPI_Send(int id)
{
+ Finish();
::MPI_Send(Z,3*Width*Height,MPI_FLOAT,id,TAG_DATA_Z,MCW);
::MPI_Send(C,12*Width*Height,MPI_CHAR,id,TAG_DATA_C,MCW);
::MPI_Send(OI,Width*Height,MPI_INT,id,TAG_DATA_C,MCW);
@@ -408,7 +409,7 @@ void mglCanvas::MPI_Recv(int id)
// TODO check status for errors
register long i,j,k;
for(k=0;k<n;k++)
- {
+ { // i0=x+Width*(Height-1-y)
i = k%Width; j = Height-1-(k/Width);
if(Quality&2)
{
@@ -510,7 +511,7 @@ unsigned char* mglCanvas::col2int(const mglPnt &p,unsigned char *r, int obj_id)
d2 = light[i].q.z-p.z;
nn = d0*d0 + d1*d1 + d2*d2 + 1e-6;
float bb = 2*(d0*light[i].p.x+d1*light[i].p.y+d2*light[i].p.z)/nn;
- bb = exp(-light[i].a*nn)*light[i].b*2;
+// bb = exp(-light[i].a*nn)*light[i].b*2;
// now difference for angles between normale and direction to light
nn = 2*(p.u*d0+p.v*d1+p.w*d2)/(p.u*p.u+p.v*p.v+p.w*p.w+1e-6)/nn;
d0 -= p.u*nn; d1 -= p.v*nn; d2 -= p.w*nn;
@@ -809,7 +810,7 @@ void mglCanvas::fast_draw(long k1, long k2, mglDrawReg *dr)
void mglCanvas::pnt_draw(long k, mglDrawReg *dr)
{
register long i,j,s,x,y;
- register float v,pw=2*dr->PenWidth*sqrt(font_factor/400),dpw=3;
+ register float v,pw=3*dr->PenWidth,dpw=3;
if(dr->ObjId==HighId) { pw *= 2; dpw=2; }
const mglPnt &p=Pnt[k];
unsigned char cs[4], cc;
@@ -839,7 +840,11 @@ void mglCanvas::mark_draw(long k, char type, mreal size, mglDrawReg *d)
pthread_mutex_lock(&mutexPnt);
#endif
size_t pos = Pnt.size(), qos=pos;
- if(type=='.' || ss==0) pnt_draw(k,d);
+ if(type=='.' || ss==0)
+ {
+ if(d) d->PenWidth = ss?ss:sqrt(font_factor/400);
+ pnt_draw(k,d);
+ }
else
{
if(d)
@@ -982,27 +987,34 @@ void mglCanvas::mark_draw(long k, char type, mreal size, mglDrawReg *d)
#endif
}
//-----------------------------------------------------------------------------
-void mglCanvas::glyph_draw(const mglPrim *P, mglDrawReg *d)
+// scale direction for new view/zoom
+float mglCanvas::GetGlyphPhi(const mglPnt &q, float phi)
{
- mglPnt p=Pnt[P->n1], q=Pnt[P->n2];
- // scale direction for new view/zoom
float dv = (1-Bp.pf)/(1-Bp.pf*q.z/Depth);
- float x,y,z,c=Bp.pf/(1-Bp.pf)/Depth,ll,phi=P->w;
+ float x,y,z,c=Bp.pf/(1-Bp.pf)/Depth,ll;
x = Bp.b[0]*q.u + Bp.b[1]*q.v + Bp.b[2]*q.w;
y = Bp.b[3]*q.u + Bp.b[4]*q.v + Bp.b[5]*q.w;
z = Bp.b[6]*q.u + Bp.b[7]*q.v + Bp.b[8]*q.w;
-
+
x += (q.x-Width/2)*z*c*dv;
y += (q.y-Height/2)*z*c*dv;
ll = x*x+y*y;
- if(ll < 1e-10) return;
+ if(ll < 1e-10) return NAN;
if(ll==ll && phi<1e4)
{
phi = -atan2(y,x)*180/M_PI;
if(fabs(phi)>90) phi+=180;
}
else phi=0;
+ return phi;
+}
+//-----------------------------------------------------------------------------
+void mglCanvas::glyph_draw(const mglPrim *P, mglDrawReg *d)
+{
+ float phi = GetGlyphPhi(Pnt[P->n2],P->w);
+ if(mgl_isnan(phi)) return;
+ mglPnt p=Pnt[P->n1];
mreal pf=sqrt((Bp.b[0]*Bp.b[0]+Bp.b[1]*Bp.b[1]+Bp.b[3]*Bp.b[3]+Bp.b[4]*Bp.b[4])/2), f = P->p*pf;
#if MGL_HAVE_PTHREAD
pthread_mutex_lock(&mutexPnt);
diff --git a/src/plot.cpp b/src/plot.cpp
index c68c474..cb0d855 100644
--- a/src/plot.cpp
+++ b/src/plot.cpp
@@ -25,7 +25,7 @@
// Plot by formulas series
//
//-----------------------------------------------------------------------------
-void mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt)
+void MGL_EXPORT mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt)
{
if(eqY==0 || eqY[0]==0) return; // nothing to plot
mreal r = gr->SaveState(opt);
@@ -48,7 +48,7 @@ void mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt)
for(i=0;i<n-1 && n<nm;)
{
- if(gr->Stop) { delete eq; return; }
+ if(gr->Stop) { free(x); free(y); delete eq; return; }
xs=(x[i]+x[i+1])/2;
ys=(y[i]+y[i+1])/2; yr=eq->Calc(xs);
if(fabs(yr-ys)>ym) // bad approximation here
@@ -69,7 +69,7 @@ void mgl_fplot(HMGL gr, const char *eqY, const char *pen, const char *opt)
mgl_plot_xy(gr,&xx,&yy,pen,0);
}
//-----------------------------------------------------------------------------
-void mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt)
+void MGL_EXPORT mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *pen, const char *opt)
{
mreal r = gr->SaveState(opt);
long n = (mgl_isnan(r) || r<=0) ? 100:long(r+0.5);
@@ -86,7 +86,11 @@ void mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, c
mreal ts, xs, ys, zs, xr, yr, zr, xm=fabs(gr->Max.x - gr->Min.x)/1000, ym=fabs(gr->Max.y - gr->Min.y)/1000, zm=fabs(gr->Max.z - gr->Min.z)/1000;
for(i=0;i<n;i++) // initial data filling
{
- if(gr->Stop) { delete ex; delete ey; delete ez; return; }
+ if(gr->Stop)
+ {
+ free(x); free(y); free(z); free(t);
+ delete ex; delete ey; delete ez; return;
+ }
t[i] = i/(n-1.);
x[i] = ex->Calc(0,0,t[i]);
y[i] = ey->Calc(0,0,t[i]);
@@ -95,7 +99,11 @@ void mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, c
for(i=0;i<n-1 && n<10000;)
{
- if(gr->Stop) { delete ex; delete ey; delete ez; return; }
+ if(gr->Stop)
+ {
+ free(x); free(y); free(z); free(t);
+ delete ex; delete ey; delete ez; return;
+ }
ts=(t[i]+t[i+1])/2;
xs=(x[i]+x[i+1])/2; xr=ex->Calc(0,0,ts);
ys=(y[i]+y[i+1])/2; yr=ey->Calc(0,0,ts);
@@ -122,14 +130,14 @@ void mgl_fplot_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, c
mgl_plot_xyz(gr,&xx,&yy,&zz,pen,0);
}
//-----------------------------------------------------------------------------
-void mgl_fplot_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo)
+void MGL_EXPORT mgl_fplot_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo)
{ char *s=new char[ly+1]; memcpy(s,fy,ly); s[ly]=0;
char *p=new char[ls+1]; memcpy(p,stl,ls); p[ls]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_fplot(_GR_, s, p, o);
delete []s; delete []p; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_fplot_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo)
+void MGL_EXPORT mgl_fplot_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo)
{ char *sx=new char[lx+1]; memcpy(sx,fx,lx); sx[lx]=0;
char *sy=new char[ly+1]; memcpy(sy,fy,ly); sy[ly]=0;
char *sz=new char[lz+1]; memcpy(sz,fz,lz); sz[lz]=0;
@@ -142,7 +150,7 @@ void mgl_fplot_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *f
// Radar series
//
//-----------------------------------------------------------------------------
-void mgl_radar(HMGL gr, HCDT a, const char *pen, const char *opt)
+void MGL_EXPORT mgl_radar(HMGL gr, HCDT a, const char *pen, const char *opt)
{
long n = a->GetNx(), ny=a->GetNy();
if(n<2) { gr->SetWarn(mglWarnLow,"Radar"); return; }
@@ -181,7 +189,7 @@ void mgl_radar(HMGL gr, HCDT a, const char *pen, const char *opt)
}
}
//-----------------------------------------------------------------------------
-void mgl_radar_(uintptr_t *gr, uintptr_t *a, const char *pen, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_radar_(uintptr_t *gr, uintptr_t *a, const char *pen, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_radar(_GR_, _DA_(a),s,o); delete []s; delete []o; }
@@ -190,14 +198,15 @@ void mgl_radar_(uintptr_t *gr, uintptr_t *a, const char *pen, const char *opt, i
// Candle series
//
//-----------------------------------------------------------------------------
-void mgl_candle_xyv(HMGL gr, HCDT x, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt)
+void MGL_EXPORT mgl_candle_xyv(HMGL gr, HCDT x, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt)
{
long i,n=v1->GetNx(),pal,nx=x->GetNx();
+ if(n<2) { gr->SetWarn(mglWarnLow,"Candle"); return; }
+ if(nx<n || v2->GetNx()!=n) { gr->SetWarn(mglWarnDim,"Candle"); return; }
bool d1=false,d2=false;
if(!y1) { y1 = new mglData(n); d1=true; ((mglData *)y1)->Fill(NAN,NAN); }
if(!y2) { y2 = new mglData(n); d2=true; ((mglData *)y2)->Fill(NAN,NAN); }
- if(n<2) { gr->SetWarn(mglWarnLow,"Candle"); return; }
- if(nx<n || v2->GetNx()!=n || y1->GetNx()!=n || y2->GetNx()!=n)
+ if(y1->GetNx()!=n || y2->GetNx()!=n)
{ gr->SetWarn(mglWarnDim,"Candle"); return; }
static int cgid=1; gr->StartGroup("Candle",cgid++);
gr->SaveState(opt); gr->SetPenPal(pen,&pal);
@@ -234,7 +243,7 @@ void mgl_candle_xyv(HMGL gr, HCDT x, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_candle_yv(HMGL gr, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt)
+void MGL_EXPORT mgl_candle_yv(HMGL gr, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(v1->GetNx()+1);
@@ -243,24 +252,24 @@ void mgl_candle_yv(HMGL gr, HCDT v1, HCDT v2, HCDT y1, HCDT y2, const char *pen,
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_candle(HMGL gr, HCDT v1, HCDT y1, HCDT y2, const char *pen, const char *opt)
+void MGL_EXPORT mgl_candle(HMGL gr, HCDT v1, HCDT y1, HCDT y2, const char *pen, const char *opt)
{
mglData v2(v1);
v2.Roll('x',1); v2.a[0]=NAN;
mgl_candle_yv(gr,v1,&v2,y1,y2,pen,opt);
}
//-----------------------------------------------------------------------------
-void mgl_candle_xyv_(uintptr_t *gr, uintptr_t *x, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_candle_xyv_(uintptr_t *gr, uintptr_t *x, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_candle_xyv(_GR_,_DA_(x),_DA_(v1),_DA_(v2),_DA_(y1),_DA_(y2),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_candle_yv_(uintptr_t *gr, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_candle_yv_(uintptr_t *gr, uintptr_t *v1, uintptr_t *v2, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_candle_yv(_GR_,_DA_(v1),_DA_(v2),_DA_(y1),_DA_(y2),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_candle_(uintptr_t *gr, uintptr_t *y, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_candle_(uintptr_t *gr, uintptr_t *y, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_candle(_GR_,_DA_(y),_DA_(y1),_DA_(y2),s,o);
@@ -270,7 +279,7 @@ void mgl_candle_(uintptr_t *gr, uintptr_t *y, uintptr_t *y1, uintptr_t *y2, cons
// Plot series
//
//-----------------------------------------------------------------------------
-void mgl_plot_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_plot_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long j,m,mx,my,mz,n=y->GetNx(),pal;
if(mgl_check_dim1(gr,x,y,z,0,"Plot")) return;
@@ -327,7 +336,7 @@ void mgl_plot_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_plot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_plot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -336,7 +345,7 @@ void mgl_plot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_plot(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_plot(HMGL gr, HCDT y, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Plot"); return; }
@@ -348,17 +357,17 @@ void mgl_plot(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_plot_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_plot_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_plot_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_plot_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_plot_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_plot_xy(_GR_, _DA_(x),_DA_(y),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_plot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_plot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_plot(_GR_, _DA_(y),s,o); delete []s; delete []o; }
@@ -367,7 +376,7 @@ void mgl_plot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int
// Tens series
//
//-----------------------------------------------------------------------------
-void mgl_tens_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tens_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *pen, const char *opt)
{
long j,m,mx,my,mz,mc,n=y->GetNx(), pal;
if(mgl_check_dim1(gr,x,y,z,0,"Tens")) return;
@@ -424,7 +433,7 @@ void mgl_tens_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *pen, cons
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_tens_xy(HMGL gr, HCDT x, HCDT y, HCDT c, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tens_xy(HMGL gr, HCDT x, HCDT y, HCDT c, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -433,7 +442,7 @@ void mgl_tens_xy(HMGL gr, HCDT x, HCDT y, HCDT c, const char *pen, const char *o
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tens(HMGL gr, HCDT y, HCDT c, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tens(HMGL gr, HCDT y, HCDT c, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Tens"); return; }
@@ -445,17 +454,17 @@ void mgl_tens(HMGL gr, HCDT y, HCDT c, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tens_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tens_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tens_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),_DA_(c),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tens_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tens_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tens_xy(_GR_, _DA_(x),_DA_(y),_DA_(c),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tens_(uintptr_t *gr, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tens_(uintptr_t *gr, uintptr_t *y, uintptr_t *c, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tens(_GR_, _DA_(y),_DA_(c),s,o); delete []o; delete []s; }
@@ -464,7 +473,7 @@ void mgl_tens_(uintptr_t *gr, uintptr_t *y, uintptr_t *c, const char *pen, const
// Area series
//
//-----------------------------------------------------------------------------
-void mgl_area_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_area_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long i,j,n=y->GetNx(),m,mx,my,mz,pal;
if(mgl_check_dim1(gr,x,y,z,0,"Area")) return;
@@ -509,7 +518,7 @@ void mgl_area_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_area_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_area_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
long i,j,n=y->GetNx(),m=y->GetNy(),mx,my,pal;
if(mgl_check_dim1(gr,x,y,0,0,"Area")) return;
@@ -553,7 +562,7 @@ void mgl_area_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_area(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_area(HMGL gr, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx());
@@ -562,17 +571,17 @@ void mgl_area(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_area_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_area_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_area_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_area_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_area_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_area_xy(_GR_, _DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_area_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_area_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_area(_GR_, _DA_(y),s,o); delete []o; delete []s; }
@@ -581,7 +590,7 @@ void mgl_area_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int
// Region series
//
//-----------------------------------------------------------------------------
-void mgl_region_xy(HMGL gr, HCDT x, HCDT y1, HCDT y2, const char *pen, const char *opt)
+void MGL_EXPORT mgl_region_xy(HMGL gr, HCDT x, HCDT y1, HCDT y2, const char *pen, const char *opt)
{
long i,j, n=y1->GetNx(), m=y1->GetNy(), mx, pal;
if(mgl_check_dim1(gr,x,y1,y2,0,"Region")) return;
@@ -623,7 +632,7 @@ void mgl_region_xy(HMGL gr, HCDT x, HCDT y1, HCDT y2, const char *pen, const cha
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_region(HMGL gr, HCDT y1, HCDT y2, const char *pen, const char *opt)
+void MGL_EXPORT mgl_region(HMGL gr, HCDT y1, HCDT y2, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y1->GetNx());
@@ -632,12 +641,12 @@ void mgl_region(HMGL gr, HCDT y1, HCDT y2, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_region_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt, int l, int lo)
+void MGL_EXPORT mgl_region_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt, int l, int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_region_xy(_GR_, _DA_(x),_DA_(y1),_DA_(y2),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_region_(uintptr_t *gr, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt, int l, int lo)
+void MGL_EXPORT mgl_region_(uintptr_t *gr, uintptr_t *y1, uintptr_t *y2, const char *pen, const char *opt, int l, int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_region(_GR_, _DA_(y1),_DA_(y2),s,o); delete []o; delete []s; }
@@ -646,7 +655,7 @@ void mgl_region_(uintptr_t *gr, uintptr_t *y1, uintptr_t *y2, const char *pen, c
// Step series
//
//-----------------------------------------------------------------------------
-void mgl_step_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_step_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long i,j,m,mx,my,mz,n=y->GetNx(), pal;
if(mgl_check_dim1(gr,x,y,z,0,"Step")) return;
@@ -684,7 +693,7 @@ void mgl_step_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_step_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_step_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
long i,j,m,mx,my,n=y->GetNx(), pal;
if(mgl_check_dim1(gr,x,y,0,0,"Step")) return;
@@ -723,7 +732,7 @@ void mgl_step_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_step(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_step(HMGL gr, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx());
@@ -732,17 +741,17 @@ void mgl_step(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_step_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_step_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_step_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_step_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_step_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_step_xy(_GR_, _DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_step_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_step_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_step(_GR_, _DA_(y),s,o); delete []o; delete []s; }
@@ -751,7 +760,7 @@ void mgl_step_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int
// Stem series
//
//-----------------------------------------------------------------------------
-void mgl_stem_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_stem_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long i,j,m,mx,my,mz,n=y->GetNx(), pal;
if(mgl_check_dim1(gr,x,y,z,0,"Stem")) return;
@@ -781,7 +790,7 @@ void mgl_stem_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_stem_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_stem_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
long i,j,m,mx,my,n=y->GetNx(), pal;
if(mgl_check_dim1(gr,x,y,0,0,"Stem")) return;
@@ -812,7 +821,7 @@ void mgl_stem_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_stem(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_stem(HMGL gr, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx());
@@ -821,17 +830,17 @@ void mgl_stem(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_stem_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_stem_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_stem_xyz(_GR_,_DA_(x),_DA_(y),_DA_(z),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_stem_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_stem_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_stem_xy(_GR_,_DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_stem_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_stem_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_stem(_GR_,_DA_(y),s,o); delete []o; delete []s; }
@@ -840,14 +849,15 @@ void mgl_stem_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int
// Bars series
//
//-----------------------------------------------------------------------------
-void mgl_bars_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_bars_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long i,j,m,mx,my,mz,n=z->GetNx(), pal,nx=x->GetNx(),ny=y->GetNx();
if(mgl_check_dim1(gr,x,z,y,0,"Bars",true)) return;
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("Bars3",cgid++);
- m = x->GetNy() > y->GetNy() ? x->GetNy() : y->GetNy(); m = z->GetNy() > m ? z->GetNy() : m;
+ m = x->GetNy() > y->GetNy() ? x->GetNy() : y->GetNy();
+ m = z->GetNy() > m ? z->GetNy() : m;
bool sh = mglchr(pen,'!');
bool wire = mglchr(pen,'#');
@@ -907,7 +917,7 @@ void mgl_bars_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup(); delete []dd;
}
//-----------------------------------------------------------------------------
-void mgl_bars_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_bars_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
long i,j,m,mx,my,n=y->GetNx(),pal;
if(mgl_check_dim1(gr,x,y,0,0,"Bars",true)) return;
@@ -963,7 +973,7 @@ void mgl_bars_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->EndGroup(); delete []dd;
}
//-----------------------------------------------------------------------------
-void mgl_bars(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_bars(HMGL gr, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx()+1);
@@ -972,17 +982,17 @@ void mgl_bars(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_bars_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_bars_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_bars_xyz(_GR_,_DA_(x),_DA_(y),_DA_(z),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_bars_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_bars_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_bars_xy(_GR_,_DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_bars_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_bars_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_bars(_GR_,_DA_(y),s,o); delete []o; delete []s; }
@@ -991,7 +1001,7 @@ void mgl_bars_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int
// Barh series
//
//-----------------------------------------------------------------------------
-void mgl_barh_yx(HMGL gr, HCDT y, HCDT v, const char *pen, const char *opt)
+void MGL_EXPORT mgl_barh_yx(HMGL gr, HCDT y, HCDT v, const char *pen, const char *opt)
{
long i,j,m,mx,my,n=v->GetNx(),pal;
if(mgl_check_dim1(gr,y,v,0,0,"Barh",true)) return;
@@ -1047,7 +1057,7 @@ void mgl_barh_yx(HMGL gr, HCDT y, HCDT v, const char *pen, const char *opt)
gr->EndGroup(); delete []dd;
}
//-----------------------------------------------------------------------------
-void mgl_barh(HMGL gr, HCDT v, const char *pen, const char *opt)
+void MGL_EXPORT mgl_barh(HMGL gr, HCDT v, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData y(v->GetNx()+1);
@@ -1056,12 +1066,12 @@ void mgl_barh(HMGL gr, HCDT v, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_barh_yx_(uintptr_t *gr, uintptr_t *y, uintptr_t *v, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_barh_yx_(uintptr_t *gr, uintptr_t *y, uintptr_t *v, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_barh_yx(_GR_,_DA_(y),_DA_(v),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_barh_(uintptr_t *gr, uintptr_t *v, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_barh_(uintptr_t *gr, uintptr_t *v, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_barh(_GR_,_DA_(v),s,o); delete []o; delete []s; }
@@ -1071,14 +1081,14 @@ void mgl_barh_(uintptr_t *gr, uintptr_t *v, const char *pen, const char *opt,int
//
//-----------------------------------------------------------------------------
double sgn(double a);
-int mgl_cmp_flt(const void *a, const void *b)
+int MGL_NO_EXPORT mgl_cmp_flt(const void *a, const void *b)
{
const mreal *aa = (const mreal *)a;
const mreal *bb = (const mreal *)b;
return int(sgn(*aa-*bb));
}
//-----------------------------------------------------------------------------
-void mgl_boxplot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_boxplot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
long n=y->GetNx(), m=y->GetNy(), nx=x->GetNx();
if(nx<n || nx<2) { gr->SetWarn(mglWarnDim,"BoxPlot"); return; }
@@ -1090,7 +1100,7 @@ void mgl_boxplot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
register long i,j;
for(i=0;i<n;i++) // find quartiles by itself
{
- if(gr->Stop) { delete []d; return; }
+ if(gr->Stop) { delete []d; delete []b; return; }
register long mm,k;
for(mm=j=0;j<m;j++)
{
@@ -1140,7 +1150,7 @@ void mgl_boxplot_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
delete []b; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_boxplot(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_boxplot(HMGL gr, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx()+1);
@@ -1149,12 +1159,12 @@ void mgl_boxplot(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_boxplot_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_boxplot_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_boxplot_xy(_GR_,_DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_boxplot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_boxplot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_boxplot(_GR_,_DA_(y),s,o); delete []o; delete []s; }
@@ -1163,7 +1173,7 @@ void mgl_boxplot_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,
// Error series
//
//-----------------------------------------------------------------------------
-void mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, const char *opt)
+void MGL_EXPORT mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, const char *opt)
{
long i,j,k,m,mx,my,m1,m2,n=ey->GetNx(),pal;
if(mgl_check_dim1(gr,x,y,ey,ex,"Error")) return;
@@ -1281,7 +1291,7 @@ void mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, c
} break;
case 'C': for(i=0;i<n;i++)
{
- vx=x->v(i,mx); ve=ex->v(i,m1); vy=y->v(i,my); vf=ey->v(i,m2);
+ vx=x->v(i,mx); vy=y->v(i,my);
gr->mark_plot(gr->AddPnt(mglPoint(vx,vy,zVal),-1,q,-1,3), '.');
if(sh) gr->NextColor(pal);
}
@@ -1305,7 +1315,7 @@ void mgl_error_exy(HMGL gr, HCDT x, HCDT y, HCDT ex, HCDT ey, const char *pen, c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_error_xy(HMGL gr, HCDT x, HCDT y, HCDT ey, const char *pen, const char *opt)
+void MGL_EXPORT mgl_error_xy(HMGL gr, HCDT x, HCDT y, HCDT ey, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData ex(y->GetNx());
@@ -1314,7 +1324,7 @@ void mgl_error_xy(HMGL gr, HCDT x, HCDT y, HCDT ey, const char *pen, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_error(HMGL gr, HCDT y, HCDT ey, const char *pen, const char *opt)
+void MGL_EXPORT mgl_error(HMGL gr, HCDT y, HCDT ey, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(y->GetNx());
@@ -1323,17 +1333,17 @@ void mgl_error(HMGL gr, HCDT y, HCDT ey, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_error_(uintptr_t *gr, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_error_(uintptr_t *gr, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_error(_GR_,_DA_(y),_DA_(ey),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_error_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_error_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_error_xy(_GR_,_DA_(x),_DA_(y),_DA_(ey),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_error_exy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ex, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_error_exy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ex, uintptr_t *ey, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_error_exy(_GR_,_DA_(x),_DA_(y),_DA_(ex),_DA_(ey),s,o);
@@ -1385,7 +1395,7 @@ void face_plot(mglBase *gr, mglPoint o, mglPoint d1, mglPoint d2, mreal c, bool
delete []id;
}
//-----------------------------------------------------------------------------
-void mgl_chart(HMGL gr, HCDT a, const char *cols, const char *opt)
+void MGL_EXPORT mgl_chart(HMGL gr, HCDT a, const char *cols, const char *opt)
{
if(a->Minimal()<0) { gr->SetWarn(mglWarnNeg,"Chart"); return; }
gr->SaveState(opt);
@@ -1400,7 +1410,8 @@ void mgl_chart(HMGL gr, HCDT a, const char *cols, const char *opt)
for(i=0;i<long(strlen(cols));i++)
if(strchr(MGL_COLORS,cols[i]) || cols[i]==' ')
{ c[nc]=gr->AddTexture(cols[i]); nc++; }
-
+ // NOTE: nc>0 since j>0 or MGL_DEF_PAL is not empty
+
mreal dy = (gr->Max.y-gr->Min.y)/a->GetNy(), dx, ss, cs, x1, y1, dz=gr->Max.z-gr->Min.z, vv;
mglPoint d1,d2,o;
@@ -1431,7 +1442,7 @@ void mgl_chart(HMGL gr, HCDT a, const char *cols, const char *opt)
gr->EndGroup(); delete []c;
}
//-----------------------------------------------------------------------------
-void mgl_chart_(uintptr_t *gr, uintptr_t *a, const char *col, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_chart_(uintptr_t *gr, uintptr_t *a, const char *col, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,col,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_chart(_GR_, _DA_(a), s,o); delete []o; delete []s; }
@@ -1440,7 +1451,7 @@ void mgl_chart_(uintptr_t *gr, uintptr_t *a, const char *col, const char *opt,in
// Mark series
//
//-----------------------------------------------------------------------------
-void mgl_mark_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_mark_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt)
{
long j,m,mx,my,mz,mr,n=y->GetNx(),pal;
if(mgl_check_dim0(gr,x,y,z,r,"Mark")) return;
@@ -1461,14 +1472,14 @@ void mgl_mark_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, cons
for(int i=0;i<n;i++)
{
if(gr->Stop) return;
- gr->mark_plot(gr->AddPnt(mglPoint(x->v(i,mx),y->v(i,my),z->v(i,mz))), mk, r->v(i,mr));
+ gr->mark_plot(gr->AddPnt(mglPoint(x->v(i,mx),y->v(i,my),z->v(i,mz))), mk, fabs(r->v(i,mr)));
if(sh) gr->NextColor(pal);
}
}
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_mark_xy(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_mark_xy(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -1477,7 +1488,7 @@ void mgl_mark_xy(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *o
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_mark_y(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_mark_y(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
{
register long n=y->GetNx();
gr->SaveState(opt);
@@ -1488,18 +1499,18 @@ void mgl_mark_y(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_mark_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_mark_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_mark_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(r),s,o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_mark_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_mark_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_mark_xy(_GR_, _DA_(x), _DA_(y), _DA_(r),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_mark_y_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_mark_y_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_mark_y(_GR_,_DA_(y),_DA_(r),s,o); delete []o; delete []s; }
@@ -1508,7 +1519,7 @@ void mgl_mark_y_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, con
// Tube series
//
//-----------------------------------------------------------------------------
-void mgl_tube_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, const char *opt)
{
long j,m,mx,my,mz,mr,n=y->GetNx(),pal;
if(mgl_check_dim1(gr,x,y,z,r,"Tube")) return;
@@ -1556,7 +1567,7 @@ void mgl_tube_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *pen, con
delete []nn; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_tube_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -1565,7 +1576,7 @@ void mgl_tube_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const char *pen, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tube_r(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube_r(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Tube"); return; }
@@ -1577,7 +1588,7 @@ void mgl_tube_r(HMGL gr, HCDT y, HCDT r, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tube(HMGL gr, HCDT y, double rr, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube(HMGL gr, HCDT y, double rr, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Tube"); return; }
@@ -1590,7 +1601,7 @@ void mgl_tube(HMGL gr, HCDT y, double rr, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tube_xy(HMGL gr, HCDT x, HCDT y, double rr, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube_xy(HMGL gr, HCDT x, HCDT y, double rr, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Tube"); return; }
@@ -1602,7 +1613,7 @@ void mgl_tube_xy(HMGL gr, HCDT x, HCDT y, double rr, const char *pen, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tube_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, double rr, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tube_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, double rr, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData r(y->GetNx());
@@ -1611,33 +1622,33 @@ void mgl_tube_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, double rr, const char *pen, c
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tube_xyzr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_xyzr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube_xyzr(_GR_,_DA_(x),_DA_(y),_DA_(z), _DA_(r),s,o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tube_xyr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_xyr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube_xyr(_GR_,_DA_(x),_DA_(y),_DA_(r),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tube_r_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_r_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube_r(_GR_,_DA_(y),_DA_(r),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_tube_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, mreal *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, mreal *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube_xyz(_GR_,_DA_(x),_DA_(y),_DA_(z),*r,s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tube_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, mreal *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, mreal *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube_xy(_GR_,_DA_(x),_DA_(y),*r,s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_tube_(uintptr_t *gr, uintptr_t *y, mreal *r, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tube_(uintptr_t *gr, uintptr_t *y, mreal *r, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tube(_GR_,_DA_(y),*r,s,o);
@@ -1647,7 +1658,7 @@ void mgl_tube_(uintptr_t *gr, uintptr_t *y, mreal *r, const char *pen, const cha
// Tape series
//
//-----------------------------------------------------------------------------
-void mgl_tape_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tape_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long j,m,mx,my,mz,n=y->GetNx(),pal;
if(mgl_check_dim1(gr,x,y,z,0,"Tape")) return;
@@ -1711,7 +1722,7 @@ void mgl_tape_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_tape_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tape_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx());
@@ -1720,7 +1731,7 @@ void mgl_tape_xy(HMGL gr, HCDT x, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tape(HMGL gr, HCDT y, const char *pen, const char *opt)
+void MGL_EXPORT mgl_tape(HMGL gr, HCDT y, const char *pen, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"Plot"); return; }
@@ -1732,17 +1743,17 @@ void mgl_tape(HMGL gr, HCDT y, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tape_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tape_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tape_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_tape_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tape_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tape_xy(_GR_, _DA_(x),_DA_(y),s,o); delete []s; delete []o; }
//-----------------------------------------------------------------------------
-void mgl_tape_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tape_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tape(_GR_, _DA_(y),s,o); delete []s; delete []o; }
diff --git a/src/prc.cpp b/src/prc.cpp
index 45ba529..cae99dd 100644
--- a/src/prc.cpp
+++ b/src/prc.cpp
@@ -42,9 +42,30 @@
#undef _GR_
#define _GR_ ((mglCanvas *)(*gr))
#define _Gr_ ((mglCanvas *)(gr))
-int mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
-int mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
-void mgl_printf(void *fp, bool gz, const char *str, ...);
+
+//-----------------------------------------------------------------------------
+void mglTexture::GetRGBAPRC(unsigned char *f) const
+{
+ register size_t i,j,i0;
+ mglColor c1,c2,c;
+ for(i=0;i<256;i++)
+ {
+ c1 = col[2*i]; c2 = col[2*i+1];
+ for(j=0;j<256;j++)
+ {
+ i0 = 4*(j+256*(255-i));
+ c = c1 + (c2-c1)*(j/255.);
+ f[i0] = int(255*c.r);
+ f[i0+1] = int(255*c.g);
+ f[i0+2] = int(255*c.b);
+ f[i0+3] = int(255*c.a);
+ }
+ }
+}
+//-----------------------------------------------------------------------------
+int MGL_NO_EXPORT mgl_tga_save(const char *fname, int w, int h, unsigned char **p);
+int MGL_NO_EXPORT mgl_pnga_save(const char *fname, int w, int h, unsigned char **p);
+void MGL_NO_EXPORT mgl_printf(void *fp, bool gz, const char *str, ...);
//-----------------------------------------------------------------------------
struct prctriangle {
uint32_t pi[3];
@@ -223,7 +244,7 @@ void my_png_flush(png_structp /*png_ptr*/)
{
}
//-----------------------------------------------------------------------------
-void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pdf)
+void MGL_EXPORT mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pdf)
{
if(gr->GetPrmNum()==0) return; // nothing to do
{
@@ -279,7 +300,7 @@ void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pd
for(size_t i=0;i<height;i++)
pbuf[i] = buf+4*width*i;
for(size_t i=0;i<ntxt;i++)
- gr->GetTxt(i).GetRGBA(buf+(ntxt-1-i)*256*width*4);
+ gr->GetTxt(i).GetRGBAPRC(buf+(ntxt-1-i)*256*width*4);
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
png_infop info_ptr = png_create_info_struct(png_ptr);
@@ -318,6 +339,17 @@ void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pd
1.0,0.1); // alpha, shininess
materialMathGLid = file.addTexturedMaterial(m,1,&t);
+ delete t;
+
+ // char * const pngname = new char[len+100];
+ // strcpy(pngname, "test_texture_");
+ // strcat(pngname,tname);
+ // const size_t tlen=strlen(pngname)-4;
+ // pngname[tlen+1]='p'; pngname[tlen+2]='n'; pngname[tlen+3]='g';
+ // FILE *fp = fopen(pngname, "wb");
+ // fwrite(buffer.data, 1, buffer.size, fp);
+ // fclose(fp);
+ // delete[] pngname;
free(buffer.data); buffer.data = NULL;
}
@@ -345,14 +377,14 @@ void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pd
const double w = (q.w>1)?(q.w*sqrt(gr->FontFactor()/400.)):1;
const mglPnt p = gr->GetPnt(q.n1) - p0;
- const mreal size = q.s*gr->FontFactor();
+ const mreal size = q.s;
{
switch(q.type)
{
case 0:
if (gr->GetPnt(q.n1).a > mgl_min_a) {
const char type = q.n4;
- float ss=size*0.35;
+ float ss=size;
const RGBAColour c(p.r, p.g, p.b, p.a);
if(!strchr("xsSoO",type)) ss *= 1.1;
@@ -625,7 +657,7 @@ void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pd
uint32_t pnti[21];
for(size_t k=0;k<=20;k++)
pnti[k]=group.addPoint(p.x+ss*cos(k*M_PI/10),p.y+ss*sin(k*M_PI/10),p.z);
- for(size_t k=0;k<=20;k++) {
+ for(size_t k=0;k<20;k++) {
group.addTriangle(ti, pnti[k], pnti[k+1], cpi);
}
}
@@ -954,7 +986,7 @@ void mgl_write_prc(HMGL gr, const char *fname,const char* /*descr*/, int make_pd
delete []tname;
}
//-----------------------------------------------------------------------------
-void mgl_write_prc_(uintptr_t *gr, const char *fname,const char *descr, int *make_pdf,int l,int n)
+void MGL_EXPORT mgl_write_prc_(uintptr_t *gr, const char *fname,const char *descr, int *make_pdf,int l,int n)
{ char *s=new char[l+1]; memcpy(s,fname,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,descr,n); f[n]=0;
mgl_write_prc(_GR_,s,f,*make_pdf); delete []s; delete []f; }
diff --git a/src/prim.cpp b/src/prim.cpp
index d04fec0..1bf0f5f 100644
--- a/src/prim.cpp
+++ b/src/prim.cpp
@@ -25,7 +25,7 @@
// Mark & Curve series
//
//-----------------------------------------------------------------------------
-void mgl_mark(HMGL gr, double x, double y, double z,const char *mark)
+void MGL_EXPORT mgl_mark(HMGL gr, double x, double y, double z,const char *mark)
{
char mk = gr->SetPenPal(mark);
if(!mk) mk = '.';
@@ -36,11 +36,11 @@ void mgl_mark(HMGL gr, double x, double y, double z,const char *mark)
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_mark_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, const char *pen,int l)
+void MGL_EXPORT mgl_mark_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, const char *pen,int l)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
mgl_mark(_GR_, *x,*y,*z,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_ball(HMGL gr, double x, double y, double z)
+void MGL_EXPORT mgl_ball(HMGL gr, double x, double y, double z)
{
static int cgid=1; gr->StartGroup("Ball",cgid++);
if(mgl_isnan(z)) z=2*gr->Max.z-gr->Min.z;
@@ -49,10 +49,10 @@ void mgl_ball(HMGL gr, double x, double y, double z)
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_ball_(uintptr_t *gr, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_ball_(uintptr_t *gr, mreal *x, mreal *y, mreal *z)
{ mgl_ball(_GR_, *x,*y,*z); }
//-----------------------------------------------------------------------------
-void mgl_line(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, const char *pen,int n)
+void MGL_EXPORT mgl_line(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, const char *pen,int n)
{
static int cgid=1; gr->StartGroup("Line",cgid++);
if(mgl_isnan(z1) || mgl_isnan(z2)) z1=z2=2*gr->Max.z-gr->Min.z;
@@ -76,11 +76,11 @@ void mgl_line(HMGL gr, double x1, double y1, double z1, double x2, double y2, do
gr->AddActive(k1,1); gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_line_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int *n,int l)
+void MGL_EXPORT mgl_line_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int *n,int l)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
mgl_line(_GR_, *x1,*y1,*z1, *x2,*y2,*z2,s,*n); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_curve(HMGL gr, double x1, double y1, double z1, double dx1, double dy1, double dz1, double x2, double y2, double z2, double dx2, double dy2, double dz2, const char *pen,int n)
+void MGL_EXPORT mgl_curve(HMGL gr, double x1, double y1, double z1, double dx1, double dy1, double dz1, double x2, double y2, double z2, double dx2, double dy2, double dz2, const char *pen,int n)
{
static int cgid=1; gr->StartGroup("Curve",cgid++);
if(mgl_isnan(z1) || mgl_isnan(z2)) z1=z2=2*gr->Max.z-gr->Min.z;
@@ -107,18 +107,18 @@ void mgl_curve(HMGL gr, double x1, double y1, double z1, double dx1, double dy1,
gr->AddActive(k1,2); gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_curve_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *dx1, mreal *dy1, mreal *dz1, mreal *x2, mreal *y2, mreal *z2, mreal *dx2, mreal *dy2, mreal *dz2, const char *pen,int *n, int l)
+void MGL_EXPORT mgl_curve_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *dx1, mreal *dy1, mreal *dz1, mreal *x2, mreal *y2, mreal *z2, mreal *dx2, mreal *dy2, mreal *dz2, const char *pen,int *n, int l)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
mgl_curve(_GR_, *x1,*y1,*z1, *dx1,*dy1,*dz1, *x2,*y2,*z2, *dx2,*dy2,*dz2, s, *n); delete []s;}
//-----------------------------------------------------------------------------
-void mgl_error_box(HMGL gr, double x, double y, double z, double ex, double ey, double ez, const char *pen)
+void MGL_EXPORT mgl_error_box(HMGL gr, double x, double y, double z, double ex, double ey, double ez, const char *pen)
{
static int cgid=1; gr->StartGroup("ErBox",cgid++);
char mk=gr->SetPenPal(pen);
mglPoint p(x,y,z), q,nn=mglPoint(NAN);
gr->Reserve(7);
long k1,k2;
- q = p; q.x += ex; k1 = gr->AddPnt(q,gr->CDef,nn,0,3); // TODO draw lines to show cube (not just perp to line)
+ q = p; q.x += ex; k1 = gr->AddPnt(q,gr->CDef,nn,0,3);
q = p; q.x -= ex; k2 = gr->AddPnt(q,gr->CDef,nn,0,3);
gr->line_plot(k1,k2); gr->arrow_plot(k1,k2,'I'); gr->arrow_plot(k2,k1,'I');
q = p; q.y += ey; k1 = gr->AddPnt(q,gr->CDef,nn,0,3);
@@ -133,7 +133,7 @@ void mgl_error_box(HMGL gr, double x, double y, double z, double ex, double ey,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_error_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int l)
+void MGL_EXPORT mgl_error_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, const char *pen,int l)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
mgl_error_box(_GR_, *x1,*y1,*z1, *x2,*y2,*z2,s); delete []s; }
//-----------------------------------------------------------------------------
@@ -141,7 +141,7 @@ void mgl_error_box_(uintptr_t *gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, m
// Face series
//
//-----------------------------------------------------------------------------
-void mgl_face(HMGL gr, double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, const char *stl)
+void MGL_EXPORT mgl_face(HMGL gr, double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, const char *stl)
{
static int cgid=1; gr->StartGroup("Face",cgid++);
long pal;
@@ -177,29 +177,29 @@ void mgl_face(HMGL gr, double x0, double y0, double z0, double x1, double y1, do
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_facex(HMGL gr, double x0, double y0, double z0, double wy, double wz, const char *stl, double d1, double d2)
+void MGL_EXPORT mgl_facex(HMGL gr, double x0, double y0, double z0, double wy, double wz, const char *stl, double d1, double d2)
{ mgl_face(gr, x0,y0,z0, x0,y0+wy,z0, x0,y0,z0+wz, x0,y0+wy+d1,z0+wz+d2, stl); }
//-----------------------------------------------------------------------------
-void mgl_facey(HMGL gr, double x0, double y0, double z0, double wx, double wz, const char *stl, double d1, double d2)
+void MGL_EXPORT mgl_facey(HMGL gr, double x0, double y0, double z0, double wx, double wz, const char *stl, double d1, double d2)
{ mgl_face(gr, x0,y0,z0, x0+wx,y0,z0, x0,y0,z0+wz, x0+wx+d1,y0,z0+wz+d2, stl); }
//-----------------------------------------------------------------------------
-void mgl_facez(HMGL gr, double x0, double y0, double z0, double wx, double wy, const char *stl, double d1, double d2)
+void MGL_EXPORT mgl_facez(HMGL gr, double x0, double y0, double z0, double wx, double wy, const char *stl, double d1, double d2)
{ mgl_face(gr, x0,y0,z0, x0,y0+wy,z0, x0+wx,y0,z0, x0+wx+d1,y0+wy+d2,z0, stl); }
//-----------------------------------------------------------------------------
-void mgl_facex_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wy, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l)
+void MGL_EXPORT mgl_facex_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wy, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_facex(_GR_, *x0,*y0,*z0,*wy,*wz,s,*dx,*dy); delete []s;
}
//-----------------------------------------------------------------------------
-void mgl_facey_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l)
+void MGL_EXPORT mgl_facey_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wz, const char *stl, mreal *dx, mreal *dy, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_facey(_GR_, *x0,*y0,*z0,*wx,*wz,s,*dx,*dy); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_facez_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wy, const char *stl, mreal *dx, mreal *dy, int l)
+void MGL_EXPORT mgl_facez_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *wx, mreal *wy, const char *stl, mreal *dx, mreal *dy, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_facez(_GR_, *x0,*y0,*z0,*wx,*wy,s,*dx,*dy); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_face_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *x3, mreal *y3, mreal *z3, const char *stl, int l)
+void MGL_EXPORT mgl_face_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *x3, mreal *y3, mreal *z3, const char *stl, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_face(_GR_, *x0,*y0,*z0, *x1,*y1,*z1, *x2,*y2,*z2, *x3,*y3,*z3, stl); delete []s; }
//-----------------------------------------------------------------------------
@@ -207,7 +207,7 @@ void mgl_face_(uintptr_t* gr, mreal *x0, mreal *y0, mreal *z0, mreal *x1, mreal
// Cone
//
//-----------------------------------------------------------------------------
-void mgl_cone(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r1, double r2, const char *stl)
+void MGL_EXPORT mgl_cone(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r1, double r2, const char *stl)
{
if(r2<0) r2=r1;
if(r1==0 && r2==0) return;
@@ -262,7 +262,7 @@ void mgl_cone(HMGL gr, double x1, double y1, double z1, double x2, double y2, do
gr->EndGroup(); delete []kk;
}
//-----------------------------------------------------------------------------
-void mgl_cone_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r1, mreal *r2, const char *stl, int l)
+void MGL_EXPORT mgl_cone_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r1, mreal *r2, const char *stl, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_cone(_GR_, *x1,*y1,*z1, *x2,*y2,*z2,*r1,*r2,s); delete []s; }
//-----------------------------------------------------------------------------
@@ -270,7 +270,7 @@ void mgl_cone_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal
// Bars series
//
//-----------------------------------------------------------------------------
-void mgl_cones_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_cones_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char *opt)
{
long i,j,m,mx,my,mz,n=z->GetNx(),nx=x->GetNx(), nz=z->GetNy(), pal;
if(mgl_check_dim1(gr,x,z,y,0,"Cones",true)) return;
@@ -317,7 +317,7 @@ void mgl_cones_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *pen, const char
gr->EndGroup(); delete []dd;
}
//-----------------------------------------------------------------------------
-void mgl_cones_xz(HMGL gr, HCDT x, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_cones_xz(HMGL gr, HCDT x, HCDT z, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData y(z);
@@ -326,7 +326,7 @@ void mgl_cones_xz(HMGL gr, HCDT x, HCDT z, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cones(HMGL gr, HCDT z, const char *pen, const char *opt)
+void MGL_EXPORT mgl_cones(HMGL gr, HCDT z, const char *pen, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()+1);
@@ -335,17 +335,17 @@ void mgl_cones(HMGL gr, HCDT z, const char *pen, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cones_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cones_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cones_xyz(_GR_,_DA_(x),_DA_(y),_DA_(z),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cones_xz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cones_xz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cones_xz(_GR_,_DA_(x),_DA_(y),s,o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cones_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cones_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,pen,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cones(_GR_,_DA_(y),s,o); delete []o; delete []s; }
@@ -354,7 +354,7 @@ void mgl_cones_(uintptr_t *gr, uintptr_t *y, const char *pen, const char *opt,in
// Ellipse & Rhomb
//
//-----------------------------------------------------------------------------
-void mgl_ellipse(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl)
+void MGL_EXPORT mgl_ellipse(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl)
{
const int n = 41;
long pal=0,n0,n1=-1,n2,m1=-1,m2;
@@ -392,7 +392,7 @@ void mgl_ellipse(HMGL gr, double x1, double y1, double z1, double x2, double y2,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_rhomb(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl)
+void MGL_EXPORT mgl_rhomb(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl)
{
long pal=0, n1,n2,n3,n4;
static int cgid=1; gr->StartGroup("Rhomb",cgid++);
@@ -420,11 +420,11 @@ void mgl_rhomb(HMGL gr, double x1, double y1, double z1, double x2, double y2, d
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_ellipse_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl,int l)
+void MGL_EXPORT mgl_ellipse_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl,int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_ellipse(_GR_,*x1,*y1,*z1,*x2,*y2,*z2,*r,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_rhomb_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl,int l)
+void MGL_EXPORT mgl_rhomb_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl,int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_rhomb(_GR_,*x1,*y1,*z1,*x2,*y2,*z2,*r,s); delete []s; }
//-----------------------------------------------------------------------------
@@ -432,14 +432,14 @@ void mgl_rhomb_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal
// Sphere & Drop
//
//-----------------------------------------------------------------------------
-void mgl_sphere(HMGL gr, double x, double y, double z, double r, const char *stl)
+void MGL_EXPORT mgl_sphere(HMGL gr, double x, double y, double z, double r, const char *stl)
{ mgl_drop(gr,x,y,z,1,0,0,2*r,stl,0,1); }
//-----------------------------------------------------------------------------
-void mgl_sphere_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *r, const char *stl,int l)
+void MGL_EXPORT mgl_sphere_(uintptr_t* gr, mreal *x, mreal *y, mreal *z, mreal *r, const char *stl,int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_sphere(_GR_, *x,*y,*z,*r,s); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_drop(HMGL gr, mglPoint p, mglPoint q, double r, double c, double sh, double a)
+void MGL_EXPORT mgl_drop(HMGL gr, mglPoint p, mglPoint q, double r, double c, double sh, double a)
{
mglPoint p1,p2,pp,qq;
if(q.norm()==0) { q = mglPoint(1,0,0); sh=0; }
@@ -477,13 +477,13 @@ void mgl_drop(HMGL gr, mglPoint p, mglPoint q, double r, double c, double sh, do
delete []nn; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_drop(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl, double sh, double a)
+void MGL_EXPORT mgl_drop(HMGL gr, double x1, double y1, double z1, double x2, double y2, double z2, double r, const char *stl, double sh, double a)
{
mreal c=gr->AddTexture((stl && stl[0]) ? stl[0]:'r');
mgl_drop(gr,mglPoint(x1,y1,z1), mglPoint(x2,y2,z2), r, c, sh, a);
}
//-----------------------------------------------------------------------------
-void mgl_drop_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, mreal *shift, mreal *ap, int l)
+void MGL_EXPORT mgl_drop_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal *y2, mreal *z2, mreal *r, const char *stl, mreal *shift, mreal *ap, int l)
{ char *s=new char[l+1]; memcpy(s,stl,l); s[l]=0;
mgl_drop(_GR_, *x1,*y1,*z1, *x2,*y2,*z2, *r,s,*shift,*ap); delete []s; }
//-----------------------------------------------------------------------------
@@ -491,7 +491,7 @@ void mgl_drop_(uintptr_t* gr, mreal *x1, mreal *y1, mreal *z1, mreal *x2, mreal
// Dew series
//
//-----------------------------------------------------------------------------
-void mgl_dew_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dew_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
long i,j,n=ax->GetNx(),m=ax->GetNy(),k;
if(mgl_check_dim2(gr,x,y,ax,ay,"Dew")) return;
@@ -535,7 +535,7 @@ void mgl_dew_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, cons
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_dew_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dew_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -545,12 +545,12 @@ void mgl_dew_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_dew_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dew_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dew_xy(_GR_, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dew_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dew_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dew_2d(_GR_, _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
@@ -559,12 +559,12 @@ void mgl_dew_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, c
// Puts series
//
//-----------------------------------------------------------------------------
-void mgl_puts(HMGL gr, double x, double y, double z,const char *text, const char *font, double size)
+void MGL_EXPORT mgl_puts(HMGL gr, double x, double y, double z,const char *text, const char *font, double size)
{ mgl_puts_dir(gr, x, y, z, NAN, NAN, 0, text, font, size); }
-void mgl_putsw(HMGL gr, double x, double y, double z,const wchar_t *text, const char *font, double size)
+void MGL_EXPORT mgl_putsw(HMGL gr, double x, double y, double z,const wchar_t *text, const char *font, double size)
{ mgl_putsw_dir(gr, x, y, z, NAN, NAN, 0, text, font, size); }
//-----------------------------------------------------------------------------
-void mgl_puts_dir(HMGL gr, double x, double y, double z, double dx, double dy, double dz, const char *text, const char *font, double size)
+void MGL_EXPORT mgl_puts_dir(HMGL gr, double x, double y, double z, double dx, double dy, double dz, const char *text, const char *font, double size)
{
long len = mbstowcs(0,text,0)+1;
wchar_t *buf = new wchar_t[len+1];
@@ -573,7 +573,7 @@ void mgl_puts_dir(HMGL gr, double x, double y, double z, double dx, double dy, d
delete []buf;
}
//-----------------------------------------------------------------------------
-void mgl_putsw_dir(HMGL gr, double x, double y, double z, double dx, double dy, double dz, const wchar_t *text, const char *font, double size)
+void MGL_EXPORT mgl_putsw_dir(HMGL gr, double x, double y, double z, double dx, double dy, double dz, const wchar_t *text, const char *font, double size)
{
bool a=mglchr(font,'a'), A=mglchr(font,'A');
static int cgid=1; gr->StartGroup("Puts",cgid++);
@@ -596,13 +596,13 @@ void mgl_putsw_dir(HMGL gr, double x, double y, double z, double dx, double dy,
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_puts_(uintptr_t *gr, mreal *x, mreal *y, mreal *z,const char *text, const char *font, mreal *size, int l, int n)
+void MGL_EXPORT mgl_puts_(uintptr_t *gr, mreal *x, mreal *y, mreal *z,const char *text, const char *font, mreal *size, int l, int n)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,font,n); f[n]=0;
mgl_putsw_dir(_GR_, *x, *y, *z, NAN, NAN, 0, s, f, *size);
delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_puts_dir_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, const char *text, const char *font, mreal *size, int l, int n)
+void MGL_EXPORT mgl_puts_dir_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, mreal *dx, mreal *dy, mreal *dz, const char *text, const char *font, mreal *size, int l, int n)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,font,n); f[n]=0;
mgl_putsw_dir(_GR_, *x, *y, *z, *dx, *dy, *dz, s, f, *size);
@@ -612,7 +612,7 @@ void mgl_puts_dir_(uintptr_t *gr, mreal *x, mreal *y, mreal *z, mreal *dx, mreal
// TextMark series
//
//-----------------------------------------------------------------------------
-void mgl_textmarkw_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmarkw_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
{
long j,m,mx,my,mz,mr,n=y->GetNx();
if(mgl_check_dim0(gr,x,y,z,r,"TextMark")) return;
@@ -641,7 +641,7 @@ void mgl_textmarkw_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const wchar_t *
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_textmarkw_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmarkw_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx()); z.Fill(gr->Min.z,gr->Min.z);
@@ -649,7 +649,7 @@ void mgl_textmarkw_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const wchar_t *text, con
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_textmarkw_yr(HMGL gr, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmarkw_yr(HMGL gr, HCDT y, HCDT r, const wchar_t *text, const char *fnt, const char *opt)
{
register long n=y->GetNx();
gr->SaveState(opt);
@@ -659,7 +659,7 @@ void mgl_textmarkw_yr(HMGL gr, HCDT y, HCDT r, const wchar_t *text, const char *
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_textmarkw(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmarkw(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
{
register long n=y->GetNx();
gr->SaveState(opt);
@@ -670,43 +670,43 @@ void mgl_textmarkw(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_textmark_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmark_xyzr(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT r, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_textmarkw_xyzr(gr, x, y, z, r, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_textmark_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmark_xyr(HMGL gr, HCDT x, HCDT y, HCDT r, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_textmarkw_xyr(gr, x, y, r, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_textmark_yr(HMGL gr, HCDT y, HCDT r, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmark_yr(HMGL gr, HCDT y, HCDT r, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_textmarkw_yr(gr, y, r, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_textmark(HMGL gr, HCDT y, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_textmark(HMGL gr, HCDT y, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_textmarkw(gr, y, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_textmark_xyzr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_textmark_xyzr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; memcpy(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_textmarkw_xyzr(_GR_, _DA_(x),_DA_(y),_DA_(z),_DA_(r),s,f, o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_textmark_xyr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_textmark_xyr_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_textmarkw_xyr(_GR_, _DA_(x),_DA_(y),_DA_(r),s,f, o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_textmark_yr_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_textmark_yr_(uintptr_t *gr, uintptr_t *y, uintptr_t *r, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_textmarkw_yr(_GR_, _DA_(y),_DA_(r),s,f, o); delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_textmark_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_textmark_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
@@ -716,7 +716,7 @@ void mgl_textmark_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fn
// Label series
//
//-----------------------------------------------------------------------------
-void mgl_labelw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_labelw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const wchar_t *text, const char *fnt, const char *opt)
{
long j,m,mx,my,mz,n=y->GetNx();
if(mgl_check_dim1(gr,x,y,z,0,"Label")) return;
@@ -726,38 +726,37 @@ void mgl_labelw_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const wchar_t *text, const
m = x->GetNy() > y->GetNy() ? x->GetNy() : y->GetNy(); m = z->GetNy() > m ? z->GetNy() : m;
register long i,k,kk,l,nn;
- for(i=k=0;text[i];i++) if(text[i]=='%')
- {if(text[i+1]=='%') k--; else k++; }
- nn = wcslen(text)+10*k+1;
- wchar_t *buf = new wchar_t[nn];
mglPoint p,q(NAN);
+ wchar_t tmp[32];
for(j=0;j<m;j++)
{
mx = j<x->GetNy() ? j:0; my = j<y->GetNy() ? j:0; mz = j<z->GetNy() ? j:0;
for(i=0;i<n;i++)
{
- if(gr->Stop) { delete []buf; return; }
+ if(gr->Stop) return;
mreal xx=x->v(i,mx), yy=y->v(i,my), zz=z->v(i,mz);
p = mglPoint(xx,yy,zz);
kk = gr->AddPnt(p,-1,q);
- memset(buf,0,nn*sizeof(wchar_t));
+ std::wstring buf;
for(k=l=0;text[k];k++)
{
- if(text[k]!='%') { buf[l]=text[k]; l++; continue; }
- else if(text[k+1]=='%') { buf[l]='%'; l++; continue; }
- else if(text[k+1]=='n') mglprintf(buf+l,nn-l,L"%ld",i);
- else if(text[k+1]=='x') mglprintf(buf+l,nn-l,L"%.2g",xx);
- else if(text[k+1]=='y') mglprintf(buf+l,nn-l,L"%.2g",yy);
- else if(text[k+1]=='z') mglprintf(buf+l,nn-l,L"%.2g",zz);
- l=wcslen(buf); k++;
+ if(text[k]!='%' || (k>0 && text[k-1]=='\\'))
+ { buf += text[k]; continue; }
+ else if(text[k+1]=='%') { buf+='%'; k++; continue; }
+ else if(text[k+1]=='n') mglprintf(tmp,32,L"%ld",i);
+ else if(text[k+1]=='x') mglprintf(tmp,32,L"%.2g",xx);
+ else if(text[k+1]=='y') mglprintf(tmp,32,L"%.2g",yy);
+ else if(text[k+1]=='z') mglprintf(tmp,32,L"%.2g",zz);
+ else { buf+='%'; continue; }
+ buf += tmp; k++;
}
- gr->text_plot(kk, buf, fnt, -0.7, 0.05);
+ gr->text_plot(kk, buf.c_str(), fnt, -0.7, 0.05);
}
}
- delete []buf; gr->EndGroup();
+ gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_labelw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_labelw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
{
gr->SaveState(opt);
mglData z(y->GetNx()); z.Fill(gr->Min.z,gr->Min.z);
@@ -765,7 +764,7 @@ void mgl_labelw_xy(HMGL gr, HCDT x, HCDT y, const wchar_t *text, const char *fnt
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_labelw_y(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_labelw_y(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const char *opt)
{
register long n=y->GetNx();
if(n<2) { gr->SetWarn(mglWarnLow,"TextMark"); return; }
@@ -776,33 +775,33 @@ void mgl_labelw_y(HMGL gr, HCDT y, const wchar_t *text, const char *fnt, const c
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_label_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_label_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_labelw_xyz(gr, x, y, z, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_label_xy(HMGL gr, HCDT x, HCDT y, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_label_xy(HMGL gr, HCDT x, HCDT y, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_labelw_xy(gr, x, y, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_label_y(HMGL gr, HCDT y, const char *str, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_label_y(HMGL gr, HCDT y, const char *str, const char *fnt, const char *opt)
{ long s = mbstowcs(0,str,0)+1; wchar_t *wcs = new wchar_t[s]; mbstowcs(wcs,str,s);
mgl_labelw_y(gr, y, wcs, fnt, opt); delete []wcs; }
//-----------------------------------------------------------------------------
-void mgl_label_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_label_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_labelw_xyz(_GR_, _DA_(x),_DA_(y),_DA_(z),s,f, o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_label_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_label_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_labelw_xy(_GR_, _DA_(x),_DA_(y),s,f, o);
delete []o; delete []s; delete []f; }
//-----------------------------------------------------------------------------
-void mgl_label_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
+void MGL_EXPORT mgl_label_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fnt, const char *opt, int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
@@ -812,12 +811,12 @@ void mgl_label_y_(uintptr_t *gr, uintptr_t *y, const char *text, const char *fnt
// Table series
//
//-----------------------------------------------------------------------------
-void mgl_tablew(HMGL gr, double x, double y, HCDT val, const wchar_t *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_tablew(HMGL gr, double x, double y, HCDT val, const wchar_t *text, const char *fnt, const char *opt)
{
mglCanvas *g = dynamic_cast<mglCanvas *>(gr);
if(g) g->Table(x,y,val,text,fnt,opt);
}
-void mgl_table(HMGL gr, double x, double y, HCDT val, const char *text, const char *fnt, const char *opt)
+void MGL_EXPORT mgl_table(HMGL gr, double x, double y, HCDT val, const char *text, const char *fnt, const char *opt)
{
if(!text) mgl_tablew(gr,x,y,val,L"",fnt,opt);
else
@@ -825,7 +824,7 @@ void mgl_table(HMGL gr, double x, double y, HCDT val, const char *text, const ch
mgl_tablew(gr, x, y, val, wcs, fnt, opt); delete []wcs; }
}
//-----------------------------------------------------------------------------
-void mgl_table_(uintptr_t *gr, mreal *x, mreal *y, uintptr_t *val, const char *text, const char *fnt, const char *opt,int l,int n,int lo)
+void MGL_EXPORT mgl_table_(uintptr_t *gr, mreal *x, mreal *y, uintptr_t *val, const char *text, const char *fnt, const char *opt,int l,int n,int lo)
{ wchar_t *s=new wchar_t[l+1]; mbstowcs(s,text,l); s[l]=0;
char *f=new char[n+1]; memcpy(f,fnt,n); f[n]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
diff --git a/src/surf.cpp b/src/surf.cpp
index 2311ae4..6e2b5b1 100644
--- a/src/surf.cpp
+++ b/src/surf.cpp
@@ -22,7 +22,7 @@
#include "mgl2/data.h"
#include "mgl2/eval.h"
//-----------------------------------------------------------------------------
-void mgl_mesh_plot(mglBase *gr, long *pos, long n, long m, int how)
+void MGL_NO_EXPORT mgl_mesh_plot(mglBase *gr, long *pos, long n, long m, int how)
{
int d = gr->MeshNum>0 ? gr->MeshNum+1 : n*m, dx = n>d?n/d:1, dy = m>d?m/d:1;
register long i,j,s;
@@ -44,7 +44,7 @@ void mgl_mesh_plot(mglBase *gr, long *pos, long n, long m, int how)
}
}
//-----------------------------------------------------------------------------
-void mgl_surf_plot(mglBase *gr, long *pos, long n, long m)
+void MGL_NO_EXPORT mgl_surf_plot(mglBase *gr, long *pos, long n, long m)
{
register long i,j,s=0;
for(j=0;j<m-1;j++) for(i=0;i<n-1;i++)
@@ -64,7 +64,7 @@ void mgl_surf_plot(mglBase *gr, long *pos, long n, long m)
// Plot by formulas series
//
//-----------------------------------------------------------------------------
-void mgl_fsurf(HMGL gr, const char *eqZ, const char *sch, const char *opt)
+void MGL_EXPORT mgl_fsurf(HMGL gr, const char *eqZ, const char *sch, const char *opt)
{ // TODO: Add strong function variation analysis ???
if(eqZ==0 || eqZ[0]==0) return; // nothing to plot
mreal r = gr->SaveState(opt);
@@ -82,7 +82,7 @@ void mgl_fsurf(HMGL gr, const char *eqZ, const char *sch, const char *opt)
delete eq;
}
//-----------------------------------------------------------------------------
-void mgl_fsurf_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *sch, const char *opt)
+void MGL_EXPORT mgl_fsurf_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, const char *sch, const char *opt)
{ // TODO: Add strong function variation analisys ???
if(eqZ==0 || eqZ[0]==0) return; // nothing to plot
mreal r = gr->SaveState(opt);
@@ -107,13 +107,13 @@ void mgl_fsurf_xyz(HMGL gr, const char *eqX, const char *eqY, const char *eqZ, c
delete ex; delete ey; delete ez;
}
//-----------------------------------------------------------------------------
-void mgl_fsurf_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo)
+void MGL_EXPORT mgl_fsurf_(uintptr_t *gr, const char *fy, const char *stl, const char *opt, int ly, int ls, int lo)
{ char *s=new char[ly+1]; memcpy(s,fy,ly); s[ly]=0;
char *p=new char[ls+1]; memcpy(p,stl,ls); p[ls]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_fsurf(_GR_, s, p, o); delete []o; delete []s; delete []p; }
//-----------------------------------------------------------------------------
-void mgl_fsurf_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo)
+void MGL_EXPORT mgl_fsurf_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *fz, const char *stl, const char *opt, int lx, int ly, int lz, int ls, int lo)
{
char *sx=new char[lx+1]; memcpy(sx,fx,lx); sx[lx]=0;
char *sy=new char[ly+1]; memcpy(sy,fy,ly); sy[ly]=0;
@@ -128,7 +128,7 @@ void mgl_fsurf_xyz_(uintptr_t *gr, const char *fx, const char *fy, const char *f
// Mesh series
//
//-----------------------------------------------------------------------------
-void mgl_mesh_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_mesh_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Mesh")) return;
@@ -155,7 +155,7 @@ void mgl_mesh_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_mesh(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_mesh(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -165,12 +165,12 @@ void mgl_mesh(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_mesh_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_mesh_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_mesh_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_mesh_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_mesh_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_mesh(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -179,7 +179,7 @@ void mgl_mesh_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// Fall series
//
//-----------------------------------------------------------------------------
-void mgl_fall_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_fall_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Fall")) return;
@@ -206,7 +206,7 @@ void mgl_fall_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_fall(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_fall(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -216,12 +216,12 @@ void mgl_fall(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_fall_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_fall_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_fall_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_fall_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_fall_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_fall(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -230,7 +230,7 @@ void mgl_fall_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// Grid series
//
//-----------------------------------------------------------------------------
-void mgl_grid_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_grid_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Grid")) return;
@@ -257,7 +257,7 @@ void mgl_grid_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_grid(HMGL gr, HCDT z,const char *sch, const char *opt)
+void MGL_EXPORT mgl_grid(HMGL gr, HCDT z,const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -267,12 +267,12 @@ void mgl_grid(HMGL gr, HCDT z,const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_grid_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_grid_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grid_xy(_GR_,_DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_grid_(uintptr_t *gr, uintptr_t *a,const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_grid_(uintptr_t *gr, uintptr_t *a,const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grid(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -281,7 +281,7 @@ void mgl_grid_(uintptr_t *gr, uintptr_t *a,const char *sch, const char *opt,int
// Surf series
//
//-----------------------------------------------------------------------------
-void mgl_surf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Surf")) return;
@@ -319,7 +319,7 @@ void mgl_surf_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_surf(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -329,12 +329,12 @@ void mgl_surf(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -343,13 +343,14 @@ void mgl_surf_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// Belt series
//
//-----------------------------------------------------------------------------
-void mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Belt")) return;
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("Belt",cgid++);
+ int d = gr->MeshNum>0 ? gr->MeshNum+1 : n*m, dx = n>d?n/d:1, dy = m>d?m/d:1;
long ss = gr->AddTexture(sch);
long *pos = new long[2*(n>m?n:m)];
gr->Reserve(2*n*m*z->GetNz());
@@ -359,7 +360,7 @@ void mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
mreal c;
for(k=0;k<z->GetNz();k++)
{
- if(how) for(i=0;i<n-1;i++)
+ if(how) for(i=0;i<n-dx;i+=dx)
{
for(j=0;j<m;j++)
{
@@ -369,13 +370,13 @@ void mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
s = mglPoint(xx.z, yy.z, z->dvy(i,j,k));
q = mglPoint(xx.y, yy.y, 0); s = q^s;
c = gr->GetC(ss,p1.z);
- p2 = mglPoint(GetX(x,i+1,j,k).x,GetY(y,i+1,j,k).x,p1.z);
+ p2 = mglPoint(GetX(x,i+dx,j,k).x,GetY(y,i+dx,j,k).x,p1.z);
pos[2*j] = gr->AddPnt(p1,c,s);
pos[2*j+1]=gr->AddPnt(p2,c,s);
}
mgl_surf_plot(gr,pos,2,m);
}
- else for(j=0;j<m-1;j++)
+ else for(j=0;j<m-dy;j+=dy)
{
for(i=0;i<n;i++) // ñîçäàåì ìàññèâ òî÷åê
{
@@ -385,7 +386,7 @@ void mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
q = mglPoint(xx.y, yy.y, z->dvx(i,j,k));
s = mglPoint(xx.z, yy.z, 0); s = q^s;
c = gr->GetC(ss,p1.z);
- p2 = mglPoint(GetX(x,i,j+1,k).x,GetY(y,i,j+1,k).x,p1.z);
+ p2 = mglPoint(GetX(x,i,j+dy,k).x,GetY(y,i,j+dy,k).x,p1.z);
pos[2*i] = gr->AddPnt(p1,c,s);
pos[2*i+1]=gr->AddPnt(p2,c,s);
}
@@ -395,7 +396,7 @@ void mgl_belt_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_belt(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_belt(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -405,12 +406,12 @@ void mgl_belt(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_belt_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_belt_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_belt_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_belt_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_belt_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_belt(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -419,7 +420,7 @@ void mgl_belt_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// Dens series
//
//-----------------------------------------------------------------------------
-void mgl_dens_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dens_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Dens")) return;
@@ -459,7 +460,7 @@ void mgl_dens_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_dens(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_dens(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -469,12 +470,12 @@ void mgl_dens(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_dens_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens_xy(_GR_,_DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_dens_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_dens_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_dens(_GR_,_DA_(a), s, o); delete []o; delete []s; }
@@ -483,18 +484,18 @@ void mgl_dens_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// STFA series
//
//-----------------------------------------------------------------------------
-void mgl_stfa_xy(HMGL gr, HCDT x, HCDT y, HCDT re, HCDT im, int dn, const char *sch, const char *opt)
+void MGL_EXPORT mgl_stfa_xy(HMGL gr, HCDT x, HCDT y, HCDT re, HCDT im, int dn, const char *sch, const char *opt)
{ mglData tmp(mglSTFA(*re,*im,dn,'x')); mgl_dens_xy(gr,x,y,&tmp,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_stfa(HMGL gr, HCDT re, HCDT im, int dn, const char *sch, const char *opt)
+void MGL_EXPORT mgl_stfa(HMGL gr, HCDT re, HCDT im, int dn, const char *sch, const char *opt)
{ mglData tmp(mglSTFA(*re,*im,dn,'x')); mgl_dens(gr,&tmp,sch,opt); }
//-----------------------------------------------------------------------------
-void mgl_stfa_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_stfa_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_stfa_xy(_GR_,_DA_(x), _DA_(y), _DA_(re), _DA_(im), *dn, s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_stfa_(uintptr_t *gr, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_stfa_(uintptr_t *gr, uintptr_t *re, uintptr_t *im, int *dn, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_stfa(_GR_,_DA_(re), _DA_(im), *dn, s, o); delete []o; delete []s; }
@@ -503,7 +504,7 @@ void mgl_stfa_(uintptr_t *gr, uintptr_t *re, uintptr_t *im, int *dn, const char
// SurfC series
//
//-----------------------------------------------------------------------------
-void mgl_surfc_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surfc_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,c,"SurfC")) return;
@@ -540,7 +541,7 @@ void mgl_surfc_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, cons
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_surfc(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surfc(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -550,12 +551,12 @@ void mgl_surfc(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surfc_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surfc_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surfc_xy(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surfc_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surfc_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surfc(_GR_, _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
@@ -564,7 +565,7 @@ void mgl_surfc_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, cons
// SurfA series
//
//-----------------------------------------------------------------------------
-void mgl_surfa_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surfa_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, const char *opt)
{
register long i,j;
long k,n=z->GetNx(),m=z->GetNy();
@@ -600,7 +601,7 @@ void mgl_surfa_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT c, const char *sch, cons
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_surfa(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surfa(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()), y(z->GetNy());
@@ -610,12 +611,12 @@ void mgl_surfa(HMGL gr, HCDT z, HCDT c, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surfa_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surfa_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surfa_xy(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surfa_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surfa_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surfa(_GR_, _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
@@ -624,14 +625,15 @@ void mgl_surfa_(uintptr_t *gr, uintptr_t *z, uintptr_t *a, const char *sch, cons
// Boxs series
//
//-----------------------------------------------------------------------------
-void mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Boxs",true)) return;
- long ly = x->GetNy()>=m ? y->GetNy() : y->GetNx(), lx = x->GetNx();
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("Boxs",cgid++);
+ long ly = y->GetNy()>=m ? y->GetNy() : y->GetNx(), lx = x->GetNx();
+ int d = gr->MeshNum>0 ? gr->MeshNum+1 : n*m, dx = n>d?n/d:1, dy = m>d?m/d:1;
long ss = gr->AddTexture(sch);
bool wire = mglchr(sch,'#');
@@ -639,25 +641,29 @@ void mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
gr->Reserve(8*n*m*z->GetNz());
mglPoint p1,p2,p3,p4,q,s,t(wire||full?NAN:0,0,1),xx,yy;
- mreal zz,z1,z2,x1,y1,c,z0=gr->GetOrgZ('x');
+ mreal zz,z1,z2,x1,y1,x2,y2,x3,y3,c,z0=gr->GetOrgZ('x');
long k1,k2,k3,k4,k5,k6,k7,k8;
for(k=0;k<z->GetNz();k++)
{
- for(i=0;i<n;i++) for(j=0;j<m;j++)
+ for(i=0;i<n;i+=dx) for(j=0;j<m;j+=dy)
{
if(gr->Stop) return;
zz = z->v(i,j,k); c = gr->GetC(ss,zz);
xx = GetX(x,i,j,k); yy = GetY(y,i,j,k);
- x1 = i<lx-1 ? GetX(x,i+1,j,k).x:NAN;
- y1 = j<ly-1 ? GetY(y,i,j+1,k).x:NAN;
- z1 = i<n-1?z->v(i+1,j,k):NAN;
- z2 = j<m-1?z->v(i,j+1,k):NAN;
+ x1 = i<lx-dx ? GetX(x,i+dx,j,k).x:NAN;
+ y1 = i<lx-dx ? GetY(y,i+dx,j,k).x:NAN;
+ x2 = j<ly-dy ? GetX(x,i,j+dy,k).x:NAN;
+ y2 = j<ly-dy ? GetY(y,i,j+dy,k).x:NAN;
+ x3 = i<lx-dx && j<ly-dy ? GetX(x,i+dx,j+dy,k).x:NAN;
+ y3 = i<lx-dx && j<ly-dy ? GetY(y,i+dx,j+dy,k).x:NAN;
+ z1 = i<n-dx?z->v(i+dx,j,k):NAN;
+ z2 = j<m-dy?z->v(i,j+dy,k):NAN;
q = mglPoint(xx.y,yy.y,0);
s = mglPoint(xx.z,yy.z,0);
p1 = mglPoint(xx.x,yy.x,zz); k1 = gr->AddPnt(p1,c,t);
- p2 = mglPoint(x1,yy.x,zz); k2 = gr->AddPnt(p2,c,t);
- p3 = mglPoint(xx.x,y1,zz); k3 = gr->AddPnt(p3,c,t);
- p4 = mglPoint(x1,y1,zz); k4 = gr->AddPnt(p4,c,t);
+ p2 = mglPoint(x1,y1,zz); k2 = gr->AddPnt(p2,c,t);
+ p3 = mglPoint(x2,y2,zz); k3 = gr->AddPnt(p3,c,t);
+ p4 = mglPoint(x3,y3,zz); k4 = gr->AddPnt(p4,c,t);
if(wire)
{
gr->line_plot(k1,k2); gr->line_plot(k1,k3);
@@ -668,9 +674,9 @@ void mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
if(full)
{
p1 = mglPoint(xx.x,yy.x,z0); k5 = gr->AddPnt(p1,c,t);
- p2 = mglPoint(x1,yy.x,z0); k6 = gr->AddPnt(p2,c,t);
- p3 = mglPoint(xx.x,y1,z0); k7 = gr->AddPnt(p3,c,t);
- p4 = mglPoint(x1,y1,z0); k8 = gr->AddPnt(p4,c,t);
+ p2 = mglPoint(x1,y1,z0); k6 = gr->AddPnt(p2,c,t);
+ p3 = mglPoint(x2,y2,z0); k7 = gr->AddPnt(p3,c,t);
+ p4 = mglPoint(x3,y3,z0); k8 = gr->AddPnt(p4,c,t);
if(wire)
{
gr->line_plot(k5,k6); gr->line_plot(k5,k7);
@@ -687,13 +693,13 @@ void mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
}
else
{
- p3 = mglPoint(x1,yy.x,z1); k5 = gr->AddPnt(p3,c,wire?t:q);
- p4 = mglPoint(x1,y1,z1); k6 = gr->AddPnt(p4,c,wire?t:q);
+ p3 = mglPoint(x1,y1,z1); k5 = gr->AddPnt(p3,c,wire?t:q);
+ p4 = mglPoint(x3,y3,z1); k6 = gr->AddPnt(p4,c,wire?t:q);
if(wire)
{ gr->line_plot(k2,k5); gr->line_plot(k6,k5); gr->line_plot(k6,k4); }
else gr->quad_plot(k2,k4,k5,k6);
- p3 = mglPoint(xx.x,y1,z2); k7 = gr->AddPnt(p3,c,wire?t:s);
- p4 = mglPoint(x1,y1,z2); k8 = gr->AddPnt(p4,c,wire?t:s);
+ p3 = mglPoint(x2,y2,z2); k7 = gr->AddPnt(p3,c,wire?t:s);
+ p4 = mglPoint(x3,y3,z2); k8 = gr->AddPnt(p4,c,wire?t:s);
if(wire)
{ gr->line_plot(k3,k7); gr->line_plot(k4,k8); gr->line_plot(k7,k8); }
else gr->quad_plot(k3,k4,k7,k8);
@@ -703,7 +709,7 @@ void mgl_boxs_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *o
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_boxs(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_boxs(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()+1), y(z->GetNy()+1);
@@ -713,12 +719,12 @@ void mgl_boxs(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_boxs_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_boxs_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_boxs_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_boxs_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_boxs_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_boxs(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -727,42 +733,46 @@ void mgl_boxs_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// Tile series
//
//-----------------------------------------------------------------------------
-void mgl_tile_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tile_xy(HMGL gr, HCDT x, HCDT y, HCDT z, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,0,"Tile",true)) return;
- long ly = x->GetNy()>=z->GetNy() ? y->GetNy() : y->GetNx(), lx = x->GetNx();
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("Tile",cgid++);
+ long ly = x->GetNy()>=z->GetNy() ? y->GetNy() : y->GetNx(), lx = x->GetNx();
+ int d = gr->MeshNum>0 ? gr->MeshNum+1 : n*m, dx = n>d?n/d:1, dy = m>d?m/d:1;
long ss = gr->AddTexture(sch);
gr->Reserve(4*n*m*z->GetNz());
mglPoint p1,p2,p3,p4,s=mglPoint(0,0,1);
- mreal zz,x1,x2,y1,y2,c;
+ mreal zz,x0,y0,x1,y1,x2,y2,x3,y3,c;
long k1,k2,k3,k4;
for(k=0;k<z->GetNz();k++)
{
- for(j=0;j<m;j++) for(i=0;i<n;i++)
+ for(j=0;j<m;j+=dx) for(i=0;i<n;i+=dy)
{
if(gr->Stop) return;
zz = z->v(i,j,k); c = gr->GetC(ss,zz);
- x1 = GetX(x,i,j,k).x; y1 = GetY(y,i,j,k).x;
- x2 = i<lx-1 ? GetX(x,i+1,j,k).x:NAN;
- y2 = j<ly-1 ? GetY(y,i,j+1,k).x:NAN;
-// x2 = GetX(x,i+1,j,k).x; y2 = GetY(y,i,j+1,k).x;
- p1 = mglPoint(x1,y1,zz); k1 = gr->AddPnt(p1,c,s);
- p2 = mglPoint(x2,y1,zz); k2 = gr->AddPnt(p2,c,s);
- p3 = mglPoint(x1,y2,zz); k3 = gr->AddPnt(p3,c,s);
- p4 = mglPoint(x2,y2,zz); k4 = gr->AddPnt(p4,c,s);
+ x0 = GetX(x,i,j,k).x; y0 = GetY(y,i,j,k).x;
+ x1 = i<lx-dx ? GetX(x,i+dx,j,k).x:NAN;
+ y1 = i<lx-dx ? GetY(y,i+dx,j,k).x:NAN;
+ x2 = j<ly-dy ? GetX(x,i,j+dy,k).x:NAN;
+ y2 = j<ly-dy ? GetY(y,i,j+dy,k).x:NAN;
+ x3 = i<lx-dx && j<ly-dy ? GetX(x,i+dx,j+dy,k).x:NAN;
+ y3 = i<lx-dx && j<ly-dy ? GetY(y,i+dx,j+dy,k).x:NAN;
+ p1 = mglPoint(x0,y0,zz); k1 = gr->AddPnt(p1,c,s);
+ p2 = mglPoint(x1,y1,zz); k2 = gr->AddPnt(p2,c,s);
+ p3 = mglPoint(x2,y2,zz); k3 = gr->AddPnt(p3,c,s);
+ p4 = mglPoint(x3,y3,zz); k4 = gr->AddPnt(p4,c,s);
gr->quad_plot(k1,k2,k3,k4);
}
}
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_tile(HMGL gr, HCDT z, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tile(HMGL gr, HCDT z, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()+1), y(z->GetNy()+1);
@@ -772,12 +782,12 @@ void mgl_tile(HMGL gr, HCDT z, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tile_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tile_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tile_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tile_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tile_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tile(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -786,14 +796,15 @@ void mgl_tile_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int
// TileS series
//
//-----------------------------------------------------------------------------
-void mgl_tiles_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tiles_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *sch, const char *opt)
{
register long i,j,k,n=z->GetNx(),m=z->GetNy();
if(mgl_check_dim2(gr,x,y,z,s,"TileS",true)) return;
- long ly = x->GetNy()>=z->GetNy() ? y->GetNy() : y->GetNx(), lx = x->GetNx();
gr->SaveState(opt);
static int cgid=1; gr->StartGroup("TileS",cgid++);
+ long ly = x->GetNy()>=z->GetNy() ? y->GetNy() : y->GetNx(), lx = x->GetNx();
+ int d = gr->MeshNum>0 ? gr->MeshNum+1 : n*m, dx = n>d?n/d:1, dy = m>d?m/d:1;
long cc = gr->AddTexture(sch);
gr->Reserve(4*n*m*z->GetNz());
@@ -803,7 +814,7 @@ void mgl_tiles_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *sch, cons
long k1,k2,k3,k4;
for(k=0;k<z->GetNz();k++)
{
- for(j=0;j<m;j++) for(i=0;i<n;i++)
+ for(j=0;j<m;j+=dx) for(i=0;i<n;i+=dy)
{
if(gr->Stop) return;
zz = z->v(i,j,k); c = gr->GetC(cc,zz);
@@ -811,13 +822,13 @@ void mgl_tiles_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *sch, cons
x1 = GetX(x,i,j,k).x; y1 = GetY(y,i,j,k).x;
x2 = x3 = x4 = y2 = y3 = y4 = NAN;
- if(i<lx-1)
- { x2 = GetX(x,i+1,j,k).x-x1; y2 = GetY(y,i+1,j,k).x-y1; }
- if(j<ly-1)
- { x4 = GetX(x,i,j+1,k).x-x1; y4 = GetY(y,i,j+1,k).x-y1; }
- if(i<lx-1 && j<ly-1)
- { x3 = GetX(x,i+1,j+1,k).x-x2-x4-x1;
- y3 = GetY(y,i+1,j+1,k).x-y2-y4-y1; }
+ if(i<lx-dx)
+ { x2 = GetX(x,i+dx,j,k).x-x1; y2 = GetY(y,i+dx,j,k).x-y1; }
+ if(j<ly-dy)
+ { x4 = GetX(x,i,j+dy,k).x-x1; y4 = GetY(y,i,j+dy,k).x-y1; }
+ if(i<lx-dx && j<ly-dy)
+ { x3 = GetX(x,i+dx,j+dy,k).x-x2-x4-x1;
+ y3 = GetY(y,i+dx,j+dy,k).x-y2-y4-y1; }
p1 = mglPoint(x1+x2*ss+x4*ss+x3*ss*ss, y1+y2*ss+y4*ss+y3*ss*ss, zz);
k1 = gr->AddPnt(p1,c,t);
@@ -833,7 +844,7 @@ void mgl_tiles_xy(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT s, const char *sch, cons
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_tiles(HMGL gr, HCDT z, HCDT s, const char *sch, const char *opt)
+void MGL_EXPORT mgl_tiles(HMGL gr, HCDT z, HCDT s, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(z->GetNx()+1), y(z->GetNy()+1);
@@ -843,12 +854,12 @@ void mgl_tiles(HMGL gr, HCDT z, HCDT s, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_tiles_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *r, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tiles_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *r, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tiles_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), _DA_(r), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_tiles_(uintptr_t *gr, uintptr_t *a, uintptr_t *r, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_tiles_(uintptr_t *gr, uintptr_t *a, uintptr_t *r, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_tiles(_GR_, _DA_(a), _DA_(r), s, o); delete []o; delete []s; }
@@ -857,7 +868,7 @@ void mgl_tiles_(uintptr_t *gr, uintptr_t *a, uintptr_t *r, const char *sch, cons
// Map series
//
//-----------------------------------------------------------------------------
-void mgl_map_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_map_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
register long i,j,n=ax->GetNx(),m=ax->GetNy();
if(mgl_check_dim2(gr,x,y,ax,ay,"Map")) return;
@@ -905,7 +916,7 @@ void mgl_map_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, cons
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_map(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_map(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -915,12 +926,12 @@ void mgl_map(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_map_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_map_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_map_xy(_GR_, _DA_(x), _DA_(y), _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_map_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_map_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_map(_GR_, _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
diff --git a/src/tex_table.cpp b/src/tex_table.cpp
index 9a1953c..7275b31 100644
--- a/src/tex_table.cpp
+++ b/src/tex_table.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_tex_table.cpp is part of Math Graphic Library
+ * tex_table.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -20,7 +20,7 @@
#include "mgl2/font.h"
/// Table of LaTeX symbols and its UTF8 codes. This array MUST BE sorted!!!
-mglTeXsymb mgl_tex_symb[] = {
+MGL_EXPORT mglTeXsymb mgl_tex_symb[] = {
{0x23, L"#"},
{0x25, L"%"},
{0x26, L"&"},
diff --git a/src/vect.cpp b/src/vect.cpp
index b7d375b..3dae76d 100644
--- a/src/vect.cpp
+++ b/src/vect.cpp
@@ -25,7 +25,7 @@
// Traj series
//
//-----------------------------------------------------------------------------
-void mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
long m,mx,my,mz,nx,ny,nz,n=ax->GetNx(),pal;
if(mgl_check_dim1(gr,x,z,y,ax,"Traj")) return;
@@ -40,15 +40,15 @@ void mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
m = x->GetNy()>y->GetNy() ? x->GetNy():y->GetNy(); if(i>m) m=i; if(j>m) m=j;
gr->SetPenPal(sch,&pal); gr->Reserve(4*n*m);
- mreal dx,dy,dz,dd,da,xm=0;
+ mreal dx,dy,dz,dd,da;
mglPoint p1,p2;
- for(j=0;j<m;j++) for(i=0;i<n;i++) // find maximal amplitude of vector field
+/* for(j=0;j<m;j++) for(i=0;i<n;i++) // find maximal amplitude of vector field
{
mx = j<ax->GetNy() ? j:0; my = j<ay->GetNy() ? j:0; mz = j<az->GetNy() ? j:0;
da = sqrt(ax->v(i,mx)*ax->v(i,mx)+ay->v(i,my)*ay->v(i,my)+az->v(i,mz)*az->v(i,mz));
xm = xm>da ? xm : da;
}
- xm = 1./(xm ? sqrt(xm):1);
+ xm = 1./(xm ? sqrt(xm):1);*/
for(j=0;j<m;j++) // start prepare arrows
{
gr->NextColor(pal);
@@ -77,7 +77,7 @@ void mgl_traj_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_traj_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_traj_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData z(x->GetNx()), az(x->GetNx()); z.Fill(gr->Min.z,gr->Min.z);
@@ -85,12 +85,12 @@ void mgl_traj_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, con
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_traj_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_traj_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_traj_xy(_GR_, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_traj_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_traj_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_traj_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, o);
@@ -100,7 +100,7 @@ void mgl_traj_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uint
// Vect series
//
//-----------------------------------------------------------------------------
-void mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
long i,j,n=ax->GetNx(),m=ax->GetNy(),l=ax->GetNz(),k;
if(mgl_check_dim2(gr,x,y,ax,ay,"Vect")) return;
@@ -139,7 +139,7 @@ void mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, con
c1 = c1<c2 ? c2:c1; ca+=c1; cm = cm<c1 ? c1:cm;
}
ca /= (n*m*l)/(tx*ty);
- // if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps
+// if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps TODO: decide later
xm = xm?1./xm:0; cm = cm?1./cm:0;
@@ -170,7 +170,7 @@ void mgl_vect_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, con
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_vect_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_vect_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -180,13 +180,13 @@ void mgl_vect_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_vect_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_vect_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect_xy(_GR_, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_vect_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_vect_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect_2d(_GR_, _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
@@ -195,7 +195,7 @@ void mgl_vect_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch,
// Vect3 series
//
//-----------------------------------------------------------------------------
-void mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
register long i,j,n=ax->GetNx(),m=ax->GetNy(),l=ax->GetNz(),k;
if(mgl_check_vec3(gr,x,y,z,ax,ay,az,"Vect_3d")) return;
@@ -236,7 +236,7 @@ void mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
ca+=c1; cm = cm<c1 ? c1:cm;
}
ca /= (n*m*l)/(tx*ty*tz);
- // if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps
+// if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps. TODO: decide later
xm = xm?1./xm:0; cm = cm?1./cm:0;
long n1,n2;
@@ -262,7 +262,7 @@ void mgl_vect_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_vect_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_vect_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy()), z(ax->GetNz());
@@ -273,13 +273,13 @@ void mgl_vect_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_vect_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_vect_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_vect_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_vect_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect_3d(_GR_, _DA_(ax), _DA_(ay), _DA_(az), s, o); delete []o; delete []s; }
@@ -290,7 +290,7 @@ void mgl_vect_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, co
//-----------------------------------------------------------------------------
struct _mgl_vec_slice { mglData x,y,z,ax,ay,az; };
//-----------------------------------------------------------------------------
-void mgl_get_slice(_mgl_vec_slice &s, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, char dir, mreal d, bool both)
+void MGL_NO_EXPORT mgl_get_slice(_mgl_vec_slice &s, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, char dir, mreal d, bool both)
{
register long i,j,i0,n=ax->GetNx(),m=ax->GetNy(),l=ax->GetNz(), nx=1,ny=1,p;
@@ -379,7 +379,7 @@ void mgl_get_slice(_mgl_vec_slice &s, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay,
}
}
//-----------------------------------------------------------------------------
-void mgl_get_slice_md(_mgl_vec_slice &s, const mglData *x, const mglData *y, const mglData *z, const mglData *ax, const mglData *ay, const mglData *az, char dir, mreal d, bool both)
+void MGL_NO_EXPORT mgl_get_slice_md(_mgl_vec_slice &s, const mglData *x, const mglData *y, const mglData *z, const mglData *ax, const mglData *ay, const mglData *az, char dir, mreal d, bool both)
{
register long i,j,i0,i1,n=ax->nx,m=ax->ny,l=ax->nz, nx=1,ny=1,p;
@@ -468,7 +468,7 @@ void mgl_get_slice_md(_mgl_vec_slice &s, const mglData *x, const mglData *y, con
}
}
//-----------------------------------------------------------------------------
-void mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt)
{
bool both = mgl_isboth(x,y,z,ax);
if(mgl_check_vec3(gr,x,y,z,ax,ay,az,"Vect3")) return;
@@ -523,7 +523,7 @@ void mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, c
ca+=c1; cm = cm<c1 ? c1:cm;
}
ca /= (n*m)/(tx*ty);
-// if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps
+// if(cm>2*ca) cm = 2*ca; // disable too narrow grid steps TODO: decide later
xm = xm?1./xm:0; cm = cm?1./cm:0;
long n1,n2;
@@ -550,7 +550,7 @@ void mgl_vect3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, c
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_vect3(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt)
+void MGL_EXPORT mgl_vect3(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy()),z(ax->GetNz());
@@ -561,13 +561,13 @@ void mgl_vect3(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double sVal,
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_vect3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_vect3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, *sVal, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *sVal, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_vect3(_GR_, _DA_(ax), _DA_(ay), _DA_(az), s, *sVal, o); delete []o; delete []s; }
@@ -576,7 +576,7 @@ void mgl_vect3_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, cons
// Flow 2d series
//
//-----------------------------------------------------------------------------
-void flow(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, long ss, bool vv)
+void MGL_NO_EXPORT flow(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, long ss, bool vv)
{
long n=10*(ax.nx+ax.ny);
bool both = x.nx==ax.nx && y.nx==ax.nx && x.ny==ax.ny && y.ny==ax.ny;
@@ -634,7 +634,7 @@ void flow(mglBase *gr, double zVal, double u, double v, const mglData &x, const
delete []pp; delete []cc;
}
//-----------------------------------------------------------------------------
-void mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
mreal u,v;
if(mgl_check_dim2(gr,x,y,ax,ay,"Flow")) return;
@@ -682,7 +682,7 @@ void mgl_flow_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, con
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_flow_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flow_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -692,16 +692,16 @@ void mgl_flow_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_flow_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_flow_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flow_xy(_GR_, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
-void mgl_flow_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_flow_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flow_2d(_GR_, _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_flowp_xy(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flowp_xy(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
mglPoint p(x0,y0,z0);
mreal u,v;
@@ -748,7 +748,7 @@ void mgl_flowp_xy(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_flowp_2d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flowp_2d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -758,12 +758,12 @@ void mgl_flowp_2d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, co
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_flowp_xy_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_flowp_xy_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flowp_xy(_GR_, *x0,*y0,*z0, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, o); delete []o; delete []s;
}
-void mgl_flowp_2d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_flowp_2d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flowp_2d(_GR_, *x0,*y0,*z0, _DA_(ax), _DA_(ay), s, o); delete []o; delete []s; }
@@ -854,7 +854,7 @@ void flow(mglBase *gr, double u, double v, double w, const mglData &x, const mgl
delete []pp; delete []cc;
}
//-----------------------------------------------------------------------------
-void mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
mreal u,v,w;
long i,j;
@@ -905,7 +905,7 @@ void mgl_flow_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_flow_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flow_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy()), z(ax->GetNz());
@@ -916,16 +916,16 @@ void mgl_flow_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_flow_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_flow_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flow_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, o); delete []o; delete []s; }
-void mgl_flow_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_flow_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flow_3d(_GR_, _DA_(ax), _DA_(ay), _DA_(az), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_flowp_xyz(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flowp_xyz(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
mglPoint p(x0,y0,z0);
mreal u,v,w;
@@ -980,7 +980,7 @@ void mgl_flowp_xyz(HMGL gr, double x0, double y0, double z0, HCDT x, HCDT y, HCD
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_flowp_3d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
+void MGL_EXPORT mgl_flowp_3d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, HCDT az, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy()), z(ax->GetNz());
@@ -991,12 +991,12 @@ void mgl_flowp_3d(HMGL gr, double x0, double y0, double z0, HCDT ax, HCDT ay, HC
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_flowp_xyz_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_flowp_xyz_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flowp_xyz(_GR_, *x0,*y0,*z0, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, o);
delete []o; delete []s; }
-void mgl_flowp_3d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_flowp_3d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_flowp_3d(_GR_, *x0,*y0,*z0, _DA_(ax), _DA_(ay), _DA_(az), s, o); delete []o; delete []s; }
@@ -1005,7 +1005,7 @@ void mgl_flowp_3d_(uintptr_t *gr, mreal *x0, mreal *y0, mreal *z0, uintptr_t *ax
// Grad series
//
//-----------------------------------------------------------------------------
-void mgl_grad_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT phi, const char *sch, const char *opt)
+void MGL_EXPORT mgl_grad_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT phi, const char *sch, const char *opt)
{
mglData ax(phi), ay,az,xx,yy,zz;
ay.Set(ax); az.Set(ax); xx.Set(ax); yy.Set(ax); zz.Set(ax);
@@ -1024,7 +1024,7 @@ void mgl_grad_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT phi, const char *sch, co
mgl_flow_xyz(gr,&xx,&yy,&zz,&ax,&ay,&az,sch,opt);
}
//-----------------------------------------------------------------------------
-void mgl_grad_xy(HMGL gr, HCDT x, HCDT y, HCDT phi, const char *sch, const char *opt)
+void MGL_EXPORT mgl_grad_xy(HMGL gr, HCDT x, HCDT y, HCDT phi, const char *sch, const char *opt)
{
mglData ax(phi), ay,xx,yy;
ay.Set(ax); xx.Set(ax); yy.Set(ax);
@@ -1041,7 +1041,7 @@ void mgl_grad_xy(HMGL gr, HCDT x, HCDT y, HCDT phi, const char *sch, const char
mgl_flow_xy(gr,&xx,&yy,&ax,&ay,sch,opt);
}
//-----------------------------------------------------------------------------
-void mgl_grad(HMGL gr, HCDT phi, const char *sch, const char *opt)
+void MGL_EXPORT mgl_grad(HMGL gr, HCDT phi, const char *sch, const char *opt)
{
mglData x(phi->GetNx()), y(phi->GetNy()), z(phi->GetNz());
gr->SaveState(opt);
@@ -1051,17 +1051,17 @@ void mgl_grad(HMGL gr, HCDT phi, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_grad_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_grad_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grad_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ph), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_grad_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_grad_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grad_xy(_GR_, _DA_(x), _DA_(y), _DA_(ph), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
+void MGL_EXPORT mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const char *opt, int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_grad(_GR_, _DA_(ph), s, o); delete []o; delete []s; }
@@ -1070,7 +1070,7 @@ void mgl_grad_(uintptr_t *gr, uintptr_t *ph, const char *sch, const char *opt, i
// Pipe 2d series
//
//-----------------------------------------------------------------------------
-void flowr(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, double r0,long sc)
+void MGL_NO_EXPORT flowr(mglBase *gr, double zVal, double u, double v, const mglData &x, const mglData &y, const mglData &ax, const mglData &ay, double r0,long sc)
{
long n=10*(ax.nx+ax.ny);
bool both = x.nx==ax.nx && y.nx==ax.nx && x.ny==ax.ny && y.ny==ax.ny;
@@ -1149,7 +1149,7 @@ void flowr(mglBase *gr, double zVal, double u, double v, const mglData &x, const
delete []pp; delete []cc;
}
//-----------------------------------------------------------------------------
-void mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt)
+void MGL_EXPORT mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt)
{
mreal u,v;
if(mgl_check_dim2(gr,x,y,ax,ay,"Pipe")) return;
@@ -1197,7 +1197,7 @@ void mgl_pipe_xy(HMGL gr, HCDT x, HCDT y, HCDT ax, HCDT ay, const char *sch, dou
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_pipe_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt)
+void MGL_EXPORT mgl_pipe_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, double r0, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy());
@@ -1207,11 +1207,11 @@ void mgl_pipe_2d(HMGL gr, HCDT ax, HCDT ay, const char *sch, double r0, const ch
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_pipe_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_pipe_xy_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_pipe_xy(_GR_, _DA_(x), _DA_(y), _DA_(ax), _DA_(ay), s, *r0, o); delete []o; delete []s; }
-void mgl_pipe_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_pipe_2d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, const char *sch, mreal *r0, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_pipe_2d(_GR_, _DA_(ax), _DA_(ay), s, *r0, o); delete []o; delete []s; }
@@ -1307,7 +1307,7 @@ void flowr(mglBase *gr, double u, double v, double w, const mglData &x, const mg
delete []pp; delete []cc;
}
//-----------------------------------------------------------------------------
-void mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt)
+void MGL_EXPORT mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt)
{
mreal u,v,w;
long i,j;
@@ -1359,7 +1359,7 @@ void mgl_pipe_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT ax, HCDT ay, HCDT az, co
gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_pipe_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt)
+void MGL_EXPORT mgl_pipe_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0, const char *opt)
{
gr->SaveState(opt);
mglData x(ax->GetNx()), y(ax->GetNy()), z(ax->GetNz());
@@ -1370,12 +1370,12 @@ void mgl_pipe_3d(HMGL gr, HCDT ax, HCDT ay, HCDT az, const char *sch, double r0,
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_pipe_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_pipe_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_pipe_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(ax), _DA_(ay), _DA_(az), s, *r0, o);
delete []o; delete []s; }
-void mgl_pipe_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_pipe_3d_(uintptr_t *gr, uintptr_t *ax, uintptr_t *ay, uintptr_t *az, const char *sch, mreal *r0, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_pipe_3d(_GR_, _DA_(ax), _DA_(ay), _DA_(az), s, *r0, o); delete []o; delete []s; }
diff --git a/src/volume.cpp b/src/volume.cpp
index 6f99e2c..e47316a 100644
--- a/src/volume.cpp
+++ b/src/volume.cpp
@@ -27,7 +27,7 @@
// CloudQ series
//
//-----------------------------------------------------------------------------
-void mgl_cloud_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cloud_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
if(!(gr->GetQuality()&3)) return; // do nothing in fast_draw
long i,j,k,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
@@ -40,8 +40,11 @@ void mgl_cloud_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, con
long tx=1,ty=1,tz=1;
if(gr->MeshNum>1)
- { tx=(n-1)/(gr->MeshNum-1); ty=(m-1)/(gr->MeshNum-1); tz=(l-1)/(gr->MeshNum-1);}
- if(tx<1) tx=1; if(ty<1) ty=1; if(tz<1) tz=1;
+ {
+ tx=(n-1)/(gr->MeshNum-1); if(tx<1) tx=1;
+ ty=(m-1)/(gr->MeshNum-1); if(ty<1) ty=1;
+ tz=(l-1)/(gr->MeshNum-1); if(tz<1) tz=1;
+ }
mreal alpha = gr->AlphaDef;
bool inv = mglchr(sch,'i');
@@ -76,7 +79,7 @@ void mgl_cloud_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, con
delete []pos; gr->EndGroup();
}
//-----------------------------------------------------------------------------
-void mgl_cloud(HMGL gr, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_cloud(HMGL gr, HCDT a, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -87,12 +90,12 @@ void mgl_cloud(HMGL gr, HCDT a, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_cloud_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cloud_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cloud_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_cloud_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_cloud_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_cloud(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -101,7 +104,7 @@ void mgl_cloud_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,in
// Surf3 series
//
//-----------------------------------------------------------------------------
-mglPoint mgl_normal_3d(HCDT a, mglPoint p, bool inv, long n,long m,long l)
+mglPoint MGL_NO_EXPORT mgl_normal_3d(HCDT a, mglPoint p, bool inv, long n,long m,long l)
{
register long i,j,k;
register mreal x=p.x, y=p.y, z=p.z;
@@ -110,16 +113,13 @@ mglPoint mgl_normal_3d(HCDT a, mglPoint p, bool inv, long n,long m,long l)
i = i<n-1 ? i:n-2; j = j<m-1 ? j:m-2; k = k<l-1 ? k:l-2;
x-=i; y-=j; z-=k;
- if(i<n-1) nx = a->dvx(i,j,k)*(1-x) + a->dvx(i+1,j,k)*x;
- else nx = a->dvx(i,j,k);
- if(j<m-1) ny = a->dvy(i,j,k)*(1-y) + a->dvy(i,j+1,k)*y;
- else ny = a->dvy(i,j,k);
- if(k<l-1) nz = a->dvz(i,j,k)*(1-z) + a->dvz(i,j,k+1)*z;
- else nz = a->dvz(i,j,k);
+ nx = a->dvx(i,j,k)*(1-x) + a->dvx(i+1,j,k)*x;
+ ny = a->dvy(i,j,k)*(1-y) + a->dvy(i,j+1,k)*y;
+ nz = a->dvz(i,j,k)*(1-z) + a->dvz(i,j,k+1)*z;
return inv ? mglPoint(nx,ny,nz) : mglPoint(-nx,-ny,-nz);
}
//-----------------------------------------------------------------------------
-mreal mgl_normal_1d(HCDT a, mreal x, bool inv, long n)
+mreal MGL_NO_EXPORT mgl_normal_1d(HCDT a, mreal x, bool inv, long n)
{
register long i=long(x); x-=i;
mreal nx = a->dvx(i);
@@ -127,7 +127,7 @@ mreal mgl_normal_1d(HCDT a, mreal x, bool inv, long n)
return inv ? nx : -nx;
}
//-----------------------------------------------------------------------------
-mglPoint mgl_find_norm(bool both, HCDT x, HCDT y, HCDT z, HCDT a, mglPoint u, bool inv, long n,long m,long l)
+mglPoint MGL_NO_EXPORT mgl_find_norm(bool both, HCDT x, HCDT y, HCDT z, HCDT a, mglPoint u, bool inv, long n,long m,long l)
{
mglPoint s = mgl_normal_3d(a,u,inv,n,m,l), t, q;
if(both)
@@ -145,14 +145,14 @@ mglPoint mgl_find_norm(bool both, HCDT x, HCDT y, HCDT z, HCDT a, mglPoint u, bo
return q;
}
//-----------------------------------------------------------------------------
-inline mreal mgl_cos_pp(const mglPoint *kk,long i0,long i1,long i2)
+inline mreal MGL_NO_EXPORT mgl_cos_pp(const mglPoint *kk,long i0,long i1,long i2)
{
mglPoint dp1 = kk[i1]-kk[i0], dp2 = kk[i2]-kk[i0];
mreal p1=dp1*dp1,p2=dp2*dp2,pc=dp1*dp2;
return p1*p2>1e-10 ? pc/sqrt(p1*p2) : NAN;
}
//-----------------------------------------------------------------------------
-void mgl_surf3_plot(HMGL gr, long n,long m,long *kx1,long *kx2,long *ky1,long *ky2, long *kz, std::vector<mglPoint> kk, int wire)
+void MGL_EXPORT mgl_surf3_plot(HMGL gr, long n,long m,long *kx1,long *kx2,long *ky1,long *ky2, long *kz, std::vector<mglPoint> kk, int wire)
{
register long i,j,k,i0,ii,jj;
long id[12],us[12],pd[12],ni;
@@ -232,7 +232,7 @@ void mgl_surf3_plot(HMGL gr, long n,long m,long *kx1,long *kx2,long *ky1,long *k
}
}
//-----------------------------------------------------------------------------
-void mgl_surf3_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
long i,j,k,i1,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
long *kx1,*kx2,*ky1,*ky2,*kz;
@@ -325,7 +325,7 @@ void mgl_surf3_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, cons
delete []ky2; delete []kz;
}
//-----------------------------------------------------------------------------
-void mgl_surf3_val(HMGL gr, double val, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3_val(HMGL gr, double val, HCDT a, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()), z(a->GetNz());
@@ -336,7 +336,7 @@ void mgl_surf3_val(HMGL gr, double val, HCDT a, const char *sch, const char *opt
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long num = mgl_isnan(r)?3:long(r+0.5);
@@ -348,7 +348,7 @@ void mgl_surf3_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, const char *sch, con
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3(HMGL gr, HCDT a, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3(HMGL gr, HCDT a, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()), z(a->GetNz());
@@ -359,22 +359,22 @@ void mgl_surf3(HMGL gr, HCDT a, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3_xyz_val(_GR_, *Val, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3_val(_GR_, *Val, _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3(_GR_, _DA_(a), s, o); delete []o; delete []s; }
@@ -383,7 +383,7 @@ void mgl_surf3_(uintptr_t *gr, uintptr_t *a, const char *sch, const char *opt,in
// Surf3A series
//
//-----------------------------------------------------------------------------
-void mgl_surf3a_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3a_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
{
long i,j,k,i1,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
long *kx1,*kx2,*ky1,*ky2,*kz;
@@ -480,7 +480,7 @@ void mgl_surf3a_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCD
delete []ky2; delete []kz;
}
//-----------------------------------------------------------------------------
-void mgl_surf3a_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3a_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -491,7 +491,7 @@ void mgl_surf3a_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3a_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3a_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long num = mgl_isnan(r)?3:long(r+0.5);
@@ -514,7 +514,7 @@ void mgl_surf3a_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3a(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3a(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -525,24 +525,24 @@ void mgl_surf3a(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3a_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3a_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3a_xyz_val(_GR_, *Val, _DA_(x), _DA_(y), _DA_(z), _DA_(a), _DA_(b), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3a_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3a_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3a_val(_GR_, *Val, _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3a_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3a_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3a_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), _DA_(b), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3a_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3a_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3a(_GR_, _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
@@ -551,7 +551,7 @@ void mgl_surf3a_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, con
// Surf3C series
//
//-----------------------------------------------------------------------------
-void mgl_surf3c_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3c_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
{
long i,j,k,i1,n=a->GetNx(),m=a->GetNy(),l=a->GetNz();
long *kx1,*kx2,*ky1,*ky2,*kz;
@@ -648,7 +648,7 @@ void mgl_surf3c_xyz_val(HMGL gr, double val, HCDT x, HCDT y, HCDT z, HCDT a, HCD
delete []ky2; delete []kz;
}
//-----------------------------------------------------------------------------
-void mgl_surf3c_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3c_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -659,7 +659,7 @@ void mgl_surf3c_val(HMGL gr, double val, HCDT a, HCDT b, const char *sch, const
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3c_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3c_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char *sch, const char *opt)
{
mreal r = gr->SaveState(opt);
long num = mgl_isnan(r)?3:long(r+0.5);
@@ -671,7 +671,7 @@ void mgl_surf3c_xyz(HMGL gr, HCDT x, HCDT y, HCDT z, HCDT a, HCDT b, const char
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3c(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
+void MGL_EXPORT mgl_surf3c(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
{
gr->SaveState(opt);
mglData x(a->GetNx()), y(a->GetNy()),z(a->GetNz());
@@ -682,24 +682,24 @@ void mgl_surf3c(HMGL gr, HCDT a, HCDT b, const char *sch, const char *opt)
gr->LoadState();
}
//-----------------------------------------------------------------------------
-void mgl_surf3c_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3c_xyz_val_(uintptr_t *gr, mreal *Val, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3c_xyz_val(_GR_, *Val, _DA_(x), _DA_(y), _DA_(z), _DA_(a), _DA_(b), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3c_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3c_val_(uintptr_t *gr, mreal *Val, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3c_val(_GR_, *Val, _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3c_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3c_xyz_(uintptr_t *gr, uintptr_t *x, uintptr_t *y, uintptr_t *z, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3c_xyz(_GR_, _DA_(x), _DA_(y), _DA_(z), _DA_(a), _DA_(b), s, o);
delete []o; delete []s; }
//-----------------------------------------------------------------------------
-void mgl_surf3c_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
+void MGL_EXPORT mgl_surf3c_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, const char *opt,int l,int lo)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
char *o=new char[lo+1]; memcpy(o,opt,lo); o[lo]=0;
mgl_surf3c(_GR_, _DA_(a), _DA_(b), s, o); delete []o; delete []s; }
@@ -711,7 +711,7 @@ void mgl_surf3c_(uintptr_t *gr, uintptr_t *a, uintptr_t *b, const char *sch, con
// flag & 0x1 -- accompanied coordinates
// flag & 0x2 -- project to r*z
// flag & 0x4 -- normalize field
-void mgl_beam_md(HMGL gr, double val, const mglData *tr, const mglData *g1, const mglData *g2, const mglData *a, double r, const char *stl, int flag)
+void MGL_NO_EXPORT mgl_beam_md(HMGL gr, double val, const mglData *tr, const mglData *g1, const mglData *g2, const mglData *a, double r, const char *stl, int flag)
{
long n = a->nz,m=a->nx,l=a->ny;
if(n<2 || m<2 || l<2) { gr->SetWarn(mglWarnLow,"Beam"); return; }
@@ -760,7 +760,7 @@ void mgl_beam_md(HMGL gr, double val, const mglData *tr, const mglData *g1, cons
mgl_surf3_xyz_val(gr,val,&x,&y,&z,&b,stl,0);
}
//-----------------------------------------------------------------------------
-void mgl_beam_val(HMGL gr, double val, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int flag)
+void MGL_EXPORT mgl_beam_val(HMGL gr, double val, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int flag)
{
const mglData *dtr=dynamic_cast<const mglData *>(tr);
@@ -817,7 +817,7 @@ void mgl_beam_val(HMGL gr, double val, HCDT tr, HCDT g1, HCDT g2, HCDT a, double
mgl_surf3_xyz_val(gr,val,&x,&y,&z,&b,stl,0);
}
//-----------------------------------------------------------------------------
-void mgl_beam(HMGL gr, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int flag, int num)
+void MGL_EXPORT mgl_beam(HMGL gr, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *stl, int flag, int num)
{
num = num<=0 ? 1 : num;
for(long i=0;i<num;i++)
@@ -827,11 +827,11 @@ void mgl_beam(HMGL gr, HCDT tr, HCDT g1, HCDT g2, HCDT a, double r, const char *
}
}
//-----------------------------------------------------------------------------
-void mgl_beam_val_(uintptr_t *gr, mreal *val, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm,int l)
+void MGL_EXPORT mgl_beam_val_(uintptr_t *gr, mreal *val, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm,int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
mgl_beam_val(_GR_, *val,_DA_(tr),_DA_(g1),_DA_(g2),_DA_(a),*r,s,*norm); delete []s; }
//-----------------------------------------------------------------------------
-void mgl_beam_(uintptr_t *gr, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm, int *num,int l)
+void MGL_EXPORT mgl_beam_(uintptr_t *gr, uintptr_t *tr, uintptr_t *g1, uintptr_t *g2, uintptr_t *a, mreal *r, const char *sch, int *norm, int *num,int l)
{ char *s=new char[l+1]; memcpy(s,sch,l); s[l]=0;
mgl_beam(_GR_, _DA_(tr), _DA_(g1), _DA_(g2), _DA_(a), *r,s,*norm,*num); delete []s; }
//-----------------------------------------------------------------------------
diff --git a/src/window.cpp b/src/window.cpp
index a4560e4..80e7249 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -87,14 +87,14 @@ void mglCanvasWnd::SetDrawFunc(int (*draw)(mglBase *gr, void *p), void *par, voi
if(get(MGL_CLF_ON_UPD)) DefaultPlotParam();
setlocale(LC_NUMERIC, "C");
// use frames for quickly redrawing while adding/changing primitives
- if(get(MGL_VECT_FRAME) && !(GetQuality()&4)) NewFrame();
+ if(mgl_is_frames(this)) NewFrame();
int n = draw ? draw(this,par) : 0;
if(n<NumFig && n>=0) NumFig = n;
DrawFunc = draw; FuncPar = par;
LoadFunc = reload;
- if(get(MGL_VECT_FRAME) && !(GetQuality()&4)) EndFrame();
+ if(mgl_is_frames(this)) EndFrame();
setlocale(LC_NUMERIC, "");
}
//-----------------------------------------------------------------------------
@@ -115,85 +115,85 @@ void mglCanvasWnd::ReLoad()
ResetFrames();
setlocale(LC_NUMERIC, "C");
// use frames for quickly redrawing while adding/changing primitives
- if(get(MGL_VECT_FRAME) && !(GetQuality()&4)) NewFrame();
+ if(mgl_is_frames(this)) NewFrame();
int n = DrawFunc ? DrawFunc(this,FuncPar) : 0;
if(n<NumFig && n>=0) NumFig = n;
- if(get(MGL_VECT_FRAME) && !(GetQuality()&4)) EndFrame();
+ if(mgl_is_frames(this)) EndFrame();
setlocale(LC_NUMERIC, "");
Update();
}
}
//-----------------------------------------------------------------------------
-void mgl_wnd_toggle_alpha(HMGL gr)
+void MGL_EXPORT mgl_wnd_toggle_alpha(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ToggleAlpha(); }
-void mgl_wnd_toggle_light(HMGL gr)
+void MGL_EXPORT mgl_wnd_toggle_light(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ToggleLight(); }
-void mgl_wnd_toggle_zoom(HMGL gr)
+void MGL_EXPORT mgl_wnd_toggle_zoom(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ToggleZoom(); }
-void mgl_wnd_toggle_rotate(HMGL gr)
+void MGL_EXPORT mgl_wnd_toggle_rotate(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ToggleRotate(); }
-void mgl_wnd_toggle_no(HMGL gr)
+void MGL_EXPORT mgl_wnd_toggle_no(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ToggleNo(); }
-void mgl_wnd_update(HMGL gr)
+void MGL_EXPORT mgl_wnd_update(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->Update(); }
-void mgl_wnd_reload(HMGL gr)
+void MGL_EXPORT mgl_wnd_reload(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ReLoad(); }
-void mgl_wnd_adjust(HMGL gr)
+void MGL_EXPORT mgl_wnd_adjust(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->Adjust(); }
-void mgl_wnd_next_frame(HMGL gr)
+void MGL_EXPORT mgl_wnd_next_frame(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->NextFrame(); }
-void mgl_wnd_prev_frame(HMGL gr)
+void MGL_EXPORT mgl_wnd_prev_frame(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->PrevFrame(); }
-void mgl_wnd_animation(HMGL gr)
+void MGL_EXPORT mgl_wnd_animation(HMGL gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->Animation(); }
-void mgl_setup_window(HMGL gr, int clf_upd, int showpos)
+void MGL_EXPORT mgl_setup_window(HMGL gr, int clf_upd, int showpos)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->Setup(clf_upd, showpos); }
-void mgl_set_click_func(HMGL gr, void (*func)(void *p))
+void MGL_EXPORT mgl_set_click_func(HMGL gr, void (*func)(void *p))
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr); if(g) g->ClickFunc = func; }
-void mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_get_last_mouse_pos(HMGL gr, mreal *x, mreal *y, mreal *z)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>(gr);
mglPoint p; if(g) p=g->GetMousePos();
*x=p.x; *y=p.y; *z=p.z; }
//-----------------------------------------------------------------------------
-void mgl_wnd_toggle_alpha_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_toggle_alpha_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ToggleAlpha(); }
-void mgl_wnd_toggle_light_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_toggle_light_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ToggleLight(); }
-void mgl_wnd_toggle_zoom_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_toggle_zoom_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ToggleZoom(); }
-void mgl_wnd_toggle_rotate_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_toggle_rotate_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ToggleRotate(); }
-void mgl_wnd_toggle_no_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_toggle_no_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ToggleNo(); }
-void mgl_wnd_update_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_update_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->Update(); }
-void mgl_wnd_reload_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_reload_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->ReLoad(); }
-void mgl_wnd_adjust_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_adjust_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->Adjust(); }
-void mgl_wnd_next_frame_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_next_frame_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->NextFrame(); }
-void mgl_wnd_prev_frame_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_prev_frame_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->PrevFrame(); }
-void mgl_wnd_animation_(uintptr_t *gr)
+void MGL_EXPORT mgl_wnd_animation_(uintptr_t *gr)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->Animation(); }
-void mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos)
+void MGL_EXPORT mgl_setup_window_(uintptr_t *gr, int *clf_upd, int *showpos)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
if(g) g->Setup(*clf_upd, *showpos); }
-void mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z)
+void MGL_EXPORT mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z)
{ mglCanvasWnd *g = dynamic_cast<mglCanvasWnd *>((HMGL)(*gr));
mglPoint p; if(g) p=g->GetMousePos();
*x=p.x; *y=p.y; *z=p.z; }
@@ -207,26 +207,26 @@ void mgl_get_last_mouse_pos_(uintptr_t *gr, mreal *x, mreal *y, mreal *z)
mglGraph g(gr); mglWindow *w = (mglWindow *)p;
return (w && w->dr) ? w->dr->Draw(&g) : 0;
}
-void mgl_reload_class(void *p) // so stupid way to save mglDraw class inheritance :(
+void MGL_EXPORT mgl_reload_class(void *p) // so stupid way to save mglDraw class inheritance :(
{ mglWindow *w = (mglWindow *)p; if(w && w->dr) w->dr->Reload();}
-void mgl_click_class(void *p) // so stupid way to save mglDraw class inheritance :(
+void MGL_EXPORT mgl_click_class(void *p) // so stupid way to save mglDraw class inheritance :(
{ mglWindow *w = (mglWindow *)p; if(w && w->dr) w->dr->Click(); }*/
-int mgl_draw_class(HMGL gr, void *p)
+int MGL_EXPORT mgl_draw_class(HMGL gr, void *p)
{ mglGraph g(gr); mglDraw *dr = (mglDraw *)p; return dr->Draw(&g); }
-void mgl_reload_class(void *p)
+void MGL_EXPORT mgl_reload_class(void *p)
{ mglDraw *dr = (mglDraw *)p; dr->Reload(); }
-void mgl_click_class(void *p)
+void MGL_EXPORT mgl_click_class(void *p)
{ mglDraw *dr = (mglDraw *)p; dr->Click(); }
//-----------------------------------------------------------------------------
typedef int (*draw_func)(mglGraph *gr);
-int mgl_draw_graph(HMGL gr, void *p)
+int MGL_EXPORT mgl_draw_graph(HMGL gr, void *p)
{
mglGraph g(gr);
draw_func func = (draw_func)(p);
return func ? func(&g) : 0;
}
//-----------------------------------------------------------------------------
-void *mgl_draw_calc(void *p)
+MGL_NO_EXPORT void *mgl_draw_calc(void *p)
{
#if MGL_HAVE_PTHREAD
((mglDraw *)p)->Calc();
@@ -234,7 +234,7 @@ void *mgl_draw_calc(void *p)
return 0;
}
//-----------------------------------------------------------------------------
-void mgl_draw_thr(void *p)
+void MGL_EXPORT mgl_draw_thr(void *p)
{
#if MGL_HAVE_PTHREAD
mglDraw *d = (mglDraw *)p;
diff --git a/texinfo/CMakeLists.txt b/texinfo/CMakeLists.txt
index 66001a9..e695069 100644
--- a/texinfo/CMakeLists.txt
+++ b/texinfo/CMakeLists.txt
@@ -8,7 +8,7 @@ if(MGL_HAVE_DOC)
several_light solve stem step stereo stfa style surf3a surf3c surf3
surfa surfc surf table tape tens ternary textmark text ticks tile tiles
torus traj triangulation triplot tube type0 type1 type2 vect vecta venn
- projection5 )
+ projection5 param1 param2 param3 paramv )
set(MGL_PNG_N )
set(MGL_PNG_S )
set(MGL_PNG_J )
@@ -127,7 +127,7 @@ endif(MGL_HAVE_PDF)
WORKING_DIRECTORY ${MGL_OUT}
)
add_custom_command(OUTPUT ${MGL_OUT}/mgl_ru.html
- COMMAND ${findth} -I=${MGL_OUT}/png --split=no -o mgl_ru.html ${MGL_TEX}/mgl_ru.texi
+ COMMAND ${findth} -I=${MGL_OUT} --split=no -o mgl_ru.html ${MGL_TEX}/mgl_ru.texi
DEPENDS ${list_texi_files_ru} mgl_ru.texi ${MGL_PNG_N}
WORKING_DIRECTORY ${MGL_OUT}
)
@@ -168,7 +168,7 @@ endif(MGL_HAVE_PDF)
install(DIRECTORY ${MGL_OUT}/mathgl_en DESTINATION ${MGL_DOC_PATH})
install(DIRECTORY ${MGL_OUT}/png DESTINATION ${MGL_DOC_PATH})
install(DIRECTORY ${MGL_OUT}/udav DESTINATION ${MGL_DOC_PATH})
- install(FILES ${MGL_TEX}/mglconv.1 ${MGL_TEX}/mglview.1 DESTINATION ${MGL_MAN_PATH}/man1)
+ install(FILES ${MGL_TEX}/mglconv.1 ${MGL_TEX}/mglview.1 ${MGL_TEX}/udav.1 DESTINATION ${MGL_MAN_PATH}/man1)
install(FILES ${MGL_TEX}/mgl.5 DESTINATION ${MGL_MAN_PATH}/man5)
# TODO: try to install all mathgl*.info* in future!!!
install(FILES ${MGL_OUT}/mathgl_en.info ${MGL_OUT}/mathgl_en.info-1 ${MGL_OUT}/mathgl_en.info-2 DESTINATION ${MGL_INFO_PATH})
diff --git a/texinfo/classes.eps b/texinfo/classes.eps
deleted file mode 100644
index 9732a29..0000000
--- a/texinfo/classes.eps
+++ /dev/null
@@ -1,5344 +0,0 @@
-%!PS-Adobe-2.0 EPSF-2.0
-%%Title: /home/balakin/progr/mathgl-code/mathgl-2x/texinfo/classes.eps
-%%Creator: Dia v0.97.2
-%%CreationDate: Tue Nov 27 12:21:29 2012
-%%For: balakin
-%%Orientation: Portrait
-%%Magnification: 1.0000
-%%BoundingBox: 0 0 682 387
-%%BeginSetup
-%%EndSetup
-%%EndComments
-%%BeginProlog
-[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
-/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
-/two /three /four /five /six /seven /eight /nine /colon /semicolon
-/less /equal /greater /question /at /A /B /C /D /E
-/F /G /H /I /J /K /L /M /N /O
-/P /Q /R /S /T /U /V /W /X /Y
-/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
-/d /e /f /g /h /i /j /k /l /m
-/n /o /p /q /r /s /t /u /v /w
-/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
-/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
-/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
-/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
-/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
-/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
-/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
-/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
-/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
-/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
-/cp {closepath} bind def
-/c {curveto} bind def
-/f {fill} bind def
-/a {arc} bind def
-/ef {eofill} bind def
-/ex {exch} bind def
-/gr {grestore} bind def
-/gs {gsave} bind def
-/sa {save} bind def
-/rs {restore} bind def
-/l {lineto} bind def
-/m {moveto} bind def
-/rm {rmoveto} bind def
-/n {newpath} bind def
-/s {stroke} bind def
-/sh {show} bind def
-/slc {setlinecap} bind def
-/slj {setlinejoin} bind def
-/slw {setlinewidth} bind def
-/srgb {setrgbcolor} bind def
-/rot {rotate} bind def
-/sc {scale} bind def
-/sd {setdash} bind def
-/ff {findfont} bind def
-/sf {setfont} bind def
-/scf {scalefont} bind def
-/sw {stringwidth pop} bind def
-/tr {translate} bind def
-
-/ellipsedict 8 dict def
-ellipsedict /mtrx matrix put
-/ellipse
-{ ellipsedict begin
- /endangle exch def
- /startangle exch def
- /yrad exch def
- /xrad exch def
- /y exch def
- /x exch def /savematrix mtrx currentmatrix def
- x y tr xrad yrad sc
- 0 0 1 startangle endangle arc
- savematrix setmatrix
- end
-} def
-
-/mergeprocs {
-dup length
-3 -1 roll
-dup
-length
-dup
-5 1 roll
-3 -1 roll
-add
-array cvx
-dup
-3 -1 roll
-0 exch
-putinterval
-dup
-4 2 roll
-putinterval
-} bind def
-/dpi_x 300 def
-/dpi_y 300 def
-/conicto {
- /to_y exch def
- /to_x exch def
- /conic_cntrl_y exch def
- /conic_cntrl_x exch def
- currentpoint
- /p0_y exch def
- /p0_x exch def
- /p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def
- /p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def
- /p2_x p1_x to_x p0_x sub 1 3 div mul add def
- /p2_y p1_y to_y p0_y sub 1 3 div mul add def
- p1_x p1_y p2_x p2_y to_x to_y curveto
-} bind def
-/start_ol { gsave 1.1 dpi_x div dup scale} bind def
-/end_ol { closepath fill grestore } bind def
-16.590756 -16.590756 scale
-0.050000 -19.950000 translate
-%%EndProlog
-
-
-0.678431 0.847059 0.901961 srgb
-n 0.000000 -0.000000 m 0.000000 1.900000 l 7.000000 1.900000 l 7.000000 -0.000000 l f
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 0.000000 -0.000000 m 0.000000 1.900000 l 7.000000 1.900000 l 7.000000 -0.000000 l cp s
-gsave 2.116250 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 2.738161 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 3.145281 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 3.322609 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-960 1728 moveto
-960 384 lineto
-1696 384 lineto
-2071 384 2251 550 conicto
-2432 716 2432 1057 conicto
-2432 1401 2251 1564 conicto
-2071 1728 1696 1728 conicto
-960 1728 lineto
-960 3136 moveto
-960 2112 lineto
-1639 2112 lineto
-1975 2112 2139 2238 conicto
-2304 2365 2304 2624 conicto
-2304 2881 2139 3008 conicto
-1975 3136 1639 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1673 3520 lineto
-2222 3520 2519 3300 conicto
-2816 3080 2816 2674 conicto
-2816 2360 2658 2174 conicto
-2500 1989 2193 1943 conicto
-2549 1866 2746 1621 conicto
-2944 1376 2944 1009 conicto
-2944 526 2625 263 conicto
-2306 0 1718 0 conicto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 3.762198 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 4.154327 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 4.486512 1.145000 translate 0.035278 -0.035278 scale
-start_ol
-2752 1480 moveto
-2752 1280 lineto
-704 1280 lineto
-733 811 978 565 conicto
-1223 320 1660 320 conicto
-1914 320 2152 384 conicto
-2390 448 2624 576 conicto
-2624 192 lineto
-2388 67 2140 1 conicto
-1893 -64 1639 -64 conicto
-1001 -64 628 309 conicto
-256 683 256 1320 conicto
-256 1979 613 2365 conicto
-970 2752 1576 2752 conicto
-2120 2752 2436 2410 conicto
-2752 2068 2752 1480 conicto
-2304 1600 moveto
-2299 1950 2099 2159 conicto
-1900 2368 1572 2368 conicto
-1200 2368 976 2166 conicto
-753 1964 719 1597 conicto
-2304 1600 lineto
-end_ol grestore
-0.678431 0.847059 0.901961 srgb
-n 0.000000 3.000000 m 0.000000 4.900000 l 7.000000 4.900000 l 7.000000 3.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 0.000000 3.000000 m 0.000000 4.900000 l 7.000000 4.900000 l 7.000000 3.000000 l cp s
-gsave 1.721250 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 2.343161 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 2.750281 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 2.927609 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 3.374689 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 3.766818 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 4.171432 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 4.551076 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 4.943205 4.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-0.678431 0.847059 0.901961 srgb
-n 0.000000 6.000000 m 0.000000 7.900000 l 7.000000 7.900000 l 7.000000 6.000000 l f
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 0.000000 6.000000 m 0.000000 7.900000 l 7.000000 7.900000 l 7.000000 6.000000 l cp s
-gsave 0.998750 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 1.620661 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 2.027781 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 2.205109 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 2.652189 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 3.044318 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 3.448932 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 3.828576 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 4.220705 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 4.552890 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 3520 moveto
-676 3520 lineto
-1420 545 lineto
-2162 3520 lineto
-2700 3520 lineto
-3444 545 lineto
-4186 3520 lineto
-4672 3520 lineto
-3783 0 lineto
-3181 0 lineto
-2434 3056 lineto
-1681 0 lineto
-1079 0 lineto
-192 3520 lineto
-end_ol grestore
-gsave 5.184797 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 5.589411 7.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 2304 moveto
-2176 3712 lineto
-2624 3712 lineto
-2624 0 lineto
-2176 0 lineto
-2176 384 lineto
-2040 157 1832 46 conicto
-1624 -64 1332 -64 conicto
-855 -64 555 324 conicto
-256 712 256 1344 conicto
-256 1976 555 2364 conicto
-855 2752 1332 2752 conicto
-1624 2752 1832 2641 conicto
-2040 2531 2176 2304 conicto
-704 1344 moveto
-704 865 900 592 conicto
-1096 320 1439 320 conicto
-1782 320 1979 592 conicto
-2176 865 2176 1344 conicto
-2176 1823 1979 2095 conicto
-1782 2368 1439 2368 conicto
-1096 2368 900 2095 conicto
-704 1823 704 1344 conicto
-end_ol grestore
-0.678431 0.847059 0.901961 srgb
-n 8.000000 5.000000 m 8.000000 6.900000 l 15.000000 6.900000 l 15.000000 5.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 8.000000 5.000000 m 8.000000 6.900000 l 15.000000 6.900000 l 15.000000 5.000000 l cp s
-gsave 9.295000 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 9.916911 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 10.324031 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 10.501359 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 10.948439 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 11.340568 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 11.745182 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 12.124826 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 12.516955 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 12.849140 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 13.343671 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-1.000000 1.000000 1.000000 srgb
-n 16.000000 5.000000 m 16.000000 6.900000 l 23.000000 6.900000 l 23.000000 5.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 16.000000 5.000000 m 16.000000 6.900000 l 23.000000 6.900000 l 23.000000 5.000000 l cp s
-gsave 16.882500 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 17.504411 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 17.911531 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 18.088859 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 18.535939 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 18.928068 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 19.332682 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 19.712326 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 20.104455 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 20.436640 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 20.931171 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 21.255864 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 1383 lineto
-960 817 1156 568 conicto
-1353 320 1793 320 conicto
-2231 320 2427 568 conicto
-2624 817 2624 1383 conicto
-2624 3520 lineto
-3136 3520 lineto
-3136 1324 lineto
-3136 637 2796 286 conicto
-2456 -64 1793 -64 conicto
-1128 -64 788 286 conicto
-448 637 448 1324 conicto
-448 3520 lineto
-end_ol grestore
-gsave 21.722920 6.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-1.000000 1.000000 1.000000 srgb
-n 5.000000 9.000000 m 5.000000 10.900000 l 12.000000 10.900000 l 12.000000 9.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 5.000000 9.000000 m 5.000000 10.900000 l 12.000000 10.900000 l 12.000000 9.000000 l cp s
-gsave 5.997500 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 6.619411 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 7.026531 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 7.203859 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 7.650939 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 8.043068 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 8.447682 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 8.827326 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 9.219455 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 9.551640 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-2496 3520 lineto
-2496 3136 lineto
-960 3136 lineto
-960 2112 lineto
-2368 2112 lineto
-2368 1728 lineto
-960 1728 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 9.918790 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 10.188533 10.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-gsave 10.578165 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 2032 lineto
-2528 3520 lineto
-3136 3520 lineto
-1402 1879 lineto
-3264 0 lineto
-2641 0 lineto
-960 1695 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-1.000000 1.000000 1.000000 srgb
-n 5.000000 15.000000 m 5.000000 16.900000 l 12.000000 16.900000 l 12.000000 15.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 5.000000 15.000000 m 5.000000 16.900000 l 12.000000 16.900000 l 12.000000 15.000000 l cp s
-gsave 6.186250 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 6.808161 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 7.215281 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 7.392609 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 7.839689 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 8.231818 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 8.636432 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 9.016076 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 9.408205 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 9.740390 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 3520 moveto
-676 3520 lineto
-1420 545 lineto
-2162 3520 lineto
-2700 3520 lineto
-3444 545 lineto
-4186 3520 lineto
-4672 3520 lineto
-3783 0 lineto
-3181 0 lineto
-2434 3056 lineto
-1681 0 lineto
-1079 0 lineto
-192 3520 lineto
-end_ol grestore
-gsave 10.372297 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-320 3520 moveto
-827 3520 lineto
-1694 2202 lineto
-2565 3520 lineto
-3072 3520 lineto
-1932 1830 lineto
-3136 0 lineto
-2625 0 lineto
-1637 1508 lineto
-641 0 lineto
-128 0 lineto
-1425 1879 lineto
-320 3520 lineto
-end_ol grestore
-1.000000 1.000000 1.000000 srgb
-n 5.000000 12.000000 m 5.000000 13.900000 l 12.000000 13.900000 l 12.000000 12.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 5.000000 12.000000 m 5.000000 13.900000 l 12.000000 13.900000 l 12.000000 12.000000 l cp s
-gsave 6.273750 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 6.895661 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 7.302781 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 7.480109 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-gsave 7.927189 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 8.319318 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 8.723932 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-128 2688 moveto
-586 2688 lineto
-1408 432 lineto
-2230 2688 lineto
-2688 2688 lineto
-1702 0 lineto
-1114 0 lineto
-128 2688 lineto
-end_ol grestore
-gsave 9.103576 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 9.495705 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 9.827890 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-1890 3200 moveto
-1375 3200 1071 2813 conicto
-768 2426 768 1759 conicto
-768 1094 1071 707 conicto
-1375 320 1890 320 conicto
-2406 320 2707 707 conicto
-3008 1094 3008 1759 conicto
-3008 2426 2707 2813 conicto
-2406 3200 1890 3200 conicto
-2553 67 moveto
-3181 -640 lineto
-2607 -640 lineto
-2087 -55 lineto
-2009 -59 1968 -61 conicto
-1927 -64 1889 -64 conicto
-1146 -64 701 431 conicto
-256 927 256 1759 conicto
-256 2593 701 3088 conicto
-1146 3584 1890 3584 conicto
-2632 3584 3076 3088 conicto
-3520 2592 3520 1758 conicto
-3520 1146 3271 710 conicto
-3023 274 2553 67 conicto
-end_ol grestore
-gsave 10.332417 13.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 3.500000 3.000000 m 3.500000 2.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 3.500000 2.011803 m 3.750000 2.511803 l 3.500000 2.386803 l 3.250000 2.511803 l ef
-n 3.500000 2.011803 m 3.750000 2.511803 l 3.500000 2.386803 l 3.250000 2.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 3.500000 6.000000 m 3.500000 5.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 3.500000 5.011803 m 3.750000 5.511803 l 3.500000 5.386803 l 3.250000 5.511803 l ef
-n 3.500000 5.011803 m 3.750000 5.511803 l 3.500000 5.386803 l 3.250000 5.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 9.750000 5.000000 m 7.454781 4.123644 l s
-[] 0 sd
-0 slj
-0 slc
-n 7.104449 3.989880 m 7.660733 3.934677 l 7.454781 4.123644 l 7.482383 4.401786 l ef
-n 7.104449 3.989880 m 7.660733 3.934677 l 7.454781 4.123644 l 7.482383 4.401786 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 16.000000 5.950000 m 15.486803 5.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 15.111803 5.950000 m 15.611803 5.700000 l 15.486803 5.950000 l 15.611803 6.200000 l ef
-n 15.111803 5.950000 m 15.611803 5.700000 l 15.486803 5.950000 l 15.611803 6.200000 l cp s
-0.000000 1.000000 0.000000 srgb
-n 17.000000 9.000000 m 17.000000 10.900000 l 22.000000 10.900000 l 22.000000 9.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 17.000000 9.000000 m 17.000000 10.900000 l 22.000000 10.900000 l 22.000000 9.000000 l cp s
-gsave 18.021250 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-1890 3200 moveto
-1375 3200 1071 2813 conicto
-768 2426 768 1759 conicto
-768 1094 1071 707 conicto
-1375 320 1890 320 conicto
-2406 320 2707 707 conicto
-3008 1094 3008 1759 conicto
-3008 2426 2707 2813 conicto
-2406 3200 1890 3200 conicto
-2553 67 moveto
-3181 -640 lineto
-2607 -640 lineto
-2087 -55 lineto
-2009 -59 1968 -61 conicto
-1927 -64 1889 -64 conicto
-1146 -64 701 431 conicto
-256 927 256 1759 conicto
-256 2593 701 3088 conicto
-1146 3584 1890 3584 conicto
-2632 3584 3076 3088 conicto
-3520 2592 3520 1758 conicto
-3520 1146 3271 710 conicto
-3023 274 2553 67 conicto
-end_ol grestore
-gsave 18.525777 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-1202 3520 lineto
-2079 1148 lineto
-2961 3520 lineto
-3712 3520 lineto
-3712 0 lineto
-3200 0 lineto
-3200 3095 lineto
-2314 704 lineto
-1846 704 lineto
-960 3095 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 19.077756 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 19.469885 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 19.719652 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-896 3712 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 20.124266 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 20.618797 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-0.000000 1.000000 0.000000 srgb
-n 17.000000 12.000000 m 17.000000 13.900000 l 22.000000 13.900000 l 22.000000 12.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 17.000000 12.000000 m 17.000000 13.900000 l 22.000000 13.900000 l 22.000000 12.000000 l cp s
-gsave 17.841250 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-2496 3520 lineto
-2496 3136 lineto
-960 3136 lineto
-960 2112 lineto
-2368 2112 lineto
-2368 1728 lineto
-960 1728 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 18.208401 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 18.385729 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2496 -832 moveto
-2496 -1152 lineto
--64 -1152 lineto
--64 -832 lineto
-2496 -832 lineto
-end_ol grestore
-gsave 18.705429 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-1202 3520 lineto
-2079 1148 lineto
-2961 3520 lineto
-3712 3520 lineto
-3712 0 lineto
-3200 0 lineto
-3200 3095 lineto
-2314 704 lineto
-1846 704 lineto
-960 3095 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 19.257407 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 19.649537 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 19.899303 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-896 3712 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 20.303917 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 20.798448 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-0.000000 1.000000 0.000000 srgb
-n 17.000000 15.000000 m 17.000000 16.900000 l 22.000000 16.900000 l 22.000000 15.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 17.000000 15.000000 m 17.000000 16.900000 l 22.000000 16.900000 l 22.000000 15.000000 l cp s
-gsave 17.822500 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 2688 moveto
-631 2688 lineto
-1179 590 lineto
-1725 2688 lineto
-2243 2688 lineto
-2791 590 lineto
-3337 2688 lineto
-3776 2688 lineto
-3077 0 lineto
-2560 0 lineto
-1985 2203 lineto
-1408 0 lineto
-891 0 lineto
-192 2688 lineto
-end_ol grestore
-gsave 18.344506 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2624 2688 moveto
-1666 1380 lineto
-2688 0 lineto
-2169 0 lineto
-1389 1056 lineto
-632 0 lineto
-128 0 lineto
-1134 1406 lineto
-192 2688 lineto
-705 2688 lineto
-1408 1730 lineto
-2111 2688 lineto
-2624 2688 lineto
-end_ol grestore
-gsave 18.724150 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-1202 3520 lineto
-2079 1148 lineto
-2961 3520 lineto
-3712 3520 lineto
-3712 0 lineto
-3200 0 lineto
-3200 3095 lineto
-2314 704 lineto
-1846 704 lineto
-960 3095 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 19.276129 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 19.668258 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 19.918025 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-896 3712 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 20.322639 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 20.817170 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-0.627451 0.125490 0.941176 srgb
-n 16.513197 9.950000 m 12.536425 9.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 16.888197 9.950000 m 16.388197 10.200000 l 16.513197 9.950000 l 16.388197 9.700000 l ef
-n 16.888197 9.950000 m 16.388197 10.200000 l 16.513197 9.950000 l 16.388197 9.700000 l cp s
-[] 0 sd
-0 slj
-0 slc
-n 12.161425 9.950000 m 12.661425 9.700000 l 12.536425 9.950000 l 12.661425 10.200000 l ef
-n 12.161425 9.950000 m 12.661425 9.700000 l 12.536425 9.950000 l 12.661425 10.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 16.513197 12.950000 m 12.486803 12.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 16.888197 12.950000 m 16.388197 13.200000 l 16.513197 12.950000 l 16.388197 12.700000 l ef
-n 16.888197 12.950000 m 16.388197 13.200000 l 16.513197 12.950000 l 16.388197 12.700000 l cp s
-[] 0 sd
-0 slj
-0 slc
-n 12.111803 12.950000 m 12.611803 12.700000 l 12.486803 12.950000 l 12.611803 13.200000 l ef
-n 12.111803 12.950000 m 12.611803 12.700000 l 12.486803 12.950000 l 12.611803 13.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 16.513197 15.950000 m 12.486803 15.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 16.888197 15.950000 m 16.388197 16.200000 l 16.513197 15.950000 l 16.388197 15.700000 l ef
-n 16.888197 15.950000 m 16.388197 16.200000 l 16.513197 15.950000 l 16.388197 15.700000 l cp s
-[] 0 sd
-0 slj
-0 slc
-n 12.111803 15.950000 m 12.611803 15.700000 l 12.486803 15.950000 l 12.611803 16.200000 l ef
-n 12.111803 15.950000 m 12.611803 15.700000 l 12.486803 15.950000 l 12.611803 16.200000 l cp s
-0.000000 0.000000 0.000000 srgb
-gsave 16.946250 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-256 5568 moveto
-1023 5568 lineto
-2203 861 lineto
-3380 5568 lineto
-4233 5568 lineto
-5413 861 lineto
-6589 5568 lineto
-7360 5568 lineto
-5950 0 lineto
-4996 0 lineto
-3812 4833 lineto
-2616 0 lineto
-1662 0 lineto
-256 5568 lineto
-end_ol grestore
-gsave 17.927829 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-704 4224 moveto
-1408 4224 lineto
-1408 0 lineto
-704 0 lineto
-704 4224 lineto
-704 5824 moveto
-1408 5824 lineto
-1408 4928 lineto
-704 4928 lineto
-704 5824 lineto
-end_ol grestore
-gsave 18.210065 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-3520 3584 moveto
-3520 5824 lineto
-4224 5824 lineto
-4224 0 lineto
-3520 0 lineto
-3520 640 lineto
-3302 250 2969 61 conicto
-2636 -128 2170 -128 conicto
-1407 -128 927 489 conicto
-448 1106 448 2112 conicto
-448 3118 927 3735 conicto
-1407 4352 2170 4352 conicto
-2636 4352 2969 4163 conicto
-3302 3974 3520 3584 conicto
-1152 2112 moveto
-1152 1334 1467 891 conicto
-1783 448 2334 448 conicto
-2886 448 3203 891 conicto
-3520 1334 3520 2112 conicto
-3520 2890 3203 3333 conicto
-2886 3776 2334 3776 conicto
-1783 3776 1467 3333 conicto
-1152 2890 1152 2112 conicto
-end_ol grestore
-gsave 18.854458 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-3520 2174 moveto
-3520 2937 3208 3356 conicto
-2897 3776 2334 3776 conicto
-1775 3776 1463 3356 conicto
-1152 2937 1152 2174 conicto
-1152 1415 1463 995 conicto
-1775 576 2334 576 conicto
-2897 576 3208 995 conicto
-3520 1415 3520 2174 conicto
-4224 520 moveto
-4224 -553 3745 -1076 conicto
-3267 -1600 2279 -1600 conicto
-1914 -1600 1589 -1537 conicto
-1265 -1474 960 -1344 conicto
-960 -704 lineto
-1264 -868 1560 -946 conicto
-1857 -1024 2165 -1024 conicto
-2844 -1024 3182 -671 conicto
-3520 -318 3520 396 conicto
-3520 768 lineto
-3306 382 2971 191 conicto
-2636 0 2170 0 conicto
-1396 0 922 595 conicto
-448 1191 448 2174 conicto
-448 3161 922 3756 conicto
-1396 4352 2170 4352 conicto
-2636 4352 2971 4161 conicto
-3306 3970 3520 3584 conicto
-3520 4224 lineto
-4224 4224 lineto
-4224 520 lineto
-end_ol grestore
-gsave 19.498851 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-4352 2304 moveto
-4352 1984 lineto
-1152 1984 lineto
-1197 1234 1581 841 conicto
-1965 448 2650 448 conicto
-3047 448 3420 544 conicto
-3793 640 4160 832 conicto
-4160 192 lineto
-3791 36 3403 -46 conicto
-3015 -128 2616 -128 conicto
-1616 -128 1032 466 conicto
-448 1061 448 2074 conicto
-448 3122 1006 3737 conicto
-1565 4352 2513 4352 conicto
-3363 4352 3857 3801 conicto
-4352 3250 4352 2304 conicto
-3648 2496 moveto
-3640 3080 3329 3428 conicto
-3018 3776 2506 3776 conicto
-1925 3776 1576 3439 conicto
-1228 3103 1175 2492 conicto
-3648 2496 lineto
-end_ol grestore
-gsave 20.123267 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-1408 5440 moveto
-1408 4224 lineto
-2816 4224 lineto
-2816 3712 lineto
-1408 3712 lineto
-1408 1395 lineto
-1408 873 1547 724 conicto
-1687 576 2114 576 conicto
-2816 576 lineto
-2816 0 lineto
-2114 0 lineto
-1313 0 1008 300 conicto
-704 601 704 1395 conicto
-704 3712 lineto
-192 3712 lineto
-192 4224 lineto
-704 4224 lineto
-704 5440 lineto
-1408 5440 lineto
-end_ol grestore
-gsave 20.520390 19.000000 translate 0.035278 -0.035278 scale
-start_ol
-3392 4096 moveto
-3392 3456 lineto
-3106 3616 2797 3696 conicto
-2489 3776 2158 3776 conicto
-1655 3776 1403 3613 conicto
-1152 3450 1152 3123 conicto
-1152 2875 1334 2733 conicto
-1517 2591 2068 2463 conicto
-2303 2409 lineto
-3033 2250 3340 1960 conicto
-3648 1671 3648 1152 conicto
-3648 561 3186 216 conicto
-2725 -128 1917 -128 conicto
-1581 -128 1216 -64 conicto
-852 0 448 128 conicto
-448 832 lineto
-830 640 1200 544 conicto
-1571 448 1934 448 conicto
-2420 448 2682 616 conicto
-2944 785 2944 1091 conicto
-2944 1375 2756 1526 conicto
-2568 1677 1931 1817 conicto
-1692 1875 lineto
-1033 2013 740 2299 conicto
-448 2585 448 3085 conicto
-448 3691 866 4021 conicto
-1285 4352 2054 4352 conicto
-2436 4352 2772 4288 conicto
-3108 4224 3392 4096 conicto
-end_ol grestore
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-1 slj
-n 17.000000 8.000000 m 22.000000 8.000000 l s
-n 17.000000 18.000000 m 22.000000 18.000000 l s
-n 17.000000 9.000000 1.000000 1.000000 180.000000 270.000000 ellipse s
-n 22.000000 9.000000 1.000000 1.000000 270.000000 360.000000 ellipse s
-n 16.000000 9.000000 m 16.000000 17.000000 l s
-n 23.000000 9.000000 m 23.000000 17.000000 l s
-n 17.000000 17.000000 1.000000 1.000000 90.000000 180.000000 ellipse s
-n 22.000000 17.000000 1.000000 1.000000 0.000000 90.000000 ellipse s
-1.000000 0.647059 0.000000 srgb
-n 28.000000 1.000000 m 28.000000 2.900000 l 33.000000 2.900000 l 33.000000 1.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 28.000000 1.000000 m 28.000000 2.900000 l 33.000000 2.900000 l 33.000000 1.000000 l cp s
-gsave 28.915000 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 29.536911 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 29.944031 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 30.121359 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 30.615890 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1984 2304 moveto
-1912 2337 1828 2352 conicto
-1744 2368 1642 2368 conicto
-1282 2368 1089 2127 conicto
-896 1887 896 1437 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1030 2531 1245 2641 conicto
-1460 2752 1767 2752 conicto
-1811 2752 1864 2752 conicto
-1917 2752 1982 2752 conicto
-1984 2304 lineto
-end_ol grestore
-gsave 30.878142 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 31.270271 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 384 moveto
-896 -1024 lineto
-448 -1024 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1032 2531 1240 2641 conicto
-1448 2752 1737 2752 conicto
-2217 2752 2516 2364 conicto
-2816 1976 2816 1344 conicto
-2816 712 2516 324 conicto
-2217 -64 1737 -64 conicto
-1448 -64 1240 46 conicto
-1032 157 896 384 conicto
-2368 1344 moveto
-2368 1823 2171 2095 conicto
-1975 2368 1632 2368 conicto
-1289 2368 1092 2095 conicto
-896 1823 896 1344 conicto
-896 865 1092 592 conicto
-1289 320 1632 320 conicto
-1975 320 2171 592 conicto
-2368 865 2368 1344 conicto
-end_ol grestore
-gsave 31.677391 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-896 3712 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 25.000000 5.000000 m 25.000000 6.900000 l 30.000000 6.900000 l 30.000000 5.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 25.000000 5.000000 m 25.000000 6.900000 l 30.000000 6.900000 l 30.000000 5.000000 l cp s
-gsave 26.057500 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 26.679411 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 27.086531 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 27.263859 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2816 504 moveto
-2816 1472 lineto
-2048 1472 lineto
-2048 1856 lineto
-3328 1856 lineto
-3328 325 lineto
-3052 133 2720 34 conicto
-2388 -64 2011 -64 conicto
-1187 -64 721 417 conicto
-256 899 256 1759 conicto
-256 2621 725 3102 conicto
-1195 3584 2028 3584 conicto
-2375 3584 2687 3503 conicto
-3000 3422 3264 3264 conicto
-3264 2752 lineto
-2998 2975 2699 3087 conicto
-2400 3200 2071 3200 conicto
-1420 3200 1094 2838 conicto
-768 2476 768 1759 conicto
-768 1044 1084 682 conicto
-1400 320 2030 320 conicto
-2276 320 2469 365 conicto
-2662 410 2816 504 conicto
-end_ol grestore
-gsave 27.758390 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 28.083084 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 1383 lineto
-960 817 1156 568 conicto
-1353 320 1793 320 conicto
-2231 320 2427 568 conicto
-2624 817 2624 1383 conicto
-2624 3520 lineto
-3136 3520 lineto
-3136 1324 lineto
-3136 637 2796 286 conicto
-2456 -64 1793 -64 conicto
-1128 -64 788 286 conicto
-448 637 448 1324 conicto
-448 3520 lineto
-end_ol grestore
-gsave 28.550140 6.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 32.000000 5.000000 m 32.000000 6.900000 l 37.000000 6.900000 l 37.000000 5.000000 l f
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 32.000000 5.000000 m 32.000000 6.900000 l 37.000000 6.900000 l 37.000000 5.000000 l cp s
-gsave 33.173750 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 33.795661 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 34.202781 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 34.380109 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 3520 moveto
-676 3520 lineto
-1420 545 lineto
-2162 3520 lineto
-2700 3520 lineto
-3444 545 lineto
-4186 3520 lineto
-4672 3520 lineto
-3783 0 lineto
-3181 0 lineto
-2434 3056 lineto
-1681 0 lineto
-1079 0 lineto
-192 3520 lineto
-end_ol grestore
-gsave 35.012017 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 35.416631 6.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 2304 moveto
-2176 3712 lineto
-2624 3712 lineto
-2624 0 lineto
-2176 0 lineto
-2176 384 lineto
-2040 157 1832 46 conicto
-1624 -64 1332 -64 conicto
-855 -64 555 324 conicto
-256 712 256 1344 conicto
-256 1976 555 2364 conicto
-855 2752 1332 2752 conicto
-1624 2752 1832 2641 conicto
-2040 2531 2176 2304 conicto
-704 1344 moveto
-704 865 900 592 conicto
-1096 320 1439 320 conicto
-1782 320 1979 592 conicto
-2176 865 2176 1344 conicto
-2176 1823 1979 2095 conicto
-1782 2368 1439 2368 conicto
-1096 2368 900 2095 conicto
-704 1823 704 1344 conicto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 28.000000 9.000000 m 28.000000 10.900000 l 33.000000 10.900000 l 33.000000 9.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 28.000000 9.000000 m 28.000000 10.900000 l 33.000000 10.900000 l 33.000000 9.000000 l cp s
-gsave 29.448750 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 30.070661 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 30.477781 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 30.655109 10.145000 translate 0.035278 -0.035278 scale
-start_ol
-1890 3200 moveto
-1375 3200 1071 2813 conicto
-768 2426 768 1759 conicto
-768 1094 1071 707 conicto
-1375 320 1890 320 conicto
-2406 320 2707 707 conicto
-3008 1094 3008 1759 conicto
-3008 2426 2707 2813 conicto
-2406 3200 1890 3200 conicto
-2553 67 moveto
-3181 -640 lineto
-2607 -640 lineto
-2087 -55 lineto
-2009 -59 1968 -61 conicto
-1927 -64 1889 -64 conicto
-1146 -64 701 431 conicto
-256 927 256 1759 conicto
-256 2593 701 3088 conicto
-1146 3584 1890 3584 conicto
-2632 3584 3076 3088 conicto
-3520 2592 3520 1758 conicto
-3520 1146 3271 710 conicto
-3023 274 2553 67 conicto
-end_ol grestore
-gsave 31.159637 10.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 28.000000 12.000000 m 28.000000 13.900000 l 33.000000 13.900000 l 33.000000 12.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 28.000000 12.000000 m 28.000000 13.900000 l 33.000000 13.900000 l 33.000000 12.000000 l cp s
-gsave 29.172500 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 29.794411 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 30.201531 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 30.378859 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-2496 3520 lineto
-2496 3136 lineto
-960 3136 lineto
-960 2112 lineto
-2368 2112 lineto
-2368 1728 lineto
-960 1728 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 30.746010 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 384 lineto
-2688 384 lineto
-2688 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 31.015753 13.145000 translate 0.035278 -0.035278 scale
-start_ol
--64 3520 moveto
-3008 3520 lineto
-3008 3136 lineto
-1728 3136 lineto
-1728 0 lineto
-1216 0 lineto
-1216 3136 lineto
--64 3136 lineto
--64 3520 lineto
-end_ol grestore
-gsave 31.405385 13.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3520 moveto
-960 3520 lineto
-960 2032 lineto
-2528 3520 lineto
-3136 3520 lineto
-1402 1879 lineto
-3264 0 lineto
-2641 0 lineto
-960 1695 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 28.000000 15.000000 m 28.000000 16.900000 l 33.000000 16.900000 l 33.000000 15.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 28.000000 15.000000 m 28.000000 16.900000 l 33.000000 16.900000 l 33.000000 15.000000 l cp s
-gsave 29.361250 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 29.983161 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 30.390281 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 30.567609 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 3520 moveto
-676 3520 lineto
-1420 545 lineto
-2162 3520 lineto
-2700 3520 lineto
-3444 545 lineto
-4186 3520 lineto
-4672 3520 lineto
-3783 0 lineto
-3181 0 lineto
-2434 3056 lineto
-1681 0 lineto
-1079 0 lineto
-192 3520 lineto
-end_ol grestore
-gsave 31.199517 16.145000 translate 0.035278 -0.035278 scale
-start_ol
-320 3520 moveto
-827 3520 lineto
-1694 2202 lineto
-2565 3520 lineto
-3072 3520 lineto
-1932 1830 lineto
-3136 0 lineto
-2625 0 lineto
-1637 1508 lineto
-641 0 lineto
-128 0 lineto
-1425 1879 lineto
-320 3520 lineto
-end_ol grestore
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 33.000000 9.950000 m 35.750000 9.950000 l 35.750000 7.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l ef
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 5.000000 9.950000 m 1.750000 9.950000 l 1.750000 8.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l ef
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 5.000000 12.950000 m 1.750000 12.950000 l 1.750000 8.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l ef
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 5.000000 15.950000 m 1.750000 15.950000 l 1.750000 8.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l ef
-n 1.750000 8.011803 m 2.000000 8.511803 l 1.750000 8.386803 l 1.500000 8.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 33.000000 12.950000 m 35.750000 12.950000 l 35.750000 7.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l ef
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 33.000000 15.950000 m 35.750000 15.950000 l 35.750000 7.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l ef
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 27.500000 5.000000 m 27.500000 3.950000 l 30.500000 3.950000 l 30.500000 3.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 30.500000 3.011803 m 30.750000 3.511803 l 30.500000 3.386803 l 30.250000 3.511803 l ef
-n 30.500000 3.011803 m 30.750000 3.511803 l 30.500000 3.386803 l 30.250000 3.511803 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 34.500000 5.000000 m 34.500000 3.950000 l 30.500000 3.950000 l 30.500000 3.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 30.500000 3.011803 m 30.750000 3.511803 l 30.500000 3.386803 l 30.250000 3.511803 l ef
-n 30.500000 3.011803 m 30.750000 3.511803 l 30.500000 3.386803 l 30.250000 3.511803 l cp s
-1.000000 1.000000 0.000000 srgb
-n 28.000000 18.000000 m 28.000000 19.900000 l 33.000000 19.900000 l 33.000000 18.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 28.000000 18.000000 m 28.000000 19.900000 l 33.000000 19.900000 l 33.000000 18.000000 l cp s
-gsave 28.685000 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 2688 moveto
-631 2688 lineto
-1179 590 lineto
-1725 2688 lineto
-2243 2688 lineto
-2791 590 lineto
-3337 2688 lineto
-3776 2688 lineto
-3077 0 lineto
-2560 0 lineto
-1985 2203 lineto
-1408 0 lineto
-891 0 lineto
-192 2688 lineto
-end_ol grestore
-gsave 29.207006 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 29.614126 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 29.791454 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 3520 moveto
-676 3520 lineto
-1420 545 lineto
-2162 3520 lineto
-2700 3520 lineto
-3444 545 lineto
-4186 3520 lineto
-4672 3520 lineto
-3783 0 lineto
-3181 0 lineto
-2434 3056 lineto
-1681 0 lineto
-1079 0 lineto
-192 3520 lineto
-end_ol grestore
-gsave 30.408372 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 2688 moveto
-896 2688 lineto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-448 3712 moveto
-896 3712 lineto
-896 3136 lineto
-448 3136 lineto
-448 3712 lineto
-end_ol grestore
-gsave 30.585701 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-2688 1646 moveto
-2688 0 lineto
-2240 0 lineto
-2240 1632 lineto
-2240 2001 2093 2184 conicto
-1947 2368 1654 2368 conicto
-1302 2368 1099 2146 conicto
-896 1925 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1053 2529 1266 2640 conicto
-1479 2752 1757 2752 conicto
-2217 2752 2452 2471 conicto
-2688 2191 2688 1646 conicto
-end_ol grestore
-gsave 30.990315 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 2304 moveto
-2176 3712 lineto
-2624 3712 lineto
-2624 0 lineto
-2176 0 lineto
-2176 384 lineto
-2040 157 1832 46 conicto
-1624 -64 1332 -64 conicto
-855 -64 555 324 conicto
-256 712 256 1344 conicto
-256 1976 555 2364 conicto
-855 2752 1332 2752 conicto
-1624 2752 1832 2641 conicto
-2040 2531 2176 2304 conicto
-704 1344 moveto
-704 865 900 592 conicto
-1096 320 1439 320 conicto
-1782 320 1979 592 conicto
-2176 865 2176 1344 conicto
-2176 1823 1979 2095 conicto
-1782 2368 1439 2368 conicto
-1096 2368 900 2095 conicto
-704 1823 704 1344 conicto
-end_ol grestore
-gsave 31.397434 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-1473 2368 moveto
-1117 2368 910 2094 conicto
-704 1820 704 1344 conicto
-704 868 909 594 conicto
-1115 320 1473 320 conicto
-1827 320 2033 595 conicto
-2240 870 2240 1344 conicto
-2240 1816 2033 2092 conicto
-1827 2368 1473 2368 conicto
-1472 2752 moveto
-2040 2752 2364 2378 conicto
-2688 2005 2688 1344 conicto
-2688 685 2364 310 conicto
-2040 -64 1472 -64 conicto
-902 -64 579 310 conicto
-256 685 256 1344 conicto
-256 2005 579 2378 conicto
-902 2752 1472 2752 conicto
-end_ol grestore
-gsave 31.789563 19.145000 translate 0.035278 -0.035278 scale
-start_ol
-192 2688 moveto
-631 2688 lineto
-1179 590 lineto
-1725 2688 lineto
-2243 2688 lineto
-2791 590 lineto
-3337 2688 lineto
-3776 2688 lineto
-3077 0 lineto
-2560 0 lineto
-1985 2203 lineto
-1408 0 lineto
-891 0 lineto
-192 2688 lineto
-end_ol grestore
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0 slc
-n 33.000000 18.950000 m 35.750000 18.950000 l 35.750000 7.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l ef
-n 35.750000 7.011803 m 36.000000 7.511803 l 35.750000 7.386803 l 35.500000 7.511803 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-0.627451 0.125490 0.941176 srgb
-n 28.000000 9.950000 m 22.486803 9.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.111803 9.950000 m 22.611803 9.700000 l 22.486803 9.950000 l 22.611803 10.200000 l ef
-n 22.111803 9.950000 m 22.611803 9.700000 l 22.486803 9.950000 l 22.611803 10.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 28.000000 12.950000 m 22.486803 12.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.111803 12.950000 m 22.611803 12.700000 l 22.486803 12.950000 l 22.611803 13.200000 l ef
-n 22.111803 12.950000 m 22.611803 12.700000 l 22.486803 12.950000 l 22.611803 13.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 28.000000 15.950000 m 22.486803 15.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.111803 15.950000 m 22.611803 15.700000 l 22.486803 15.950000 l 22.611803 16.200000 l ef
-n 22.111803 15.950000 m 22.611803 15.700000 l 22.486803 15.950000 l 22.611803 16.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 28.000000 18.950000 m 22.372442 14.213472 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.085538 13.971995 m 22.629061 14.102695 l 22.372442 14.213472 l 22.307092 14.485233 l ef
-n 22.085538 13.971995 m 22.629061 14.102695 l 22.372442 14.213472 l 22.307092 14.485233 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 28.000000 18.950000 m 22.290917 11.290314 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.066814 10.989643 m 22.566065 11.241136 l 22.290917 11.290314 l 22.165171 11.539939 l ef
-n 22.066814 10.989643 m 22.566065 11.241136 l 22.290917 11.290314 l 22.165171 11.539939 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 28.000000 18.950000 m 22.460658 17.057391 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.105799 16.936148 m 22.659773 16.861233 l 22.460658 17.057391 l 22.498115 17.334379 l ef
-n 22.105799 16.936148 m 22.659773 16.861233 l 22.460658 17.057391 l 22.498115 17.334379 l cp s
-0.678431 0.847059 0.901961 srgb
-n 36.000000 -1.000000 m 36.000000 0.900000 l 41.000000 0.900000 l 41.000000 -1.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 36.000000 -1.000000 m 36.000000 0.900000 l 41.000000 0.900000 l 41.000000 -1.000000 l cp s
-gsave 36.895000 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 37.516911 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 37.924031 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 38.101359 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-960 3136 moveto
-960 1792 lineto
-1552 1792 lineto
-1881 1792 2060 1967 conicto
-2240 2142 2240 2465 conicto
-2240 2786 2060 2961 conicto
-1881 3136 1552 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1552 3520 lineto
-2145 3520 2448 3251 conicto
-2752 2983 2752 2465 conicto
-2752 1943 2448 1675 conicto
-2145 1408 1552 1408 conicto
-960 1408 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 38.458522 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 38.850651 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-1984 2304 moveto
-1912 2337 1828 2352 conicto
-1744 2368 1642 2368 conicto
-1282 2368 1089 2127 conicto
-896 1887 896 1437 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1030 2531 1245 2641 conicto
-1460 2752 1767 2752 conicto
-1811 2752 1864 2752 conicto
-1917 2752 1982 2752 conicto
-1984 2304 lineto
-end_ol grestore
-gsave 39.112903 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 39.445087 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-2752 1480 moveto
-2752 1280 lineto
-704 1280 lineto
-733 811 978 565 conicto
-1223 320 1660 320 conicto
-1914 320 2152 384 conicto
-2390 448 2624 576 conicto
-2624 192 lineto
-2388 67 2140 1 conicto
-1893 -64 1639 -64 conicto
-1001 -64 628 309 conicto
-256 683 256 1320 conicto
-256 1979 613 2365 conicto
-970 2752 1576 2752 conicto
-2120 2752 2436 2410 conicto
-2752 2068 2752 1480 conicto
-2304 1600 moveto
-2299 1950 2099 2159 conicto
-1900 2368 1572 2368 conicto
-1200 2368 976 2166 conicto
-753 1964 719 1597 conicto
-2304 1600 lineto
-end_ol grestore
-gsave 39.839713 0.145000 translate 0.035278 -0.035278 scale
-start_ol
-1984 2304 moveto
-1912 2337 1828 2352 conicto
-1744 2368 1642 2368 conicto
-1282 2368 1089 2127 conicto
-896 1887 896 1437 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1030 2531 1245 2641 conicto
-1460 2752 1767 2752 conicto
-1811 2752 1864 2752 conicto
-1917 2752 1982 2752 conicto
-1984 2304 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 36.000000 2.000000 m 36.000000 3.900000 l 41.000000 3.900000 l 41.000000 2.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 36.000000 2.000000 m 36.000000 3.900000 l 41.000000 3.900000 l 41.000000 2.000000 l cp s
-gsave 37.026250 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 37.648161 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 38.055281 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 38.232609 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-960 3136 moveto
-960 1792 lineto
-1552 1792 lineto
-1881 1792 2060 1967 conicto
-2240 2142 2240 2465 conicto
-2240 2786 2060 2961 conicto
-1881 3136 1552 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1552 3520 lineto
-2145 3520 2448 3251 conicto
-2752 2983 2752 2465 conicto
-2752 1943 2448 1675 conicto
-2145 1408 1552 1408 conicto
-960 1408 lineto
-960 0 lineto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 38.589772 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 38.981901 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-1984 2304 moveto
-1912 2337 1828 2352 conicto
-1744 2368 1642 2368 conicto
-1282 2368 1089 2127 conicto
-896 1887 896 1437 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1030 2531 1245 2641 conicto
-1460 2752 1767 2752 conicto
-1811 2752 1864 2752 conicto
-1917 2752 1982 2752 conicto
-1984 2304 lineto
-end_ol grestore
-gsave 39.244153 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-2112 2560 moveto
-2112 2176 lineto
-1932 2272 1738 2320 conicto
-1544 2368 1336 2368 conicto
-1020 2368 862 2269 conicto
-704 2170 704 1972 conicto
-704 1821 814 1735 conicto
-925 1649 1260 1571 conicto
-1403 1538 lineto
-1857 1438 2048 1255 conicto
-2240 1072 2240 744 conicto
-2240 371 1954 153 conicto
-1668 -64 1167 -64 conicto
-958 -64 732 -16 conicto
-506 32 256 128 conicto
-256 576 lineto
-491 448 719 384 conicto
-947 320 1170 320 conicto
-1470 320 1631 425 conicto
-1792 531 1792 722 conicto
-1792 900 1678 994 conicto
-1564 1089 1177 1177 conicto
-1032 1212 lineto
-621 1298 438 1476 conicto
-256 1654 256 1964 conicto
-256 2341 520 2546 conicto
-784 2752 1269 2752 conicto
-1509 2752 1721 2704 conicto
-1933 2656 2112 2560 conicto
-end_ol grestore
-gsave 39.576337 3.145000 translate 0.035278 -0.035278 scale
-start_ol
-2752 1480 moveto
-2752 1280 lineto
-704 1280 lineto
-733 811 978 565 conicto
-1223 320 1660 320 conicto
-1914 320 2152 384 conicto
-2390 448 2624 576 conicto
-2624 192 lineto
-2388 67 2140 1 conicto
-1893 -64 1639 -64 conicto
-1001 -64 628 309 conicto
-256 683 256 1320 conicto
-256 1979 613 2365 conicto
-970 2752 1576 2752 conicto
-2120 2752 2436 2410 conicto
-2752 2068 2752 1480 conicto
-2304 1600 moveto
-2299 1950 2099 2159 conicto
-1900 2368 1572 2368 conicto
-1200 2368 976 2166 conicto
-753 1964 719 1597 conicto
-2304 1600 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 20.000000 1.000000 m 20.000000 2.900000 l 25.000000 2.900000 l 25.000000 1.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 20.000000 1.000000 m 20.000000 2.900000 l 25.000000 2.900000 l 25.000000 1.000000 l cp s
-gsave 21.132500 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 21.754411 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 22.161531 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 22.338859 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-960 3136 moveto
-960 384 lineto
-1536 384 lineto
-2266 384 2605 716 conicto
-2944 1048 2944 1764 conicto
-2944 2475 2605 2805 conicto
-2266 3136 1536 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1463 3520 lineto
-2493 3520 2974 3094 conicto
-3456 2669 3456 1764 conicto
-3456 853 2972 426 conicto
-2488 0 1463 0 conicto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 22.830893 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 23.223023 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 23.472789 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-0.678431 0.847059 0.901961 srgb
-n 17.000000 -2.000000 m 17.000000 -0.100000 l 22.000000 -0.100000 l 22.000000 -2.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 17.000000 -2.000000 m 17.000000 -0.100000 l 22.000000 -0.100000 l 22.000000 -2.000000 l cp s
-gsave 17.913750 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 18.535661 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 18.942781 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 19.120109 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-960 3136 moveto
-960 384 lineto
-1536 384 lineto
-2266 384 2605 716 conicto
-2944 1048 2944 1764 conicto
-2944 2475 2605 2805 conicto
-2266 3136 1536 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1463 3520 lineto
-2493 3520 2974 3094 conicto
-3456 2669 3456 1764 conicto
-3456 853 2972 426 conicto
-2488 0 1463 0 conicto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 19.612143 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 20.004273 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 20.254039 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 20.646168 -0.855000 translate 0.035278 -0.035278 scale
-start_ol
-1696 3047 moveto
-1042 1280 lineto
-2352 1280 lineto
-1696 3047 lineto
-1424 3520 moveto
-1970 3520 lineto
-3328 0 lineto
-2827 0 lineto
-2502 896 lineto
-897 896 lineto
-572 0 lineto
-64 0 lineto
-1424 3520 lineto
-end_ol grestore
-1.000000 1.000000 0.000000 srgb
-n 14.000000 1.000000 m 14.000000 2.900000 l 19.000000 2.900000 l 19.000000 1.000000 l f
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slj
-0.000000 0.000000 0.000000 srgb
-n 14.000000 1.000000 m 14.000000 2.900000 l 19.000000 2.900000 l 19.000000 1.000000 l cp s
-gsave 14.908750 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2549 2204 moveto
-2714 2485 2942 2618 conicto
-3171 2752 3482 2752 conicto
-3899 2752 4125 2464 conicto
-4352 2177 4352 1646 conicto
-4352 0 lineto
-3904 0 lineto
-3904 1632 lineto
-3904 2006 3769 2187 conicto
-3634 2368 3356 2368 conicto
-3017 2368 2820 2146 conicto
-2624 1925 2624 1542 conicto
-2624 0 lineto
-2176 0 lineto
-2176 1632 lineto
-2176 2008 2041 2188 conicto
-1906 2368 1624 2368 conicto
-1289 2368 1092 2145 conicto
-896 1922 896 1542 conicto
-896 0 lineto
-448 0 lineto
-448 2688 lineto
-896 2688 lineto
-896 2304 lineto
-1046 2534 1255 2643 conicto
-1465 2752 1753 2752 conicto
-2044 2752 2247 2611 conicto
-2451 2471 2549 2204 conicto
-end_ol grestore
-gsave 15.530661 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-2176 1375 moveto
-2176 1848 1982 2108 conicto
-1789 2368 1439 2368 conicto
-1091 2368 897 2108 conicto
-704 1848 704 1375 conicto
-704 904 897 644 conicto
-1091 384 1439 384 conicto
-1789 384 1982 644 conicto
-2176 904 2176 1375 conicto
-2624 347 moveto
-2624 -347 2323 -685 conicto
-2023 -1024 1404 -1024 conicto
-1174 -1024 971 -992 conicto
-768 -961 576 -896 conicto
-576 -448 lineto
-766 -546 951 -593 conicto
-1137 -640 1329 -640 conicto
-1754 -640 1965 -415 conicto
-2176 -190 2176 264 conicto
-2176 448 lineto
-2042 223 1833 111 conicto
-1624 0 1332 0 conicto
-848 0 552 376 conicto
-256 753 256 1375 conicto
-256 1999 552 2375 conicto
-848 2752 1332 2752 conicto
-1624 2752 1833 2640 conicto
-2042 2529 2176 2304 conicto
-2176 2688 lineto
-2624 2688 lineto
-2624 347 lineto
-end_ol grestore
-gsave 15.937781 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-448 3712 moveto
-896 3712 lineto
-896 0 lineto
-448 0 lineto
-448 3712 lineto
-end_ol grestore
-gsave 16.115109 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-960 3136 moveto
-960 384 lineto
-1536 384 lineto
-2266 384 2605 716 conicto
-2944 1048 2944 1764 conicto
-2944 2475 2605 2805 conicto
-2266 3136 1536 3136 conicto
-960 3136 lineto
-448 3520 moveto
-1463 3520 lineto
-2493 3520 2974 3094 conicto
-3456 2669 3456 1764 conicto
-3456 853 2972 426 conicto
-2488 0 1463 0 conicto
-448 0 lineto
-448 3520 lineto
-end_ol grestore
-gsave 16.607143 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 16.999273 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-896 3456 moveto
-896 2688 lineto
-1792 2688 lineto
-1792 2368 lineto
-896 2368 lineto
-896 902 lineto
-896 572 984 478 conicto
-1073 384 1345 384 conicto
-1792 384 lineto
-1792 0 lineto
-1345 0 lineto
-836 0 642 194 conicto
-448 389 448 902 conicto
-448 2368 lineto
-128 2368 lineto
-128 2688 lineto
-448 2688 lineto
-448 3456 lineto
-896 3456 lineto
-end_ol grestore
-gsave 17.249039 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-1622 1344 moveto
-1104 1344 904 1225 conicto
-704 1106 704 818 conicto
-704 589 854 454 conicto
-1004 320 1262 320 conicto
-1618 320 1833 572 conicto
-2048 825 2048 1244 conicto
-2048 1344 lineto
-1622 1344 lineto
-2496 1513 moveto
-2496 0 lineto
-2048 0 lineto
-2048 384 lineto
-1900 154 1679 45 conicto
-1458 -64 1138 -64 conicto
-733 -64 494 162 conicto
-256 389 256 769 conicto
-256 1213 555 1438 conicto
-854 1664 1448 1664 conicto
-2048 1664 lineto
-2048 1712 lineto
-2048 2025 1851 2196 conicto
-1655 2368 1300 2368 conicto
-1074 2368 860 2320 conicto
-646 2272 448 2176 conicto
-448 2560 lineto
-687 2656 912 2704 conicto
-1138 2752 1351 2752 conicto
-1927 2752 2211 2444 conicto
-2496 2137 2496 1513 conicto
-end_ol grestore
-gsave 17.641168 2.145000 translate 0.035278 -0.035278 scale
-start_ol
-3136 3264 moveto
-3136 2752 lineto
-2892 2977 2616 3088 conicto
-2340 3200 2030 3200 conicto
-1418 3200 1093 2829 conicto
-768 2459 768 1759 conicto
-768 1061 1093 690 conicto
-1418 320 2030 320 conicto
-2340 320 2616 431 conicto
-2892 543 3136 768 conicto
-3136 256 lineto
-2882 96 2599 16 conicto
-2316 -64 2000 -64 conicto
-1189 -64 722 424 conicto
-256 913 256 1759 conicto
-256 2607 722 3095 conicto
-1189 3584 2000 3584 conicto
-2320 3584 2603 3504 conicto
-2887 3424 3136 3264 conicto
-end_ol grestore
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 38.500000 2.000000 m 38.500000 1.386803 l s
-[] 0 sd
-0 slj
-0 slc
-n 38.500000 1.011803 m 38.750000 1.511803 l 38.500000 1.386803 l 38.250000 1.511803 l ef
-n 38.500000 1.011803 m 38.750000 1.511803 l 38.500000 1.386803 l 38.250000 1.511803 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-0.627451 0.125490 0.941176 srgb
-n 27.513197 1.950000 m 25.486803 1.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 27.888197 1.950000 m 27.388197 2.200000 l 27.513197 1.950000 l 27.388197 1.700000 l ef
-n 27.888197 1.950000 m 27.388197 2.200000 l 27.513197 1.950000 l 27.388197 1.700000 l cp s
-[] 0 sd
-0 slj
-0 slc
-n 25.111803 1.950000 m 25.611803 1.700000 l 25.486803 1.950000 l 25.611803 2.200000 l ef
-n 25.111803 1.950000 m 25.611803 1.700000 l 25.486803 1.950000 l 25.611803 2.200000 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-0.000000 0.000000 0.000000 srgb
-n 16.500000 1.000000 m 17.837854 0.159063 l s
-[] 0 sd
-0 slj
-0 slc
-n 18.155343 -0.040501 m 17.865068 0.437243 l 17.837854 0.159063 l 17.598982 0.013925 l ef
-n 18.155343 -0.040501 m 17.865068 0.437243 l 17.837854 0.159063 l 17.598982 0.013925 l cp s
-0.100000 slw
-[] 0 sd
-[] 0 sd
-0 slc
-n 22.500000 1.000000 m 21.162146 0.159063 l s
-[] 0 sd
-0 slj
-0 slc
-n 20.844657 -0.040501 m 21.401018 0.013925 l 21.162146 0.159063 l 21.134932 0.437243 l ef
-n 20.844657 -0.040501 m 21.401018 0.013925 l 21.162146 0.159063 l 21.134932 0.437243 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-0.627451 0.125490 0.941176 srgb
-n 28.000000 1.000000 m 22.460658 -0.892609 l s
-[] 0 sd
-0 slj
-0 slc
-n 22.105799 -1.013852 m 22.659773 -1.088767 l 22.460658 -0.892609 l 22.498115 -0.615621 l ef
-n 22.105799 -1.013852 m 22.659773 -1.088767 l 22.460658 -0.892609 l 22.498115 -0.615621 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 36.000000 2.950000 m 33.461822 2.103941 l s
-[] 0 sd
-0 slj
-0 slc
-n 33.106066 1.985355 m 33.659465 1.906298 l 33.461822 2.103941 l 33.501351 2.380640 l ef
-n 33.106066 1.985355 m 33.659465 1.906298 l 33.461822 2.103941 l 33.501351 2.380640 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 25.000000 5.950000 m 23.486803 5.950000 l s
-[] 0 sd
-0 slj
-0 slc
-n 23.111803 5.950000 m 23.611803 5.700000 l 23.486803 5.950000 l 23.611803 6.200000 l ef
-n 23.111803 5.950000 m 23.611803 5.700000 l 23.486803 5.950000 l 23.611803 6.200000 l cp s
-0.100000 slw
-[0.200000] 0 sd
-[0.200000] 0 sd
-0 slc
-n 7.000000 0.950000 m 16.522650 -0.954530 l s
-[] 0 sd
-0 slj
-0 slc
-n 16.890368 -1.028074 m 16.449106 -0.684870 l 16.522650 -0.954530 l 16.351048 -1.175161 l ef
-n 16.890368 -1.028074 m 16.449106 -0.684870 l 16.522650 -0.954530 l 16.351048 -1.175161 l cp s
-0.100000 slw
-[1.000000] 0 sd
-[1.000000] 0 sd
-0 slj
-0 slc
-0.000000 0.000000 1.000000 srgb
-n 30.500000 1.000000 m 23.000000 -5.000000 15.000000 -5.000000 7.344222 2.655778 c s
-[] 0 sd
-0 slj
-0 slc
-n 7.079057 2.920943 m 7.255834 2.390613 l 7.344222 2.655778 l 7.609387 2.744166 l ef
-n 7.079057 2.920943 m 7.255834 2.390613 l 7.344222 2.655778 l 7.609387 2.744166 l cp s
-showpage
diff --git a/texinfo/core_en.texi b/texinfo/core_en.texi
index 0607b71..8d27592 100644
--- a/texinfo/core_en.texi
+++ b/texinfo/core_en.texi
@@ -282,6 +282,13 @@ Sets approximate number of visible faces. Can be used for speeding up drawing by
Sets default name @var{id} as filename for saving (in FLTK window for example).
@end deftypefn
+ at ifclear UDAV
+ at deftypefn {Method on @code{mglGraph}} @code{const char *} GetPlotId ()
+ at deftypefnx {C function} @code{const char *} mgl_get_plotid (@code{HMGL} gr)
+Gets default name @var{id} as filename for saving (in FLTK window for example).
+ at end deftypefn
+ at end ifclear
+
@c ==================================================================
@comment @external{}
@node Cutting, Font settings, Default sizes, Graphics setup
@@ -577,10 +584,13 @@ Sets center of axis cross section. If one of values is NAN then MathGL try to se
@end deftypefn
@anchor{zoomaxis}
- at deftypefn {MGL command} {} zoomaxis @code{x1 x2 [y1=0 y2=1 [z1=0 z2=1 [c1=0 c2=1]]]}
+ at deftypefn {MGL command} {} zoomaxis @code{x1 x2}
+ at deftypefnx {MGL command} {} zoomaxis @code{x1 y1 x2 y2}
+ at deftypefnx {MGL command} {} zoomaxis @code{x1 y1 z1 x2 y2 z2}
+ at deftypefnx {MGL command} {} zoomaxis @code{x1 y1 z1 c1 x2 y2 z2 c2}
@ifclear UDAV
@deftypefnx {Method on @code{mglGraph}} @code{void} ZoomAxis (@code{mglPoint} p1, @code{mglPoint} p2)
- at deftypefnx {C function} @code{void} mgl_zoom_axis (@code{HMGL} gr, @code{mreal} x1, @code{mreal} x2, @code{mreal} y1, @code{mreal} y2, @code{mreal} z1, @code{mreal} z2, @code{mreal} c1, @code{mreal} c2)
+ at deftypefnx {C function} @code{void} mgl_zoom_axis (@code{HMGL} gr, @code{mreal} x1, @code{mreal} y1, @code{mreal} z1, @code{mreal} c1, @code{mreal} x2, @code{mreal} y2, @code{mreal} z2, @code{mreal} c2)
@end ifclear
Additionally extend axis range for any settings made by @code{SetRange} or @code{SetRanges} functions according the formula @math{min += (max-min)*p1} and @math{max += (max-min)*p1} (or @math{min *= (max/min)^p1} and @math{max *= (max/min)^p1} for log-axis range when @math{inf>max/min>100} or @math{0<max/min<0.01}). Initial ranges are [0, 1]. Attention! this settings can not be overwritten by any other functions, including @code{DefaultPlotParam()}.
@end deftypefn
@@ -711,9 +721,15 @@ Set template @var{templ} for x-,y-,z-axis ticks or colorbar ticks. It may contai
@deftypefnx {Method on @code{mglGraph}} @code{void} SetTicksTime (@code{char} dir, @code{mreal} val, @code{const char *}templ)
@deftypefnx {C function} @code{void} mgl_set_ticks_time (@code{HMGL} gr, @code{mreal} val, @code{const char *}templ)
@end ifclear
-Set time labels with step @var{val} and template @var{templ} for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template @var{templ} is the same as described in @url{http://www.manpagez.com/man/3/strftime/}. Most common variants are @samp{%X} for national representation of time, @samp{%x} for national representation of date, @samp{%Y} for year with century. If @var{val}=0 and/or @var{templ}="" then automatic tick step and/or template will be selected.
+Sets time labels with step @var{val} and template @var{templ} for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. The format of template @var{templ} is the same as described in @url{http://www.manpagez.com/man/3/strftime/}. Most common variants are @samp{%X} for national representation of time, @samp{%x} for national representation of date, @samp{%Y} for year with century. If @var{val}=0 and/or @var{templ}="" then automatic tick step and/or template will be selected. You can use @code{mgl_get_time}() function for obtaining number of second for given date/time string. Note, that MS Visual Studio couldn't handle date before 1970.
@end deftypefn
+ at ifclear UDAV
+ at deftypefn {C function} @code{double} mgl_get_time (@code{const char*}str, @code{const char *}templ)
+Gets number of seconds from 1970 year to specified date/time @var{str}. The format of string is specified by @var{templ}, which is the same as described in @url{http://www.manpagez.com/man/3/strftime/}. Most common variants are @samp{%X} for national representation of time, @samp{%x} for national representation of date, @samp{%Y} for year with century. Note, that MS Visual Studio couldn't handle date before 1970.
+ at end deftypefn
+ at end ifclear
+
@deftypefn {MGL command} {} tuneticks @code{val} [@code{pos=1.15}]
@ifclear UDAV
@deftypefnx {Method on @code{mglGraph}} @code{void} SetTuneTicks (@code{int} tune, @code{mreal} pos=@code{1.15})
@@ -905,7 +921,7 @@ Rotates a further plotting around vector @{@var{x}, @var{y}, @var{z}@} on angle
@deftypefnx {Method on @code{mglGraph}} @code{void} Aspect (@code{mreal} Ax, @code{mreal} Ay, @code{mreal} Az=@code{1})
@deftypefnx {C function} @code{void} mgl_aspect (@code{HMGL} gr, @code{mreal} Ax, @code{mreal} Ay, @code{mreal} Az)
@end ifclear
-Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{Ax:Ay:Az}. For the best effect it should be used after @ref{rotate} function.
+Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio @var{Ax:Ay:Az}. For the best effect it should be used after @ref{rotate} function. If @var{Ax} is @code{NAN} then function try to select optimal aspect ratio to keep equal ranges for x-y axis. At this, @var{Ay} will specify proportionality factor, or set to use automatic one if @var{Ay}=@code{NAN}.
@end deftypefn
@anchor{perspective}
@@ -979,10 +995,14 @@ Sets size of picture in pixels. This function @strong{must be} called before any
@deftypefnx {Method on @code{mglGraph}} @code{void} SetQuality (@code{int} val=@code{MGL_DRAW_NORM})
@deftypefnx {C function} @code{void} mgl_set_quality (@code{HMGL} gr, @code{int} val)
@end ifclear
-Sets quality of the plot depending on value @var{val}: @code{MGL_DRAW_WIRE=0} -- no face drawing (fastest), @code{MGL_DRAW_FAST=1} -- no color interpolation (fast), @code{MGL_DRAW_NORM=2} -- high quality (normal), @code{MGL_DRAW_NORM=3} -- high quality with 3d primitives (arrows and marks). If @code{MGL_DRAW_LMEM=0x4} is set then direct bitmap drawing is used (low memory usage).
+Sets quality of the plot depending on value @var{val}: @code{MGL_DRAW_WIRE=0} -- no face drawing (fastest), @code{MGL_DRAW_FAST=1} -- no color interpolation (fast), @code{MGL_DRAW_NORM=2} -- high quality (normal), @code{MGL_DRAW_HIGH=3} -- high quality with 3d primitives (arrows and marks). If @code{MGL_DRAW_LMEM=0x4} is set then direct bitmap drawing is used (low memory usage).
@end deftypefn
@ifclear UDAV
+ at deftypefn {Method on @code{mglGraph}} @code{int} GetQuality ()
+ at deftypefnx {C function} @code{int} mgl_get_quality (@code{HMGL} gr)
+Gets quality of the plot: @code{MGL_DRAW_WIRE=0} -- no face drawing (fastest), @code{MGL_DRAW_FAST=1} -- no color interpolation (fast), @code{MGL_DRAW_NORM=2} -- high quality (normal), @code{MGL_DRAW_HIGH=3} -- high quality with 3d primitives (arrows and marks). If @code{MGL_DRAW_LMEM=0x4} is set then direct bitmap drawing is used (low memory usage).
+ at end deftypefn
@deftypefn {Method on @code{mglGraph}} @code{void} StartGroup (const char *name)
@deftypefnx {C function} @code{void} mgl_start_group (@code{HMGL} gr, @code{const char *}name)
@@ -1011,7 +1031,7 @@ Ends group definition.
@cindex WriteFrame
@cindex WritePNG
@cindex WriteGIF
- at cindex WriteIDTF
+ at c @cindex WriteIDTF
@cindex WriteSVG
@cindex WriteBMP
@cindex WriteEPS
@@ -1025,7 +1045,7 @@ Ends group definition.
@cindex ShowImage
@end ifclear
-These functions export current view to a graphic file. The filename @var{fname} should have appropriate extension. Parameter @var{descr} gives the short description of the picture. Just now the transparency is supported in PNG, SVG, OBJ and IDTF files.
+These functions export current view to a graphic file. The filename @var{fname} should have appropriate extension. Parameter @var{descr} gives the short description of the picture. Just now the transparency is supported in PNG, SVG, OBJ and PRC files.
@anchor{write}
@deftypefn {MGL command} {} write ['fname'='']
diff --git a/texinfo/core_ru.texi b/texinfo/core_ru.texi
index 885cc9b..05463ac 100644
--- a/texinfo/core_ru.texi
+++ b/texinfo/core_ru.texi
@@ -273,6 +273,13 @@ MGL не требует создания данного типа объекто
Задает имя графика для сохранения в файл (например, в окне FLTK).
@end deftypefn
+ at ifclear UDAV
+ at deftypefn {Метод класса @code{mglGraph}} @code{const char *} GetPlotId ()
+ at deftypefnx {Функция С} @code{const char *} mgl_get_plotid (@code{HMGL} gr)
+Возвращает имя графика для сохранения в файл (например, в окне FLTK).
+ at end deftypefn
+ at end ifclear
+
@c ==================================================================
@comment @external{}
@node Cutting, Font settings, Default sizes, Graphics setup
@@ -562,10 +569,13 @@ Setsize: размер(ы) равны нулю или отрицательны
@end deftypefn
@anchor{zoomaxis}
- at deftypefn {Команда MGL} {} zoomaxis @code{x1 x2 [y1=0 y2=1 [z1=0 z2=1 [c1=0 c2=1]]]}
+ at deftypefn {Команда MGL} {} zoomaxis @code{x1 x2}
+ at deftypefnx {Команда MGL} {} zoomaxis @code{x1 y1 x2 y2}
+ at deftypefnx {Команда MGL} {} zoomaxis @code{x1 y1 z1 x2 y2 z2}
+ at deftypefnx {Команда MGL} {} zoomaxis @code{x1 y1 z1 c1 x2 y2 z2 c2}
@ifclear UDAV
@deftypefnx {Метод класса @code{mglGraph}} @code{void} ZoomAxis (@code{mglPoint} p1, @code{mglPoint} p2)
- at deftypefnx {Функция С} @code{void} mgl_zoom_axis (@code{HMGL} gr, @code{mreal} x1, @code{mreal} x2, @code{mreal} y1, @code{mreal} y2, @code{mreal} z1, @code{mreal} z2, @code{mreal} c1, @code{mreal} c2)
+ at deftypefnx {Функция С} @code{void} mgl_zoom_axis (@code{HMGL} gr, @code{mreal} x1, @code{mreal} y1, @code{mreal} z1, @code{mreal} c1, @code{mreal} x2, @code{mreal} y2, @code{mreal} z2, @code{mreal} c2)
@end ifclear
Дополнительно расширяет диапазон осей координат, задаваемый функциями @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<max/min<0.01}). Начальные значения [0, 1]. Внимание! эти настройки не могут быть переписаны никакими другими функциями, включая @code{DefaultPlotParam()}.
@end deftypefn
@@ -696,8 +706,14 @@ Ternary -- специальный тип графика для 3 зависим
@deftypefnx {Метод класса @code{mglGraph}} @code{void} SetTicksTime (@code{char} dir, @code{mreal} val, @code{const char *}templ)
@deftypefnx {Функция С} @code{void} mgl_set_ticks_time (@code{HMGL} gr, @code{mreal} val, @code{const char *}templ)
@end ifclear
-Задает метки времени с шагом @var{val} и шаблоном @var{templ} для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Формат шаблона @var{templ} такой же как @url{http://www.manpagez.com/man/3/strftime/}. Наиболее употребительные варианты: @samp{%X} для национального представления времени, @samp{%x} для национального представления даты, @samp{%Y} для года с цифрами столетия. Если @var{val}=0 и/или @var{templ}="", то используется автоматическая расстановка меток и/или выбор шаблона.
+Задает метки времени с шагом @var{val} и шаблоном @var{templ} для меток вдоль x-,y-,z-оси или colorbar. Шаблон может содержать и символы TeX. Формат шаблона @var{templ} такой же как @url{http://www.manpagez.com/man/3/strftime/}. Наиболее употребительные варианты: @samp{%X} для национального представления времени, @samp{%x} для национального представления даты, @samp{%Y} для года с цифрами столетия. Если @var{val}=0 и/или @var{templ}="", то используется автоматическая расстановка меток и/или выбор шаблона. Вы можете использовать функцию @code{mgl_get_time}() для получения числа секунд с 1970 года до указанной даты/времени. Отмечу, что MS Visual Studio не может обрабатывать даты до 1970.
+ at end deftypefn
+
+ at ifclear UDAV
+ at deftypefn {Функция С} @code{double} mgl_get_time (@code{const char*}str, @code{const char *}templ)
+Возвращает число секунд с 1970 года до даты/времени, указанной в строке @var{str}. Формат строки задается @var{templ}, такой же как @url{http://www.manpagez.com/man/3/strftime/}. Наиболее употребительные варианты: @samp{%X} для национального представления времени, @samp{%x} для национального представления даты, @samp{%Y} для года с цифрами столетия. Отмечу, что MS Visual Studio не может обрабатывать даты до 1970.
@end deftypefn
+ at end ifclear
@deftypefn {Команда MGL} {} tuneticks @code{val} [@code{pos=1.15}]
@ifclear UDAV
@@ -860,7 +876,7 @@ Ternary -- специальный тип графика для 3 зависим
@deftypefnx {Метод класса @code{mglGraph}} @code{void} Aspect (@code{mreal} Ax, @code{mreal} Ay, @code{mreal} Az=@code{1})
@deftypefnx {Функция С} @code{void} mgl_aspect (@code{HMGL} gr, @code{mreal} Ax, @code{mreal} Ay, @code{mreal} Az)
@end ifclear
-Устанавливает соотношение размеров осей в отношении @var{Ax:Ay:Az}. Для лучшего вида следует вызывать после функции @ref{rotate}.
+Устанавливает соотношение размеров осей в отношении @var{Ax:Ay:Az}. Для лучшего вида следует вызывать после функции @ref{rotate}. Если @var{Ax}=@code{NAN}, то функция выберет оптимальное соотношение размеров, чтобы шаг по осям x-y был одинаков. При этом, @var{Ay} задает фактор пропорциональности шага (обычно 1), или указывает на его автоматический выбор при @var{Ay}=@code{NAN}.
@end deftypefn
@anchor{perspective}
@@ -935,10 +951,15 @@ Ternary -- специальный тип графика для 3 зависим
@deftypefnx {Метод класса @code{mglGraph}} @code{void} SetQuality (@code{int} val=@code{MGL_DRAW_NORM})
@deftypefnx {Функция С} @code{void} mgl_set_quality (@code{HMGL} gr, @code{int} val)
@end ifclear
-Задает качество графика в зависимости от значения @var{val}: @code{MGL_DRAW_WIRE=0} -- нет рисования граней (наиболее быстрый), @code{MGL_DRAW_FAST=1} -- нет интерполяции цвета (быстрый), @code{MGL_DRAW_NORM=2} -- высокое качество (нормальный), @code{MGL_DRAW_NORM=3} -- высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит @code{MGL_DRAW_LMEM=0x4}, то происходит прямое рисование в растровое изображение (меньше затраты памяти).
+Задает качество графика в зависимости от значения @var{val}: @code{MGL_DRAW_WIRE=0} -- нет рисования граней (наиболее быстрый), @code{MGL_DRAW_FAST=1} -- нет интерполяции цвета (быстрый), @code{MGL_DRAW_NORM=2} -- высокое качество (нормальный), @code{MGL_DRAW_HIGH=3} -- высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит @code{MGL_DRAW_LMEM=0x4}, то происходит прямое рисование в растровое изображение (меньше затраты памяти).
@end deftypefn
@ifclear UDAV
+ at deftypefn {Метод класса @code{mglGraph}} @code{int} GetQuality ()
+ at deftypefnx {Функция С} @code{void} mgl_get_quality (@code{HMGL} gr)
+Возвращает качество графика: @code{MGL_DRAW_WIRE=0} -- нет рисования граней (наиболее быстрый), @code{MGL_DRAW_FAST=1} -- нет интерполяции цвета (быстрый), @code{MGL_DRAW_NORM=2} -- высокое качество (нормальный), @code{MGL_DRAW_HIGH=3} -- высокое качество с рисованием 3d примитивов (стрелок и маркеров). Если установлен бит @code{MGL_DRAW_LMEM=0x4}, то происходит прямое рисование в растровое изображение (меньше затраты памяти).
+ at end deftypefn
+
@deftypefn {Метод класса @code{mglGraph}} @code{void} StartGroup (const char *name)
@deftypefnx {Функция С} @code{void} mgl_start_group (@code{HMGL} gr, @code{const char *}name)
Начинает определение группы. Группа может содержать объекты и другие группы. Они используются для выбора части модели при приближении, изменении прозрачности и т.д.
@@ -966,7 +987,7 @@ Ternary -- специальный тип графика для 3 зависим
@cindex WriteFrame
@cindex WritePNG
@cindex WriteGIF
- at cindex WriteIDTF
+ at c @cindex WriteIDTF
@cindex WriteSVG
@cindex WriteBMP
@cindex WriteEPS
@@ -980,7 +1001,7 @@ Ternary -- специальный тип графика для 3 зависим
@cindex ShowImage
@end ifclear
-Эти функции экспортируют текущую картинку (кадр) в файл. Имя файла @var{fname} должно иметь соответствующее расширение. Параметр @var{descr} дает краткое описание картинки. Пока прозрачность поддерживается только для форматов PNG, SVG, OBJ и IDTF.
+Эти функции экспортируют текущую картинку (кадр) в файл. Имя файла @var{fname} должно иметь соответствующее расширение. Параметр @var{descr} дает краткое описание картинки. Пока прозрачность поддерживается только для форматов PNG, SVG, OBJ и PRC.
@anchor{write}
@deftypefn {Команда MGL} {} write ['fname'='']
diff --git a/texinfo/doc_en.texi b/texinfo/doc_en.texi
index a7886d5..9ca554a 100644
--- a/texinfo/doc_en.texi
+++ b/texinfo/doc_en.texi
@@ -1,6 +1,6 @@
\input texinfo
@setfilename mathgl_en.info
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MathGL @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -141,10 +141,6 @@ screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
@macro sref {arg}
@xref{\arg\}, for sample code and picture.
@end macro
- at macro tdref {nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
-
@node Website, Overview, , Top
@include web_en.texi
diff --git a/texinfo/doc_ru.texi b/texinfo/doc_ru.texi
index 94f6f49..2ce99e6 100644
--- a/texinfo/doc_ru.texi
+++ b/texinfo/doc_ru.texi
@@ -1,6 +1,6 @@
\input texinfo
@setfilename mathgl_en.info
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MathGL @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -141,11 +141,6 @@ screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
@macro sref {arg}
См. раздел @ref{\arg\}, для примеров кода и графика.
@end macro
- at macro tdref {nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
-
-
@node Website, Overview, , Top
@include web_ru.texi
diff --git a/texinfo/ex_mgl_en.texi b/texinfo/ex_mgl_en.texi
index 35d895d..5c696d4 100644
--- a/texinfo/ex_mgl_en.texi
+++ b/texinfo/ex_mgl_en.texi
@@ -952,7 +952,7 @@ area y '!'
new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
+area xc yc z 'r':area xc -yc z 'b#'
@end verbatim
@pfig{area, Example of Area()}
@@ -1852,17 +1852,26 @@ list xq -1 1 -1 1 -1 1 -1 1
list yq -1 -1 1 1 -1 -1 1 1
list zq -1 -1 -1 -1 1 1 1 1
light on
-subplot 2 1 0:title 'QuadPlot sample':rotate 50 60
+subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
quadplot q xq yq zq 'yr'
quadplot q xq yq zq '#k'
+subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
+quadplot q xq yq zq yq 'yr'
+quadplot q xq yq zq '#k'
+
list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
list xt -1 1 0 0
list yt -1 -1 1 0
list zt -1 -1 -1 1
-subplot 2 1 1:title 'TriPlot sample':rotate 50 60
+subplot 2 2 1:title 'TriPlot sample':rotate 50 60
triplot t xt yt zt 'b'
triplot t xt yt zt '#k'
+
+subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
+triplot t xt yt zt yt 'cb'
+triplot t xt yt zt '#k'
+tricont t xt yt zt 'B'
@end verbatim
@pfig{triplot, Example of TriPlot() and QuadPlot()}
@@ -2253,7 +2262,7 @@ ellipse 0 -1 1 -0.6 0.2 'm@'
light on
subplot 2 2 1:title 'Face[xyz]':rotate 50 60:box
facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'm'
+face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
subplot 2 2 3 '':title 'Cone'
cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)'
@@ -2609,7 +2618,7 @@ The standard way is to use Unicode encoding for the text output. But the MathGL
There are 3 general ways. First, the point with @code{nan} value as one of the coordinates (including color/alpha range) will never be plotted. Second, special functions define the condition when the points should be omitted (see @ref{Cutting}). Last, you may change the transparency of a part of the plot by the help of functions @ref{surfa}, @ref{surf3a} (see @ref{Dual plotting}). In last case the transparency is switched on smoothly.
@item How many people write this library?
-Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/IDTF was written mostly by M.Vidassov.
+Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
@item How can I display a bitmap on the figure?
You can import data by command @ref{import} and display it by @ref{dens} function. For example, for black-and-white bitmap you can use the code: @code{import bmp 'fname.png' 'wk':dens bmp 'wk'}.
@@ -2631,6 +2640,9 @@ Just set a negative value in @ref{ticklen}. For example, use @code{ticklen -0.1}
@item How can I prevent text rotation?
Just use @code{rotatetext off}. Also you can use axis style @samp{U} for disable only tick labels rotation.
+ at item How can I draw equal axis range even for rectangular image?
+Just use @code{aspect nan nan} for each subplot, or at the beginning of the drawing.
+
@end table
@external{}
diff --git a/texinfo/ex_mgl_ru.texi b/texinfo/ex_mgl_ru.texi
index 3e3acb2..3c9f65f 100644
--- a/texinfo/ex_mgl_ru.texi
+++ b/texinfo/ex_mgl_ru.texi
@@ -952,7 +952,7 @@ area y '!'
new yc 30 'sin(pi*x)':new xc 30 'cos(pi*x)':new z 30 'x'
subplot 2 2 3:title '3d variant':rotate 50 60:box
-area xc yc z 'r'
+area xc yc z 'r':area xc -yc z 'b#'
@end verbatim
@pfig{area, Example of Area()}
@@ -1852,17 +1852,26 @@ list xq -1 1 -1 1 -1 1 -1 1
list yq -1 -1 1 1 -1 -1 1 1
list zq -1 -1 -1 -1 1 1 1 1
light on
-subplot 2 1 0:title 'QuadPlot sample':rotate 50 60
+subplot 2 2 0:title 'QuadPlot sample':rotate 50 60
quadplot q xq yq zq 'yr'
quadplot q xq yq zq '#k'
+subplot 2 2 2:title 'QuadPlot coloring':rotate 50 60
+quadplot q xq yq zq yq 'yr'
+quadplot q xq yq zq '#k'
+
list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3
list xt -1 1 0 0
list yt -1 -1 1 0
list zt -1 -1 -1 1
-subplot 2 1 1:title 'TriPlot sample':rotate 50 60
+subplot 2 2 1:title 'TriPlot sample':rotate 50 60
triplot t xt yt zt 'b'
triplot t xt yt zt '#k'
+
+subplot 2 2 3:title 'TriPlot coloring':rotate 50 60
+triplot t xt yt zt yt 'cb'
+triplot t xt yt zt '#k'
+tricont t xt yt zt 'B'
@end verbatim
@pfig{triplot, Example of TriPlot() and QuadPlot()}
@@ -2253,7 +2262,7 @@ ellipse 0 -1 1 -0.6 0.2 'm@'
light on
subplot 2 2 1:title 'Face[xyz]':rotate 50 60:box
facex 1 0 -1 1 1 'r':facey -1 -1 -1 1 1 'g':facez 1 -1 -1 -1 1 'b'
-face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'm'
+face -1 -1 1 -1 1 1 1 -1 0 1 1 1 'bmgr'
subplot 2 2 3 '':title 'Cone'
cone -0.7 -0.3 0 -0.7 0.7 0.5 0.2 0.1 'b':text -0.7 -0.7 'no edges\n(default)'
@@ -2609,7 +2618,7 @@ The standard way is to use Unicode encoding for the text output. But the MathGL
There are 3 general ways. First, the point with @code{nan} value as one of the coordinates (including color/alpha range) will never be plotted. Second, special functions define the condition when the points should be omitted (see @ref{Cutting}). Last, you may change the transparency of a part of the plot by the help of functions @ref{surfa}, @ref{surf3a} (see @ref{Dual plotting}). In last case the transparency is switched on smoothly.
@item How many people write this library?
-Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/IDTF was written mostly by M.Vidassov.
+Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
@item How can I display a bitmap on the figure?
You can import data by command @ref{import} and display it by @ref{dens} function. For example, for black-and-white bitmap you can use the code: @code{import bmp 'fname.png' 'wk':dens bmp 'wk'}.
@@ -2623,6 +2632,9 @@ Just set a negative value in @ref{ticklen}. For example, use @code{ticklen -0.1}
@item How can I prevent text rotation?
Just use @code{rotatetext off}.
+ at item Как нарисовать одинаковые оси координат для прямоугольного (не квадратного) рисунка?
+Просто используйте @code{aspect nan nan} для каждого подграфика, или в начале рисования.
+
@end table
@external{}
diff --git a/texinfo/example_en.texi b/texinfo/example_en.texi
index 97541b4..316d42e 100644
--- a/texinfo/example_en.texi
+++ b/texinfo/example_en.texi
@@ -102,6 +102,7 @@ Let me consider the aforesaid in more detail.
* Drawing in memory::
* Using QMathGL::
* MathGL and PyQt::
+* MathGL and MPI::
@end menu
@@ -460,7 +461,7 @@ int main(int argc,char **argv)
@c ------------------------------------------------------------------
@c @external{}
- at node MathGL and PyQt, , Using QMathGL, Basic usage
+ at node MathGL and PyQt, MathGL and MPI, Using QMathGL, Basic usage
@subsection MathGL and PyQt
Generally SWIG based classes (including the Python one) are the same as C++ classes. However, there are few tips for using MathGL with PyQt. Below I place a very simple python code which demonstrate how MathGL can be used with PyQt. This code is mostly written by Prof. Dr. Heino Falcke. You can just copy it to a file @code{mgl-pyqt-test.py} and execute it from python shell by command @code{execfile("mgl-pyqt-test.py")}
@@ -532,6 +533,84 @@ qw.raise_()
@c ------------------------------------------------------------------
+ at c @external{}
+ at node MathGL and MPI, , MathGL and PyQt, , Basic usage
+ at subsection MathGL and MPI
+
+For using MathGL in MPI program you just need to: (1) plot its own part of data for each running node; (2) collect resulting graphical information in a single program (for example, at node with rank=0); (3) save it. The sample code below demonstrate this for very simple sample of surface drawing.
+
+First you need to initialize MPI
+ at verbatim
+#include <stdio.h>
+#include <mgl2/mgl.h>
+#include <mpi.h>
+
+int main(int argc, char *argv[])
+{
+ // initialize MPI
+ int rank=0, numproc=1;
+ MPI_Init(&argc, &argv);
+ MPI_Comm_size(MPI_COMM_WORLD,&numproc);
+ MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+ if(rank==0) printf("Use %d processes.\n", numproc);
+ at end verbatim
+
+Next step is data creation. For simplicity, I create data arrays with the same sizes for all nodes. At this, you have to create @code{mglGraph} object too.
+
+ at verbatim
+ // initialize data similarly for all nodes
+ mglData a(128,256);
+ mglGraph gr;
+ at end verbatim
+
+Now, data should be filled by numbers. In real case, it should be some kind of calculations. But I just fill it by formula.
+
+ at verbatim
+ // do the same plot for its own range
+ char buf[64];
+ sprintf(buf,"xrange %g %g",2.*rank/numproc-1,2.*(rank+1)/numproc-1);
+ gr.Fill(a,"sin(2*pi*x)",buf);
+ at end verbatim
+
+It is time to plot the data. Don't forget to set proper axis range(s) by using parametric form or by using options (as in the sample).
+
+ at verbatim
+ // plot data in each node
+ gr.Clf(); // clear image before making the image
+ gr.Rotate(40,60);
+ gr.Surf(a,"",buf);
+ at end verbatim
+
+Finally, let send graphical information to node with rank=0.
+
+ at verbatim
+ // collect information
+ if(rank!=0) gr.MPI_Send(0);
+ else for(int i=1;i<numproc;i++) gr.MPI_Recv(i);
+ at end verbatim
+
+Now, node with rank=0 have whole image. It is time to save the image to a file. Also, you can add a kind of annotations here -- I draw axis and bounding box in the sample.
+
+ at verbatim
+ if(rank==0)
+ {
+ gr.Box(); gr.Axis(); // some post processing
+ gr.WritePNG("test.png"); // save result
+ }
+ at end verbatim
+
+In my case the program is done, and I finalize MPI. In real program, you can repeat the loop of data calculation and data plotting as many times as you need.
+
+ at verbatim
+ MPI_Finalize();
+ return 0;
+}
+ at end verbatim
+
+You can type @samp{mpic++ test.cpp -lmgl && mpirun -np 8 ./a.out} for compilation and running the sample program on 8 nodes. Note, that you have to set enable-mpi=ON at MathGL configure to use this feature.
+
+
+ at c ------------------------------------------------------------------
@external{}
@node Advanced usage, Data handling, Basic usage, Examples
@section Advanced usage
@@ -1590,6 +1669,7 @@ int sample(mglGraph *gr)
mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
gr->Area(xc,yc,z,"r");
+ yc.Modify("-sin(pi*(2*x-1))"); gr->Area(xc,yc,z,"b#");
return 0;
}
@end verbatim
@@ -2734,16 +2814,23 @@ int sample(mglGraph *gr)
mreal xc[] = {-1,1,-1,1,-1,1,-1,1}, yc[] = {-1,-1,1,1,-1,-1,1,1}, zc[] = {-1,-1,-1,-1,1,1,1,1};
mglData qq(6,4,q), xx(8,xc), yy(8,yc), zz(8,zc);
gr->Light(true); //gr->Alpha(true);
- gr->SubPlot(2,1,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
gr->QuadPlot(qq,xx,yy,zz,"yr");
gr->QuadPlot(qq,xx,yy,zz,"k#");
+ gr->SubPlot(2,2,2); gr->Title("QuadPlot coloring"); gr->Rotate(50,60);
+ gr->QuadPlot(qq,xx,yy,zz,yy,"yr");
+ gr->QuadPlot(qq,xx,yy,zz,"k#");
mreal t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
mreal xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->SubPlot(2,1,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
gr->TriPlot(tt,uu,vv,ww,"b");
gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->SubPlot(2,2,3); gr->Title("TriPlot coloring"); gr->Rotate(50,60);
+ gr->TriPlot(tt,uu,vv,ww,vv,"cb");
+ gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->TriCont(tt,uu,vv,ww,"B");
return 0;
}
@end verbatim
@@ -3756,7 +3843,7 @@ Note, that you have to make import library(-ies) *.lib for provided binary *.dll
Generally, it is the same procedure as for Linux or MacOS -- see section @ref{Installation}. The simplest way is using the combination CMake+MinGW. Also you may need some extra libraries like GSL, PNG, JPEG and so on. All of them can be found at @url{http://gnuwin32.sourceforge.net/packages.html}. After installing all components, just run @uref{http://www.cmake.org/cmake/help/runningcmake.html, cmake-gui} configurator and build the MathGL itself.
@item How many people write this library?
-Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/IDTF was written mostly by M.Vidassov.
+Most of the library was written by one person. This is a result of nearly a year of work (mostly in the evening and on holidays): I spent half a year to write the kernel and half a year to a year on extending, improving the library and writing documentation. This process continues now :). The build system (cmake files) was written mostly by D.Kulagin, and the export to PRC/PDF was written mostly by M.Vidassov.
@item How can I display a bitmap on the figure?
You can import data into a @code{mglData} instance by function @ref{import} and display it by @ref{dens} function. For example, for black-and-white bitmap you can use the code: @code{mglData bmp; bmp.Import("fname.png","wk"); gr->Dens(bmp,"wk");}.
@@ -3788,6 +3875,10 @@ Just use @code{SetRotatedText(false)}. Also you can use axis style @samp{U} for
@item What is @code{*.so}? What is @code{gcc}? How I can use @code{make}?
They are standard GNU tools. There is special FAQ about its usage under Windows -- @uref{http://www.mingw.org/wiki/FAQ}.
+ at item How can I draw equal axis range even for rectangular image?
+Just use @code{Aspect(NAN,NAN)} for each subplot, or at the beginning of the drawing.
+
+
@end table
@external{}
diff --git a/texinfo/example_ru.texi b/texinfo/example_ru.texi
index e8445e4..f655354 100644
--- a/texinfo/example_ru.texi
+++ b/texinfo/example_ru.texi
@@ -102,6 +102,7 @@ Let me consider the aforesaid in more detail.
* Drawing in memory::
* Using QMathGL::
* MathGL and PyQt::
+* MathGL and MPI::
@end menu
@@ -460,7 +461,7 @@ int main(int argc,char **argv)
@c ------------------------------------------------------------------
@c @external{}
- at node MathGL and PyQt, , Using QMathGL, Basic usage
+ at node MathGL and PyQt, MathGL and MPI, Using QMathGL, Basic usage
@subsection MathGL and PyQt
Generally SWIG based classes (including the Python one) are the same as C++ classes. However, there are few tips for using MathGL with PyQt. Below I place a very simple python code which demonstrate how MathGL can be used with PyQt. This code is mostly written by Prof. Dr. Heino Falcke. You can just copy it to a file @code{mgl-pyqt-test.py} and execute it from python shell by command @code{execfile("mgl-pyqt-test.py")}
@@ -531,6 +532,84 @@ qw.raise_()
@end verbatim
+
+ at c ------------------------------------------------------------------
+ at c @external{}
+ at node MathGL and MPI, , MathGL and PyQt, , Basic usage
+ at subsection MathGL and MPI
+
+For using MathGL in MPI program you just need to: (1) plot its own part of data for each running node; (2) collect resulting graphical information in a single program (for example, at node with rank=0); (3) save it. The sample code below demonstrate this for very simple sample of surface drawing.
+
+First you need to initialize MPI
+ at verbatim
+#include <stdio.h>
+#include <mgl2/mgl.h>
+#include <mpi.h>
+
+int main(int argc, char *argv[])
+{
+ // initialize MPI
+ int rank=0, numproc=1;
+ MPI_Init(&argc, &argv);
+ MPI_Comm_size(MPI_COMM_WORLD,&numproc);
+ MPI_Comm_rank(MPI_COMM_WORLD,&rank);
+ if(rank==0) printf("Use %d processes.\n", numproc);
+ at end verbatim
+
+Next step is data creation. For simplicity, I create data arrays with the same sizes for all nodes. At this, you have to create @code{mglGraph} object too.
+
+ at verbatim
+ // initialize data similarly for all nodes
+ mglData a(128,256);
+ mglGraph gr;
+ at end verbatim
+
+Now, data should be filled by numbers. In real case, it should be some kind of calculations. But I just fill it by formula.
+
+ at verbatim
+ // do the same plot for its own range
+ char buf[64];
+ sprintf(buf,"xrange %g %g",2.*rank/numproc-1,2.*(rank+1)/numproc-1);
+ gr.Fill(a,"sin(2*pi*x)",buf);
+ at end verbatim
+
+It is time to plot the data. Don't forget to set proper axis range(s) by using parametric form or by using options (as in the sample).
+
+ at verbatim
+ // plot data in each node
+ gr.Clf(); // clear image before making the image
+ gr.Rotate(40,60);
+ gr.Surf(a,"",buf);
+ at end verbatim
+
+Finally, let send graphical information to node with rank=0.
+
+ at verbatim
+ // collect information
+ if(rank!=0) gr.MPI_Send(0);
+ else for(int i=1;i<numproc;i++) gr.MPI_Recv(i);
+ at end verbatim
+
+Now, node with rank=0 have whole image. It is time to save the image to a file. Also, you can add a kind of annotations here -- I draw axis and bounding box in the sample.
+
+ at verbatim
+ if(rank==0)
+ {
+ gr.Box(); gr.Axis(); // some post processing
+ gr.WritePNG("test.png"); // save result
+ }
+ at end verbatim
+
+In my case the program is done, and I finalize MPI. In real program, you can repeat the loop of data calculation and data plotting as many times as you need.
+
+ at verbatim
+ MPI_Finalize();
+ return 0;
+}
+ at end verbatim
+
+You can type @samp{mpic++ test.cpp -lmgl && mpirun -np 8 ./a.out} for compilation and running the sample program on 8 nodes. Note, that you have to set enable-mpi=ON at MathGL configure to use this feature.
+
@c ------------------------------------------------------------------
@external{}
@node Advanced usage, Data handling, Basic usage, Examples
@@ -1589,6 +1668,7 @@ int sample(mglGraph *gr)
mglData yc(30), xc(30), z(30); z.Modify("2*x-1");
yc.Modify("sin(pi*(2*x-1))"); xc.Modify("cos(pi*2*x-pi)");
gr->Area(xc,yc,z,"r");
+ yc.Modify("-sin(pi*(2*x-1))"); gr->Area(xc,yc,z,"b#");
return 0;
}
@end verbatim
@@ -2733,16 +2813,23 @@ int sample(mglGraph *gr)
mreal xc[] = {-1,1,-1,1,-1,1,-1,1}, yc[] = {-1,-1,1,1,-1,-1,1,1}, zc[] = {-1,-1,-1,-1,1,1,1,1};
mglData qq(6,4,q), xx(8,xc), yy(8,yc), zz(8,zc);
gr->Light(true); //gr->Alpha(true);
- gr->SubPlot(2,1,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,0); gr->Title("QuadPlot sample"); gr->Rotate(50,60);
gr->QuadPlot(qq,xx,yy,zz,"yr");
gr->QuadPlot(qq,xx,yy,zz,"k#");
+ gr->SubPlot(2,2,2); gr->Title("QuadPlot coloring"); gr->Rotate(50,60);
+ gr->QuadPlot(qq,xx,yy,zz,yy,"yr");
+ gr->QuadPlot(qq,xx,yy,zz,"k#");
mreal t[] = {0,1,2, 0,1,3, 0,2,3, 1,2,3};
mreal xt[] = {-1,1,0,0}, yt[] = {-1,-1,1,0}, zt[] = {-1,-1,-1,1};
mglData tt(4,3,t), uu(4,xt), vv(4,yt), ww(4,zt);
- gr->SubPlot(2,1,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
+ gr->SubPlot(2,2,1); gr->Title("TriPlot sample"); gr->Rotate(50,60);
gr->TriPlot(tt,uu,vv,ww,"b");
gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->SubPlot(2,2,3); gr->Title("TriPlot coloring"); gr->Rotate(50,60);
+ gr->TriPlot(tt,uu,vv,ww,vv,"cb");
+ gr->TriPlot(tt,uu,vv,ww,"k#");
+ gr->TriCont(tt,uu,vv,ww,"B");
return 0;
}
@end verbatim
@@ -3825,7 +3912,7 @@ int main (int argc, char ** argv)
@end verbatim
@item Сколько человек участвовало в создании библиотеки?
-Большую часть библиотеки написал один человек. Это результат примерно года работы на написание ядра библиотеки и базовых функций (в основном вечерами и по выходным). Процесс усовершенствования продолжается и теперь :). Скрипты сборки в основном написаны Д.Кулагиным, а экспорт в IDTF написан М.Видассовым.
+Большую часть библиотеки написал один человек. Это результат примерно года работы на написание ядра библиотеки и базовых функций (в основном вечерами и по выходным). Процесс усовершенствования продолжается и теперь :). Скрипты сборки в основном написаны Д.Кулагиным, а экспорт в PRC/PDF написан М.Видассовым.
@item Как мне показать растровую картинку на рисунке?
Можно импортировать ее в экземпляр @code{mglData} и построить с помощью функции @code{Dens()}. Например, для черно-белого рисунка можно использовать код: @code{mglData bmp; bmp.Import("fname.png","wk"); gr->Dens(bmp,"wk");}.
@@ -3850,6 +3937,9 @@ int main (int argc, char ** argv)
@item Как нарисовать метки оси снаружи от графика?
Просто используйте отрицательные значения длины меток, например @code{gr->SetTickLen(-0.1);}.
+ at item Как нарисовать одинаковые оси координат для прямоугольного (не квадратного) рисунка?
+Просто используйте @code{Aspect(NAN,NAN)} для каждого подграфика, или в начале рисования.
+
@end table
@external{}
diff --git a/texinfo/index.html b/texinfo/index.html
index a3126ed..3d48f35 100644
--- a/texinfo/index.html
+++ b/texinfo/index.html
@@ -6,7 +6,7 @@
<frame src="title.html">
<frameset cols="150,*" frameborder="0" noresize>
<frame name="toc" src="toc_en.html">
- <frame name="main" src="web_en/web_en_1.html">
+ <frame name="main" src="doc_en/doc_en_2.html">
</frameset>
</frameset>
</html>
diff --git a/texinfo/mathgl.js b/texinfo/mathgl.js
index a0952e9..99d1037 100644
--- a/texinfo/mathgl.js
+++ b/texinfo/mathgl.js
@@ -194,9 +194,17 @@ var mgl_draw_fast = function(obj, ctx, skip)
var i,n1;
for(var i=0;i<obj.nprim;i++) // for each primitive
{
- var n1 = obj.prim[i][1];
+ var n1 = obj.prim[i][1], n2 = obj.prim[i][2];
ctx.fillStyle = obj.prim[i][10];
- ctx.fillRect(obj.pp[n1][0], obj.pp[n1][1], 1, 1);
+ ctx.fillRect(obj.pp[n1][0], obj.pp[n1][1], 2, 2);
+ if(obj.prim[i][0]==1)
+ {
+ ctx.beginPath();
+ ctx.moveTo(obj.pp[n1][0],obj.pp[n1][1]);
+ ctx.lineTo(obj.pp[n2][0],obj.pp[n2][1]);
+ ctx.lineWidth = obj.prim[i][7];
+ ctx.stroke();
+ }
}
obj.fast = 0;
}
diff --git a/texinfo/mathgl_en.texi b/texinfo/mathgl_en.texi
index 113c3a4..54a5341 100644
--- a/texinfo/mathgl_en.texi
+++ b/texinfo/mathgl_en.texi
@@ -1,6 +1,6 @@
\input texinfo
@setfilename mathgl_en.info
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MathGL @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -100,10 +100,6 @@ This file documents the Mathematical Graphic Library (MathGL), a collection of c
@macro sref {arg}
@xref{\arg\}, for sample code and picture.
@end macro
- at macro tdref {nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
-
@node Overview, Examples, , Top
@include overview_en.texi
diff --git a/texinfo/mathgl_ru.texi b/texinfo/mathgl_ru.texi
index ef6d152..5c9f5f0 100644
--- a/texinfo/mathgl_ru.texi
+++ b/texinfo/mathgl_ru.texi
@@ -2,7 +2,7 @@
@setfilename mathgl_ru.info
@c @documentlanguage ru
@documentencoding UTF-8
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MathGL @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -102,10 +102,6 @@
@macro sref {arg}
См. раздел @ref{\arg\}, для примеров кода и графика.
@end macro
- at macro tdref {nam}
- at uref{http://mathgl.sourceforge.net/pdf_u3d/\nam\.pdf, 3D pdf}
- at end macro
-
@node Overview, Examples, , Top
@include overview_ru.texi
diff --git a/texinfo/mgl_en.texi b/texinfo/mgl_en.texi
index 27028c9..f52a6a3 100644
--- a/texinfo/mgl_en.texi
+++ b/texinfo/mgl_en.texi
@@ -1,6 +1,6 @@
\input texinfo
@setfilename mgl_en.info
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MGL script language for version @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -82,8 +82,6 @@ This file documents the MGL script language. It corresponds to release @value{VE
@macro sref {arg}
@xref{\arg\}, for sample code and picture.
@end macro
- at macro tdref {nam}
- at end macro
@set UDAV
diff --git a/texinfo/mgl_ru.texi b/texinfo/mgl_ru.texi
index 5454c09..dbeead7 100644
--- a/texinfo/mgl_ru.texi
+++ b/texinfo/mgl_ru.texi
@@ -2,7 +2,7 @@
@setfilename mgl_ru.info
@c @documentlanguage ru
@documentencoding UTF-8
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle Язык MGL для версии @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -84,8 +84,6 @@
@macro sref {arg}
См. @ref{\arg\}, для примеров кода и графика.
@end macro
- at macro tdref {nam}
- at end macro
@set UDAV
@c @node Overview, Examples, , Top
diff --git a/texinfo/mglview.1 b/texinfo/mglview.1
index ae7d0f0..e8d0722 100644
--- a/texinfo/mglview.1
+++ b/texinfo/mglview.1
@@ -33,4 +33,5 @@ Print help message.
mglview was written by Alexey Balakin, http://mathgl.sourceforge.net/
.SH "SEE ALSO"
.BR mglconv (1),
+.BR udav (1),
.BR mgl (5)
diff --git a/texinfo/parse_en.texi b/texinfo/parse_en.texi
index 2dd387b..4e353f2 100644
--- a/texinfo/parse_en.texi
+++ b/texinfo/parse_en.texi
@@ -35,7 +35,7 @@ If string contain references to external parameters (substrings @samp{$0}, @samp
Argument can be a string, a variable (data arrays) or a number (scalars).
@itemize @bullet
@item
-The string is any symbols between ordinary marks @samp{'}. Long strings can be concatenated from several lines by @samp{\} symbol. I.e. the string @samp{'a +'\<br>' b'} will give string @samp{'a + b'} (here @samp{<br>} is newline).
+The string is any symbols between ordinary marks @samp{'}. Long strings can be concatenated from several lines by @samp{\} symbol. I.e. the string @samp{'a +'\<br>' b'} will give string @samp{'a + b'} (here @samp{<br>} is newline). Also you can concatenate strings and numbers using @samp{,} with out spaces (for example, @samp{'max(u)=',u.max,' a.u.'}).
@item
Usually variable have a name which is arbitrary combination of symbols (except spaces and @samp{'}) started from a letter and with length less than 64. A temporary array can be used as variable:
diff --git a/texinfo/parse_ru.texi b/texinfo/parse_ru.texi
index 4b1705d..b7d0817 100644
--- a/texinfo/parse_ru.texi
+++ b/texinfo/parse_ru.texi
@@ -37,7 +37,7 @@ MathGL library supports the simplest scripts for data handling and plotting. The
Аргументы команды могут быть строками, переменными или числами.
@itemize @bullet
@item
-Строка -- произвольный набор символов между метками @samp{'}. Длинные строки могут быть соединены из нескольких линий файла символом @samp{\}. Т.е. строки файла @samp{'a +'\<br>' b'} дадут строку @samp{'a + b'} (здесь @samp{<br>} -- перевод строки).
+Строка -- произвольный набор символов между метками @samp{'}. Длинные строки могут быть соединены из нескольких линий файла символом @samp{\}. Т.е. строки файла @samp{'a +'\<br>' b'} дадут строку @samp{'a + b'} (здесь @samp{<br>} -- перевод строки). Также можно использовать соединение строк и чисел, используя символ @samp{,} без пробелов (например, @samp{'max(u)=',u.max,' a.u.'}).
@item
Обычно переменная имеет имя, состоящее из букв и чисел (должно начинаться с буквы и не быть длиннее 64 символов). В качестве переменной можно использовать временные массивы, включающие в себя:
diff --git a/texinfo/test.html b/texinfo/test.html
deleted file mode 100644
index 37da28c..0000000
--- a/texinfo/test.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-
-<head>
- <script type="text/javascript" src="mathgl.js"></script>
-</head>
-
-<body onload="main();">
- <center>
- <canvas id="canvas" width="640" height="480"
- style="border:1px solid #d3d3d3;" onmousemove="mglMouseMove()"
- onmousedown="mglMouseDown()" onmouseup="mglMouseUp()"
- onmouseout="mglMouseUp()" onmousewheel="mglMouseWheel()"></canvas>
- </center>
-</body>
-
-</html>
diff --git a/texinfo/toc_en.html b/texinfo/toc_en.html
index 0e0ddd6..b5237ee 100644
--- a/texinfo/toc_en.html
+++ b/texinfo/toc_en.html
@@ -5,16 +5,14 @@
<title>MathGL 2.0</title>
</head><body>
-<a target="main" href="web_en/web_en_1.html"><b>Main page</b></a></p>
-<a target="main" href="web_en/web_en_2.html"><b>News</b></a></p>
-<a target="main" href="web_en/web_en_3.html"><b>Features</b></a></p>
-<a target="main" href="web_en/web_en_4.html"><b>Pictures</b></a></p>
+<a target="main" href="doc_en/doc_en_2.html"><b>Main page</b></a></p>
+<a target="main" href="doc_en/doc_en_3.html"><b>News</b></a></p>
+<a target="main" href="doc_en/doc_en_4.html"><b>Features</b></a></p>
+<a target="main" href="doc_en/doc_en_5.html"><b>Pictures</b></a></p>
<a target="main" href="json.html"><b>JS samples</b></a></p>
-<a target="main" href="web_en/web_en_5.html"><b>MGL scripts</b></a></p>
-<a target="main" href="web_en/web_en_6.html"><b>Download</b></a></p>
-<a target="main" href="doc_en/doc_en.html"><b>Documentation</b></a></p>
-<a target="main" href="json.html"><b>JavaScript</b></a></p>
-<a target="main" href="web_en/web_en_8.html"><b>Other projects</b></a></p>
+<a target="main" href="doc_en/doc_en_6.html"><b>Download</b></a></p>
+<a target="main" href="doc_en/doc_en_toc.html"><b>Documentation</b></a></p>
+<a target="main" href="doc_en/doc_en_7.html"><b>Other projects</b></a></p>
<hr style="width: 100%; height: 1px;">
<g:plusone></g:plusone>
diff --git a/texinfo/toc_fr.html b/texinfo/toc_fr.html
index 64bf57c..a0e2556 100644
--- a/texinfo/toc_fr.html
+++ b/texinfo/toc_fr.html
@@ -5,16 +5,14 @@
<title>MathGL 2.0</title>
</head><body>
-<a target="main" href="web_en/web_en_1.html"><b>Main page</b></a></p>
-<a target="main" href="web_en/web_en_2.html"><b>News</b></a></p>
-<a target="main" href="web_en/web_en_3.html"><b>Features</b></a></p>
-<a target="main" href="web_en/web_en_4.html"><b>Pictures</b></a></p>
+<a target="main" href="doc_en/doc_en_2.html"><b>Main page</b></a></p>
+<a target="main" href="doc_en/doc_en_3.html"><b>News</b></a></p>
+<a target="main" href="doc_en/doc_en_4.html"><b>Features</b></a></p>
+<a target="main" href="doc_en/doc_en_5.html"><b>Pictures</b></a></p>
<a target="main" href="json.html"><b>JS samples</b></a></p>
-<a target="main" href="web_en/web_en_5.html"><b>MGL scripts</b></a></p>
-<a target="main" href="web_en/web_en_6.html"><b>Download</b></a></p>
-<a target="main" href="doc_en/doc_en.html"><b>Documentation</b></a></p>
-<a target="main" href="json.html"><b>JavaScript</b></a></p>
-<a target="main" href="web_en/web_en_8.html"><b>Other projects</b></a></p>
+<a target="main" href="doc_en/doc_en_6.html"><b>Download</b></a></p>
+<a target="main" href="doc_en/doc_en_toc.html"><b>Documentation</b></a></p>
+<a target="main" href="doc_en/doc_en_7.html"><b>Other projects</b></a></p>
<hr style="width: 100%; height: 1px;">
<g:plusone></g:plusone>
diff --git a/texinfo/toc_ru.html b/texinfo/toc_ru.html
index ad69d01..9722049 100644
--- a/texinfo/toc_ru.html
+++ b/texinfo/toc_ru.html
@@ -5,16 +5,24 @@
<title>MathGL 2.0</title>
</head><body>
-<a target="main" href="web_ru/web_ru_1.html"><b>Main page</b></a></p>
-<a target="main" href="web_ru/web_ru_2.html"><b>Новости</b></a></p>
-<a target="main" href="web_ru/web_ru_3.html"><b>Возможности</b></a></p>
-<a target="main" href="web_ru/web_ru_4.html"><b>Примеры</b></a></p>
+<a target="main" href="doc_en/doc_en_2.html"><b>Main page</b></a></p>
+<a target="main" href="doc_en/doc_en_3.html"><b>News</b></a></p>
+<a target="main" href="doc_en/doc_en_4.html"><b>Features</b></a></p>
+<a target="main" href="doc_en/doc_en_5.html"><b>Pictures</b></a></p>
+<a target="main" href="json.html"><b>JS samples</b></a></p>
+<a target="main" href="doc_en/doc_en_6.html"><b>Download</b></a></p>
+<a target="main" href="doc_en/doc_en_toc.html"><b>Documentation</b></a></p>
+<a target="main" href="doc_en/doc_en_7.html"><b>Other projects</b></a></p>
+
+
+<a target="main" href="doc_ru/doc_ru_2.html"><b>Main page</b></a></p>
+<a target="main" href="doc_ru/doc_ru_3.html"><b>Новости</b></a></p>
+<a target="main" href="doc_ru/doc_ru_4.html"><b>Возможности</b></a></p>
+<a target="main" href="doc_ru/doc_ru_5.html"><b>Примеры</b></a></p>
<a target="main" href="json.html"><b>JS примеры</b></a></p>
-<a target="main" href="web_ru/web_ru_5.html"><b>Скрипты MGL</b></a></p>
-<a target="main" href="web_ru/web_ru_6.html"><b>Загрузка</b></a></p>
-<a target="main" href="doc_ru/doc_ru.html"><b>Документация</b></a></p>
-<a target="main" href="json.html"><b>JavaScript</b></a></p>
-<a target="main" href="web_ru/web_ru_8.html"><b>Другие проекты</b></a></p>
+<a target="main" href="doc_ru/doc_ru_6.html"><b>Загрузка</b></a></p>
+<a target="main" href="doc_ru/doc_ru_toc.html"><b>Документация</b></a></p>
+<a target="main" href="doc_ru/doc_ru_7.html"><b>Другие проекты</b></a></p>
<hr style="width: 100%; height: 1px;">
<g:plusone></g:plusone>
diff --git a/texinfo/udav.1 b/texinfo/udav.1
new file mode 100644
index 0000000..5598f5c
--- /dev/null
+++ b/texinfo/udav.1
@@ -0,0 +1,20 @@
+.\" Process this file with
+.\" groff -man -Tascii udav.1
+.\"
+.TH UDAV 1 "MARCH 2012" MathGL "User Manuals"
+.SH NAME
+udav \- program for data visualization based on MathGL library
+.SH SYNOPSIS
+.B udav
+[scriptfile]
+.SH DESCRIPTION
+.B udav
+reads MGL scripts from
+.I scriptfile
+to produce plots of specified functions or data. The program will create a GUI window which show the script result and allow to edit the script itself.
+.SH AUTHOR
+mglview was written by Alexey Balakin, http://mathgl.sourceforge.net/
+.SH "SEE ALSO"
+.BR mglview (1),
+.BR mglconv (1),
+.BR mgl (5)
diff --git a/texinfo/version_hist.txt b/texinfo/version_hist.txt
index 92771aa..b43e928 100644
--- a/texinfo/version_hist.txt
+++ b/texinfo/version_hist.txt
@@ -1,5 +1,13 @@
+2.1.2 Released 28 January 2013
+2.1.1 Released 24 December 2012
+2.1 Released 13 December 2012
+2.0.3 Released 27 July 2012
+2.0.2 Released 24 May 2012
+2.0.1 Released 23 May 2012
+2.0 Released 12 April 2012
2.0.b Released 23 August 2011
+1.11.3 Released 23 November 2012
1.11.2 Released 30 May 2011
1.11.1 Released 28 March 2011
1.11 Released 8 November 2010
@@ -26,6 +34,7 @@
1.2 Released 10 September 2007
1.1 Released 23 May 2007
1.0 Released 2 April 2007
+
0.9 Last beta version of the MathGL library. Released 2 March 2007
0.8.1 Released 19 Febriary 2007
0.8.0 First public release (24 January 2007)
diff --git a/texinfo/web_en.texi b/texinfo/web_en.texi
index 9ac8a8f..de7138d 100644
--- a/texinfo/web_en.texi
+++ b/texinfo/web_en.texi
@@ -48,7 +48,7 @@ Generally MathGL is GPL library. However, you can use LGPL license for MathGL co
@strong{Latest news}
@itemize
- at item @emph{24 December 2012.}
+ at item @emph{28 January 2013.}
New version (v. at value{VERSION}) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements, which denoted @ref{News, here}.
@item @emph{13 December 2012.}
New version (v.2.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new plots, advanced color schemes, @uref{../json.html, JavaScript drawing}, and many other improvements in both MathGL core and UDAV, which partially denoted @ref{News, here}. Note, there are @strong{incompatible with v.2.0.* changes} in the arguments of some functions.
@@ -71,6 +71,21 @@ Javascript interface was developed with support of @url{www.datadvance.net, $DAT
@itemize
@item
+ at strong{28 January 2013.}
+New version (v.2.1.2) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements:
+ at itemize @bullet
+ at item Exclude "local" functions from resulting library.
+ at item String in MGL script now can be concatenated with another string or data/numbers (like @samp{'max(u)=',u.max,' a.u.'}).
+ at item Bugfix for colors in 3D PDF.
+ at item Bugfix for drawing in MPI mode.
+ at item If Aspect() function have NAN argument(s) then it try to select optimal aspect ratio.
+ at item Option 'size' in Legend() now change only text size (not mark size).
+ at item Option 'meshnum' now influence on Boxs() and Belt() functions
+ at item Adjust marks drawing (line width and dots).
+ at item Minor improvements and bugfixes.
+ at end itemize
+
+ at item
@strong{24 December 2012.}
New version (v.2.1.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements:
@itemize @bullet
@@ -260,7 +275,7 @@ and so on. See also @ref{Extra samples}.
In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in the new version.
-I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in IDTF format which can be converted into U3D.
+I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in PRC format.
All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string. Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function @code{setlocale()}) and UTF-16 encoding are supported.
diff --git a/texinfo/web_fr.texi b/texinfo/web_fr.texi
index 6ee71eb..8120720 100644
--- a/texinfo/web_fr.texi
+++ b/texinfo/web_fr.texi
@@ -1,6 +1,6 @@
\input texinfo
@setfilename mgl_web_en.info
- at set VERSION 2.1.1
+ at set VERSION 2.1.2
@settitle MathGL @value{VERSION}
@syncodeindex pg cp
@comment %**end of header
@@ -323,7 +323,7 @@ and so on. See also @ref{Extra samples}.
In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in the new version.
-I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in IDTF format which can be converted into U3D.
+I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in PRC format.
All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string. Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function @code{setlocale()}) and UTF-16 encoding are supported.
diff --git a/texinfo/web_ru.texi b/texinfo/web_ru.texi
index c694eba..de7138d 100644
--- a/texinfo/web_ru.texi
+++ b/texinfo/web_ru.texi
@@ -48,7 +48,7 @@ Generally MathGL is GPL library. However, you can use LGPL license for MathGL co
@strong{Latest news}
@itemize
- at item @emph{24 December 2012.}
+ at item @emph{28 January 2013.}
New version (v. at value{VERSION}) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements, which denoted @ref{News, here}.
@item @emph{13 December 2012.}
New version (v.2.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are new plots, advanced color schemes, @uref{../json.html, JavaScript drawing}, and many other improvements in both MathGL core and UDAV, which partially denoted @ref{News, here}. Note, there are @strong{incompatible with v.2.0.* changes} in the arguments of some functions.
@@ -70,8 +70,21 @@ Javascript interface was developed with support of @url{www.datadvance.net, $DAT
@section News
@itemize
+ at item
+ at strong{28 January 2013.}
+New version (v.2.1.2) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements:
+ at itemize @bullet
+ at item Exclude "local" functions from resulting library.
+ at item String in MGL script now can be concatenated with another string or data/numbers (like @samp{'max(u)=',u.max,' a.u.'}).
+ at item Bugfix for colors in 3D PDF.
+ at item Bugfix for drawing in MPI mode.
+ at item If Aspect() function have NAN argument(s) then it try to select optimal aspect ratio.
+ at item Option 'size' in Legend() now change only text size (not mark size).
+ at item Option 'meshnum' now influence on Boxs() and Belt() functions
+ at item Adjust marks drawing (line width and dots).
+ at item Minor improvements and bugfixes.
+ at end itemize
- at itemize
@item
@strong{24 December 2012.}
New version (v.2.1.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are minor bugfixes and improvements:
@@ -262,7 +275,7 @@ and so on. See also @ref{Extra samples}.
In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in the new version.
-I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in IDTF format which can be converted into U3D.
+I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or in PRC format.
All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string. Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function @code{setlocale()}) and UTF-16 encoding are supported.
diff --git a/texinfo/widget_en.texi b/texinfo/widget_en.texi
index 2e03096..9880938 100644
--- a/texinfo/widget_en.texi
+++ b/texinfo/widget_en.texi
@@ -68,57 +68,62 @@ Set callback function @code{func} which will be called on mouse click.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ToggleAlpha ()
- at deftypefnx {C function} @code{int} mgl_wnd_toggle_alpha (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_toggle_alpha (@code{HMGL} gr)
Switch on/off transparency but do not overwrite switches in user drawing function.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ToggleLight ()
- at deftypefnx {C function} @code{int} mgl_wnd_toggle_light (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_toggle_light (@code{HMGL} gr)
Switch on/off lighting but do not overwrite switches in user drawing function.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ToggleRotate ()
- at deftypefnx {C function} @code{int} mgl_wnd_toggle_rotate (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_toggle_rotate (@code{HMGL} gr)
Switch on/off rotation by mouse. Usually, left button is used for rotation, middle button for shift, right button for zoom/perspective.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ToggleZoom ()
- at deftypefnx {C function} @code{int} mgl_wnd_toggle_zoom (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_toggle_zoom (@code{HMGL} gr)
Switch on/off zooming by mouse. Just select rectangular region by mouse and it will be zoomed in.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ToggleNo ()
- at deftypefnx {C function} @code{int} mgl_wnd_toggle_no (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_toggle_no (@code{HMGL} gr)
Switch off all zooming and rotation and restore initial state.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} Update ()
- at deftypefnx {C function} @code{int} mgl_wnd_update (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_update (@code{HMGL} gr)
Update window contents. This is very useful function for manual updating the plot while long calculation was running in parallel thread.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} ReLoad ()
- at deftypefnx {C function} @code{int} mgl_wnd_reload (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_reload (@code{HMGL} gr)
Reload user data and update picture. This function also update number of frames which drawing function can create.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} Adjust ()
- at deftypefnx {C function} @code{int} mgl_wnd_adjust (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_adjust (@code{HMGL} gr)
Adjust size of bitmap to window size.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} NextFrame ()
- at deftypefnx {C function} @code{int} mgl_wnd_next_frame (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_next_frame (@code{HMGL} gr)
Show next frame if one.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} PrevFrame ()
- at deftypefnx {C function} @code{int} mgl_wnd_prev_frame (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_prev_frame (@code{HMGL} gr)
Show previous frame if one.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{void} Animation ()
- at deftypefnx {C function} @code{int} mgl_wnd_animation (@code{HMGL} gr)
+ at deftypefnx {C function} @code{void} mgl_wnd_animation (@code{HMGL} gr)
Run/stop slideshow (animation) of frames.
@end deftypefn
- at deftypefn {Method on @code{mglWindow}} @code{void} SetDelay (@code{mreal} dt)
- at deftypefnx {C function} @code{int} mgl_wnd_set_delay (@code{HMGL} gr, @code{int} dt)
+ at deftypefn {Method on @code{mglWindow}} @code{void} SetDelay (@code{double} dt)
+ at deftypefnx {C function} @code{void} mgl_wnd_set_delay (@code{HMGL} gr, @code{double} dt)
Sets delay for animation in seconds. Default value is 1 sec.
@end deftypefn
+ at deftypefn {Method on @code{mglWindow}} @code{double} GetDelay ()
+ at deftypefnx {C function} @code{double} mgl_wnd_get_delay (@code{HMGL} gr)
+Gets delay for animation in seconds.
+ at end deftypefn
+
@deftypefn {Method on @code{mglWindow}} @code{void} Setup (@code{bool} clfupd=@code{true}, @code{bool} showpos=@code{false})
- at deftypefnx {C function} @code{int} mgl_setup_window (@code{HMGL} gr, @code{bool} clfupd, @code{bool} showpos)
+ at deftypefnx {C function} @code{void} mgl_setup_window (@code{HMGL} gr, @code{bool} clfupd, @code{bool} showpos)
Enable/disable flags for:
@itemize @bullet
@item
@@ -129,7 +134,7 @@ showing the last mouse click position in the widget.
@end deftypefn
@deftypefn {Method on @code{mglWindow}} @code{mglPoint} LastMousePos ()
- at deftypefnx {C function} @code{int} mgl_get_last_mouse_pos (@code{HMGL} gr, @code{mreal *}x, @code{mreal *}y, @code{mreal *}z)
+ at deftypefnx {C function} @code{void} mgl_get_last_mouse_pos (@code{HMGL} gr, @code{mreal *}x, @code{mreal *}y, @code{mreal *}z)
Gets last position of mouse click.
@end deftypefn
diff --git a/texinfo/widget_ru.texi b/texinfo/widget_ru.texi
index f1b6257..1ef5140 100644
--- a/texinfo/widget_ru.texi
+++ b/texinfo/widget_ru.texi
@@ -68,57 +68,62 @@ public:
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ToggleAlpha ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_toggle_alpha (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_toggle_alpha (@code{HMGL} gr)
Включает/выключает прозрачность, но не перекрывает ее включение в пользовательской функции рисования.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ToggleLight ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_toggle_light (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_toggle_light (@code{HMGL} gr)
Включает/выключает освещение, но не перекрывает его включение в пользовательской функции рисования.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ToggleRotate ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_toggle_rotate (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_toggle_rotate (@code{HMGL} gr)
Включает/выключает вращение мышкой. Нажатая левая кнопка используется для вращения, средняя для сдвига, правая для приближения/перспективы.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ToggleZoom ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_toggle_zoom (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_toggle_zoom (@code{HMGL} gr)
Включает/выключает приближение мышкой. Выделите прямоугольную область и она будет приближена.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ToggleNo ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_toggle_no (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_toggle_no (@code{HMGL} gr)
Выключает вращение и приближение мышкой, а также восстанавливает исходный вид графика.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} Update ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_update (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_update (@code{HMGL} gr)
Обновляет содержимое окна. Функция полезна при ручном обновлении содержимого, пока долгий расчет идет в параллельном потоке.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} ReLoad ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_reload (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_reload (@code{HMGL} gr)
Перегружает данные и обновляет рисунок. Функция также обновляет число кадров, которое создает функция рисования.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} Adjust ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_adjust (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_adjust (@code{HMGL} gr)
Подгоняет размер рисунка под размер окна.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} NextFrame ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_next_frame (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_next_frame (@code{HMGL} gr)
Показывает следующий кадр, если он есть.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} PrevFrame ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_prev_frame (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_prev_frame (@code{HMGL} gr)
Показывает предыдущий кадр, если он есть.
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{void} Animation ()
- at deftypefnx {Функция С} @code{int} mgl_wnd_animation (@code{HMGL} gr)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_animation (@code{HMGL} gr)
Запускает/останавливает анимацию кадров.
@end deftypefn
- at deftypefn {Метод класса @code{mglWindow}} @code{void} SetDelay (@code{mreal} dt)
- at deftypefnx {Функция С} @code{int} mgl_wnd_set_delay (@code{HMGL} gr, @code{int} dt)
+ at deftypefn {Метод класса @code{mglWindow}} @code{void} SetDelay (@code{double} dt)
+ at deftypefnx {Функция С} @code{void} mgl_wnd_set_delay (@code{HMGL} gr, @code{double} dt)
Задает задержку при анимации в секундах. По умолчанию интервал -- 1 секунда.
@end deftypefn
+ at deftypefn {Метод класса @code{mglWindow}} @code{double} GetDelay ()
+ at deftypefnx {Функция С} @code{double} mgl_wnd_get_delay (@code{HMGL} gr)
+Возвращает задержку при анимации в секундах.
+ at end deftypefn
+
@deftypefn {Метод класса @code{mglWindow}} @code{void} Setup (@code{bool} clfupd=@code{true}, @code{bool} showpos=@code{false})
- at deftypefnx {Функция С} @code{int} mgl_setup_window (@code{HMGL} gr, @code{bool} clfupd, @code{bool} showpos)
+ at deftypefnx {Функция С} @code{void} mgl_setup_window (@code{HMGL} gr, @code{bool} clfupd, @code{bool} showpos)
Включает/выключает:
@itemize @bullet
@item
@@ -129,7 +134,7 @@ public:
@end deftypefn
@deftypefn {Метод класса @code{mglWindow}} @code{mglPoint} LastMousePos ()
- at deftypefnx {Функция С} @code{int} mgl_get_last_mouse_pos (@code{HMGL} gr, @code{mreal *}x, @code{mreal *}y, @code{mreal *}z)
+ at deftypefnx {Функция С} @code{void} mgl_get_last_mouse_pos (@code{HMGL} gr, @code{mreal *}x, @code{mreal *}y, @code{mreal *}z)
Возвращает положение щелчка мыши.
@end deftypefn
diff --git a/udav/calc_dlg.cpp b/udav/calc_dlg.cpp
index 7ddcdf0..12212f9 100644
--- a/udav/calc_dlg.cpp
+++ b/udav/calc_dlg.cpp
@@ -27,7 +27,6 @@
#include <mgl2/mgl.h>
#include "calc_dlg.h"
extern mglParse parser;
-mglData mglFormulaCalc(const wchar_t *string, mglParser *arg);
//-----------------------------------------------------------------------------
//
// Calc dialog
diff --git a/udav/dat_pnl.cpp b/udav/dat_pnl.cpp
index 6724a7a..0259b52 100644
--- a/udav/dat_pnl.cpp
+++ b/udav/dat_pnl.cpp
@@ -179,7 +179,7 @@ void DatPanel::save()
if(ext=="png")
{
bool ok;
- QString s = QInputDialog::getText(this, tr("UDAV - Export to PNG"), tr("Enter color scheme for picture"), QLineEdit::Normal, "BbcyrR", &ok);
+ QString s = QInputDialog::getText(this, tr("UDAV - Export to PNG"), tr("Enter color scheme for picture"), QLineEdit::Normal, MGL_DEF_SCH, &ok);
if(ok) var->Export(fn.toAscii().constData(), s.toAscii().constData());
}
else if(ext=="h5" || ext=="hdf")
@@ -200,7 +200,7 @@ void DatPanel::load()
if(ext=="png")
{
bool ok;
- QString s = QInputDialog::getText(this, tr("UDAV - Import PNG"), tr("Enter color scheme for picture"), QLineEdit::Normal, "BbcyrR", &ok);
+ QString s = QInputDialog::getText(this, tr("UDAV - Import PNG"), tr("Enter color scheme for picture"), QLineEdit::Normal, MGL_DEF_SCH, &ok);
if(ok) var->Import(fn.toAscii().constData(), s.toAscii().constData());
}
else if(ext=="h5" || ext=="hdf")
diff --git a/udav/data_dlg.cpp b/udav/data_dlg.cpp
index 050307b..379dfa1 100644
--- a/udav/data_dlg.cpp
+++ b/udav/data_dlg.cpp
@@ -25,7 +25,6 @@
#include <QLineEdit>
//-----------------------------------------------------------------------------
#include <mgl2/mgl.h>
-mglData mglFormulaCalc(const wchar_t *string, mglParser *arg);
extern mglParse parser;
#include "data_dlg.h"
//-----------------------------------------------------------------------------
diff --git a/udav/hint_dlg.cpp b/udav/hint_dlg.cpp
index 59273ee..be555e4 100644
--- a/udav/hint_dlg.cpp
+++ b/udav/hint_dlg.cpp
@@ -22,6 +22,7 @@
#include <QLayout>
#include <QPushButton>
#include "hint_dlg.h"
+#include "mgl2/data_cf.h"
//-----------------------------------------------------------------------------
#define qtr HintDialog::tr
QString hints[] = {
@@ -51,7 +52,6 @@ QString hints[] = {
// Hint dialog
//
//-----------------------------------------------------------------------------
-extern "C"{double mgl_rnd();}
HintDialog::HintDialog(QWidget *parent) : QDialog(parent)
{
for(numHints=0;!hints[numHints].isEmpty();numHints++);
diff --git a/udav/newcmd_dlg.cpp b/udav/newcmd_dlg.cpp
index 5cb0c3e..8b13798 100644
--- a/udav/newcmd_dlg.cpp
+++ b/udav/newcmd_dlg.cpp
@@ -150,7 +150,7 @@ void NewCmdDialog::parseCmd(const QString &txt)
}
}
//-----------------------------------------------------------------------------
-void NewCmdDialog::fillList() // TODO update list !!!
+void NewCmdDialog::fillList()
{
types<<tr("1D plots")<<tr("2D plots")<<tr("3D plots")<<tr("Dual plots")
<<tr("Vector plots")<<tr("Other plots")<<tr("Text and legend")
diff --git a/udav/plot_pnl.cpp b/udav/plot_pnl.cpp
index 4f43e02..3f1344b 100644
--- a/udav/plot_pnl.cpp
+++ b/udav/plot_pnl.cpp
@@ -418,7 +418,7 @@ void PlotPanel::toolTop(QBoxLayout *l)
oo->addAction(tr("vector EPS"), mgl, SLOT(exportEPS()),Qt::ALT+Qt::Key_E);
oo->addAction(tr("SVG"), mgl, SLOT(exportSVG()),Qt::ALT+Qt::Key_S);
oo->addAction(tr("LaTeX"), mgl, SLOT(exportTEX()),Qt::ALT+Qt::Key_L);
-// oo->addAction(tr("C++"), mgl, SLOT(exportCPP())); // TODO: Add later
+
o->addMenu(oo); popup->addMenu(oo);
oo = new QMenu(tr("Export as 3D ..."),this);
oo->addAction(tr("MGLD"), mgl, SLOT(exportMGLD()),Qt::ALT+Qt::Key_M);
diff --git a/udav/prop_dlg.cpp b/udav/prop_dlg.cpp
index 18dc151..8efcf3b 100644
--- a/udav/prop_dlg.cpp
+++ b/udav/prop_dlg.cpp
@@ -243,7 +243,6 @@ void PropDialog::applyChanges()
MainWindow *s = (MainWindow *)w;
if(ok) { s->writeSettings(); ok = false; }
s->edit->setEditorFont();
-// if(s->hlp->isActiveWindow()) s->hlp->showHelp(); // TODO: may be should enabled later
s->graph->setMGLFont(pathFont);
s->setEditPos(editPosBottom);
s->edit->setCompleter(mglCompleter);
diff --git a/udav/text_pnl.cpp b/udav/text_pnl.cpp
index a3c1c89..19f8889 100644
--- a/udav/text_pnl.cpp
+++ b/udav/text_pnl.cpp
@@ -61,8 +61,7 @@ TextPanel::TextPanel(QWidget *parent) : QWidget(parent)
register int i,n=parser.GetCmdNum();
for(i=0;i<n;i++) words<<QString::fromAscii(parser.GetCmdName(i));
- completer = new QCompleter(words, this);
- completer->setCaseSensitivity(Qt::CaseInsensitive);
+ vars = words;
connect(setupDlg, SIGNAL(putText(const QString &)), this, SLOT(animPutText(const QString &)));
connect(newCmdDlg, SIGNAL(result(const QString&)), this, SLOT(putLine(const QString&)));
@@ -73,8 +72,6 @@ TextPanel::TextPanel(QWidget *parent) : QWidget(parent)
new QMGLSyntax(edit);
defFontFamily = edit->fontFamily();
defFontSize = int(edit->fontPointSize());
- completer->setCompletionMode(QCompleter::PopupCompletion);
-// edit->setCompleter(completer);
edit->setLineWrapMode(QTextEdit::NoWrap);
setCompleter(mglCompleter);
@@ -89,7 +86,14 @@ TextPanel::~TextPanel() { delete printer; }
//-----------------------------------------------------------------------------
void TextPanel::setCompleter(bool en)
{
- edit->setCompleter(en?completer:0);
+ if(en)
+ {
+ QCompleter *completer = new QCompleter(vars, this);
+ completer->setCaseSensitivity(Qt::CaseInsensitive);
+ completer->setCompletionMode(QCompleter::PopupCompletion);
+ edit->setCompleter(completer);
+ }
+ else edit->setCompleter(0);
// completer->setCompletionMode(en ? QCompleter::PopupCompletion : QCompleter::InlineCompletion);
}
//-----------------------------------------------------------------------------
@@ -104,7 +108,7 @@ void TextPanel::insNVal()
}
wchar_t *txt=new wchar_t[sel.length()+1];
sel.toWCharArray(txt); txt[sel.length()]=0;
- mglData res=mglFormulaCalc(txt, parser.Self());
+ mglData res=parser.Calc(txt);
delete []txt;
edit->textCursor().insertText(QString::number(res.GetVal(0)));
}
@@ -136,17 +140,13 @@ void TextPanel::insPath()
//-----------------------------------------------------------------------------
void TextPanel::refreshData()
{
- QStringList vars=words;
+ vars=words;
mglVar *v = parser.FindVar("");
while(v)
{
if(v->s.length()>2) vars<<QString::fromStdWString(v->s);
v = v->next;
}
- if(completer) delete completer;
- completer = new QCompleter(vars, this);
- completer->setCaseSensitivity(Qt::CaseInsensitive);
- completer->setCompletionMode(QCompleter::PopupCompletion);
setCompleter(mglCompleter);
}
//-----------------------------------------------------------------------------
diff --git a/udav/text_pnl.h b/udav/text_pnl.h
index 4fd373e..5d86d49 100644
--- a/udav/text_pnl.h
+++ b/udav/text_pnl.h
@@ -26,7 +26,6 @@
//-----------------------------------------------------------------------------
class QMenu;
class QPrinter;
-class QCompleter;
class QBoxLayout;
class FindDialog;
class OptionDialog;
@@ -84,8 +83,7 @@ public slots:
private:
- QCompleter *completer;
- QStringList words;
+ QStringList words, vars;
QPrinter *printer;
FindDialog *findDialog;
diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt
index 8abeec8..9f4ede7 100644
--- a/widgets/CMakeLists.txt
+++ b/widgets/CMakeLists.txt
@@ -1,12 +1,16 @@
+include(GenerateExportHeader)
+add_compiler_export_flags()
if(MGL_HAVE_FLTK)
include_directories(${FLTK_INCLUDE_DIR})
add_library(mgl-fltk SHARED fltk.cpp ../include/mgl2/fltk.h)
add_library(mgl-fltk-static STATIC fltk.cpp ../include/mgl2/fltk.h)
- set_target_properties(mgl-fltk-static PROPERTIES OUTPUT_NAME "mgl-fltk")
+ set_target_properties(mgl-fltk PROPERTIES SOVERSION 7.0.0)
set_target_properties(mgl-fltk PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties(mgl-fltk PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+ set_target_properties(mgl-fltk-static PROPERTIES OUTPUT_NAME "mgl-fltk")
set_target_properties(mgl-fltk-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(mgl-fltk PROPERTIES SOVERSION 7.0.0)
+ set_target_properties(mgl-fltk-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
target_link_libraries(mgl-fltk mgl)
target_link_libraries(mgl-fltk ${FLTK_LIBRARIES})
@@ -22,10 +26,12 @@ if(MGL_HAVE_GLUT)
include_directories(${GLUT_INCLUDE_DIR})
add_library(mgl-glut SHARED glut.cpp ../include/mgl2/glut.h)
add_library(mgl-glut-static STATIC glut.cpp ../include/mgl2/glut.h)
- set_target_properties(mgl-glut-static PROPERTIES OUTPUT_NAME "mgl-glut")
+ set_target_properties(mgl-glut PROPERTIES SOVERSION 7.0.0)
set_target_properties(mgl-glut PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties(mgl-glut PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+ set_target_properties(mgl-glut-static PROPERTIES OUTPUT_NAME "mgl-glut")
set_target_properties(mgl-glut-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(mgl-glut PROPERTIES SOVERSION 7.0.0)
+ set_target_properties(mgl-glut-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
target_link_libraries(mgl-glut mgl)
target_link_libraries(mgl-glut ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
@@ -41,10 +47,12 @@ if(MGL_HAVE_WX)
include(${wxWidgets_USE_FILE})
add_library(mgl-wx SHARED wx.cpp ../include/mgl2/wx.h)
add_library(mgl-wx-static STATIC wx.cpp ../include/mgl2/wx.h)
- set_target_properties(mgl-wx-static PROPERTIES OUTPUT_NAME "mgl-wx")
+ set_target_properties(mgl-wx PROPERTIES SOVERSION 7.0.0)
set_target_properties(mgl-wx PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties(mgl-wx PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+ set_target_properties(mgl-wx-static PROPERTIES OUTPUT_NAME "mgl-wx")
set_target_properties(mgl-wx-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(mgl-wx PROPERTIES SOVERSION 7.0.0)
+ set_target_properties(mgl-wx-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
target_link_libraries(mgl-wx mgl)
target_link_libraries(mgl-wx ${wxWidgets_LIBRARIES})
@@ -61,10 +69,12 @@ if(MGL_HAVE_QT)
qt4_wrap_cpp(MGL_MOC_FILES ../include/mgl2/qmathgl.h)
add_library(mgl-qt SHARED qt.cpp ${MGL_MOC_FILES} ../include/mgl2/qt.h ../include/mgl2/qmathgl.h)
add_library(mgl-qt-static STATIC qt.cpp ${MGL_MOC_FILES} ../include/mgl2/qt.h ../include/mgl2/qmathgl.h)
- set_target_properties(mgl-qt-static PROPERTIES OUTPUT_NAME "mgl-qt")
+ set_target_properties(mgl-qt PROPERTIES SOVERSION 7.0.0)
set_target_properties(mgl-qt PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties(mgl-qt PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+ set_target_properties(mgl-qt-static PROPERTIES OUTPUT_NAME "mgl-qt")
set_target_properties(mgl-qt-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(mgl-qt PROPERTIES SOVERSION 7.0.0)
+ set_target_properties(mgl-qt-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
target_link_libraries(mgl-qt mgl)
target_link_libraries(mgl-qt ${QT_LIBRARIES})
@@ -89,10 +99,12 @@ if(MGL_HAVE_QT AND MGL_HAVE_FLTK)
add_library(mgl-wnd SHARED ${MGL_WND_SRC} ${MGL_MOC_FILES})
add_library(mgl-wnd-static STATIC ${MGL_WND_SRC} ${MGL_MOC_FILES})
- set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl-wnd")
+ set_target_properties(mgl-wnd PROPERTIES SOVERSION 7.0.0)
set_target_properties(mgl-wnd PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+ set_target_properties(mgl-wnd PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
+ set_target_properties(mgl-wnd-static PROPERTIES OUTPUT_NAME "mgl-wnd")
set_target_properties(mgl-wnd-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(mgl-wnd PROPERTIES SOVERSION 7.0.0)
+ set_target_properties(mgl-wnd-static PROPERTIES COMPILE_FLAGS -DMGL_STATIC_DEFINE)
target_link_libraries(mgl-wnd mgl)
target_link_libraries(mgl-wnd ${QT_LIBRARIES})
diff --git a/widgets/fltk.cpp b/widgets/fltk.cpp
index 963bcbf..c267ac9 100644
--- a/widgets/fltk.cpp
+++ b/widgets/fltk.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_fltk.cpp is part of Math Graphic Library
+ * fltk.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -93,7 +93,7 @@ using mglCanvasWnd::Window;
void Animation(); ///< Run animation (I'm too lasy to change it)
};
//-----------------------------------------------------------------------------
-void mgl_ask_fltk(const wchar_t *quest, wchar_t *res)
+void MGL_EXPORT mgl_ask_fltk(const wchar_t *quest, wchar_t *res)
{
static char buf[1024];
#if FL_MINOR_VERSION>=3
@@ -136,8 +136,8 @@ void Fl_MathGL::set_graph(HMGL GR)
void Fl_MathGL::draw()
{
// TODO: add active points drawing here (from Qt)
- const unsigned char *g = gr ? gr->GetBits() : 0;
- int i, hh=gr->GetHeight(), ww=gr->GetWidth();
+ const unsigned char *g = mgl_get_rgb(gr);
+ int i, ww=mgl_get_width(gr), hh=mgl_get_height(gr);
if(g) fl_draw_image(g, x(), y(), ww, hh, 3);
if(flag&4)
{
@@ -158,24 +158,24 @@ void Fl_MathGL::update()
{
if(draw_func || draw_cl)
{
- if(gr->get(MGL_CLF_ON_UPD)) gr->DefaultPlotParam();
- gr->ResetFrames();
- gr->Alpha(flag&1); gr->Light(flag&2);
+ mgl_reset_frames(gr);
+ if(mgl_get_flag(gr,MGL_CLF_ON_UPD)) mgl_set_def_param(gr);
+ mgl_set_alpha(gr,flag&1); mgl_set_light(gr,flag&2);
if(tet_val) tet = tet_val->value();
if(phi_val) phi = phi_val->value();
- gr->Zoom(x1,y1,x2,y2); gr->View(phi,0,tet);
+ mgl_zoom(gr,x1,y1,x2,y2); mgl_view(gr,phi,0,tet);
setlocale(LC_NUMERIC, "C");
// use frames for quickly redrawing while adding/changing primitives
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4)) gr->NewFrame();
+ if(mgl_is_frames(gr)) mgl_new_frame(gr);
if(draw_func) draw_func(gr, draw_par); // drawing itself
else if(draw_cl) { mglGraph g(gr); draw_cl->Draw(&g); }
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4)) gr->EndFrame();
+ if(mgl_is_frames(gr)) mgl_end_frame(gr);
setlocale(LC_NUMERIC, "");
- const char *buf = gr->Mess.c_str();
+ const char *buf = mgl_get_mess(gr);
if(*buf) fl_message("%s",buf);
}
- if(gr->GetWidth()!=w() || gr->GetHeight()!=h())
- size(gr->GetWidth(), gr->GetHeight());
+ if(mgl_get_width(gr)!=w() || mgl_get_height(gr)!=h())
+ size(mgl_get_width(gr), mgl_get_height(gr));
redraw(); Fl::flush();
}
//-----------------------------------------------------------------------------
@@ -193,7 +193,7 @@ int Fl_MathGL::handle(int code)
{
mglCanvasWnd *g=dynamic_cast<mglCanvasWnd *>(gr);
if(g && g->ClickFunc) g->ClickFunc(draw_par);
- if(gr->get(MGL_SHOW_POS))
+ if(mgl_get_flag(gr,MGL_SHOW_POS))
{
mglPoint p = gr->CalcXYZ(Fl::event_x()-x(), Fl::event_y()-y());
if(g) g->LastMousePos = p;
@@ -313,8 +313,6 @@ int Fl_MathGL::handle(int code)
void Fl_MGLView::toggle(int &val, Fl_Button *b, const char *txt)
{
val = 1-val; b->value(val);
- // TODO: add pixmap (Fl_Pixmap *pix) change?!
- // if(pix) {b->image(*pix); b->redraw();}
if(menu && txt && *txt)
{
Fl_Menu_Item *m = (Fl_Menu_Item *)menu->find_item(gettext(txt));
@@ -327,8 +325,6 @@ void Fl_MGLView::toggle(int &val, Fl_Button *b, const char *txt)
void Fl_MGLView::setoff(int &val, Fl_Button *b, const char *txt)
{
val = 0; b->value(val);
- // TODO: add pixmap (Fl_Pixmap *pix) change?!
- // if(pix) {b->image(*pix); b->redraw();}
if(menu && txt && *txt)
{
Fl_Menu_Item *m = (Fl_Menu_Item *)menu->find_item(gettext(txt));
@@ -338,18 +334,18 @@ void Fl_MGLView::setoff(int &val, Fl_Button *b, const char *txt)
//update();
}
//-----------------------------------------------------------------------------
-void mgl_grid_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_grid_cb(Fl_Widget*, void* v)
{ if(v) ((Fl_MGLView*)v)->toggle_grid(); }
//-------------------------------------------------------------------------
-void mgl_alpha_cb(Fl_Widget*, void* v) // alpha?xpm_a2:xpm_a1
+void MGL_NO_EXPORT mgl_alpha_cb(Fl_Widget*, void* v) // alpha?xpm_a2:xpm_a1
{ if(v) ((Fl_MGLView*)v)->toggle_alpha(); }
void mglCanvasFL::ToggleAlpha() { Fl::lock(); mgl->toggle_alpha(); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_light_cb(Fl_Widget*, void* v) // light?xpm_l2:xpm_l1
+void MGL_NO_EXPORT mgl_light_cb(Fl_Widget*, void* v) // light?xpm_l2:xpm_l1
{ if(v) ((Fl_MGLView*)v)->toggle_light(); }
void mglCanvasFL::ToggleLight() { Fl::lock(); mgl->toggle_light(); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_norm_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_norm_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
e->setoff_rotate(); e->setoff_zoom();
@@ -359,14 +355,14 @@ void mgl_norm_cb(Fl_Widget*, void* v)
}
void mglCanvasFL::ToggleNo() { Fl::lock(); mgl_norm_cb(0,mgl); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_zoom_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_zoom_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
e->setoff_rotate(); e->toggle_zoom();
}
void mglCanvasFL::ToggleZoom() { Fl::lock(); mgl_zoom_cb(0,mgl); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_rotate_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_rotate_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
e->setoff_zoom(); e->toggle_rotate();
@@ -379,88 +375,88 @@ void Fl_MGLView::update()
FMGL->set_flag(alpha + 2*light + 4*grid);
FMGL->update();
}
-void mgl_draw_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_draw_cb(Fl_Widget*, void* v)
{ if(v) ((Fl_MGLView*)v)->update(); }
void mglCanvasFL::Update() { Fl::lock(); mgl->update(); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_export_png_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_png_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.png", 0);
if(!fname || !fname[0]) return;
mgl_write_png(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_bps_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_bps_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.eps", 0);
if(!fname || !fname[0]) return;
mgl_write_bps(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_pngn_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_pngn_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.png", 0);
if(!fname || !fname[0]) return;
mgl_write_png_solid(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_jpeg_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_jpeg_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.jpg", 0);
if(!fname || !fname[0]) return;
mgl_write_jpg(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_svg_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_svg_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.svg", 0);
if(!fname || !fname[0]) return;
mgl_write_svg(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_eps_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_eps_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.eps", 0);
if(!fname || !fname[0]) return;
mgl_write_eps(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_prc_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_prc_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.prc", 0);
if(!fname || !fname[0]) return;
mgl_write_prc(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0,1);
}
//-----------------------------------------------------------------------------
-void mgl_export_tex_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_tex_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.tex", 0);
if(!fname || !fname[0]) return;
mgl_write_tex(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_obj_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_obj_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.obj", 0);
if(!fname || !fname[0]) return;
mgl_write_obj(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0,1);
}
//-----------------------------------------------------------------------------
-void mgl_export_off_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_off_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.off", 0);
if(!fname || !fname[0]) return;
mgl_write_off(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0,0);
}
//-----------------------------------------------------------------------------
-void mgl_export_stl_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_export_stl_cb(Fl_Widget*, void* v)
{
char *fname = fl_file_chooser(gettext("Save File As?"), "*.stl", 0);
if(!fname || !fname[0]) return;
mgl_write_stl(((Fl_MGLView*)v)->FMGL->get_graph(),fname,0);
}
//-----------------------------------------------------------------------------
-void mgl_su_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_su_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -469,7 +465,7 @@ void mgl_su_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_sd_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_sd_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -478,7 +474,7 @@ void mgl_sd_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_sr_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_sr_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -487,7 +483,7 @@ void mgl_sr_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_sl_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_sl_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -496,7 +492,7 @@ void mgl_sl_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_sz_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_sz_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -506,7 +502,7 @@ void mgl_sz_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_so_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_so_cb(Fl_Widget*, void* v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mreal x1,x2,y1,y2,d;
@@ -516,7 +512,7 @@ void mgl_so_cb(Fl_Widget*, void* v)
e->FMGL->set_zoom(x1,y1,x2,y2);
}
//-----------------------------------------------------------------------------
-void mgl_adjust_cb(Fl_Widget*, void*v)
+void MGL_NO_EXPORT mgl_adjust_cb(Fl_Widget*, void*v)
{
Fl_MGLView *e = (Fl_MGLView*)v; if(!e) return;
mgl_set_size(e->FMGL->get_graph(), e->scroll->w(), e->scroll->h());
@@ -524,18 +520,18 @@ void mgl_adjust_cb(Fl_Widget*, void*v)
}
void mglCanvasFL::Adjust() { Fl::lock(); mgl_adjust_cb(0,mgl); Fl::unlock(); }
//-----------------------------------------------------------------------------
-void mgl_oncemore_cb(Fl_Widget*, void*v)
+void MGL_NO_EXPORT mgl_oncemore_cb(Fl_Widget*, void*v)
{ Fl_MGLView *e = (Fl_MGLView*)v; if(e && e->reload) e->reload(e->par); }
//-----------------------------------------------------------------------------
-void mgl_quit_cb(Fl_Widget*, void*) { Fl::first_window()->hide(); }
+void MGL_NO_EXPORT mgl_quit_cb(Fl_Widget*, void*) { Fl::first_window()->hide(); }
//-----------------------------------------------------------------------------
-void mgl_snext_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_snext_cb(Fl_Widget*, void* v)
{ Fl_MGLView *e = (Fl_MGLView*)v; if(e && e->next) e->next(e->par); }
//-----------------------------------------------------------------------------
-void mgl_sprev_cb(Fl_Widget*, void* v)
+void MGL_NO_EXPORT mgl_sprev_cb(Fl_Widget*, void* v)
{ Fl_MGLView *e = (Fl_MGLView*)v; if(e && e->prev) e->prev(e->par); }
//-----------------------------------------------------------------------------
-void mgl_time_cb(void *v)
+void MGL_NO_EXPORT mgl_time_cb(void *v)
{
Fl_MGLView *e = (Fl_MGLView*)v;
if(!e || !e->is_sshow() || !e->next || !e->delay) return;
@@ -543,7 +539,7 @@ void mgl_time_cb(void *v)
Fl::repeat_timeout(e->delay(e->par), mgl_time_cb, v);
}
//-----------------------------------------------------------------------------
-void mgl_sshow_cb(Fl_Widget *, void *v)
+void MGL_NO_EXPORT mgl_sshow_cb(Fl_Widget *, void *v)
{
Fl_MGLView *e = (Fl_MGLView*)v;
if(!e || !e->delay || !e->next) return;
@@ -551,7 +547,7 @@ void mgl_sshow_cb(Fl_Widget *, void *v)
if(e->is_sshow()) Fl::add_timeout(e->delay(e->par), mgl_time_cb, v);
}
void mglCanvasFL::Animation() { Fl::lock(); mgl_sshow_cb(0,mgl); Fl::unlock(); }
-void mgl_no_cb(Fl_Widget *, void *) {}
+void MGL_NO_EXPORT mgl_no_cb(Fl_Widget *, void *) {}
//-----------------------------------------------------------------------------
Fl_Menu_Item pop_graph[20] = {
{ gettext("Export"), 0, mgl_no_cb, 0, FL_SUBMENU,0,0,0,0},
@@ -681,12 +677,12 @@ void mglCanvasFL::GotoFrame(int d)
if(GetNumFig()>0 && d) { SetCurFig(f); mgl->FMGL->redraw(); }
}
//-----------------------------------------------------------------------------
-void mgl_fl_next(void *v) { ((mglCanvasWnd*)v)->NextFrame(); } ///< Callback function for next frame
-void mgl_fl_prev(void *v) { ((mglCanvasWnd*)v)->PrevFrame(); } ///< Callback function for prev frame
-void mgl_fl_reload(void *v) { ((mglCanvasWnd*)v)->ReLoad(); } ///< Callback function for reloading
-mreal mgl_fl_delay(void *v) { return ((mglCanvasWnd*)v)->GetDelay(); } ///< Callback function for delay
+void MGL_NO_EXPORT mgl_fl_next(void *v) { ((mglCanvasWnd*)v)->NextFrame(); } ///< Callback function for next frame
+void MGL_NO_EXPORT mgl_fl_prev(void *v) { ((mglCanvasWnd*)v)->PrevFrame(); } ///< Callback function for prev frame
+void MGL_NO_EXPORT mgl_fl_reload(void *v) { ((mglCanvasWnd*)v)->ReLoad(); } ///< Callback function for reloading
+mreal MGL_NO_EXPORT mgl_fl_delay(void *v) { return ((mglCanvasWnd*)v)->GetDelay(); } ///< Callback function for delay
//-----------------------------------------------------------------------------
-void mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w)
+void MGL_EXPORT mgl_makemenu_fltk(Fl_Menu_ *m, Fl_MGLView *w)
{
m->add("Graphics/Alpha", "^t", mgl_alpha_cb, w, FL_MENU_TOGGLE);
m->add("Graphics/Light", "^l", mgl_light_cb, w, FL_MENU_TOGGLE);
@@ -746,26 +742,26 @@ void mglCanvasFL::Window(int argc, char **argv, int (*draw)(mglBase *gr, void *p
delete []tmp[0];
}
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph_fltk(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
+HMGL MGL_EXPORT mgl_create_graph_fltk(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
{
mglCanvasFL *g = new mglCanvasFL;
g->Window(0,0,draw,title,par,load);
return g;
}
-int mgl_fltk_run() { return Fl::run(); }
+int MGL_EXPORT mgl_fltk_run() { return Fl::run(); }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_graph_fltk_(const char *title, int l)
+uintptr_t MGL_EXPORT mgl_create_graph_fltk_(const char *title, int l)
{
char *s = new char[l+1]; memcpy(s,title,l); s[l]=0;
uintptr_t t = uintptr_t(mgl_create_graph_fltk(0,s,0,0));
delete []s; return t;
}
-int mgl_fltk_run_() { return mgl_fltk_run(); }
+int MGL_EXPORT mgl_fltk_run_() { return mgl_fltk_run(); }
//-----------------------------------------------------------------------------
-void *mgl_fltk_tmp(void *)
+MGL_NO_EXPORT void *mgl_fltk_tmp(void *)
{ mgl_fltk_run(); return 0; }
//-----------------------------------------------------------------------------
-int mgl_fltk_thr() // NOTE: Qt couldn't be running in non-primary thread
+int MGL_EXPORT mgl_fltk_thr() // NOTE: Qt couldn't be running in non-primary thread
{
#if MGL_HAVE_PTHREAD
static pthread_t thr;
diff --git a/widgets/glut.cpp b/widgets/glut.cpp
index 8730159..3c97118 100644
--- a/widgets/glut.cpp
+++ b/widgets/glut.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_glut.cpp is part of Math Graphic Library
+ * glut.cpp is part of Math Graphic Library
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -226,7 +226,7 @@ void mglCanvasGLUT::Window(int argc, char **argv,int (*draw)(mglBase *gr, void *
glDeleteLists(1,NumFig);
}
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph_glut(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
+HMGL MGL_EXPORT mgl_create_graph_glut(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
{
mglCanvasGLUT *g = new mglCanvasGLUT;
g->Window(0,0,draw,title,par, load);
diff --git a/widgets/qt.cpp b/widgets/qt.cpp
index 53f4904..970f2f9 100644
--- a/widgets/qt.cpp
+++ b/widgets/qt.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * mgl_qt.cpp is part of Math Graphic Library *
+ * qt.cpp is part of Math Graphic Library *
* Copyright (C) 2007-2012 Alexey Balakin <mathgl.abalakin at gmail.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -79,7 +79,7 @@ protected:
QSpinBox *tet, *phi; ///< Spin box for angles
};
//-----------------------------------------------------------------------------
-void mgl_ask_qt(const wchar_t *quest, wchar_t *res)
+void MGL_EXPORT mgl_ask_qt(const wchar_t *quest, wchar_t *res)
{ QInputDialog::getText(QApplication::activeWindow(), "MathGL",
QString::fromWCharArray(quest)).toWCharArray(res); }
//-----------------------------------------------------------------------------
@@ -95,7 +95,7 @@ QMathGL::QMathGL(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
phi = tet = per = 0;
x1 = y1 = ax1 = ay1 = 0; x2 = y2 = ax2 = ay2 = 1;
alpha = light = zoom = rotate = grid = viewYZ = false;
- resize(600, 400); gr->set(MGL_CLF_ON_UPD);
+ resize(600, 400); mgl_set_flag(gr, true, MGL_CLF_ON_UPD);
timer = new QTimer(this);
enableWheel = enableMouse = true;
// resize(graph->GetWidth(), graph->GetHeight());
@@ -109,7 +109,7 @@ QMathGL::~QMathGL()
if(grBuf) delete []grBuf;
}
//-----------------------------------------------------------------------------
-double QMathGL::getRatio() { return double(gr->GetWidth())/gr->GetHeight(); }
+double QMathGL::getRatio() { return double(mgl_get_width(gr))/mgl_get_height(gr); }
//-----------------------------------------------------------------------------
void QMathGL::setGraph(HMGL GR) ///< Set grapher object
{
@@ -125,7 +125,7 @@ void QMathGL::paintEvent(QPaintEvent *)
paint.begin(this);
paint.drawPixmap(0,0,pic);
if(zoom) paint.drawRect(x0,y0,xe-x0,ye-y0);
- if(gr->get(MGL_SHOW_POS) && !mousePos.isEmpty())
+ if(mgl_get_flag(gr,MGL_SHOW_POS) && !mousePos.isEmpty())
paint.drawText(0,12,mousePos);
if(grid)
{
@@ -140,7 +140,7 @@ void QMathGL::paintEvent(QPaintEvent *)
}
paint.setPen(QColor(0,0,0));
d = (h>w?w:h)/100;
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4))
+ if(mgl_is_frames(gr))
for(i=0;i<(long)gr->Act.size();i++)
{
const mglActivePos &p=gr->Act[i];
@@ -155,7 +155,7 @@ void QMathGL::paintEvent(QPaintEvent *)
void QMathGL::resizeEvent(QResizeEvent *ev)
{
if(autoResize && ev->size().width()>0 && ev->size().height()>0)
- { gr->SetSize(ev->size().width(), ev->size().height()); update(); }
+ { mgl_set_size(gr, ev->size().width(), ev->size().height()); update(); }
// else resize(graph->GetWidth(), graph->GetHeight());
}
//-----------------------------------------------------------------------------
@@ -232,7 +232,8 @@ void QMathGL::restore()
if(ax1!=0 || ay1!=0 || ax2!=1 || ay2!=1)
{
ax1=ay1=0; ax2=ay2=1;
- gr->ZoomAxis(); update();
+ mgl_zoom_axis(gr,0,0,0,0,1,1,1,1);
+ update();
}
else refresh();
}
@@ -251,52 +252,63 @@ void QMathGL::update()
if(draw_func || draw)
{
- gr->ResetFrames(); // remove previous frames
- if(gr->get(MGL_CLF_ON_UPD)) gr->DefaultPlotParam();
- gr->Alpha(alpha); gr->Light(light);
+ mgl_reset_frames(gr); // remove previous frames
+ if(mgl_get_flag(gr,MGL_CLF_ON_UPD)) mgl_set_def_param(gr);
+ mgl_set_alpha(gr,alpha); mgl_set_light(gr,light);
if(!isHidden()) QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
setlocale(LC_NUMERIC, "C");
// use frames for quickly redrawing while adding/changing primitives
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4)) gr->NewFrame();
+ if(mgl_is_frames(gr)) mgl_new_frame(gr);
if(draw_func) draw_func(gr, draw_par);
else if(draw) { mglGraph g(gr); draw->Draw(&g); }
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4)) gr->EndFrame();
+ if(mgl_is_frames(gr)) mgl_end_frame(gr);
setlocale(LC_NUMERIC, "");
if(!isHidden()) QApplication::restoreOverrideCursor();
emit refreshData();
- emit showWarn(gr->Mess.c_str());
+ emit showWarn(mgl_get_mess(gr));
mousePos="";
}
refresh();
}
//-----------------------------------------------------------------------------
+void QMathGL::draw_thr()
+{
+ mgl_clf(gr);
+ mgl_get_frame(gr, mgl_get_num_frame(gr)-1);
+ mglParse pr;
+ long i, n=primitives.count('\n');
+ mglGraph gg(gr);
+ setlocale(LC_NUMERIC, "C");
+ gg.Push(); gg.SubPlot(1,1,0,"#");
+ mglPoint ox1=gr->Min, ox2=gr->Max;
+ gg.SetRanges(mglPoint(-1,-1,-1),mglPoint(1,1,1));
+ for(i=0;i<n;i++)
+ {
+ mgl_set_obj_id(gr,i+MGL_MAX_LINES);
+ QString tst = primitives.section('\n',i,i);
+ pr.Parse(&gg,primitives.section('\n',i,i).toAscii().constData(),i+MGL_MAX_LINES);
+ }
+ gg.SetRanges(ox1,ox2); gg.Pop(); setlocale(LC_NUMERIC, "");
+}
+//-----------------------------------------------------------------------------
+void *mgl_qt_thr(void *p) { QMathGL *q = (QMathGL *)p; q->draw_thr(); return 0; }
void QMathGL::refresh()
{
-// printf("%ld,%d\n",gr->GetPrmNum(),gr->GetNumFrame()); fflush(stdout);
- if(gr->get(MGL_VECT_FRAME) && !(gr->GetQuality()&4) && gr->GetNumFrame()>0)
+ if(mgl_is_frames(gr) && mgl_get_num_frame(gr)>0)
{
if(draw_func || draw)
{
- gr->Clf(); gr->GetFrame(gr->GetNumFrame()-1);
- mglParse pr;
- long i, n=primitives.count('\n');
- mglGraph gg(gr);
- setlocale(LC_NUMERIC, "C");
- gg.Push(); gg.SubPlot(1,1,0,"#");
- mglPoint x1=gr->Min, x2=gr->Max;
- gg.SetRanges(mglPoint(-1,-1,-1),mglPoint(1,1,1));
- for(i=0;i<n;i++)
- {
- gr->SetObjId(i+MGL_MAX_LINES);
- QString tst = primitives.section('\n',i,i);
- pr.Parse(&gg,primitives.section('\n',i,i).toAscii().constData(),i+MGL_MAX_LINES);
- }
- gg.SetRanges(x1,x2); gg.Pop(); setlocale(LC_NUMERIC, "");
-
+#if MGL_HAVE_PTHREAD
+ pthread_t tmp;
+ pthread_create(&tmp, 0, mgl_qt_thr, this);
+ pthread_join(tmp, 0);
+#else
+ draw_thr();
+#endif
}
- gr->Zoom(x1,y1,x2,y2); gr->Perspective(per);
- if(viewYZ) gr->View(0,phi,tet);
- else gr->View(phi,0,tet);
+ mgl_zoom(gr,x1,y1,x2,y2); mgl_perspective(gr,per);
+ if(viewYZ) mgl_view(gr,0,phi,tet);
+ else mgl_view(gr,phi,0,tet);
}
mglConvertFromGraph(pic, gr, &grBuf);
if(pic.size()!=size()) setSize(pic.width(), pic.height());
@@ -312,7 +324,7 @@ void QMathGL::mousePressEvent(QMouseEvent *ev)
if(g) g->LastMousePos = p;
if(g && g->ClickFunc) g->ClickFunc(draw_par);
emit mouseClick(p.x,p.y,p.z);
- int id = gr->GetObjId(ev->x(),ev->y());
+ int id = mgl_get_obj_id(gr,ev->x(),ev->y());
if(id<MGL_MAX_LINES) emit objChanged(id-1);
p = gr->CalcXYZ(ev->x(), ev->y(), true);
@@ -388,14 +400,14 @@ void QMathGL::mouseMoveEvent(QMouseEvent *ev)
mreal ff = 1./sqrt(mreal(width()*height()));
mreal dx = (x0-xe)*ff*(ax2-ax1), dy = (y0-ye)*ff*(ay2-ay1);
ax1 += dx; ax2 += dx; ay1 -= dy; ay2 -= dy;
- gr->ZoomAxis(mglPoint(ax1,ay1),mglPoint(ax2,ay2));
+ mgl_zoom_axis(gr,ax1,ay1,0,0,ax2,ay2,0,0);
update(); x0 = xe; y0 = ye;
}
else if(ev->buttons()&Qt::LeftButton) // move primitives
{
long h=pic.height(), w=pic.width(), d=(h>w?w:h)/100;
long pos = mgl_is_active(gr,x0,y0,d);
- long id = long(gr->GetObjId(x0,y0))-MGL_MAX_LINES;
+ long id = long(mgl_get_obj_id(gr,x0,y0))-MGL_MAX_LINES;
if(grid && pos>=0) // this active point
{
const mglActivePos &p = gr->Act[pos];
@@ -430,7 +442,6 @@ void QMathGL::mouseMoveEvent(QMouseEvent *ev)
res = "rect "+QString::number(xx)+" "+QString::number(yy)+" "+
QString::number(x_)+" "+QString::number(y_)+" "+tst.section(' ',5);
}
- // TODO parse circle if I'll add it
else if(p.n==1)
{
xx=tst.section(' ',3,3).toFloat(); yy=tst.section(' ',4,4).toFloat();
@@ -494,7 +505,7 @@ void QMathGL::mouseDoubleClickEvent(QMouseEvent *ev)
{
long h=pic.height(), w=pic.width(), d=(h>w?w:h)/100;
long pos = mgl_is_active(gr,x0,y0,d);
- long id = long(gr->GetObjId(x0,y0));
+ long id = long(mgl_get_obj_id(gr,x0,y0));
if(grid && pos>=0) // this active point -> delete primitive
{
const mglActivePos &p = gr->Act[pos];
@@ -534,13 +545,13 @@ void QMathGL::wheelEvent(QWheelEvent *ev)
mreal d,c,f=exp(0.001*ev->delta())/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;
- gr->ZoomAxis(mglPoint(ax1,ay1),mglPoint(ax2,ay2));
+ mgl_zoom_axis(gr,ax1,ay1,0,0,ax2,ay2,0,0);
update(); ev->accept();
}
}
//-----------------------------------------------------------------------------
void QMathGL::imgSize(int w, int h)
-{ if(w>0 && h>0) { gr->SetSize(w,h); update(); } }
+{ if(w>0 && h>0) { mgl_set_size(gr,w,h); update(); } }
//-----------------------------------------------------------------------------
QString setExtension(QString &fname, const char *ext)
{
@@ -551,35 +562,35 @@ QString setExtension(QString &fname, const char *ext)
//-----------------------------------------------------------------------------
void QMathGL::exportGIF(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else mgl_write_gif(gr,setExtension(fname,"png").toAscii().constData(), appName.toAscii().constData());
}
//-----------------------------------------------------------------------------
void QMathGL::exportPNG(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else mgl_write_png(gr,setExtension(fname,"png").toAscii().constData(), appName.toAscii().constData());
}
//-----------------------------------------------------------------------------
void QMathGL::exportPNGs(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else mgl_write_png_solid(gr,setExtension(fname,"png").toAscii().constData(), appName.toAscii().constData());
}
//-----------------------------------------------------------------------------
void QMathGL::exportJPG(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else mgl_write_jpg(gr,setExtension(fname,"jpg").toAscii().constData(), appName.toAscii().constData());
}
//-----------------------------------------------------------------------------
void QMathGL::exportBPS(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -591,7 +602,7 @@ void QMathGL::exportBPS(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportEPS(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -603,7 +614,7 @@ void QMathGL::exportEPS(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportSVG(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -615,7 +626,7 @@ void QMathGL::exportSVG(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportXYZ(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -627,7 +638,7 @@ void QMathGL::exportXYZ(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportTEX(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -639,7 +650,7 @@ void QMathGL::exportTEX(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportOFF(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -651,7 +662,7 @@ void QMathGL::exportOFF(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportOBJ(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -663,7 +674,7 @@ void QMathGL::exportOBJ(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportSTL(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -675,7 +686,7 @@ void QMathGL::exportSTL(QString fname)
//-----------------------------------------------------------------------------
/*void QMathGL::exportX3D(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -687,7 +698,7 @@ void QMathGL::exportSTL(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportTGA(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -699,7 +710,7 @@ void QMathGL::exportTGA(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportPRC(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -711,7 +722,7 @@ void QMathGL::exportPRC(QString fname)
//-----------------------------------------------------------------------------
void QMathGL::exportMGLD(QString fname)
{
- if(fname.isEmpty()) fname = gr->PlotId.c_str();
+ if(fname.isEmpty()) fname = mgl_get_plotid(gr);
if(fname.isEmpty()) QMessageBox::critical(this, appName, tr("No filename."),QMessageBox::Ok,0,0);
else
{
@@ -723,8 +734,8 @@ void QMathGL::exportMGLD(QString fname)
//-----------------------------------------------------------------------------
void mglConvertFromGraph(QPixmap &pic, mglCanvas *gr, uchar **buf)
{
- const uchar *bb = gr->GetBits();
- register long i,w=gr->GetWidth(), h=gr->GetHeight();
+ const uchar *bb = mgl_get_rgb(gr);
+ register long i,w=mgl_get_width(gr), h=mgl_get_height(gr);
if(*buf) delete [](*buf);
*buf = new uchar[4*w*h];
for(i=0;i<w*h;i++)
@@ -746,13 +757,14 @@ void QMathGL::copyClickCoor()
{ QApplication::clipboard()->setText(mousePos); }
//-----------------------------------------------------------------------------
void QMathGL::setMGLFont(QString path)
-{ if(path.isEmpty()) gr->RestoreFont();
- else gr->LoadFont(path.toAscii().constData()); }
+{ if(path.isEmpty()) mgl_restore_font(gr);
+ else mgl_load_font(gr,path.toAscii().constData(),0); }
//-----------------------------------------------------------------------------
void QMathGL::setSize(int w, int h)
{
resize(w, h);
- if(w!=pic.width() || h!=pic.height()) { gr->SetSize(w,h); update(); } // update only when image size is changed
+ if(w!=pic.width() || h!=pic.height()) // update only when image size is changed
+ { mgl_set_size(gr,w,h); update(); }
}
//-----------------------------------------------------------------------------
void QMathGL::about()
@@ -799,12 +811,12 @@ void QMathGL::prevSlide()
void QMathGL::animation(bool st)
{
if(st) timer->stop();
- else timer->start(int(gr->GetDelay()*1000));
+ else timer->start(int(mgl_wnd_get_delay(gr)*1000));
}
//-----------------------------------------------------------------------------
void QMathGL::adjust()
{
- gr->SetSize(parentWidget()->width()-3, parentWidget()->height()-3);
+ mgl_set_size(gr, parentWidget()->width()-3, parentWidget()->height()-3);
setSize(parentWidget()->width()-3, parentWidget()->height()-3);
update();
}
@@ -850,7 +862,7 @@ void mglCanvasQT::GotoFrame(int d)
if(GetNumFig()>0 && d) { SetCurFig(f); QMGL->refresh(); }
}
//-----------------------------------------------------------------------------
-void mglCanvasQT::Animation() { QMGL->animation(true); } // TODO: Add toggle ???
+void mglCanvasQT::Animation() { QMGL->animation(true); }
//-----------------------------------------------------------------------------
void mglCanvasQT::ToggleAlpha() { QMGL->setAlpha(!QMGL->getAlpha()); }
//-----------------------------------------------------------------------------
@@ -1137,19 +1149,19 @@ QMenu *mglMakeMenu(QMainWindow *Wnd, QMathGL *QMGL, QSpinBox *&tet, QSpinBox *&p
return popup;
}
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph_qt(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
+HMGL MGL_EXPORT mgl_create_graph_qt(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
{
mglCanvasQT *g = new mglCanvasQT;
g->Window(0,0,draw,title,par,load);
return g;
}
-int mgl_qt_run() { return (qApp)?qApp->exec():-1; }
+int MGL_EXPORT mgl_qt_run() { return (qApp)?qApp->exec():-1; }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_graph_qt_(const char *title, int l)
+uintptr_t MGL_EXPORT mgl_create_graph_qt_(const char *title, int l)
{
char *s = new char[l+1]; memcpy(s,title,l); s[l]=0;
uintptr_t t = uintptr_t(mgl_create_graph_qt(0,s,0,0));
delete []s; return t;
}
-int mgl_qt_run_() { return mgl_qt_run(); }
+int MGL_EXPORT mgl_qt_run_() { return mgl_qt_run(); }
//-----------------------------------------------------------------------------
diff --git a/widgets/wx.cpp b/widgets/wx.cpp
index 17d3e55..6256732 100644
--- a/widgets/wx.cpp
+++ b/widgets/wx.cpp
@@ -98,7 +98,7 @@ wxMathGL::wxMathGL(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wx
//-----------------------------------------------------------------------------
wxMathGL::~wxMathGL() { if(mgl_use_graph(gr,-1)<1) mgl_delete_graph(gr); }
//-----------------------------------------------------------------------------
-double wxMathGL::GetRatio() { return double(gr->GetWidth())/gr->GetHeight(); };
+double wxMathGL::GetRatio() { return double(mgl_get_width(gr))/mgl_get_height(gr); };
//-----------------------------------------------------------------------------
void wxMathGL::SetGraph(HMGL GR)
{
@@ -113,7 +113,7 @@ void wxMathGL::OnPaint(wxPaintEvent& event)
wxPaintDC dc(this);
dc.DrawBitmap(pic,0,0);
// if(zoom) dc.DrawRectangle(x0,y0,xe-x0,ye-y0);
- if(gr->get(MGL_SHOW_POS) && !MousePos.IsEmpty())
+ if(mgl_get_flag(gr,MGL_SHOW_POS) && !MousePos.IsEmpty())
dc.DrawText(MousePos,0,12);
// TODO: add grid drawing here (from Qt)
// TODO: add active points drawing here (from Qt)
@@ -122,11 +122,11 @@ void wxMathGL::OnPaint(wxPaintEvent& event)
void wxMathGL::OnSize(wxSizeEvent& event)
{
wxSize ev = event.GetSize();
- if(gr->GetWidth()==ev.GetWidth() && gr->GetHeight()==ev.GetHeight())
+ if(mgl_get_width(gr)==ev.GetWidth() && mgl_get_height(gr)==ev.GetHeight())
return;
if(AutoResize && ev.GetWidth()>0 && ev.GetHeight()>0)
- { gr->SetSize(ev.GetWidth(), ev.GetHeight()); Update(); }
- else SetSize(gr->GetWidth(), gr->GetHeight());
+ { mgl_set_size(gr, ev.GetWidth(), ev.GetHeight()); Update(); }
+ else SetSize(mgl_get_width(gr), mgl_get_height(gr));
}
//-----------------------------------------------------------------------------
void wxMathGL::OnNextSlide(wxTimerEvent& evt) { NextSlide(); }
@@ -191,27 +191,25 @@ void wxMathGL::Update()
{
if(draw_func || draw_cl)
{
- if(gr->get(MGL_CLF_ON_UPD)) gr->DefaultPlotParam();
- gr->ResetFrames();
- gr->Alpha(alpha); gr->Light(light);
+ if(mgl_get_flag(gr,MGL_CLF_ON_UPD)) mgl_set_def_param(gr);
+ mgl_reset_frames(gr);
+ mgl_set_alpha(gr,alpha); mgl_set_light(gr,light);
if(draw_func) draw_func(gr, draw_par); // drawing itself
else if(draw_cl) { mglGraph g(gr); draw_cl->Draw(&g); }
- const char *buf = gr->Mess.c_str();
+ const char *buf = mgl_get_mess(gr);
if(*buf)
{
wxMessageDialog dlg(this, wxString(buf,wxConvLocal), appName, wxOK);
dlg.ShowModal();
}
}
-// if(gr->GetWidth()!=w() || gr->GetHeight()!=h())
-// size(gr->GetWidth(), gr->GetHeight());
MousePos.Empty(); Repaint();
}
//-----------------------------------------------------------------------------
void convertFromGraph(wxBitmap &pic, mglCanvas *gr, unsigned char **buf)
{
- const unsigned char *bb = gr->GetBits();
- register long i,w=gr->GetWidth(), h=gr->GetHeight();
+ const unsigned char *bb = mgl_get_rgb(gr);
+ register long i,w=mgl_get_width(gr), h=mgl_get_height(gr);
if(*buf) delete [](*buf);
*buf = new unsigned char[4*w*h];
for(i=0;i<w*h;i++)
@@ -227,7 +225,7 @@ void convertFromGraph(wxBitmap &pic, mglCanvas *gr, unsigned char **buf)
//-----------------------------------------------------------------------------
void wxMathGL::Repaint()
{
- gr->Zoom(x1,y1,x2,y2); gr->View(phi,0,tet); gr->Perspective(per);
+ mgl_zoom(gr,x1,y1,x2,y2); mgl_view(gr,phi,0,tet); mgl_perspective(gr, per);
convertFromGraph(pic, gr, &grBuf);
wxSize sz=GetSize();
if(pic.GetWidth()!=sz.GetWidth() || pic.GetHeight()!=sz.GetHeight())
@@ -396,12 +394,12 @@ void wxMathGL::Copy()
}
//-----------------------------------------------------------------------------
void wxMathGL::SetSize(int w, int h)
-{ gr->SetSize(w,h); wxWindow::SetSize(w, h); Update(); };
+{ mgl_set_size(gr,w,h); wxWindow::SetSize(w, h); Update(); };
//-----------------------------------------------------------------------------
void wxMathGL::Adjust()
{
wxSize sz=GetSize();
- gr->SetSize(sz.GetWidth(),sz.GetHeight());
+ mgl_set_size(gr,sz.GetWidth(),sz.GetHeight());
Repaint();
}
//-----------------------------------------------------------------------------
@@ -419,7 +417,7 @@ void wxMathGL::PrevSlide()
//-----------------------------------------------------------------------------
void wxMathGL::Animation(bool st)
{
- if(st) timer->Start(int(gr->GetDelay()*1000));
+ if(st) timer->Start(int(mgl_wnd_get_delay(gr)*1000));
else timer->Stop();
}
//-----------------------------------------------------------------------------
@@ -689,19 +687,19 @@ void mglCanvasWX::MakeMenu()
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-HMGL mgl_create_graph_wx(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
+HMGL MGL_EXPORT mgl_create_graph_wx(int (*draw)(HMGL gr, void *p), const char *title, void *par, void (*load)(void *p))
{
mglCanvasWX *g = new mglCanvasWX;
g->Window(0,0,draw,title,par,load);
return g;
}
-int mgl_wx_run(){ return wxTheApp ? wxTheApp->MainLoop():0; }
+int MGL_EXPORT mgl_wx_run(){ return wxTheApp ? wxTheApp->MainLoop():0; }
//-----------------------------------------------------------------------------
-uintptr_t mgl_create_graph_wx_(const char *title, int l)
+uintptr_t MGL_EXPORT mgl_create_graph_wx_(const char *title, int l)
{
char *s = new char[l+1]; memcpy(s,title,l); s[l]=0;
uintptr_t t = uintptr_t(mgl_create_graph_wx(0,s,0,0));
delete []s; return t;
}
-int mgl_wx_run_() { return mgl_wx_run(); }
+int MGL_EXPORT mgl_wx_run_() { return mgl_wx_run(); }
//-----------------------------------------------------------------------------
--
Packaging for mathgl
More information about the debian-science-commits
mailing list