List Info

Thread: Wx::Image resizing




Wx::Image resizing
country flaguser name
United Kingdom
2007-06-05 03:55:58
Hello,

 I am having problems using the 'resize' and 'size' methods
of
Wx::Image. They seem to be undefined:

irb(main):021:0> image =
Wx::Image.new("input.ppm")
=> #<Wx::Image:0xb7b49ef4>
irb(main):022:0> image.respond_to? "rescale"
=> true
irb(main):023:0> image.respond_to? "resize"
=> false
irb(main):024:0> image.respond_to? "size"
=> false

Installation details:

wxruby2-preview (0.0.40)
    Ruby interface to the wxWidgets GUI library

ruby 1.8.5 (2006-08-25) [i486-linux]

Any help would be much appreciated.

Roman


_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

Re: Wx::Image resizing
country flaguser name
United Kingdom
2007-06-05 04:39:53
Hi

Roman Kingsland wrote:
>  I am having problems using the 'resize' and 'size'
methods of
> Wx::Image. They seem to be undefined:
>   
> wxruby2-preview (0.0.40)
>     Ruby interface to the wxWidgets GUI library
>   
Thanks for the report - it seems these two have been missed
in the 
header files which generate the methods in Ruby. Will be
fixed for the 
next release.

In the meantime, you could probably use a MemoryDC to do
something 
similar to those methods, drawing the original bitmap onto a
suitably 
sized 'canvas' image. Or if you've compiled your own wxruby2
I can give 
you a patch.

a
_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

Re: Wx::Image resizing
country flaguser name
United Kingdom
2007-06-05 04:44:30
Hi

> In the meantime, you could probably use a MemoryDC to
do something 
> similar to those methods, drawing the original bitmap
onto a suitably 
> sized 'canvas' image. Or if you've compiled your own
wxruby2 I can give 
> you a patch.

A patch would be great, thanks.

Roman


_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )