ruby-gr 0.64.0.0 → 0.66.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +14 -6
 - data/lib/gr/ffi.rb +26 -22
 - data/lib/gr.rb +35 -1
 - data/lib/gr3/ffi.rb +99 -97
 - data/lib/gr_commons/version.rb +1 -1
 - data/lib/grm/ffi.rb +1 -0
 - metadata +3 -17
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8f62d57c43711e0e23533d38287699d89479a21071c362ff162f2106dfcc550e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 9be23f52f87aa7b61680142bc648049cbfa2c4b683bf082d47679daf430ff9dc
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: fd728fb1457f78827d8ce1ecf77ef7cd87df51f1ecbc4a1165d371a67e04cac130294dbe9e8b6d947a69a6c1385818f7aa041df3d4de9a883aec7e11f62742f6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: f6e6af01b74bfe6f6b373477d1a7cb917b52c8cb941d530fd1a90986927e241a4c75048cf49f2c1c4fbabebf59ea763d01de418768d67ebbafd9a19dabaf7b1c
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -3,7 +3,7 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            [](https://rubygems.org/gems/ruby-gr)
         
     | 
| 
       4 
4 
     | 
    
         
             
            [](https://github.com/red-data-tools/GR.rb/actions)
         
     | 
| 
       5 
5 
     | 
    
         
             
            [](https://gitter.im/red-data-tools/en)
         
     | 
| 
       6 
     | 
    
         
            -
            [](https:// 
     | 
| 
      
 6 
     | 
    
         
            +
            [](https://red-data-tools.github.io/GR.rb/)
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            [](examples/rdatasets.rb)
         
     | 
| 
       9 
9 
     | 
    
         
             
            [](examples/fast_plots.rb)
         
     | 
| 
         @@ -27,7 +27,7 @@ 
     | 
|
| 
       27 
27 
     | 
    
         | 
| 
       28 
28 
     | 
    
         
             
            GR.rb supports Ruby 2.5+.
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
     | 
    
         
            -
            First, [install GR](#gr-installation). Then install `gr-plot` gem.
         
     | 
| 
      
 30 
     | 
    
         
            +
            First, [install GR](#gr-installation). Then install [`gr-plot`](https://github.com/red-data-tools/gr-plot) gem.
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
            ```sh
         
     | 
| 
       33 
33 
     | 
    
         
             
            gem install gr-plot
         
     | 
| 
         @@ -60,9 +60,11 @@ GR.plot(x, y) 
     | 
|
| 
       60 
60 
     | 
    
         
             
            GR.savefig("figure.png")
         
     | 
| 
       61 
61 
     | 
    
         
             
            ```
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
      
 63 
     | 
    
         
            +
            GR.rb supports [Jupyter Notebook / Lab](../../wiki/Jupyter-Notebook).
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
       63 
65 
     | 
    
         
             
            ## API Overview
         
     | 
| 
       64 
66 
     | 
    
         | 
| 
       65 
     | 
    
         
            -
            #### GR::Plot - A simple, matlab-style API.
         
     | 
| 
      
 67 
     | 
    
         
            +
            #### [GR::Plot - A simple, matlab-style API](https://github.com/red-data-tools/gr-plot)
         
     | 
| 
       66 
68 
     | 
    
         | 
| 
       67 
69 
     | 
    
         
             
            ```ruby
         
     | 
| 
       68 
70 
     | 
    
         
             
            require 'gr/plot'
         
     | 
| 
         @@ -98,7 +100,7 @@ List of available functions. 
     | 
|
| 
       98 
100 
     | 
    
         
             
            See [GR.rb Wiki](https://github.com/red-data-tools/GR.rb/wiki) for details.
         
     | 
| 
       99 
101 
     | 
    
         
             
            Some GR module methods are overwritten. Code has been moved to [gr-plot](https://github.com/red-data-tools/gr-plot).
         
     | 
| 
       100 
102 
     | 
    
         | 
| 
       101 
     | 
    
         
            -
            #### GR - A module for calling native GR functions 
     | 
| 
      
 103 
     | 
    
         
            +
            #### GR - A module for calling native GR functions
         
     | 
| 
       102 
104 
     | 
    
         | 
| 
       103 
105 
     | 
    
         
             
            2-D Plots and common 3-D Plots.
         
     | 
| 
       104 
106 
     | 
    
         | 
| 
         @@ -110,7 +112,7 @@ GR.setviewport(0.1, 0.9, 0.1, 0.9) 
     | 
|
| 
       110 
112 
     | 
    
         
             
            GR.setwindow(0.0, 20.0, 0.0, 20.0)
         
     | 
| 
       111 
113 
     | 
    
         
             
            ```
         
     | 
| 
       112 
114 
     | 
    
         | 
| 
       113 
     | 
    
         
            -
            #### GR3 - A module for calling native GR3 functions 
     | 
| 
      
 115 
     | 
    
         
            +
            #### GR3 - A module for calling native GR3 functions
         
     | 
| 
       114 
116 
     | 
    
         | 
| 
       115 
117 
     | 
    
         
             
            Complex 3D scenes.
         
     | 
| 
       116 
118 
     | 
    
         | 
| 
         @@ -134,7 +136,7 @@ export GKS_WSTYPE=100 
     | 
|
| 
       134 
136 
     | 
    
         
             
            ## Documentation
         
     | 
| 
       135 
137 
     | 
    
         | 
| 
       136 
138 
     | 
    
         
             
            - [GR.rb Wiki](https://github.com/red-data-tools/GR.rb/wiki)
         
     | 
| 
       137 
     | 
    
         
            -
            - [GR.rb API Documentation](https:// 
     | 
| 
      
 139 
     | 
    
         
            +
            - [GR.rb API Documentation](https://red-data-tools.github.io/GR.rb/) - Yard documents.
         
     | 
| 
       138 
140 
     | 
    
         
             
            - [GR Framework](https://gr-framework.org/) - The official GR reference.
         
     | 
| 
       139 
141 
     | 
    
         | 
| 
       140 
142 
     | 
    
         
             
            ## GR Installation
         
     | 
| 
         @@ -164,10 +166,16 @@ export GKS_WSTYPE=411 # Set the workstation type to gksqt (recommended) 
     | 
|
| 
       164 
166 
     | 
    
         | 
| 
       165 
167 
     | 
    
         
             
            GR releases are also available from the [openSUSE Build service](https://software.opensuse.org//download.html?project=science%3Agr-framework&package=gr) for CentOS, Debian, Fedora openSUSE and Ubuntu. Obtain a packaged release [here](https://software.opensuse.org//download.html?project=science%3Agr-framework&package=gr).
         
     | 
| 
       166 
168 
     | 
    
         | 
| 
      
 169 
     | 
    
         
            +
            GR will be installed in `/usr/gr`. Set one of the following environment variables so that GR.rb can find the library.
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
       167 
171 
     | 
    
         
             
            ```sh
         
     | 
| 
       168 
172 
     | 
    
         
             
            export GRDIR="/usr/gr" # Check the location with `dpkg -L gr`
         
     | 
| 
       169 
173 
     | 
    
         
             
            ```
         
     | 
| 
       170 
174 
     | 
    
         | 
| 
      
 175 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 176 
     | 
    
         
            +
            export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/gr/lib/pkgconfig"
         
     | 
| 
      
 177 
     | 
    
         
            +
            ```
         
     | 
| 
      
 178 
     | 
    
         
            +
             
     | 
| 
       171 
179 
     | 
    
         
             
            #### Windows - MSYS2
         
     | 
| 
       172 
180 
     | 
    
         | 
| 
       173 
181 
     | 
    
         
             
            If you are using Rubyinstaller, pacman will automatically install [mingw-w64-gr](https://packages.msys2.org/base/mingw-w64-gr) when the gem is installed.
         
     | 
    
        data/lib/gr/ffi.rb
    CHANGED
    
    | 
         @@ -35,20 +35,20 @@ module GR 
     | 
|
| 
       35 
35 
     | 
    
         
             
                try_extern 'void gr_text(double, double, char *)'
         
     | 
| 
       36 
36 
     | 
    
         
             
                try_extern 'void gr_textx(double, double, char *, int)'
         
     | 
| 
       37 
37 
     | 
    
         
             
                try_extern 'void gr_inqtext(double, double, char *, double *, double *)'
         
     | 
| 
       38 
     | 
    
         
            -
                try_extern 'gr_inqtextx(double, double, char *, int, double *, double *)'
         
     | 
| 
      
 38 
     | 
    
         
            +
                try_extern 'void gr_inqtextx(double, double, char *, int, double *, double *)'
         
     | 
| 
       39 
39 
     | 
    
         
             
                try_extern 'void gr_fillarea(int, double *, double *)'
         
     | 
| 
       40 
     | 
    
         
            -
                try_extern 'void gr_cellarray(double, double, double, double, 
     | 
| 
       41 
     | 
    
         
            -
                           'int, int, int, int, int, int, int *)'
         
     | 
| 
       42 
     | 
    
         
            -
                try_extern 'void gr_nonuniformcellarray(double *, double *, 
     | 
| 
       43 
     | 
    
         
            -
                           'int, int, int, int, int, int, int *)'
         
     | 
| 
       44 
     | 
    
         
            -
                try_extern 'void gr_polarcellarray(double, double, double, double, double, double, 
     | 
| 
       45 
     | 
    
         
            -
                           'int, int, int, int, int, int, int *)'
         
     | 
| 
       46 
     | 
    
         
            -
                try_extern 'void gr_nonuniformpolarcellarray(double, double, double *, double *, 
     | 
| 
       47 
     | 
    
         
            -
                           'int, int, int, int, int, int, int *) 
     | 
| 
      
 40 
     | 
    
         
            +
                try_extern 'void gr_cellarray(double, double, double, double,' \
         
     | 
| 
      
 41 
     | 
    
         
            +
                           ' int, int, int, int, int, int, int *)'
         
     | 
| 
      
 42 
     | 
    
         
            +
                try_extern 'void gr_nonuniformcellarray(double *, double *,' \
         
     | 
| 
      
 43 
     | 
    
         
            +
                           ' int, int, int, int, int, int, int *)'
         
     | 
| 
      
 44 
     | 
    
         
            +
                try_extern 'void gr_polarcellarray(double, double, double, double, double, double,' \
         
     | 
| 
      
 45 
     | 
    
         
            +
                           ' int, int, int, int, int, int, int *)'
         
     | 
| 
      
 46 
     | 
    
         
            +
                try_extern 'void gr_nonuniformpolarcellarray(double, double, double *, double *,' \
         
     | 
| 
      
 47 
     | 
    
         
            +
                           ' int, int, int, int, int, int, int *)'
         
     | 
| 
       48 
48 
     | 
    
         
             
                try_extern 'void gr_gdp(int, double *, double *, int, int, int *)'
         
     | 
| 
       49 
49 
     | 
    
         
             
                try_extern 'void gr_spline(int, double *, double *, int, int)'
         
     | 
| 
       50 
     | 
    
         
            -
                try_extern 'void gr_gridit(int, double *, double *, double *, int, int, 
     | 
| 
       51 
     | 
    
         
            -
                           'double *, double *, double *)'
         
     | 
| 
      
 50 
     | 
    
         
            +
                try_extern 'void gr_gridit(int, double *, double *, double *, int, int,' \
         
     | 
| 
      
 51 
     | 
    
         
            +
                           ' double *, double *, double *)'
         
     | 
| 
       52 
52 
     | 
    
         
             
                try_extern 'void gr_setlinetype(int)'
         
     | 
| 
       53 
53 
     | 
    
         
             
                try_extern 'void gr_inqlinetype(int *)'
         
     | 
| 
       54 
54 
     | 
    
         
             
                try_extern 'void gr_setlinewidth(double)'
         
     | 
| 
         @@ -77,6 +77,8 @@ module GR 
     | 
|
| 
       77 
77 
     | 
    
         
             
                try_extern 'void gr_inqfillstyle(int *)'
         
     | 
| 
       78 
78 
     | 
    
         
             
                try_extern 'void gr_setfillcolorind(int)'
         
     | 
| 
       79 
79 
     | 
    
         
             
                try_extern 'void gr_inqfillcolorind(int *)'
         
     | 
| 
      
 80 
     | 
    
         
            +
                try_extern 'void gr_setresizebehaviour(int)'
         
     | 
| 
      
 81 
     | 
    
         
            +
                try_extern 'void gr_inqresizebehaviour(int *)'
         
     | 
| 
       80 
82 
     | 
    
         
             
                try_extern 'void gr_setcolorrep(int, double, double, double)'
         
     | 
| 
       81 
83 
     | 
    
         
             
                try_extern 'void gr_setwindow(double, double, double, double)'
         
     | 
| 
       82 
84 
     | 
    
         
             
                try_extern 'void gr_inqwindow(double *, double *, double *, double *)'
         
     | 
| 
         @@ -99,10 +101,11 @@ module GR 
     | 
|
| 
       99 
101 
     | 
    
         
             
                try_extern 'void gr_inqscale(int *)'
         
     | 
| 
       100 
102 
     | 
    
         
             
                try_extern 'int gr_textext(double, double, char *)'
         
     | 
| 
       101 
103 
     | 
    
         
             
                try_extern 'void gr_inqtextext(double, double, char *, double *, double *)'
         
     | 
| 
      
 104 
     | 
    
         
            +
                try_extern 'void gr_setscientificformat(int)'
         
     | 
| 
       102 
105 
     | 
    
         
             
                try_extern 'void gr_axes(double, double, double, double, int, int, double)'
         
     | 
| 
       103 
106 
     | 
    
         
             
                try_extern 'void gr_axeslbl(double, double, double, double, int, int, double,' \
         
     | 
| 
       104 
     | 
    
         
            -
                           'void (*)(double, double, const char *, double),' \
         
     | 
| 
       105 
     | 
    
         
            -
                           'void (*)(double, double, const char *, double))'
         
     | 
| 
      
 107 
     | 
    
         
            +
                           ' void (*)(double, double, const char *, double),' \
         
     | 
| 
      
 108 
     | 
    
         
            +
                           ' void (*)(double, double, const char *, double))'
         
     | 
| 
       106 
109 
     | 
    
         
             
                try_extern 'void gr_grid(double, double, double, double, int, int)'
         
     | 
| 
       107 
110 
     | 
    
         
             
                try_extern 'void gr_grid3d(double, double, double, double, double, double, int, int, int)'
         
     | 
| 
       108 
111 
     | 
    
         
             
                try_extern 'void gr_verrorbars(int, double *, double *, double *, double *)'
         
     | 
| 
         @@ -160,6 +163,7 @@ module GR 
     | 
|
| 
       160 
163 
     | 
    
         
             
                try_extern 'void gr_resizeselection(int, double, double)'
         
     | 
| 
       161 
164 
     | 
    
         
             
                try_extern 'void gr_inqbbox(double *, double *, double *, double *)'
         
     | 
| 
       162 
165 
     | 
    
         
             
                try_extern 'double gr_precision(void)'
         
     | 
| 
      
 166 
     | 
    
         
            +
                try_extern 'int gr_text_maxsize(void)'
         
     | 
| 
       163 
167 
     | 
    
         
             
                try_extern 'void gr_setregenflags(int)'
         
     | 
| 
       164 
168 
     | 
    
         
             
                try_extern 'int gr_inqregenflags(void)'
         
     | 
| 
       165 
169 
     | 
    
         
             
                try_extern 'void gr_savestate(void)'
         
     | 
| 
         @@ -173,30 +177,30 @@ module GR 
     | 
|
| 
       173 
177 
     | 
    
         
             
                try_extern 'void gr_gradient(int, int, double *, double *, double *, double *, double *)'
         
     | 
| 
       174 
178 
     | 
    
         
             
                try_extern 'void gr_quiver(int, int, double *, double *, double *, double *, int)'
         
     | 
| 
       175 
179 
     | 
    
         
             
                try_extern 'void gr_interp2(int nx, int ny, const double *x, const double *y, const double *z,' \
         
     | 
| 
       176 
     | 
    
         
            -
                           'int nxq, int nyq, const double *xq, const double *yq, double *zq, int method, double extrapval)'
         
     | 
| 
      
 180 
     | 
    
         
            +
                           ' int nxq, int nyq, const double *xq, const double *yq, double *zq, int method, double extrapval)'
         
     | 
| 
       177 
181 
     | 
    
         
             
                try_extern 'const char *gr_version(void)'
         
     | 
| 
       178 
182 
     | 
    
         
             
                try_extern 'void gr_shade(int, double *, double *, int, int, double *, int, int, int *)'
         
     | 
| 
       179 
183 
     | 
    
         
             
                try_extern 'void gr_shadepoints(int, double *, double *, int, int, int)'
         
     | 
| 
       180 
184 
     | 
    
         
             
                try_extern 'void gr_shadelines(int, double *, double *, int, int, int)'
         
     | 
| 
       181 
185 
     | 
    
         
             
                try_extern 'void gr_panzoom(double, double, double, double, double *, double *, double *, double *)'
         
     | 
| 
       182 
186 
     | 
    
         
             
                try_extern 'int gr_findboundary(int, double *, double *, double, double (*)(double, double), int, int *)'
         
     | 
| 
       183 
     | 
    
         
            -
                try_extern 'void gr_setresamplemethod(unsigned int 
     | 
| 
       184 
     | 
    
         
            -
                try_extern 'void gr_inqresamplemethod(unsigned int * 
     | 
| 
      
 187 
     | 
    
         
            +
                try_extern 'void gr_setresamplemethod(unsigned int)'
         
     | 
| 
      
 188 
     | 
    
         
            +
                try_extern 'void gr_inqresamplemethod(unsigned int *)'
         
     | 
| 
       185 
189 
     | 
    
         
             
                try_extern 'void gr_path(int, double *, double *, const char *)'
         
     | 
| 
       186 
190 
     | 
    
         
             
                try_extern 'void gr_setborderwidth(double)'
         
     | 
| 
       187 
191 
     | 
    
         
             
                try_extern 'void gr_inqborderwidth(double *)'
         
     | 
| 
       188 
192 
     | 
    
         
             
                try_extern 'void gr_setbordercolorind(int)'
         
     | 
| 
       189 
193 
     | 
    
         
             
                try_extern 'void gr_inqbordercolorind(int *)'
         
     | 
| 
       190 
194 
     | 
    
         
             
                try_extern 'void gr_selectclipxform(int)'
         
     | 
| 
       191 
     | 
    
         
            -
                try_extern 'void gr_inqclipxform(int *) 
     | 
| 
      
 195 
     | 
    
         
            +
                try_extern 'void gr_inqclipxform(int *)'
         
     | 
| 
       192 
196 
     | 
    
         
             
                try_extern 'void gr_setprojectiontype(int)'
         
     | 
| 
       193 
197 
     | 
    
         
             
                try_extern 'void gr_inqprojectiontype(int *)'
         
     | 
| 
       194 
198 
     | 
    
         
             
                try_extern 'void gr_setperspectiveprojection(double, double, double)'
         
     | 
| 
       195 
199 
     | 
    
         
             
                try_extern 'void gr_inqperspectiveprojection(double *, double *, double *)'
         
     | 
| 
       196 
     | 
    
         
            -
                try_extern 'void gr_settransformationparameters(double, double, double, 
     | 
| 
       197 
     | 
    
         
            -
                           'double, double, double, double, double, double)'
         
     | 
| 
       198 
     | 
    
         
            -
                try_extern 'void gr_inqtransformationparameters(double *, double *, double *, 
     | 
| 
       199 
     | 
    
         
            -
                           'double *, double *, double *, double *, double *, double *) 
     | 
| 
      
 200 
     | 
    
         
            +
                try_extern 'void gr_settransformationparameters(double, double, double,' \
         
     | 
| 
      
 201 
     | 
    
         
            +
                           ' double, double, double, double, double, double)'
         
     | 
| 
      
 202 
     | 
    
         
            +
                try_extern 'void gr_inqtransformationparameters(double *, double *, double *,' \
         
     | 
| 
      
 203 
     | 
    
         
            +
                           ' double *, double *, double *, double *, double *, double *)'
         
     | 
| 
       200 
204 
     | 
    
         
             
                try_extern 'void gr_setorthographicprojection(double, double, double, double, double, double)'
         
     | 
| 
       201 
205 
     | 
    
         
             
                try_extern 'void gr_inqorthographicprojection(double *, double *, double *, double *, double *, double *)'
         
     | 
| 
       202 
206 
     | 
    
         
             
                try_extern 'void gr_camerainteraction(double, double, double, double)'
         
     | 
| 
         @@ -210,7 +214,7 @@ module GR 
     | 
|
| 
       210 
214 
     | 
    
         
             
                try_extern 'void gr_settextencoding(int)'
         
     | 
| 
       211 
215 
     | 
    
         
             
                try_extern 'void gr_inqtextencoding(int *)'
         
     | 
| 
       212 
216 
     | 
    
         
             
                try_extern 'void gr_loadfont(char *, int *)'
         
     | 
| 
       213 
     | 
    
         
            -
                 
     | 
| 
      
 217 
     | 
    
         
            +
                try_extern 'void gr_setcallback(char *(*)(const char *))'
         
     | 
| 
       214 
218 
     | 
    
         
             
                try_extern 'void gr_setthreadnumber(int)'
         
     | 
| 
       215 
219 
     | 
    
         
             
                try_extern 'void gr_setpicturesizeforvolume(int, int)'
         
     | 
| 
       216 
220 
     | 
    
         
             
                try_extern 'void gr_setvolumebordercalculation(int)'
         
     | 
    
        data/lib/gr.rb
    CHANGED
    
    | 
         @@ -268,12 +268,38 @@ module GR 
     | 
|
| 
       268 
268 
     | 
    
         
             
                #
         
     | 
| 
       269 
269 
     | 
    
         
             
                # @!method text
         
     | 
| 
       270 
270 
     | 
    
         | 
| 
      
 271 
     | 
    
         
            +
                # Draw a text at position `x`, `y` using the given options and current text
         
     | 
| 
      
 272 
     | 
    
         
            +
                # attributes.
         
     | 
| 
      
 273 
     | 
    
         
            +
                #
         
     | 
| 
      
 274 
     | 
    
         
            +
                # @param x      [Numeric] The X coordinate of the starting position of the text string
         
     | 
| 
      
 275 
     | 
    
         
            +
                # @param y      [Numeric] The Y coordinate of the starting position of the text string
         
     | 
| 
      
 276 
     | 
    
         
            +
                # @param string [String]  The text to be drawn
         
     | 
| 
      
 277 
     | 
    
         
            +
                # @param opts   [Integer] Bit mask including text options (GR_TEXT_USE_WC,
         
     | 
| 
      
 278 
     | 
    
         
            +
                # GR_TEXT_ENABLE_INLINE_MATH)
         
     | 
| 
      
 279 
     | 
    
         
            +
                #
         
     | 
| 
      
 280 
     | 
    
         
            +
                # The values for `x` and `y` specify the text position. If the GR_TEXT_USE_WC
         
     | 
| 
      
 281 
     | 
    
         
            +
                # option is set, they are interpreted as world cordinates, otherwise as
         
     | 
| 
      
 282 
     | 
    
         
            +
                # normalized device coordinates. The string may contain new line characters
         
     | 
| 
      
 283 
     | 
    
         
            +
                # and inline math expressions ($...$). The latter are only taken into account,
         
     | 
| 
      
 284 
     | 
    
         
            +
                # if the GR_TEXT_ENABLE_INLINE_MATH option is set.
         
     | 
| 
      
 285 
     | 
    
         
            +
                # The attributes that control the appearance of text are text font and
         
     | 
| 
      
 286 
     | 
    
         
            +
                # precision, character expansion factor, character spacing, text color index,
         
     | 
| 
      
 287 
     | 
    
         
            +
                # character height, character up vector, text path and text alignment.
         
     | 
| 
      
 288 
     | 
    
         
            +
                #
         
     | 
| 
      
 289 
     | 
    
         
            +
                # @!method textx
         
     | 
| 
      
 290 
     | 
    
         
            +
             
     | 
| 
       271 
291 
     | 
    
         
             
                def inqtext(x, y, string)
         
     | 
| 
       272 
292 
     | 
    
         
             
                  inquiry [{ double: 4 }, { double: 4 }] do |tbx, tby|
         
     | 
| 
       273 
293 
     | 
    
         
             
                    super(x, y, string, tbx, tby)
         
     | 
| 
       274 
294 
     | 
    
         
             
                  end
         
     | 
| 
       275 
295 
     | 
    
         
             
                end
         
     | 
| 
       276 
296 
     | 
    
         | 
| 
      
 297 
     | 
    
         
            +
                def inqtextx(x, y, string, opts)
         
     | 
| 
      
 298 
     | 
    
         
            +
                  inquiry [{ double: 4 }, { double: 4 }] do |tbx, tby|
         
     | 
| 
      
 299 
     | 
    
         
            +
                    super(x, y, string, opts, tbx, tby)
         
     | 
| 
      
 300 
     | 
    
         
            +
                  end
         
     | 
| 
      
 301 
     | 
    
         
            +
                end
         
     | 
| 
      
 302 
     | 
    
         
            +
             
     | 
| 
       277 
303 
     | 
    
         
             
                # Allows you to specify a polygonal shape of an area to be filled.
         
     | 
| 
       278 
304 
     | 
    
         
             
                #
         
     | 
| 
       279 
305 
     | 
    
         
             
                # @param x [Array, NArray] A list containing the X coordinates
         
     | 
| 
         @@ -783,6 +809,12 @@ module GR 
     | 
|
| 
       783 
809 
     | 
    
         
             
                  inquiry_int { |pt| super(pt) }
         
     | 
| 
       784 
810 
     | 
    
         
             
                end
         
     | 
| 
       785 
811 
     | 
    
         | 
| 
      
 812 
     | 
    
         
            +
                # @!method gr_setresizebehaviour
         
     | 
| 
      
 813 
     | 
    
         
            +
             
     | 
| 
      
 814 
     | 
    
         
            +
                def inqresizebehaviour
         
     | 
| 
      
 815 
     | 
    
         
            +
                  inquiry_int { |pt| super(pt) }
         
     | 
| 
      
 816 
     | 
    
         
            +
                end
         
     | 
| 
      
 817 
     | 
    
         
            +
             
     | 
| 
       786 
818 
     | 
    
         
             
                # Redefine an existing color index representation by specifying an RGB color
         
     | 
| 
       787 
819 
     | 
    
         
             
                # triplet.
         
     | 
| 
       788 
820 
     | 
    
         
             
                #
         
     | 
| 
         @@ -1820,7 +1852,9 @@ module GR 
     | 
|
| 
       1820 
1852 
     | 
    
         
             
                end
         
     | 
| 
       1821 
1853 
     | 
    
         | 
| 
       1822 
1854 
     | 
    
         
             
                # @return [Numeric]
         
     | 
| 
       1823 
     | 
    
         
            -
                # @!method 
     | 
| 
      
 1855 
     | 
    
         
            +
                # @!method
         
     | 
| 
      
 1856 
     | 
    
         
            +
             
     | 
| 
      
 1857 
     | 
    
         
            +
                # @!method text_maxsize
         
     | 
| 
       1824 
1858 
     | 
    
         | 
| 
       1825 
1859 
     | 
    
         
             
                # @!method setregenflags
         
     | 
| 
       1826 
1860 
     | 
    
         | 
    
        data/lib/gr3/ffi.rb
    CHANGED
    
    | 
         @@ -17,6 +17,8 @@ module GR3 
     | 
|
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                extend GRCommons::TryExtern
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
      
 20 
     | 
    
         
            +
                typealias("GR3_MC_DTYPE", "unsigned short")
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       20 
22 
     | 
    
         
             
                # https://github.com/sciapp/gr/blob/master/lib/gr3/gr3.h
         
     | 
| 
       21 
23 
     | 
    
         
             
                # keep same order
         
     | 
| 
       22 
24 
     | 
    
         
             
                try_extern 'int gr3_init(int *attrib_list)'
         
     | 
| 
         @@ -25,123 +27,123 @@ module GR3 
     | 
|
| 
       25 
27 
     | 
    
         
             
                try_extern 'int gr3_geterror(int clear, int *line, const char **file)'
         
     | 
| 
       26 
28 
     | 
    
         
             
                try_extern 'const char *gr3_getrenderpathstring(void)'
         
     | 
| 
       27 
29 
     | 
    
         
             
                try_extern 'const char *gr3_geterrorstring(int error)'
         
     | 
| 
       28 
     | 
    
         
            -
                 
     | 
| 
      
 30 
     | 
    
         
            +
                try_extern 'void gr3_setlogcallback(void (*gr3_log_func)(const char *log_message))'
         
     | 
| 
       29 
31 
     | 
    
         
             
                try_extern 'int gr3_clear(void)'
         
     | 
| 
       30 
32 
     | 
    
         
             
                try_extern 'void gr3_usecurrentframebuffer()'
         
     | 
| 
       31 
33 
     | 
    
         
             
                try_extern 'void gr3_useframebuffer(unsigned int framebuffer)'
         
     | 
| 
       32 
34 
     | 
    
         
             
                try_extern 'int gr3_setquality(int quality)'
         
     | 
| 
       33 
35 
     | 
    
         
             
                try_extern 'int gr3_getimage(int width, int height, int use_alpha, char *pixels)'
         
     | 
| 
       34 
36 
     | 
    
         
             
                try_extern 'int gr3_export(const char *filename, int width, int height)'
         
     | 
| 
       35 
     | 
    
         
            -
                try_extern 'int gr3_drawimage(float xmin, float xmax, float ymin, float ymax, 
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
                try_extern 'int gr3_createmesh_nocopy(int *mesh, int n, 
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                try_extern 'int gr3_createmesh(int *mesh, int n, 
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                try_extern 'int gr3_createindexedmesh_nocopy(int *mesh, int number_of_vertices, 
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                try_extern 'int gr3_createindexedmesh(int *mesh, int number_of_vertices, 
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                try_extern 'void gr3_drawmesh(int mesh, int n, 
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
      
 37 
     | 
    
         
            +
                try_extern 'int gr3_drawimage(float xmin, float xmax, float ymin, float ymax,' \
         
     | 
| 
      
 38 
     | 
    
         
            +
                           ' int width, int height, int drawable_type)'
         
     | 
| 
      
 39 
     | 
    
         
            +
                try_extern 'int gr3_createmesh_nocopy(int *mesh, int n,' \
         
     | 
| 
      
 40 
     | 
    
         
            +
                           ' float *vertices, float *normals, float *colors)'
         
     | 
| 
      
 41 
     | 
    
         
            +
                try_extern 'int gr3_createmesh(int *mesh, int n,' \
         
     | 
| 
      
 42 
     | 
    
         
            +
                           ' const float *vertices, const float *normals, const float *colors)'
         
     | 
| 
      
 43 
     | 
    
         
            +
                try_extern 'int gr3_createindexedmesh_nocopy(int *mesh, int number_of_vertices,' \
         
     | 
| 
      
 44 
     | 
    
         
            +
                           ' float *vertices, float *normals, float *colors, int number_of_indices, int *indices)'
         
     | 
| 
      
 45 
     | 
    
         
            +
                try_extern 'int gr3_createindexedmesh(int *mesh, int number_of_vertices,' \
         
     | 
| 
      
 46 
     | 
    
         
            +
                           ' const float *vertices, const float *normals, const float *colors,' \
         
     | 
| 
      
 47 
     | 
    
         
            +
                           ' int number_of_indices, const int *indices)'
         
     | 
| 
      
 48 
     | 
    
         
            +
                try_extern 'void gr3_drawmesh(int mesh, int n,' \
         
     | 
| 
      
 49 
     | 
    
         
            +
                           ' const float *positions, const float *directions, const float *ups,' \
         
     | 
| 
      
 50 
     | 
    
         
            +
                           ' const float *colors, const float *scales)'
         
     | 
| 
       49 
51 
     | 
    
         
             
                try_extern 'void gr3_deletemesh(int mesh)'
         
     | 
| 
       50 
     | 
    
         
            -
                try_extern 'void gr3_cameralookat(float camera_x, float camera_y, float camera_z, 
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                try_extern 'int gr3_setcameraprojectionparameters(float vertical_field_of_view, 
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
      
 52 
     | 
    
         
            +
                try_extern 'void gr3_cameralookat(float camera_x, float camera_y, float camera_z,' \
         
     | 
| 
      
 53 
     | 
    
         
            +
                           ' float center_x, float center_y, float center_z,' \
         
     | 
| 
      
 54 
     | 
    
         
            +
                           ' float up_x, float up_y, float up_z)'
         
     | 
| 
      
 55 
     | 
    
         
            +
                try_extern 'int gr3_setcameraprojectionparameters(float vertical_field_of_view,' \
         
     | 
| 
      
 56 
     | 
    
         
            +
                           ' float zNear, float zFar)'
         
     | 
| 
       55 
57 
     | 
    
         
             
                try_extern 'int gr3_getcameraprojectionparameters(float *vfov, float *znear, float *zfar)'
         
     | 
| 
       56 
58 
     | 
    
         
             
                try_extern 'void gr3_setlightdirection(float x, float y, float z)'
         
     | 
| 
       57 
59 
     | 
    
         
             
                try_extern 'void gr3_setbackgroundcolor(float red, float green, float blue, float alpha)'
         
     | 
| 
       58 
60 
     | 
    
         
             
                try_extern 'int gr3_createheightmapmesh(const float *heightmap, int num_columns, int num_rows)'
         
     | 
| 
       59 
     | 
    
         
            -
                try_extern 'void gr3_drawheightmap(const float *heightmap, 
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                try_extern 'void gr3_drawconemesh(int n, const float *positions, const float *directions, 
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                try_extern 'void gr3_drawcylindermesh(int n, const float *positions, const float *directions, 
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                try_extern 'void gr3_drawspheremesh(int n, const float *positions, 
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                try_extern 'void gr3_drawcubemesh(int n, 
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
      
 61 
     | 
    
         
            +
                try_extern 'void gr3_drawheightmap(const float *heightmap,' \
         
     | 
| 
      
 62 
     | 
    
         
            +
                           ' int num_columns, int num_rows, const float *positions, const float *scales)'
         
     | 
| 
      
 63 
     | 
    
         
            +
                try_extern 'void gr3_drawconemesh(int n, const float *positions, const float *directions,' \
         
     | 
| 
      
 64 
     | 
    
         
            +
                           ' const float *colors, const float *radii, const float *lengths)'
         
     | 
| 
      
 65 
     | 
    
         
            +
                try_extern 'void gr3_drawcylindermesh(int n, const float *positions, const float *directions,' \
         
     | 
| 
      
 66 
     | 
    
         
            +
                           ' const float *colors, const float *radii, const float *lengths)'
         
     | 
| 
      
 67 
     | 
    
         
            +
                try_extern 'void gr3_drawspheremesh(int n, const float *positions,' \
         
     | 
| 
      
 68 
     | 
    
         
            +
                           ' const float *colors, const float *radii)'
         
     | 
| 
      
 69 
     | 
    
         
            +
                try_extern 'void gr3_drawcubemesh(int n,' \
         
     | 
| 
      
 70 
     | 
    
         
            +
                           ' const float *positions, const float *directions, const float *ups,' \
         
     | 
| 
      
 71 
     | 
    
         
            +
                           ' const float *colors, const float *scales)'
         
     | 
| 
       70 
72 
     | 
    
         
             
                try_extern 'void gr3_setobjectid(int id)'
         
     | 
| 
       71 
73 
     | 
    
         
             
                try_extern 'int gr3_selectid(int x, int y, int width, int height, int *selection_id)'
         
     | 
| 
       72 
74 
     | 
    
         
             
                try_extern 'void gr3_getviewmatrix(float *m)'
         
     | 
| 
       73 
75 
     | 
    
         
             
                try_extern 'void gr3_setviewmatrix(const float *m)'
         
     | 
| 
       74 
76 
     | 
    
         
             
                try_extern 'int gr3_getprojectiontype(void)'
         
     | 
| 
       75 
77 
     | 
    
         
             
                try_extern 'void gr3_setprojectiontype(int type)'
         
     | 
| 
       76 
     | 
    
         
            -
                 
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
                 
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
                try_extern 'int gr3_createisosurfacemesh(int *mesh,  
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
                try_extern 'int gr3_createsurfacemesh(int *mesh, int nx, int ny, 
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                try_extern 'int gr3_createsurface3dmesh(int *mesh, int ncols, int nrows, 
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                try_extern 'void gr3_drawmesh_grlike(int mesh, int n, 
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
      
 78 
     | 
    
         
            +
                try_extern 'unsigned int gr3_triangulate(const GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 79 
     | 
    
         
            +
                           ' GR3_MC_DTYPE isolevel, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 80 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 81 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z, double offset_x, double offset_y, double offset_z,' \
         
     | 
| 
      
 82 
     | 
    
         
            +
                           ' gr3_triangle_t **triangles_p)'
         
     | 
| 
      
 83 
     | 
    
         
            +
                try_extern 'void gr3_triangulateindexed(const GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 84 
     | 
    
         
            +
                           ' GR3_MC_DTYPE isolevel, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 85 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 86 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z, double offset_x, double offset_y, double offset_z,' \
         
     | 
| 
      
 87 
     | 
    
         
            +
                           ' unsigned int *num_vertices, gr3_coord_t **vertices, gr3_coord_t **normals,' \
         
     | 
| 
      
 88 
     | 
    
         
            +
                           ' unsigned int *num_indices, unsigned int **indices)'
         
     | 
| 
      
 89 
     | 
    
         
            +
                try_extern 'int gr3_createisosurfacemesh(int *mesh, GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 90 
     | 
    
         
            +
                           ' GR3_MC_DTYPE isolevel, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 91 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 92 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 93 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 94 
     | 
    
         
            +
                try_extern 'int gr3_createsurfacemesh(int *mesh, int nx, int ny,' \
         
     | 
| 
      
 95 
     | 
    
         
            +
                           ' float *px, float *py, float *pz, int option)'
         
     | 
| 
      
 96 
     | 
    
         
            +
                try_extern 'int gr3_createsurface3dmesh(int *mesh, int ncols, int nrows,' \
         
     | 
| 
      
 97 
     | 
    
         
            +
                           ' float *px, float *py, float *pz)'
         
     | 
| 
      
 98 
     | 
    
         
            +
                try_extern 'void gr3_drawmesh_grlike(int mesh, int n,' \
         
     | 
| 
      
 99 
     | 
    
         
            +
                           ' const float *positions, const float *directions, const float *ups,' \
         
     | 
| 
      
 100 
     | 
    
         
            +
                           ' const float *colors, const float *scales)'
         
     | 
| 
       99 
101 
     | 
    
         
             
                try_extern 'void gr3_drawsurface(int mesh)'
         
     | 
| 
       100 
102 
     | 
    
         
             
                try_extern 'void gr3_surface(int nx, int ny, float *px, float *py, float *pz, int option)'
         
     | 
| 
       101 
     | 
    
         
            -
                try_extern 'int gr3_drawtubemesh(int n, float *points, float *colors, float *radii, 
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
                try_extern 'int gr3_createtubemesh(int *mesh, int n, 
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
                try_extern 'void gr3_drawspins(int n, const float *positions, const float *directions, const float *colors, 
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                try_extern 'void gr3_drawmolecule(int n, const float *positions, const float *colors, const float *radii, 
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
                try_extern 'void gr3_createxslicemesh(int *mesh, const  
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                try_extern 'void gr3_createyslicemesh(int *mesh, const  
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                try_extern 'void gr3_createzslicemesh(int *mesh, const  
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
                try_extern 'void gr3_drawxslicemesh(const  
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
     | 
    
         
            -
                try_extern 'void gr3_drawyslicemesh(const  
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
                try_extern 'void gr3_drawzslicemesh(const  
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
                 
     | 
| 
       141 
     | 
    
         
            -
                try_extern 'void gr_volume(int nx, int ny, int nz, double *data, 
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
      
 103 
     | 
    
         
            +
                try_extern 'int gr3_drawtubemesh(int n, float *points, float *colors, float *radii,' \
         
     | 
| 
      
 104 
     | 
    
         
            +
                           ' int num_steps, int num_segments)'
         
     | 
| 
      
 105 
     | 
    
         
            +
                try_extern 'int gr3_createtubemesh(int *mesh, int n,' \
         
     | 
| 
      
 106 
     | 
    
         
            +
                           ' const float *points, const float *colors, const float *radii,' \
         
     | 
| 
      
 107 
     | 
    
         
            +
                           ' int num_steps, int num_segments)'
         
     | 
| 
      
 108 
     | 
    
         
            +
                try_extern 'void gr3_drawspins(int n, const float *positions, const float *directions, const float *colors,' \
         
     | 
| 
      
 109 
     | 
    
         
            +
                           ' float cone_radius, float cylinder_radius, float cone_height, float cylinder_height)'
         
     | 
| 
      
 110 
     | 
    
         
            +
                try_extern 'void gr3_drawmolecule(int n, const float *positions, const float *colors, const float *radii,' \
         
     | 
| 
      
 111 
     | 
    
         
            +
                           ' float bond_radius, const float bond_color[3], float bond_delta)'
         
     | 
| 
      
 112 
     | 
    
         
            +
                try_extern 'void gr3_createxslicemesh(int *mesh, const GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 113 
     | 
    
         
            +
                           ' unsigned int ix, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 114 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 115 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 116 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 117 
     | 
    
         
            +
                try_extern 'void gr3_createyslicemesh(int *mesh, const GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 118 
     | 
    
         
            +
                           ' unsigned int iy, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 119 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 120 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 121 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 122 
     | 
    
         
            +
                try_extern 'void gr3_createzslicemesh(int *mesh, const GR3_MC_DTYPE *data,' \
         
     | 
| 
      
 123 
     | 
    
         
            +
                           ' unsigned int iz, unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 124 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 125 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 126 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 127 
     | 
    
         
            +
                try_extern 'void gr3_drawxslicemesh(const GR3_MC_DTYPE *data, unsigned int ix,' \
         
     | 
| 
      
 128 
     | 
    
         
            +
                           ' unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 129 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 130 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 131 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 132 
     | 
    
         
            +
                try_extern 'void gr3_drawyslicemesh(const GR3_MC_DTYPE *data, unsigned int iy,' \
         
     | 
| 
      
 133 
     | 
    
         
            +
                           ' unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 134 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 135 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 136 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 137 
     | 
    
         
            +
                try_extern 'void gr3_drawzslicemesh(const GR3_MC_DTYPE *data, unsigned int iz,' \
         
     | 
| 
      
 138 
     | 
    
         
            +
                           ' unsigned int dim_x, unsigned int dim_y, unsigned int dim_z,' \
         
     | 
| 
      
 139 
     | 
    
         
            +
                           ' unsigned int stride_x, unsigned int stride_y, unsigned int stride_z,' \
         
     | 
| 
      
 140 
     | 
    
         
            +
                           ' double step_x, double step_y, double step_z,' \
         
     | 
| 
      
 141 
     | 
    
         
            +
                           ' double offset_x, double offset_y, double offset_z)'
         
     | 
| 
      
 142 
     | 
    
         
            +
                try_extern 'void gr3_drawtrianglesurface(int n, const float *triangles)'
         
     | 
| 
      
 143 
     | 
    
         
            +
                try_extern 'void gr_volume(int nx, int ny, int nz, double *data,' \
         
     | 
| 
      
 144 
     | 
    
         
            +
                           ' int algorithm, double *dmin_ptr, double *dmax_ptr)'
         
     | 
| 
       143 
145 
     | 
    
         
             
                try_extern 'void gr3_setorthographicprojection' \
         
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
      
 146 
     | 
    
         
            +
                           '(float left, float right, float bottom, float top, float znear, float zfar)'
         
     | 
| 
       145 
147 
     | 
    
         
             
                try_extern 'void gr3_setsurfaceoption(int option)'
         
     | 
| 
       146 
148 
     | 
    
         
             
                try_extern 'int gr3_getsurfaceoption(void)'
         
     | 
| 
       147 
149 
     | 
    
         
             
                try_extern 'int gr3_getlightsources(int max_num_lights, float *positions, float *colors)'
         
     | 
    
        data/lib/gr_commons/version.rb
    CHANGED
    
    
    
        data/lib/grm/ffi.rb
    CHANGED
    
    | 
         @@ -47,6 +47,7 @@ module GRM 
     | 
|
| 
       47 
47 
     | 
    
         
             
                typealias 'const_int', 'int' # FIXME
         
     | 
| 
       48 
48 
     | 
    
         
             
                try_extern 'int grm_input(const grm_args_t *input_args)'
         
     | 
| 
       49 
49 
     | 
    
         
             
                try_extern 'int grm_get_box(const_int x1, const_int y1, const_int x2, const_int y2, const_int keep_aspect_ratio, int *x, int *y, int *w, int *h)' # FIXME
         
     | 
| 
      
 50 
     | 
    
         
            +
                try_extern 'int grm_is3d(const int x, const int y)'
         
     | 
| 
       50 
51 
     | 
    
         
             
                try_extern 'grm_tooltip_info_t *grm_get_tooltip(const_int, const_int)' # FIXME
         
     | 
| 
       51 
52 
     | 
    
         | 
| 
       52 
53 
     | 
    
         
             
                # https://github.com/sciapp/gr/blob/master/lib/grm/net.h
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ruby-gr
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.66.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - kojix2
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-07-09 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: fiddle
         
     | 
| 
         @@ -24,20 +24,6 @@ dependencies: 
     | 
|
| 
       24 
24 
     | 
    
         
             
                - - ">="
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       27 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
     | 
    
         
            -
              name: histogram
         
     | 
| 
       29 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
     | 
    
         
            -
                requirements:
         
     | 
| 
       31 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       32 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       34 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       35 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       36 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
     | 
    
         
            -
                requirements:
         
     | 
| 
       38 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       39 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: '0'
         
     | 
| 
       41 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
28 
     | 
    
         
             
              name: numo-narray
         
     | 
| 
       43 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -108,7 +94,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       108 
94 
     | 
    
         
             
              requirements:
         
     | 
| 
       109 
95 
     | 
    
         
             
              - - ">="
         
     | 
| 
       110 
96 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       111 
     | 
    
         
            -
                  version: '2. 
     | 
| 
      
 97 
     | 
    
         
            +
                  version: '2.6'
         
     | 
| 
       112 
98 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       113 
99 
     | 
    
         
             
              requirements:
         
     | 
| 
       114 
100 
     | 
    
         
             
              - - ">="
         
     |