octave-maintainers
[Top][All Lists]
Advanced

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

Re: FLTK refresh required


From: Ben Abbott
Subject: Re: FLTK refresh required
Date: Sat, 27 Jul 2013 16:51:41 -0400

On Jul 27, 2013, at 4:36 PM, Ben Abbott wrote:

On Jul 26, 2013, at 10:07 PM, Ben Abbott wrote:

On Jul 26, 2013, at 9:13 AM, Ben Abbott wrote:

On Jul 25, 2013, at 9:49 PM, Dmitri A. Sergatskov wrote:

On Thu, Jul 25, 2013 at 2:39 PM, Dmitri A. Sergatskov <address@hidden> wrote:
I took a sceenshot and counted pixels.
The lower left corner of the canvas is at 200,300 from (lower left corner of the screen).
The height of the canvas is 420 (+some 30 for the windows decoration).

Dmitri.
--
Attached is a relevant cutout.

Dmitri.

I've reattached your bitmap with the figure's "position" property labeled as being 560x400 pixels in size.  The toolbar at the bottom is 560x20 and the title bar is 560x30.

There are 20 pixels missing.  I'll try to determine if the missing pixels are from the top/bottom margin or from the axes height latter today (when I have some more free time).

Ben

I've measured the axes box size of Dimitri's example, and included it in the graphic below.

<screendump.png>

Below is a short Octave session run on Mac OSX which indicates the axes box size (marked as 434x310) is the correct fractional size of the figure size (marked as 560x440).

-------------------------
figure
set (gcf, 'position', [130, 436, 560, 380])
axes
set (gca, 'units', 'pixels')
get (gca, 'position')
ans =

   73.80000    42.80000   434.00000   309.70000
-------------------------

This looks to confirm Michael's hypothesis, which I've included below.

- Octave creates a figure object with the default position
- FLTK backend creates the corresponding window and size it to the figure position
- FLTK backend puts the OpenGL widget *and* the menubar and the statusbar within the allocated window
- Because of the height of the menubar and statusbar, the OpenGL widget height is less than the default height from the "position" property
- FLTK event loop processes the move/resize event that is (always) occurring when a window is initially shown
- FLTK backend updates the position property with the real OpenGL widget size

On Mac OSX ...

-------------------------
figure
axes
set (gca, 'units', 'pixels')
get (gcf, 'position')
ans =

  300   200   560   420

get (gca, 'position')
ans =

   73.80000    47.20000   434.00000   342.30000
-------------------------

The axes and figure size is what is expected (the FLTK event loop is not modifying them from their default value).  However, while the axes box size is the proper size (see below), the figure' size is too tall by 20 pixels.

<macosx.png>

The menu bar is also missing.  I can get that back by adding a clf ().

<MacOSX-no-axes.png>

The figure area appears to be rendered on top of the menubar.

Over the weekend, I'll open a bug report for Linux, and update bug # 39555 for Mac OSX.

https://savannah.gnu.org/bugs/index.php?39555

Ben

The attached changeset fixes the problem on MacOSX.  Can someone try it on Linux?

Ben

<bugs_39555_39577.diff>

I forgot to attach a bitmap of what I see.  The white canvas area is now 560x420 pixels and the axes box is 434x342 pixels.

If the changeset functions correctly on Linux, I'll push three changesets (one that fixes the initialization of the tightinset, one that fixes the initial figure layout on MacOSX and the final one that places the menubar, statusbar, and plot canvas in the proper locations.

Ben



reply via email to

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