octave-maintainers
[Top][All Lists]
Advanced

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

Re: Overhaul FLTK toolkit resize/redraw functions


From: Ben Abbott
Subject: Re: Overhaul FLTK toolkit resize/redraw functions
Date: Wed, 23 Jul 2014 14:18:08 -0400

On Jul 22, 2014, at 1:01 PM, Andreas Weber <address@hidden> wrote:

> Dear maintainers,
> 
> I tried to overhaul the FLTK resize and redraw functions and want to ask
> for your optinion and if you could apply the patch and test it a little
> bit. There are many "std::cout <<" debugging ouputs commented which are
> of course removed before commit. My aim was:
> 
> * Avoid redraw of the OpenGL and the plot window if not needed.
>  Moving the mouse priviously caused a redraw of the OpenGL window.
> 
> * Let FLTK do the resize of the canvas, the menubar and statusbar.
>  This was done by creating a resize_dummy and set this as resizable
>  for the plot_window group. Previously this was done inside draw().
> 
> * Avoid timing issues with fltk_maxtime (removed) and other hacks.
>  You can use flush is you really need to force a immediate redraw.
> 
> * Add debug_file output for graphics_toolkit fltk so that
>  drawnow("eps", "gs", false, "sombrero.eps") is possible.
>  This is redundant with "print -color out.eps" and will be removed.
> 
> * Manually placement of the toolbar is only done once when hiding or
>  showing the menubar. (update_toolbar_position)
> 
> * set(gcf, "position", [x, y, w, h]) is now handled by
>  figure::properties::ID_POSITION which calls
>  figure_manager::update_position;
> 
> 
> I want to also list some problems I noticed while testing the changes
> for the records. (Output of compare_plot_demos is fine so far)
> 
> * I don't like the "gui_mode" which is the same for all figures.
>  Switching to pan/rotate therefore influences the other figures.
>  I suggest adding a figure property for this. What does ML do?
>  The current approach also makes it difficult to check in
>  DEFUN_DLD (gui_mode..) if the requested rotate+zoom mode is
>  valid (it's not for ndims==2). Until now you could switch to
>  rotate+zoom using the uimenu even for 2D plots.
> 
> * Save As from the uimenu doesn't work because __uiputfile_fltk__ was
>  moved to private and the path is missing (easy to fix)
> 
> * The new "legend" can be moved while panning. Try
>  t=linspace(0,6*pi); plot(t, sin(t), ";sin;", t, cos(t), ";cos;")
>  and drag the legend with the mouse.
> 
> 
> Another idea (independent of the above) was to make a script for testing
> the FLTK toolkit functions which needs human interaction or judgment.
> I've attached human_driven_fltk_test.m to give you a rough idea what I
> was trying to address. But soon I lost my enthusiasm because it creates
> doubt who will run it. The normal users shouldn't be bothered with this
> and the core devs know how the toolkit should behave.
> 
> 
> Any feedback appreciated :-D
> -- Andy
> <fltk_overhaul.diff><human_driven_fltk_test.m>


On MacOS X, I can confirm that I'm able to print when the figure window is
minimized and I've built Octave using fltk_overhaul.diff.

However, line objects no longer print for me. For the example below, I've 
attached junk.pdf

figure (1)
clf ()
plot (rand(3))
print -dpdfwrite junk.pdf

Ben

Attachment: junk.pdf
Description: Adobe PDF document



reply via email to

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