octave-maintainers
[Top][All Lists]
Advanced

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

Re: figure positioning problem


From: Michael Goffioul
Subject: Re: figure positioning problem
Date: Sat, 19 Nov 2011 08:58:42 +0000

On Sat, Nov 19, 2011 at 2:31 AM, John W. Eaton <address@hidden> wrote:
> The other day on #octave, I was mistaken about the changeset that
> caused the figure positioning problem for me.  It is actually
>
>  # HG changeset patch
>  # User Michael Goffioul <address@hidden>
>  # Date 1318884362 -3600
>  # Node ID d99aa455296e0ece82bddca44859d62344470dd4
>  # Parent  f80473f245532a328f7c925a8c4845581c56d978
>  Add outerposition property to figure objects.
>
> I don't know how I got the wrong one before.  I was certain that I had
> tested it.
>
> In any case, the trouble seems to be that
> figure::properties::get_outerposition is returning the initial value
> of [-1 -1 -1 -1], so the function
> figure::properties::get_boundingbox does not produce a reasonable
> value.  Oddly, doing set (gcf, 'outerposition', [300, 300, 700, 500])
> at the command line does not change the appearance of the plot, but
> forcing that value inside get_boundingbox does.
>
> Is the value of the outerposition property supposed to be set to
> something other than [-1 -1 -1 -1] somewhere?

Yes, in the toolkit. This is related to this question:
http://octave.1599824.n4.nabble.com/Need-test-of-movegui-td3907213.html
The outerposition property takes the window title bar into account;
hence that's something only a toolkit can properly set. And even in
the toolkit, it might not be properly computed, as the window must be
shown before it's possible to compute a valid outerposition.

No default value would be suitable, so I chose to set an "invalid"
value as default, which can be used to tell the toolkit to ignore that
property and set it instead, when possible. Normally, the figure
outerposition should be ignored anywhere else in octave code, as
normally only figure::properties::get_boundingbox(true) should be
called. I thought I checked all instanced of get_boundingbox, but now
I realize there might be a problem in
figure::properties::set_position, where the get_boundingbox calls are
using the default value for the "internal" argument. Could you try to
use "true" as argument for those calls and check whether it makes any
difference.

Note that the outerposition property is only intended to be used by
toolkits. FLTK ignores that property, that's why nothing happens when
you set it.

Michael.


reply via email to

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