Zoom GUI in fltk backend

Søren Hauberg soren at hauberg.org
Sun Jul 19 09:03:10 CDT 2009


tir, 30 06 2009 kl. 22:11 +0200, skrev Søren Hauberg:
> Ahh, okay, thanks. The attached patch does this. I don't really
> understand where which functions belong in all this graphics stuff, so I
> just removed the 'static' keyword and added the function at the end of
> 'graphics.h.in' without adding it to any class. This is probably wrong,
> and as Michael said, these values should probably be cached anyway.
> (Read: my solution to this part is still too hacky)

Okay, I just cleaned up my patch for changing the zooming interface for
the FLTK backend. The result is attached. The code that actually
performs the zooming has been moved to 'axes::properties' where the
'zoom' function already was. This should make it easier to get the same
zooming style in other backends (e.g. the GTK one that John Swensen has
done some work on).

The patch still has issues, though:

*) I'm using 'get_children_limits' to get the extremal limits of the
   plot. As Micheal said some time ago, it might be good to cache this
   information.

*) The zooming only works for the current axes. To see this try zooming
   in the first subplot generated by these commands:

     backend ("fltk")
     subplot (1, 2, 1)
     plot (1:10, cos(1:10))
     subplot (1, 2, 2)
     plot (1:10, cos(1:10))

   I don't know how to fix this.

Søren

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.patch3
Type: text/x-patch
Size: 7900 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090719/4accb540/attachment.bin 


More information about the Octave-maintainers mailing list