[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: figure positioning problem
From: |
John W. Eaton |
Subject: |
Re: figure positioning problem |
Date: |
Sat, 19 Nov 2011 11:18:35 -0500 |
On 19-Nov-2011, Michael Goffioul wrote:
| On Sat, Nov 19, 2011 at 2:31 AM, John W. Eaton <address@hidden> wrote:
|
| > 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.
Do you mean the following change?
diff --git a/src/graphics.cc b/src/graphics.cc
--- a/src/graphics.cc
+++ b/src/graphics.cc
@@ -3237,9 +3237,9 @@
{
Matrix old_bb, new_bb;
- old_bb = get_boundingbox ();
+ old_bb = get_boundingbox (true);
position.set (v, true, do_notify_toolkit);
- new_bb = get_boundingbox ();
+ new_bb = get_boundingbox (true);
if (old_bb != new_bb)
{
If so, then yes, this avoids the problem for me. But then the figure
that I'm working with is also not resized in the way I think it is
supposed to be. So instead of the figure window being tight around
the axes objects, there is a lot of whitespace padding. But at least
the axes are fully within the figure window.
Should I make this change?
jwe
- figure positioning problem, John W. Eaton, 2011/11/18
- Re: figure positioning problem, Ben Abbott, 2011/11/18
- Re: figure positioning problem, Michael Goffioul, 2011/11/19
- Re: figure positioning problem,
John W. Eaton <=
- Re: figure positioning problem, Michael Goffioul, 2011/11/19
- Re: figure positioning problem, John W. Eaton, 2011/11/21
- Re: figure positioning problem, John W. Eaton, 2011/11/21
- Re: figure positioning problem, Michael Goffioul, 2011/11/21
- Re: figure positioning problem, Ben Abbott, 2011/11/21
- Re: figure positioning problem, Ben Abbott, 2011/11/19
- Re: figure positioning problem, Michael Goffioul, 2011/11/19
- Re: figure positioning problem, Ben Abbott, 2011/11/19
- Re: figure positioning problem, Michael Goffioul, 2011/11/19
- Re: figure positioning problem, Ben Abbott, 2011/11/19