octave-maintainers
[Top][All Lists]
Advanced

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

Re: Zoom GUI in fltk backend


From: Søren Hauberg
Subject: Re: Zoom GUI in fltk backend
Date: Tue, 30 Jun 2009 22:11:12 +0200

tir, 30 06 2009 kl. 09:27 +0300, skrev Shai Ayal:
> On Tue, Jun 30, 2009 at 8:15 AM, Soren Hauberg<address@hidden> wrote:
> > No. When you zoom you change the values of 'xlim' and 'ylim', whereas
> > 'min[x|y]' and 'max[x|y]' should be the extremas of the data. These are
> > used to ensure that you don't zoom too far a way.
> 
> Thanks for explaining:
> So, perusing src/graphics.cc I think the right function to use is
> get_children_limits as used in the code there, e.g.:
> 
> Matrix kids = ap.get_children ();
> 
> double min_val = octave_Inf;
> double max_val = -octave_Inf;
> double min_pos = octave_Inf;
> get_children_limits (min_val, max_val, min_pos, kids, 'x');
> 
> Note that this function is now static, so it would have to be
> "un-statified" and the prototype would have to go to the
> src/graphics.h.in files

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)

That being said, the interface works quite nicely with the attached
patch. I think this behaviour for zooming should be the default, but
what do other people think?

Soren

Attachment: ui.patch2
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]