ruby-gnome2 canvas pixbuf scaling

J

Joe Van Dyk

Hi,

According to http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspixbu=
f.html#GNOMECANVASPIXBUF--WIDTH-SET
, to set the width or height of a CanvasPixbuf item, the width-set and
height-set properties must be set to true. Otherwise, it's not taken
into account.

I searched the ruby-gnome2 bindings and didn't see any reference to
width-set or height-set. Does ruby-gnome2 not support manually
setting the width and height of an CanvasPixbuf item?

Thanks,
Joe
 
J

Joe Van Dyk

Hi,
=20
According to http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspix= buf.html#GNOMECANVASPIXBUF--WIDTH-SET
, to set the width or height of a CanvasPixbuf item, the width-set and
height-set properties must be set to true. Otherwise, it's not taken
into account.
=20
I searched the ruby-gnome2 bindings and didn't see any reference to
width-set or height-set. Does ruby-gnome2 not support manually
setting the width and height of an CanvasPixbuf item?

The problem I'm trying to solve is I want to let a user zoom in and
out on a large image (10000x10000 pixels) that's being rendered on a
Gnome::Canvas item.
 
M

Masao Mutoh

Hi,

Hi,

According to http://developer.gnome.org/doc/API/gdk-pixbuf/gnomecanvaspixbuf.html#GNOMECANVASPIXBUF--WIDTH-SET
, to set the width or height of a CanvasPixbuf item, the width-set and
height-set properties must be set to true. Otherwise, it's not taken
into account.

I searched the ruby-gnome2 bindings and didn't see any reference to
width-set or height-set. Does ruby-gnome2 not support manually
setting the width and height of an CanvasPixbuf item?

Both of Gnome::CanvasPixbuf#width_set=(val)
and Gnome::CanvasPixbuf#height_set=(val) are available.

# Have you tried rbbr? if not yet, try it. You can find all of the methods in a class.
 
J

Joe Van Dyk

Hi,
=20
On Wed, 20 Jul 2005 06:34:12 +0900

=20
Both of Gnome::CanvasPixbuf#width_set=3D(val)
and Gnome::CanvasPixbuf#height_set=3D(val) are available.
=20
# Have you tried rbbr? if not yet, try it. You can find all of the method=
s in a class.

Thanks for the tip!
 
J

Joe Van Dyk

Hi,
=20
On Wed, 20 Jul 2005 06:34:12 +0900

=20
Both of Gnome::CanvasPixbuf#width_set=3D(val)
and Gnome::CanvasPixbuf#height_set=3D(val) are available.
=20
# Have you tried rbbr? if not yet, try it. You can find all of the method=
s in a class.

I've got another question for you.

(gdb) backtrace
#0 0xffffe002 in ?? ()
#1 0x42028a73 in abort () from /lib/tls/libc.so.6
#2 0x080bc392 in rb_bug (fmt=3D0x80d63b0 "Segmentation fault") at error.c:=
214
#3 0x080a03e8 in sigsegv (sig=3D11) at signal.c:446
#4 <signal handler called>
#5 0x400f8f82 in g_type_check_instance_is_a () from
/usr/lib/libgobject-2.0.so.0
#6 0x40b7e990 in gnome_canvas_request_redraw () from
/usr/lib/libgnomecanvas-2.so.0
#7 0x40b7739c in gnome_canvas_item_construct () from
/usr/lib/libgnomecanvas-2.so.0
#8 0x40b773fd in gnome_canvas_item_construct () from
/usr/lib/libgnomecanvas-2.so.0
#9 0x400ddb2f in g_object_interface_list_properties () from
/usr/lib/libgobject-2.0.so.0
#10 0x400bebe4 in rbgobj_free (holder=3D0x83627f8) at rbgobject.c:137
#11 0x0806b8fb in rb_gc_call_finalizer_at_exit () at gc.c:1858
#12 0x080539b6 in ruby_finalize_1 () at eval.c:1418
#13 0x08053ac8 in ruby_cleanup (ex=3D0) at eval.c:1453
#14 0x08053c12 in ruby_stop (ex=3D0) at eval.c:1484
#15 0x08053c76 in ruby_run () at eval.c:1505
#16 0x080520d5 in main (argc=3D2, argv=3D0xbfffdd14, envp=3D0xbfffdd20) at =
main.c:46
#17 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6

After I quit my program, it apparently still tries to create canvas
items. I'm only creating new canvas items on a size-allocate and
mouse click and move events. Why would it be creating new canvas
events after the program shutdown process has begun? Are there any
good strategies that would avoid having the application seg-fault most
of the time on shutdown?

Thanks,
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,332
Latest member
LeesaButts

Latest Threads

Top