Re: Get current canvas position



On Sun, 2008-10-12 at 14:09 -0600, Jesse wrote:
> Is there any way to get the current canvas scroll position (stored in
> its hadjustment and vadjustment)?
> 
> I'm trying to do smooth scrolling and zooming, and while I could keep
> track of the position separately in the application, that seems ugly.

If you've placed the canvas in a scrolled window you can use:
  gtk_scrolled_window_get_hadjustment()
and then:
  gtk_adjustment_get_value()

Damon




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