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: Thu, 24 Jul 2014 14:48:29 -0400

On Jul 24, 2014, at 1:10 PM, Ben Abbott <address@hidden> wrote:

> On Jul 24, 2014, at 9:12 AM, Ben Abbott <address@hidden> wrote:
> 
>> On Jul 24, 2014, at 3:23 AM, Andreas Weber <address@hidden> wrote:
>> 
>>> Am 23.07.2014 20:18, schrieb Ben Abbott:
>>> 
>>>> 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
>>>> 
>>> 
>>> Hi Ben, thanks for testing.
>>> 
>>> Do you see the lines in the plot window? Is this only when called
>>> figure(1), clf() before plot or does this also happen when calling
>>> plot(rand(3)) alone?
>>> 
>>> Please try:
>>> plot(rand(3))
>>> print -color -deps junk.eps
>>> 
>>> This bypasses "gs" and stores the ouput of gl2ps directly.
>>> 
>>> Then please try
>>> drawnow("eps", "dummy", false, "junk2.eps")
>>> 
>>> Which does basically the same as print -color -deps but doesn't do a
>>> resize of the canvas before drawnow which could be a reason for timing
>>> issues.
>>> 
>>> If it's a timing issue you could add
>>> 
>>> draw ();
>>> 
>>> in OpenGL_fltk::print just before glps_renderer rend (fp, term);
>>> 
>>> 
>>> For the MXE build we have a bug report #42534 "No lines when printing
>>> plot (fltk)" which perhaps could be related.
>>> 
>>> -- Andy
>>> 
>> 
>> The junk.eps file also has missing lines. However, junk2.eps includes the 
>> lines. Both are attached.  Adding the draw() command didn't fix the problem.
>> 
>> Ben
>> 
>> <junk.eps><junk2.eps>
> 
> Andreas,
> 
> It occurred to me that the line are likely present, but hidden. Thus, I tried 
> ...
> 
>       graphics_toolkit fltk
>       plot (rand (3))
>       set (gca (), 'color', 'none')
>       print -dpdfwrite junk.pdf
> 
> ... and the lines are now present in junk.pdf (see attached).  Are you are 
> able to test the MXE build to determine if this is also true for bug #42534?
> 
> Ben
> 
> <junk.pdf>

I've repeated one of the earlier tests with the axes color set to "none"

close all
graphics_toolkit fltk
h = plot ([0, 0.5, 1], [0, 0.5, 1], '-sb');
set (h, 'markerfacecolor', 'b', 'markersize', 20, 'linewidth', 4)
hold all
h = plot ([1, 0.5, 0], [0, 0.5, 1], '-or');
set (h, 'markerfacecolor', 'r', 'markersize', 20, 'linewidth', 4)
set (gcf (), 'color', 'none')
print -depsc junk1.eps

I thought that the objects might just be rendered in the wrong order ... the 
two lines were draw in the proper order, so that wasn't it.

Next, I looked over your patch and noticed you had removed the duplicate 
"Fl:check ();".  I don't recall why that was duplicated, but when I reinstated 
the both "Fl:check ();", then the output looks as expected.

      // it seems that we have to call Fl::check twice to get everything drawn
      Fl::check ();

      // Andy: Do we really have to? I can't see a problem with a single call
      Fl::check ();
    }

My test script is ...

        close all
        graphics_toolkit fltk
        h = plot ([0, 0.5, 1], [0, 0.5, 1], '-sb');
        set (h, 'markerfacecolor', 'b', 'markersize', 20, 'linewidth', 4)
        hold all
        h = plot ([1, 0.5, 0], [0, 0.5, 1], '-or');
        set (h, 'markerfacecolor', 'r', 'markersize', 20, 'linewidth', 4)
        set (gca (), 'color', 'c')
        print -depsc junk1.eps
        drawnow("eps", "dummy", false, "junk2.eps")

And the eps-files are attached.

Ben

image/eps

image/eps





reply via email to

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