Zoom GUI in fltk backend
Shai Ayal
shaiay at gmail.com
Sun Jul 19 12:59:10 CDT 2009
On Sun, Jul 19, 2009 at 5:03 PM, Søren Hauberg<soren at hauberg.org> wrote:
> 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.
It's very nice. thanks!
Does this really need fixing? zoom should be on the current axis.
Perhaps what we need is a feature to select the axis as current by
clicking. I think the competition does it that way.
Shai
More information about the Octave-maintainers
mailing list