[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: figure positioning problem
From: |
Ben Abbott |
Subject: |
Re: figure positioning problem |
Date: |
Sat, 19 Nov 2011 14:42:51 -0500 |
On Nov 19, 2011, at 11:18 AM, John W. Eaton wrote:
> 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)
> {
With this change the problem I mentioned earlier with printing from a script is
greatly improved. The only remaining problem is that when I run the script
below ...
clear all
v = version;
dpi = round (get (0, "screenpixelsperinch"));
paperposition = get (0, "defaultfigurepaperposition");
position = get (0, "defaultfigureposition");
position(3:4) = paperposition(3:4) * dpi;
for backend = {"gnuplot", "fltk"}
close all
graphics_toolkit (backend{1});
figure (1, "position", position)
plot (rand (2))
set (gca, "activepositionproperty", "position")
axis ([1, 2, 0, 1])
print (sprintf ("-r%d", dpi), sprintf ("Octave-%s-%s.png", v,
backend{1}))
drawnow
endfor
... the height of the FLTK result is off by the height of the status bar, but
when I then create a second image from the command line ...
print -r100 test_r100.png
... everything is ok (the FLTK result matched gnuplot).
Ben
- 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, 2011/11/19
- 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 <=
- 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