ruby-dcl 1.6.3.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/ChangeLog +57 -1
- data/Gemfile +4 -0
- data/GenWrapper/Makefile +1 -0
- data/GenWrapper/dcl_rb_heading +2 -8
- data/GenWrapper/elim_ary_size.rb +1 -1
- data/GenWrapper/proto/Makefile +17 -16
- data/GenWrapper/proto/grph1_sgpack.fp +367 -1
- data/GenWrapper/proto/grph1_stpack.fp +45 -1
- data/GenWrapper/proto/grph1_swpack.fp +70 -1
- data/GenWrapper/proto/grph2_uipack.fp +508 -0
- data/GenWrapper/proto/math1_clsplib.fp +74 -0
- data/GenWrapper/proto/misc1_randlib.fp +15 -1
- data/README.md +29 -0
- data/Rakefile +18 -38
- data/dcl_narrayed_funcs.c +23 -22
- data/dcl_rubydcloriginal.c +21 -21
- data/demo/grph2/uipack/uipk01.rb +38 -0
- data/demo/grph2/uipack/uipk02.rb +48 -0
- data/demo/grph2/umpack/test09_2.rb +89 -0
- data/demo/math1/clsplib/cslb01.rb +55 -0
- data/extconf.rb +16 -48
- data/grph1_sgpack.c +1166 -0
- data/grph1_stpack.c +141 -0
- data/grph1_swpack.c +182 -0
- data/grph2_uipack.c +1456 -0
- data/init.c.default +8 -0
- data/lib/.keepme +0 -0
- data/lib/dcl/dcl.rb +5578 -0
- data/lib/dcl/version.rb +3 -0
- data/lib/dcl.rb +2 -5084
- data/math1_clsplib.c +329 -0
- data/misc1_randlib.c +37 -0
- data/ruby-dcl.gemspec +30 -0
- metadata +343 -352
- data/GenWrapper/etc/Mk_proto +0 -375
- data/GenWrapper/etc/dcl_gen +0 -13
- data/GenWrapper/etc/p_init +0 -410
- data/GenWrapper/proto/math2_shtlib.fp_old +0 -1294
- data/README_old +0 -79
- data/dummy.c +0 -9
- data/grph1_zgpack.c.org +0 -141
- data/init.c.gtk +0 -189
data/grph1_sgpack.c
CHANGED
@@ -3721,6 +3721,1109 @@ dcl_sgqcwd(obj)
|
|
3721
3721
|
|
3722
3722
|
}
|
3723
3723
|
|
3724
|
+
#endif
|
3725
|
+
|
3726
|
+
#if DCLVER >= 544
|
3727
|
+
|
3728
|
+
static VALUE
|
3729
|
+
dcl_isgrgb(obj, ir, ig, ib)
|
3730
|
+
VALUE obj, ir, ig, ib;
|
3731
|
+
{
|
3732
|
+
integer i_ir;
|
3733
|
+
integer i_ig;
|
3734
|
+
integer i_ib;
|
3735
|
+
integer o_rtn_val;
|
3736
|
+
VALUE rtn_val;
|
3737
|
+
|
3738
|
+
if ((TYPE(ir) != T_BIGNUM) || (TYPE(ir) != T_FIXNUM)) {
|
3739
|
+
ir = rb_funcall(ir, rb_intern("to_i"), 0);
|
3740
|
+
}
|
3741
|
+
if ((TYPE(ig) != T_BIGNUM) || (TYPE(ig) != T_FIXNUM)) {
|
3742
|
+
ig = rb_funcall(ig, rb_intern("to_i"), 0);
|
3743
|
+
}
|
3744
|
+
if ((TYPE(ib) != T_BIGNUM) || (TYPE(ib) != T_FIXNUM)) {
|
3745
|
+
ib = rb_funcall(ib, rb_intern("to_i"), 0);
|
3746
|
+
}
|
3747
|
+
|
3748
|
+
i_ir = NUM2INT(ir);
|
3749
|
+
i_ig = NUM2INT(ig);
|
3750
|
+
i_ib = NUM2INT(ib);
|
3751
|
+
|
3752
|
+
|
3753
|
+
o_rtn_val = isgrgb_(&i_ir, &i_ig, &i_ib);
|
3754
|
+
|
3755
|
+
rtn_val = INT2NUM(o_rtn_val);
|
3756
|
+
|
3757
|
+
|
3758
|
+
return rtn_val;
|
3759
|
+
|
3760
|
+
}
|
3761
|
+
|
3762
|
+
#endif
|
3763
|
+
|
3764
|
+
#if DCLVER >= 544
|
3765
|
+
|
3766
|
+
static VALUE
|
3767
|
+
dcl_sgclst(obj, ccfile)
|
3768
|
+
VALUE obj, ccfile;
|
3769
|
+
{
|
3770
|
+
char *i_ccfile;
|
3771
|
+
|
3772
|
+
if (TYPE(ccfile) != T_STRING) {
|
3773
|
+
ccfile = rb_funcall(ccfile, rb_intern("to_str"), 0);
|
3774
|
+
}
|
3775
|
+
|
3776
|
+
i_ccfile = StringValuePtr(ccfile);
|
3777
|
+
|
3778
|
+
|
3779
|
+
sgclst_(i_ccfile, (ftnlen)strlen(i_ccfile));
|
3780
|
+
|
3781
|
+
return Qnil;
|
3782
|
+
|
3783
|
+
}
|
3784
|
+
|
3785
|
+
#endif
|
3786
|
+
|
3787
|
+
#if DCLVER >= 544
|
3788
|
+
|
3789
|
+
static VALUE
|
3790
|
+
dcl_sgqcl(obj, num)
|
3791
|
+
VALUE obj, num;
|
3792
|
+
{
|
3793
|
+
integer i_num;
|
3794
|
+
integer o_nr;
|
3795
|
+
integer o_ng;
|
3796
|
+
integer o_nb;
|
3797
|
+
VALUE nr;
|
3798
|
+
VALUE ng;
|
3799
|
+
VALUE nb;
|
3800
|
+
|
3801
|
+
if ((TYPE(num) != T_BIGNUM) || (TYPE(num) != T_FIXNUM)) {
|
3802
|
+
num = rb_funcall(num, rb_intern("to_i"), 0);
|
3803
|
+
}
|
3804
|
+
|
3805
|
+
i_num = NUM2INT(num);
|
3806
|
+
|
3807
|
+
|
3808
|
+
sgqcl_(&i_num, &o_nr, &o_ng, &o_nb);
|
3809
|
+
|
3810
|
+
nr = INT2NUM(o_nr);
|
3811
|
+
ng = INT2NUM(o_ng);
|
3812
|
+
nb = INT2NUM(o_nb);
|
3813
|
+
|
3814
|
+
|
3815
|
+
return rb_ary_new3(3, nr, ng, nb);
|
3816
|
+
|
3817
|
+
}
|
3818
|
+
|
3819
|
+
#endif
|
3820
|
+
|
3821
|
+
#if DCLVER >= 544
|
3822
|
+
|
3823
|
+
static VALUE
|
3824
|
+
dcl_sgplxu(obj, n, upx, upy, itype, index, icolor)
|
3825
|
+
VALUE obj, n, upx, upy, itype, index, icolor;
|
3826
|
+
{
|
3827
|
+
integer i_n;
|
3828
|
+
real *i_upx;
|
3829
|
+
real *i_upy;
|
3830
|
+
integer i_itype;
|
3831
|
+
integer i_index;
|
3832
|
+
integer i_icolor;
|
3833
|
+
|
3834
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
3835
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
3836
|
+
}
|
3837
|
+
if (TYPE(upx) == T_FLOAT) {
|
3838
|
+
upx = rb_Array(upx);
|
3839
|
+
}
|
3840
|
+
/* if ((TYPE(upx) != T_ARRAY) &&
|
3841
|
+
(rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
|
3842
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3843
|
+
} -- no check since obj2c*ary will do that */
|
3844
|
+
if (TYPE(upy) == T_FLOAT) {
|
3845
|
+
upy = rb_Array(upy);
|
3846
|
+
}
|
3847
|
+
/* if ((TYPE(upy) != T_ARRAY) &&
|
3848
|
+
(rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
|
3849
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3850
|
+
} -- no check since obj2c*ary will do that */
|
3851
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
3852
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
3853
|
+
}
|
3854
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
3855
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
3856
|
+
}
|
3857
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
3858
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
3859
|
+
}
|
3860
|
+
|
3861
|
+
i_n = NUM2INT(n);
|
3862
|
+
i_itype = NUM2INT(itype);
|
3863
|
+
i_index = NUM2INT(index);
|
3864
|
+
i_icolor = NUM2INT(icolor);
|
3865
|
+
i_upx = dcl_obj2crealary(upx);
|
3866
|
+
i_upy = dcl_obj2crealary(upy);
|
3867
|
+
|
3868
|
+
|
3869
|
+
sgplxu_(&i_n, i_upx, i_upy, &i_itype, &i_index, &i_icolor);
|
3870
|
+
|
3871
|
+
dcl_freecrealary(i_upx);
|
3872
|
+
dcl_freecrealary(i_upy);
|
3873
|
+
|
3874
|
+
return Qnil;
|
3875
|
+
|
3876
|
+
}
|
3877
|
+
|
3878
|
+
#endif
|
3879
|
+
|
3880
|
+
#if DCLVER >= 544
|
3881
|
+
|
3882
|
+
static VALUE
|
3883
|
+
dcl_sgplxv(obj, n, vpx, vpy, itype, index, icolor)
|
3884
|
+
VALUE obj, n, vpx, vpy, itype, index, icolor;
|
3885
|
+
{
|
3886
|
+
integer i_n;
|
3887
|
+
real *i_vpx;
|
3888
|
+
real *i_vpy;
|
3889
|
+
integer i_itype;
|
3890
|
+
integer i_index;
|
3891
|
+
integer i_icolor;
|
3892
|
+
|
3893
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
3894
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
3895
|
+
}
|
3896
|
+
if (TYPE(vpx) == T_FLOAT) {
|
3897
|
+
vpx = rb_Array(vpx);
|
3898
|
+
}
|
3899
|
+
/* if ((TYPE(vpx) != T_ARRAY) &&
|
3900
|
+
(rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
|
3901
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3902
|
+
} -- no check since obj2c*ary will do that */
|
3903
|
+
if (TYPE(vpy) == T_FLOAT) {
|
3904
|
+
vpy = rb_Array(vpy);
|
3905
|
+
}
|
3906
|
+
/* if ((TYPE(vpy) != T_ARRAY) &&
|
3907
|
+
(rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
|
3908
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3909
|
+
} -- no check since obj2c*ary will do that */
|
3910
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
3911
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
3912
|
+
}
|
3913
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
3914
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
3915
|
+
}
|
3916
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
3917
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
3918
|
+
}
|
3919
|
+
|
3920
|
+
i_n = NUM2INT(n);
|
3921
|
+
i_itype = NUM2INT(itype);
|
3922
|
+
i_index = NUM2INT(index);
|
3923
|
+
i_icolor = NUM2INT(icolor);
|
3924
|
+
i_vpx = dcl_obj2crealary(vpx);
|
3925
|
+
i_vpy = dcl_obj2crealary(vpy);
|
3926
|
+
|
3927
|
+
|
3928
|
+
sgplxv_(&i_n, i_vpx, i_vpy, &i_itype, &i_index, &i_icolor);
|
3929
|
+
|
3930
|
+
dcl_freecrealary(i_vpx);
|
3931
|
+
dcl_freecrealary(i_vpy);
|
3932
|
+
|
3933
|
+
return Qnil;
|
3934
|
+
|
3935
|
+
}
|
3936
|
+
|
3937
|
+
#endif
|
3938
|
+
|
3939
|
+
#if DCLVER >= 544
|
3940
|
+
|
3941
|
+
static VALUE
|
3942
|
+
dcl_sgplxr(obj, n, rpx, rpy, itype, index, icolor)
|
3943
|
+
VALUE obj, n, rpx, rpy, itype, index, icolor;
|
3944
|
+
{
|
3945
|
+
integer i_n;
|
3946
|
+
real *i_rpx;
|
3947
|
+
real *i_rpy;
|
3948
|
+
integer i_itype;
|
3949
|
+
integer i_index;
|
3950
|
+
integer i_icolor;
|
3951
|
+
|
3952
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
3953
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
3954
|
+
}
|
3955
|
+
if (TYPE(rpx) == T_FLOAT) {
|
3956
|
+
rpx = rb_Array(rpx);
|
3957
|
+
}
|
3958
|
+
/* if ((TYPE(rpx) != T_ARRAY) &&
|
3959
|
+
(rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
|
3960
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3961
|
+
} -- no check since obj2c*ary will do that */
|
3962
|
+
if (TYPE(rpy) == T_FLOAT) {
|
3963
|
+
rpy = rb_Array(rpy);
|
3964
|
+
}
|
3965
|
+
/* if ((TYPE(rpy) != T_ARRAY) &&
|
3966
|
+
(rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
|
3967
|
+
rb_raise(rb_eTypeError, "invalid type");
|
3968
|
+
} -- no check since obj2c*ary will do that */
|
3969
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
3970
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
3971
|
+
}
|
3972
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
3973
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
3974
|
+
}
|
3975
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
3976
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
3977
|
+
}
|
3978
|
+
|
3979
|
+
i_n = NUM2INT(n);
|
3980
|
+
i_itype = NUM2INT(itype);
|
3981
|
+
i_index = NUM2INT(index);
|
3982
|
+
i_icolor = NUM2INT(icolor);
|
3983
|
+
i_rpx = dcl_obj2crealary(rpx);
|
3984
|
+
i_rpy = dcl_obj2crealary(rpy);
|
3985
|
+
|
3986
|
+
|
3987
|
+
sgplxr_(&i_n, i_rpx, i_rpy, &i_itype, &i_index, &i_icolor);
|
3988
|
+
|
3989
|
+
dcl_freecrealary(i_rpx);
|
3990
|
+
dcl_freecrealary(i_rpy);
|
3991
|
+
|
3992
|
+
return Qnil;
|
3993
|
+
|
3994
|
+
}
|
3995
|
+
|
3996
|
+
#endif
|
3997
|
+
|
3998
|
+
#if DCLVER >= 544
|
3999
|
+
|
4000
|
+
static VALUE
|
4001
|
+
dcl_sgpmxu(obj, n, upx, upy, itype, index, icolor, rsize)
|
4002
|
+
VALUE obj, n, upx, upy, itype, index, icolor, rsize;
|
4003
|
+
{
|
4004
|
+
integer i_n;
|
4005
|
+
real *i_upx;
|
4006
|
+
real *i_upy;
|
4007
|
+
integer i_itype;
|
4008
|
+
integer i_index;
|
4009
|
+
integer i_icolor;
|
4010
|
+
real i_rsize;
|
4011
|
+
|
4012
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4013
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4014
|
+
}
|
4015
|
+
if (TYPE(upx) == T_FLOAT) {
|
4016
|
+
upx = rb_Array(upx);
|
4017
|
+
}
|
4018
|
+
/* if ((TYPE(upx) != T_ARRAY) &&
|
4019
|
+
(rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
|
4020
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4021
|
+
} -- no check since obj2c*ary will do that */
|
4022
|
+
if (TYPE(upy) == T_FLOAT) {
|
4023
|
+
upy = rb_Array(upy);
|
4024
|
+
}
|
4025
|
+
/* if ((TYPE(upy) != T_ARRAY) &&
|
4026
|
+
(rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
|
4027
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4028
|
+
} -- no check since obj2c*ary will do that */
|
4029
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4030
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4031
|
+
}
|
4032
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4033
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4034
|
+
}
|
4035
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4036
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4037
|
+
}
|
4038
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4039
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4040
|
+
}
|
4041
|
+
|
4042
|
+
i_n = NUM2INT(n);
|
4043
|
+
i_itype = NUM2INT(itype);
|
4044
|
+
i_index = NUM2INT(index);
|
4045
|
+
i_icolor = NUM2INT(icolor);
|
4046
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4047
|
+
i_upx = dcl_obj2crealary(upx);
|
4048
|
+
i_upy = dcl_obj2crealary(upy);
|
4049
|
+
|
4050
|
+
|
4051
|
+
sgpmxu_(&i_n, i_upx, i_upy, &i_itype, &i_index, &i_icolor, &i_rsize);
|
4052
|
+
|
4053
|
+
dcl_freecrealary(i_upx);
|
4054
|
+
dcl_freecrealary(i_upy);
|
4055
|
+
|
4056
|
+
return Qnil;
|
4057
|
+
|
4058
|
+
}
|
4059
|
+
|
4060
|
+
#endif
|
4061
|
+
|
4062
|
+
#if DCLVER >= 544
|
4063
|
+
|
4064
|
+
static VALUE
|
4065
|
+
dcl_sgpmxv(obj, n, vpx, vpy, itype, index, icolor, rsize)
|
4066
|
+
VALUE obj, n, vpx, vpy, itype, index, icolor, rsize;
|
4067
|
+
{
|
4068
|
+
integer i_n;
|
4069
|
+
real *i_vpx;
|
4070
|
+
real *i_vpy;
|
4071
|
+
integer i_itype;
|
4072
|
+
integer i_index;
|
4073
|
+
integer i_icolor;
|
4074
|
+
real i_rsize;
|
4075
|
+
|
4076
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4077
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4078
|
+
}
|
4079
|
+
if (TYPE(vpx) == T_FLOAT) {
|
4080
|
+
vpx = rb_Array(vpx);
|
4081
|
+
}
|
4082
|
+
/* if ((TYPE(vpx) != T_ARRAY) &&
|
4083
|
+
(rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
|
4084
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4085
|
+
} -- no check since obj2c*ary will do that */
|
4086
|
+
if (TYPE(vpy) == T_FLOAT) {
|
4087
|
+
vpy = rb_Array(vpy);
|
4088
|
+
}
|
4089
|
+
/* if ((TYPE(vpy) != T_ARRAY) &&
|
4090
|
+
(rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
|
4091
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4092
|
+
} -- no check since obj2c*ary will do that */
|
4093
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4094
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4095
|
+
}
|
4096
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4097
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4098
|
+
}
|
4099
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4100
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4101
|
+
}
|
4102
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4103
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4104
|
+
}
|
4105
|
+
|
4106
|
+
i_n = NUM2INT(n);
|
4107
|
+
i_itype = NUM2INT(itype);
|
4108
|
+
i_index = NUM2INT(index);
|
4109
|
+
i_icolor = NUM2INT(icolor);
|
4110
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4111
|
+
i_vpx = dcl_obj2crealary(vpx);
|
4112
|
+
i_vpy = dcl_obj2crealary(vpy);
|
4113
|
+
|
4114
|
+
|
4115
|
+
sgpmxv_(&i_n, i_vpx, i_vpy, &i_itype, &i_index, &i_icolor, &i_rsize);
|
4116
|
+
|
4117
|
+
dcl_freecrealary(i_vpx);
|
4118
|
+
dcl_freecrealary(i_vpy);
|
4119
|
+
|
4120
|
+
return Qnil;
|
4121
|
+
|
4122
|
+
}
|
4123
|
+
|
4124
|
+
#endif
|
4125
|
+
|
4126
|
+
#if DCLVER >= 544
|
4127
|
+
|
4128
|
+
static VALUE
|
4129
|
+
dcl_sgpmxr(obj, n, rpx, rpy, itype, index, icolor, rsize)
|
4130
|
+
VALUE obj, n, rpx, rpy, itype, index, icolor, rsize;
|
4131
|
+
{
|
4132
|
+
integer i_n;
|
4133
|
+
real *i_rpx;
|
4134
|
+
real *i_rpy;
|
4135
|
+
integer i_itype;
|
4136
|
+
integer i_index;
|
4137
|
+
integer i_icolor;
|
4138
|
+
real i_rsize;
|
4139
|
+
|
4140
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4141
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4142
|
+
}
|
4143
|
+
if (TYPE(rpx) == T_FLOAT) {
|
4144
|
+
rpx = rb_Array(rpx);
|
4145
|
+
}
|
4146
|
+
/* if ((TYPE(rpx) != T_ARRAY) &&
|
4147
|
+
(rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
|
4148
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4149
|
+
} -- no check since obj2c*ary will do that */
|
4150
|
+
if (TYPE(rpy) == T_FLOAT) {
|
4151
|
+
rpy = rb_Array(rpy);
|
4152
|
+
}
|
4153
|
+
/* if ((TYPE(rpy) != T_ARRAY) &&
|
4154
|
+
(rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
|
4155
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4156
|
+
} -- no check since obj2c*ary will do that */
|
4157
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4158
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4159
|
+
}
|
4160
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4161
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4162
|
+
}
|
4163
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4164
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4165
|
+
}
|
4166
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4167
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4168
|
+
}
|
4169
|
+
|
4170
|
+
i_n = NUM2INT(n);
|
4171
|
+
i_itype = NUM2INT(itype);
|
4172
|
+
i_index = NUM2INT(index);
|
4173
|
+
i_icolor = NUM2INT(icolor);
|
4174
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4175
|
+
i_rpx = dcl_obj2crealary(rpx);
|
4176
|
+
i_rpy = dcl_obj2crealary(rpy);
|
4177
|
+
|
4178
|
+
|
4179
|
+
sgpmxr_(&i_n, i_rpx, i_rpy, &i_itype, &i_index, &i_icolor, &i_rsize);
|
4180
|
+
|
4181
|
+
dcl_freecrealary(i_rpx);
|
4182
|
+
dcl_freecrealary(i_rpy);
|
4183
|
+
|
4184
|
+
return Qnil;
|
4185
|
+
|
4186
|
+
}
|
4187
|
+
|
4188
|
+
#endif
|
4189
|
+
|
4190
|
+
#if DCLVER >= 544
|
4191
|
+
|
4192
|
+
static VALUE
|
4193
|
+
dcl_sgtxxu(obj, ux, uy, chars, rsize, irota, icent, index, icolor)
|
4194
|
+
VALUE obj, ux, uy, chars, rsize, irota, icent, index, icolor;
|
4195
|
+
{
|
4196
|
+
real i_ux;
|
4197
|
+
real i_uy;
|
4198
|
+
char *i_chars;
|
4199
|
+
real i_rsize;
|
4200
|
+
integer i_irota;
|
4201
|
+
integer i_icent;
|
4202
|
+
integer i_index;
|
4203
|
+
integer i_icolor;
|
4204
|
+
|
4205
|
+
if (TYPE(ux) != T_FLOAT) {
|
4206
|
+
ux = rb_funcall(ux, rb_intern("to_f"), 0);
|
4207
|
+
}
|
4208
|
+
if (TYPE(uy) != T_FLOAT) {
|
4209
|
+
uy = rb_funcall(uy, rb_intern("to_f"), 0);
|
4210
|
+
}
|
4211
|
+
if (TYPE(chars) != T_STRING) {
|
4212
|
+
chars = rb_funcall(chars, rb_intern("to_str"), 0);
|
4213
|
+
}
|
4214
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4215
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4216
|
+
}
|
4217
|
+
if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
|
4218
|
+
irota = rb_funcall(irota, rb_intern("to_i"), 0);
|
4219
|
+
}
|
4220
|
+
if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
|
4221
|
+
icent = rb_funcall(icent, rb_intern("to_i"), 0);
|
4222
|
+
}
|
4223
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4224
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4225
|
+
}
|
4226
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4227
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4228
|
+
}
|
4229
|
+
|
4230
|
+
i_ux = (real)NUM2DBL(ux);
|
4231
|
+
i_uy = (real)NUM2DBL(uy);
|
4232
|
+
i_chars = StringValuePtr(chars);
|
4233
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4234
|
+
i_irota = NUM2INT(irota);
|
4235
|
+
i_icent = NUM2INT(icent);
|
4236
|
+
i_index = NUM2INT(index);
|
4237
|
+
i_icolor = NUM2INT(icolor);
|
4238
|
+
|
4239
|
+
|
4240
|
+
sgtxxu_(&i_ux, &i_uy, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, &i_icolor, (ftnlen)strlen(i_chars));
|
4241
|
+
|
4242
|
+
return Qnil;
|
4243
|
+
|
4244
|
+
}
|
4245
|
+
|
4246
|
+
#endif
|
4247
|
+
|
4248
|
+
#if DCLVER >= 544
|
4249
|
+
|
4250
|
+
static VALUE
|
4251
|
+
dcl_sgtxxv(obj, vx, vy, chars, rsize, irota, icent, index, icolor)
|
4252
|
+
VALUE obj, vx, vy, chars, rsize, irota, icent, index, icolor;
|
4253
|
+
{
|
4254
|
+
real i_vx;
|
4255
|
+
real i_vy;
|
4256
|
+
char *i_chars;
|
4257
|
+
real i_rsize;
|
4258
|
+
integer i_irota;
|
4259
|
+
integer i_icent;
|
4260
|
+
integer i_index;
|
4261
|
+
integer i_icolor;
|
4262
|
+
|
4263
|
+
if (TYPE(vx) != T_FLOAT) {
|
4264
|
+
vx = rb_funcall(vx, rb_intern("to_f"), 0);
|
4265
|
+
}
|
4266
|
+
if (TYPE(vy) != T_FLOAT) {
|
4267
|
+
vy = rb_funcall(vy, rb_intern("to_f"), 0);
|
4268
|
+
}
|
4269
|
+
if (TYPE(chars) != T_STRING) {
|
4270
|
+
chars = rb_funcall(chars, rb_intern("to_str"), 0);
|
4271
|
+
}
|
4272
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4273
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4274
|
+
}
|
4275
|
+
if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
|
4276
|
+
irota = rb_funcall(irota, rb_intern("to_i"), 0);
|
4277
|
+
}
|
4278
|
+
if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
|
4279
|
+
icent = rb_funcall(icent, rb_intern("to_i"), 0);
|
4280
|
+
}
|
4281
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4282
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4283
|
+
}
|
4284
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4285
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4286
|
+
}
|
4287
|
+
|
4288
|
+
i_vx = (real)NUM2DBL(vx);
|
4289
|
+
i_vy = (real)NUM2DBL(vy);
|
4290
|
+
i_chars = StringValuePtr(chars);
|
4291
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4292
|
+
i_irota = NUM2INT(irota);
|
4293
|
+
i_icent = NUM2INT(icent);
|
4294
|
+
i_index = NUM2INT(index);
|
4295
|
+
i_icolor = NUM2INT(icolor);
|
4296
|
+
|
4297
|
+
|
4298
|
+
sgtxxv_(&i_vx, &i_vy, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, &i_icolor, (ftnlen)strlen(i_chars));
|
4299
|
+
|
4300
|
+
return Qnil;
|
4301
|
+
|
4302
|
+
}
|
4303
|
+
|
4304
|
+
#endif
|
4305
|
+
|
4306
|
+
#if DCLVER >= 544
|
4307
|
+
|
4308
|
+
static VALUE
|
4309
|
+
dcl_sgtxxr(obj, rx, ry, chars, rsize, irota, icent, index, icolor)
|
4310
|
+
VALUE obj, rx, ry, chars, rsize, irota, icent, index, icolor;
|
4311
|
+
{
|
4312
|
+
real i_rx;
|
4313
|
+
real i_ry;
|
4314
|
+
char *i_chars;
|
4315
|
+
real i_rsize;
|
4316
|
+
integer i_irota;
|
4317
|
+
integer i_icent;
|
4318
|
+
integer i_index;
|
4319
|
+
integer i_icolor;
|
4320
|
+
|
4321
|
+
if (TYPE(rx) != T_FLOAT) {
|
4322
|
+
rx = rb_funcall(rx, rb_intern("to_f"), 0);
|
4323
|
+
}
|
4324
|
+
if (TYPE(ry) != T_FLOAT) {
|
4325
|
+
ry = rb_funcall(ry, rb_intern("to_f"), 0);
|
4326
|
+
}
|
4327
|
+
if (TYPE(chars) != T_STRING) {
|
4328
|
+
chars = rb_funcall(chars, rb_intern("to_str"), 0);
|
4329
|
+
}
|
4330
|
+
if (TYPE(rsize) != T_FLOAT) {
|
4331
|
+
rsize = rb_funcall(rsize, rb_intern("to_f"), 0);
|
4332
|
+
}
|
4333
|
+
if ((TYPE(irota) != T_BIGNUM) || (TYPE(irota) != T_FIXNUM)) {
|
4334
|
+
irota = rb_funcall(irota, rb_intern("to_i"), 0);
|
4335
|
+
}
|
4336
|
+
if ((TYPE(icent) != T_BIGNUM) || (TYPE(icent) != T_FIXNUM)) {
|
4337
|
+
icent = rb_funcall(icent, rb_intern("to_i"), 0);
|
4338
|
+
}
|
4339
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4340
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4341
|
+
}
|
4342
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4343
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4344
|
+
}
|
4345
|
+
|
4346
|
+
i_rx = (real)NUM2DBL(rx);
|
4347
|
+
i_ry = (real)NUM2DBL(ry);
|
4348
|
+
i_chars = StringValuePtr(chars);
|
4349
|
+
i_rsize = (real)NUM2DBL(rsize);
|
4350
|
+
i_irota = NUM2INT(irota);
|
4351
|
+
i_icent = NUM2INT(icent);
|
4352
|
+
i_index = NUM2INT(index);
|
4353
|
+
i_icolor = NUM2INT(icolor);
|
4354
|
+
|
4355
|
+
|
4356
|
+
sgtxxr_(&i_rx, &i_ry, i_chars, &i_rsize, &i_irota, &i_icent, &i_index, &i_icolor, (ftnlen)strlen(i_chars));
|
4357
|
+
|
4358
|
+
return Qnil;
|
4359
|
+
|
4360
|
+
}
|
4361
|
+
|
4362
|
+
#endif
|
4363
|
+
|
4364
|
+
#if DCLVER >= 544
|
4365
|
+
|
4366
|
+
static VALUE
|
4367
|
+
dcl_sgtnxu(obj, n, upx, upy, itpat, icolor)
|
4368
|
+
VALUE obj, n, upx, upy, itpat, icolor;
|
4369
|
+
{
|
4370
|
+
integer i_n;
|
4371
|
+
real *i_upx;
|
4372
|
+
real *i_upy;
|
4373
|
+
integer i_itpat;
|
4374
|
+
integer i_icolor;
|
4375
|
+
|
4376
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4377
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4378
|
+
}
|
4379
|
+
if (TYPE(upx) == T_FLOAT) {
|
4380
|
+
upx = rb_Array(upx);
|
4381
|
+
}
|
4382
|
+
/* if ((TYPE(upx) != T_ARRAY) &&
|
4383
|
+
(rb_obj_is_kind_of(upx, cNArray) != Qtrue)) {
|
4384
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4385
|
+
} -- no check since obj2c*ary will do that */
|
4386
|
+
if (TYPE(upy) == T_FLOAT) {
|
4387
|
+
upy = rb_Array(upy);
|
4388
|
+
}
|
4389
|
+
/* if ((TYPE(upy) != T_ARRAY) &&
|
4390
|
+
(rb_obj_is_kind_of(upy, cNArray) != Qtrue)) {
|
4391
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4392
|
+
} -- no check since obj2c*ary will do that */
|
4393
|
+
if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
|
4394
|
+
itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
|
4395
|
+
}
|
4396
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4397
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4398
|
+
}
|
4399
|
+
|
4400
|
+
i_n = NUM2INT(n);
|
4401
|
+
i_itpat = NUM2INT(itpat);
|
4402
|
+
i_icolor = NUM2INT(icolor);
|
4403
|
+
i_upx = dcl_obj2crealary(upx);
|
4404
|
+
i_upy = dcl_obj2crealary(upy);
|
4405
|
+
|
4406
|
+
|
4407
|
+
sgtnxu_(&i_n, i_upx, i_upy, &i_itpat, &i_icolor);
|
4408
|
+
|
4409
|
+
dcl_freecrealary(i_upx);
|
4410
|
+
dcl_freecrealary(i_upy);
|
4411
|
+
|
4412
|
+
return Qnil;
|
4413
|
+
|
4414
|
+
}
|
4415
|
+
|
4416
|
+
#endif
|
4417
|
+
|
4418
|
+
#if DCLVER >= 544
|
4419
|
+
|
4420
|
+
static VALUE
|
4421
|
+
dcl_sgtnxv(obj, n, vpx, vpy, itpat, icolor)
|
4422
|
+
VALUE obj, n, vpx, vpy, itpat, icolor;
|
4423
|
+
{
|
4424
|
+
integer i_n;
|
4425
|
+
real *i_vpx;
|
4426
|
+
real *i_vpy;
|
4427
|
+
integer i_itpat;
|
4428
|
+
integer i_icolor;
|
4429
|
+
|
4430
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4431
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4432
|
+
}
|
4433
|
+
if (TYPE(vpx) == T_FLOAT) {
|
4434
|
+
vpx = rb_Array(vpx);
|
4435
|
+
}
|
4436
|
+
/* if ((TYPE(vpx) != T_ARRAY) &&
|
4437
|
+
(rb_obj_is_kind_of(vpx, cNArray) != Qtrue)) {
|
4438
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4439
|
+
} -- no check since obj2c*ary will do that */
|
4440
|
+
if (TYPE(vpy) == T_FLOAT) {
|
4441
|
+
vpy = rb_Array(vpy);
|
4442
|
+
}
|
4443
|
+
/* if ((TYPE(vpy) != T_ARRAY) &&
|
4444
|
+
(rb_obj_is_kind_of(vpy, cNArray) != Qtrue)) {
|
4445
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4446
|
+
} -- no check since obj2c*ary will do that */
|
4447
|
+
if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
|
4448
|
+
itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
|
4449
|
+
}
|
4450
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4451
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4452
|
+
}
|
4453
|
+
|
4454
|
+
i_n = NUM2INT(n);
|
4455
|
+
i_itpat = NUM2INT(itpat);
|
4456
|
+
i_icolor = NUM2INT(icolor);
|
4457
|
+
i_vpx = dcl_obj2crealary(vpx);
|
4458
|
+
i_vpy = dcl_obj2crealary(vpy);
|
4459
|
+
|
4460
|
+
|
4461
|
+
sgtnxv_(&i_n, i_vpx, i_vpy, &i_itpat, &i_icolor);
|
4462
|
+
|
4463
|
+
dcl_freecrealary(i_vpx);
|
4464
|
+
dcl_freecrealary(i_vpy);
|
4465
|
+
|
4466
|
+
return Qnil;
|
4467
|
+
|
4468
|
+
}
|
4469
|
+
|
4470
|
+
#endif
|
4471
|
+
|
4472
|
+
#if DCLVER >= 544
|
4473
|
+
|
4474
|
+
static VALUE
|
4475
|
+
dcl_sgtnxr(obj, n, rpx, rpy, itpat, icolor)
|
4476
|
+
VALUE obj, n, rpx, rpy, itpat, icolor;
|
4477
|
+
{
|
4478
|
+
integer i_n;
|
4479
|
+
real *i_rpx;
|
4480
|
+
real *i_rpy;
|
4481
|
+
integer i_itpat;
|
4482
|
+
integer i_icolor;
|
4483
|
+
|
4484
|
+
if ((TYPE(n) != T_BIGNUM) || (TYPE(n) != T_FIXNUM)) {
|
4485
|
+
n = rb_funcall(n, rb_intern("to_i"), 0);
|
4486
|
+
}
|
4487
|
+
if (TYPE(rpx) == T_FLOAT) {
|
4488
|
+
rpx = rb_Array(rpx);
|
4489
|
+
}
|
4490
|
+
/* if ((TYPE(rpx) != T_ARRAY) &&
|
4491
|
+
(rb_obj_is_kind_of(rpx, cNArray) != Qtrue)) {
|
4492
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4493
|
+
} -- no check since obj2c*ary will do that */
|
4494
|
+
if (TYPE(rpy) == T_FLOAT) {
|
4495
|
+
rpy = rb_Array(rpy);
|
4496
|
+
}
|
4497
|
+
/* if ((TYPE(rpy) != T_ARRAY) &&
|
4498
|
+
(rb_obj_is_kind_of(rpy, cNArray) != Qtrue)) {
|
4499
|
+
rb_raise(rb_eTypeError, "invalid type");
|
4500
|
+
} -- no check since obj2c*ary will do that */
|
4501
|
+
if ((TYPE(itpat) != T_BIGNUM) || (TYPE(itpat) != T_FIXNUM)) {
|
4502
|
+
itpat = rb_funcall(itpat, rb_intern("to_i"), 0);
|
4503
|
+
}
|
4504
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4505
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4506
|
+
}
|
4507
|
+
|
4508
|
+
i_n = NUM2INT(n);
|
4509
|
+
i_itpat = NUM2INT(itpat);
|
4510
|
+
i_icolor = NUM2INT(icolor);
|
4511
|
+
i_rpx = dcl_obj2crealary(rpx);
|
4512
|
+
i_rpy = dcl_obj2crealary(rpy);
|
4513
|
+
|
4514
|
+
|
4515
|
+
sgtnxr_(&i_n, i_rpx, i_rpy, &i_itpat, &i_icolor);
|
4516
|
+
|
4517
|
+
dcl_freecrealary(i_rpx);
|
4518
|
+
dcl_freecrealary(i_rpy);
|
4519
|
+
|
4520
|
+
return Qnil;
|
4521
|
+
|
4522
|
+
}
|
4523
|
+
|
4524
|
+
#endif
|
4525
|
+
|
4526
|
+
#if DCLVER >= 544
|
4527
|
+
|
4528
|
+
static VALUE
|
4529
|
+
dcl_sglnxu(obj, ux1, uy1, ux2, uy2, index, icolor)
|
4530
|
+
VALUE obj, ux1, uy1, ux2, uy2, index, icolor;
|
4531
|
+
{
|
4532
|
+
real i_ux1;
|
4533
|
+
real i_uy1;
|
4534
|
+
real i_ux2;
|
4535
|
+
real i_uy2;
|
4536
|
+
integer i_index;
|
4537
|
+
integer i_icolor;
|
4538
|
+
|
4539
|
+
if (TYPE(ux1) != T_FLOAT) {
|
4540
|
+
ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
|
4541
|
+
}
|
4542
|
+
if (TYPE(uy1) != T_FLOAT) {
|
4543
|
+
uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
|
4544
|
+
}
|
4545
|
+
if (TYPE(ux2) != T_FLOAT) {
|
4546
|
+
ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
|
4547
|
+
}
|
4548
|
+
if (TYPE(uy2) != T_FLOAT) {
|
4549
|
+
uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
|
4550
|
+
}
|
4551
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4552
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4553
|
+
}
|
4554
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4555
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4556
|
+
}
|
4557
|
+
|
4558
|
+
i_ux1 = (real)NUM2DBL(ux1);
|
4559
|
+
i_uy1 = (real)NUM2DBL(uy1);
|
4560
|
+
i_ux2 = (real)NUM2DBL(ux2);
|
4561
|
+
i_uy2 = (real)NUM2DBL(uy2);
|
4562
|
+
i_index = NUM2INT(index);
|
4563
|
+
i_icolor = NUM2INT(icolor);
|
4564
|
+
|
4565
|
+
|
4566
|
+
sglnxu_(&i_ux1, &i_uy1, &i_ux2, &i_uy2, &i_index, &i_icolor);
|
4567
|
+
|
4568
|
+
return Qnil;
|
4569
|
+
|
4570
|
+
}
|
4571
|
+
|
4572
|
+
#endif
|
4573
|
+
|
4574
|
+
#if DCLVER >= 544
|
4575
|
+
|
4576
|
+
static VALUE
|
4577
|
+
dcl_sglnxv(obj, vx1, vy1, vx2, vy2, index, icolor)
|
4578
|
+
VALUE obj, vx1, vy1, vx2, vy2, index, icolor;
|
4579
|
+
{
|
4580
|
+
real i_vx1;
|
4581
|
+
real i_vy1;
|
4582
|
+
real i_vx2;
|
4583
|
+
real i_vy2;
|
4584
|
+
integer i_index;
|
4585
|
+
integer i_icolor;
|
4586
|
+
|
4587
|
+
if (TYPE(vx1) != T_FLOAT) {
|
4588
|
+
vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
|
4589
|
+
}
|
4590
|
+
if (TYPE(vy1) != T_FLOAT) {
|
4591
|
+
vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
|
4592
|
+
}
|
4593
|
+
if (TYPE(vx2) != T_FLOAT) {
|
4594
|
+
vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
|
4595
|
+
}
|
4596
|
+
if (TYPE(vy2) != T_FLOAT) {
|
4597
|
+
vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
|
4598
|
+
}
|
4599
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4600
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4601
|
+
}
|
4602
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4603
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4604
|
+
}
|
4605
|
+
|
4606
|
+
i_vx1 = (real)NUM2DBL(vx1);
|
4607
|
+
i_vy1 = (real)NUM2DBL(vy1);
|
4608
|
+
i_vx2 = (real)NUM2DBL(vx2);
|
4609
|
+
i_vy2 = (real)NUM2DBL(vy2);
|
4610
|
+
i_index = NUM2INT(index);
|
4611
|
+
i_icolor = NUM2INT(icolor);
|
4612
|
+
|
4613
|
+
|
4614
|
+
sglnxv_(&i_vx1, &i_vy1, &i_vx2, &i_vy2, &i_index, &i_icolor);
|
4615
|
+
|
4616
|
+
return Qnil;
|
4617
|
+
|
4618
|
+
}
|
4619
|
+
|
4620
|
+
#endif
|
4621
|
+
|
4622
|
+
#if DCLVER >= 544
|
4623
|
+
|
4624
|
+
static VALUE
|
4625
|
+
dcl_sglnxr(obj, rx1, ry1, rx2, ry2, index, icolor)
|
4626
|
+
VALUE obj, rx1, ry1, rx2, ry2, index, icolor;
|
4627
|
+
{
|
4628
|
+
real i_rx1;
|
4629
|
+
real i_ry1;
|
4630
|
+
real i_rx2;
|
4631
|
+
real i_ry2;
|
4632
|
+
integer i_index;
|
4633
|
+
integer i_icolor;
|
4634
|
+
|
4635
|
+
if (TYPE(rx1) != T_FLOAT) {
|
4636
|
+
rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
|
4637
|
+
}
|
4638
|
+
if (TYPE(ry1) != T_FLOAT) {
|
4639
|
+
ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
|
4640
|
+
}
|
4641
|
+
if (TYPE(rx2) != T_FLOAT) {
|
4642
|
+
rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
|
4643
|
+
}
|
4644
|
+
if (TYPE(ry2) != T_FLOAT) {
|
4645
|
+
ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
|
4646
|
+
}
|
4647
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4648
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4649
|
+
}
|
4650
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4651
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4652
|
+
}
|
4653
|
+
|
4654
|
+
i_rx1 = (real)NUM2DBL(rx1);
|
4655
|
+
i_ry1 = (real)NUM2DBL(ry1);
|
4656
|
+
i_rx2 = (real)NUM2DBL(rx2);
|
4657
|
+
i_ry2 = (real)NUM2DBL(ry2);
|
4658
|
+
i_index = NUM2INT(index);
|
4659
|
+
i_icolor = NUM2INT(icolor);
|
4660
|
+
|
4661
|
+
|
4662
|
+
sglnxr_(&i_rx1, &i_ry1, &i_rx2, &i_ry2, &i_index, &i_icolor);
|
4663
|
+
|
4664
|
+
return Qnil;
|
4665
|
+
|
4666
|
+
}
|
4667
|
+
|
4668
|
+
#endif
|
4669
|
+
|
4670
|
+
#if DCLVER >= 544
|
4671
|
+
|
4672
|
+
static VALUE
|
4673
|
+
dcl_sglaxu(obj, ux1, uy1, ux2, uy2, itype, index, icolor)
|
4674
|
+
VALUE obj, ux1, uy1, ux2, uy2, itype, index, icolor;
|
4675
|
+
{
|
4676
|
+
real i_ux1;
|
4677
|
+
real i_uy1;
|
4678
|
+
real i_ux2;
|
4679
|
+
real i_uy2;
|
4680
|
+
integer i_itype;
|
4681
|
+
integer i_index;
|
4682
|
+
integer i_icolor;
|
4683
|
+
|
4684
|
+
if (TYPE(ux1) != T_FLOAT) {
|
4685
|
+
ux1 = rb_funcall(ux1, rb_intern("to_f"), 0);
|
4686
|
+
}
|
4687
|
+
if (TYPE(uy1) != T_FLOAT) {
|
4688
|
+
uy1 = rb_funcall(uy1, rb_intern("to_f"), 0);
|
4689
|
+
}
|
4690
|
+
if (TYPE(ux2) != T_FLOAT) {
|
4691
|
+
ux2 = rb_funcall(ux2, rb_intern("to_f"), 0);
|
4692
|
+
}
|
4693
|
+
if (TYPE(uy2) != T_FLOAT) {
|
4694
|
+
uy2 = rb_funcall(uy2, rb_intern("to_f"), 0);
|
4695
|
+
}
|
4696
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4697
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4698
|
+
}
|
4699
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4700
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4701
|
+
}
|
4702
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4703
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4704
|
+
}
|
4705
|
+
|
4706
|
+
i_ux1 = (real)NUM2DBL(ux1);
|
4707
|
+
i_uy1 = (real)NUM2DBL(uy1);
|
4708
|
+
i_ux2 = (real)NUM2DBL(ux2);
|
4709
|
+
i_uy2 = (real)NUM2DBL(uy2);
|
4710
|
+
i_itype = NUM2INT(itype);
|
4711
|
+
i_index = NUM2INT(index);
|
4712
|
+
i_icolor = NUM2INT(icolor);
|
4713
|
+
|
4714
|
+
|
4715
|
+
sglaxu_(&i_ux1, &i_uy1, &i_ux2, &i_uy2, &i_itype, &i_index, &i_icolor);
|
4716
|
+
|
4717
|
+
return Qnil;
|
4718
|
+
|
4719
|
+
}
|
4720
|
+
|
4721
|
+
#endif
|
4722
|
+
|
4723
|
+
#if DCLVER >= 544
|
4724
|
+
|
4725
|
+
static VALUE
|
4726
|
+
dcl_sglaxv(obj, vx1, vy1, vx2, vy2, itype, index, icolor)
|
4727
|
+
VALUE obj, vx1, vy1, vx2, vy2, itype, index, icolor;
|
4728
|
+
{
|
4729
|
+
real i_vx1;
|
4730
|
+
real i_vy1;
|
4731
|
+
real i_vx2;
|
4732
|
+
real i_vy2;
|
4733
|
+
integer i_itype;
|
4734
|
+
integer i_index;
|
4735
|
+
integer i_icolor;
|
4736
|
+
|
4737
|
+
if (TYPE(vx1) != T_FLOAT) {
|
4738
|
+
vx1 = rb_funcall(vx1, rb_intern("to_f"), 0);
|
4739
|
+
}
|
4740
|
+
if (TYPE(vy1) != T_FLOAT) {
|
4741
|
+
vy1 = rb_funcall(vy1, rb_intern("to_f"), 0);
|
4742
|
+
}
|
4743
|
+
if (TYPE(vx2) != T_FLOAT) {
|
4744
|
+
vx2 = rb_funcall(vx2, rb_intern("to_f"), 0);
|
4745
|
+
}
|
4746
|
+
if (TYPE(vy2) != T_FLOAT) {
|
4747
|
+
vy2 = rb_funcall(vy2, rb_intern("to_f"), 0);
|
4748
|
+
}
|
4749
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4750
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4751
|
+
}
|
4752
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4753
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4754
|
+
}
|
4755
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4756
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4757
|
+
}
|
4758
|
+
|
4759
|
+
i_vx1 = (real)NUM2DBL(vx1);
|
4760
|
+
i_vy1 = (real)NUM2DBL(vy1);
|
4761
|
+
i_vx2 = (real)NUM2DBL(vx2);
|
4762
|
+
i_vy2 = (real)NUM2DBL(vy2);
|
4763
|
+
i_itype = NUM2INT(itype);
|
4764
|
+
i_index = NUM2INT(index);
|
4765
|
+
i_icolor = NUM2INT(icolor);
|
4766
|
+
|
4767
|
+
|
4768
|
+
sglaxv_(&i_vx1, &i_vy1, &i_vx2, &i_vy2, &i_itype, &i_index, &i_icolor);
|
4769
|
+
|
4770
|
+
return Qnil;
|
4771
|
+
|
4772
|
+
}
|
4773
|
+
|
4774
|
+
#endif
|
4775
|
+
|
4776
|
+
#if DCLVER >= 544
|
4777
|
+
|
4778
|
+
static VALUE
|
4779
|
+
dcl_sglaxr(obj, rx1, ry1, rx2, ry2, itype, index, icolor)
|
4780
|
+
VALUE obj, rx1, ry1, rx2, ry2, itype, index, icolor;
|
4781
|
+
{
|
4782
|
+
real i_rx1;
|
4783
|
+
real i_ry1;
|
4784
|
+
real i_rx2;
|
4785
|
+
real i_ry2;
|
4786
|
+
integer i_itype;
|
4787
|
+
integer i_index;
|
4788
|
+
integer i_icolor;
|
4789
|
+
|
4790
|
+
if (TYPE(rx1) != T_FLOAT) {
|
4791
|
+
rx1 = rb_funcall(rx1, rb_intern("to_f"), 0);
|
4792
|
+
}
|
4793
|
+
if (TYPE(ry1) != T_FLOAT) {
|
4794
|
+
ry1 = rb_funcall(ry1, rb_intern("to_f"), 0);
|
4795
|
+
}
|
4796
|
+
if (TYPE(rx2) != T_FLOAT) {
|
4797
|
+
rx2 = rb_funcall(rx2, rb_intern("to_f"), 0);
|
4798
|
+
}
|
4799
|
+
if (TYPE(ry2) != T_FLOAT) {
|
4800
|
+
ry2 = rb_funcall(ry2, rb_intern("to_f"), 0);
|
4801
|
+
}
|
4802
|
+
if ((TYPE(itype) != T_BIGNUM) || (TYPE(itype) != T_FIXNUM)) {
|
4803
|
+
itype = rb_funcall(itype, rb_intern("to_i"), 0);
|
4804
|
+
}
|
4805
|
+
if ((TYPE(index) != T_BIGNUM) || (TYPE(index) != T_FIXNUM)) {
|
4806
|
+
index = rb_funcall(index, rb_intern("to_i"), 0);
|
4807
|
+
}
|
4808
|
+
if ((TYPE(icolor) != T_BIGNUM) || (TYPE(icolor) != T_FIXNUM)) {
|
4809
|
+
icolor = rb_funcall(icolor, rb_intern("to_i"), 0);
|
4810
|
+
}
|
4811
|
+
|
4812
|
+
i_rx1 = (real)NUM2DBL(rx1);
|
4813
|
+
i_ry1 = (real)NUM2DBL(ry1);
|
4814
|
+
i_rx2 = (real)NUM2DBL(rx2);
|
4815
|
+
i_ry2 = (real)NUM2DBL(ry2);
|
4816
|
+
i_itype = NUM2INT(itype);
|
4817
|
+
i_index = NUM2INT(index);
|
4818
|
+
i_icolor = NUM2INT(icolor);
|
4819
|
+
|
4820
|
+
|
4821
|
+
sglaxr_(&i_rx1, &i_ry1, &i_rx2, &i_ry2, &i_itype, &i_index, &i_icolor);
|
4822
|
+
|
4823
|
+
return Qnil;
|
4824
|
+
|
4825
|
+
}
|
4826
|
+
|
3724
4827
|
#endif
|
3725
4828
|
void
|
3726
4829
|
init_grph1_sgpack(mDCL)
|
@@ -3873,4 +4976,67 @@ VALUE mDCL;
|
|
3873
4976
|
#if DCLVER >= 530
|
3874
4977
|
rb_define_module_function(mDCL, "sgqcwd", dcl_sgqcwd, 0);
|
3875
4978
|
#endif
|
4979
|
+
#if DCLVER >= 544
|
4980
|
+
rb_define_module_function(mDCL, "isgrgb", dcl_isgrgb, 3);
|
4981
|
+
#endif
|
4982
|
+
#if DCLVER >= 544
|
4983
|
+
rb_define_module_function(mDCL, "sgclst", dcl_sgclst, 1);
|
4984
|
+
#endif
|
4985
|
+
#if DCLVER >= 544
|
4986
|
+
rb_define_module_function(mDCL, "sgqcl", dcl_sgqcl, 1);
|
4987
|
+
#endif
|
4988
|
+
#if DCLVER >= 544
|
4989
|
+
rb_define_module_function(mDCL, "sgplxu", dcl_sgplxu, 6);
|
4990
|
+
#endif
|
4991
|
+
#if DCLVER >= 544
|
4992
|
+
rb_define_module_function(mDCL, "sgplxv", dcl_sgplxv, 6);
|
4993
|
+
#endif
|
4994
|
+
#if DCLVER >= 544
|
4995
|
+
rb_define_module_function(mDCL, "sgplxr", dcl_sgplxr, 6);
|
4996
|
+
#endif
|
4997
|
+
#if DCLVER >= 544
|
4998
|
+
rb_define_module_function(mDCL, "sgpmxu", dcl_sgpmxu, 7);
|
4999
|
+
#endif
|
5000
|
+
#if DCLVER >= 544
|
5001
|
+
rb_define_module_function(mDCL, "sgpmxv", dcl_sgpmxv, 7);
|
5002
|
+
#endif
|
5003
|
+
#if DCLVER >= 544
|
5004
|
+
rb_define_module_function(mDCL, "sgpmxr", dcl_sgpmxr, 7);
|
5005
|
+
#endif
|
5006
|
+
#if DCLVER >= 544
|
5007
|
+
rb_define_module_function(mDCL, "sgtxxu", dcl_sgtxxu, 8);
|
5008
|
+
#endif
|
5009
|
+
#if DCLVER >= 544
|
5010
|
+
rb_define_module_function(mDCL, "sgtxxv", dcl_sgtxxv, 8);
|
5011
|
+
#endif
|
5012
|
+
#if DCLVER >= 544
|
5013
|
+
rb_define_module_function(mDCL, "sgtxxr", dcl_sgtxxr, 8);
|
5014
|
+
#endif
|
5015
|
+
#if DCLVER >= 544
|
5016
|
+
rb_define_module_function(mDCL, "sgtnxu", dcl_sgtnxu, 5);
|
5017
|
+
#endif
|
5018
|
+
#if DCLVER >= 544
|
5019
|
+
rb_define_module_function(mDCL, "sgtnxv", dcl_sgtnxv, 5);
|
5020
|
+
#endif
|
5021
|
+
#if DCLVER >= 544
|
5022
|
+
rb_define_module_function(mDCL, "sgtnxr", dcl_sgtnxr, 5);
|
5023
|
+
#endif
|
5024
|
+
#if DCLVER >= 544
|
5025
|
+
rb_define_module_function(mDCL, "sglnxu", dcl_sglnxu, 6);
|
5026
|
+
#endif
|
5027
|
+
#if DCLVER >= 544
|
5028
|
+
rb_define_module_function(mDCL, "sglnxv", dcl_sglnxv, 6);
|
5029
|
+
#endif
|
5030
|
+
#if DCLVER >= 544
|
5031
|
+
rb_define_module_function(mDCL, "sglnxr", dcl_sglnxr, 6);
|
5032
|
+
#endif
|
5033
|
+
#if DCLVER >= 544
|
5034
|
+
rb_define_module_function(mDCL, "sglaxu", dcl_sglaxu, 7);
|
5035
|
+
#endif
|
5036
|
+
#if DCLVER >= 544
|
5037
|
+
rb_define_module_function(mDCL, "sglaxv", dcl_sglaxv, 7);
|
5038
|
+
#endif
|
5039
|
+
#if DCLVER >= 544
|
5040
|
+
rb_define_module_function(mDCL, "sglaxr", dcl_sglaxr, 7);
|
5041
|
+
#endif
|
3876
5042
|
}
|