These patches allow the RMagick sample to work with wxRuby2. They also open up some functions that were %ignored that probably shouldn''t be (at least with the typemap adjustment). I think we may need to visit (or document carefully) what happens when you pass in a string of data to the constructor or to SetAlpha. We need to decide which setting of static_data is correct for the library. Does anyone know of any reason we would or wouldn''t want to just set the unsigned char * typemap in typemap.i? Roy _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Roy Sutton wrote:> These patches allow the RMagick sample to work with wxRuby2.Committed, thanks. I get several warnings now when compiling Image.cpp of the type: src/Image.cpp: In function `VALUE _wrap_new_wxImage__SWIG_3(int, VALUE*, long unsigned int)'': src/Image.cpp:2560: warning: invalid conversion from `char*'' to `unsigned char* ''> I think we may need to visit (or document carefully) what happens when > you pass in a string of data to the constructor or to SetAlpha.We should have aliases that disambiguate the different forms of new - maybe Image.from_data or .new_from_data.> Does anyone know of any reason we would or wouldn''t want to just set > the unsigned char * typemap in typemap.i?Nope, but I probably wouldn''t if there was one. Would be nice to fix Icon.new(data) as well. There is Icon.new(void*data) and Icon.new(char**bits) ... thanks alex
Alex Fenton wrote:> Committed, thanks. I get several warnings now when compiling Image.cpp > of the type: > > src/Image.cpp: In function `VALUE _wrap_new_wxImage__SWIG_3(int, VALUE*, > long > unsigned int)'': > src/Image.cpp:2560: warning: invalid conversion from `char*'' to > `unsigned char* > '' >Hmm... Yeah, that''s not ideal. I may have to visit that to see if there''s a good workaround. I also was noticing that SWIG already handles unsigned char (not the pointer) so I may patch to remove that particular one.>> I think we may need to visit (or document carefully) what happens when >> you pass in a string of data to the constructor or to SetAlpha. >> > We should have aliases that disambiguate the different forms of new - > maybe Image.from_data or .new_from_data. >Could be good. I think wxPython does this. Most of the time we''ve been able to disambiguate without the use of new method names. Roy
Possibly Parallel Threads
- [1007] trunk/wxruby2/swig: Fixed Wx::Image#scale and rescale signature, also added needed constants.
- Newton method iteration problem
- [954] branches/wxruby2/wxwidgets_282: Additions to Image API 2.6 -> 2.8, remove comment cruft
- [PATCH] perl: use INT2PTR macro for casting back to guestfs_h * (RHBZ#1150298)
- libshout-perl compilation error