How does GnomeCanvas scrolling work..?



  Dear GtkAppPeople,

  How does GnomeCanvas scrolling work?

  When I set_usize( 200,200 ),
  set_pixels_per_unit( 1.0 ),
  set_scroll_region( 0,0, 600, 200 ),
  and then scroll_to( 0,0 ),

  I expect to have a 200x200 pixels canvas, the top-left being 0,0,
corrosponding to 0,0 in the world coordinates system, and the bottom-right
being 200,200 in the world coordinates system.

  If I scroll_to( 100,0 ), I expect the canvas to draw (100,0)-(300,200) in
world coordinates.

  However, what I'm getting (with scroll_to(0,0)) is everything shifted to
the right.
  The 100 across pixels (midway across the canvas display) is 0 across in
the world coordinates.

  I'm drawing everything to the 0,0-600,200 world system, but half of my
display is living in negative coordinate land (from 0 on over to the LEFT-
into negative world coordinates)..!

  What am I misinterpretting?
  Why does it work so weird?

  I absolutely LOVE my GTK+/Gnome Application Development book. But I have
come to be furious with the section on the GnomeCanvas coordinates system.
I'll be over at Andamooka when I figure this out to add more notes on the
subject...

  Take care,
    Lion Kimbro =^_^=



---------------------------------------
http://taoriver.net/~lion/
ICQ# 101406196




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]