[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size a
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale |
Date: |
Mon, 21 Nov 2011 02:26:12 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2 |
Follow-up Comment #18, bug #34720 (project octave):
The patch below improves the situation.
diff --git a/scripts/plot/print.m b/scripts/plot/print.m
--- a/scripts/plot/print.m
+++ b/scripts/plot/print.m
@@ -289,6 +289,24 @@
props(1).name = "position";
props(1).value = {fpos};
fpos(3:4) = opts.canvas_size;
+ if (! strcmp (get (opts.figure, "__graphics_toolkit__"), "gnuplot"))
+ ## FIXME - This should not be needed.
+ ##
+ ## Comments by bpabbott:
+ ##
+ ## Without the drawnow(), printing from a script results in an
+ ## image whose height is shortened by the status bar height.
+ ## With the added drawnow(), and printing from a script, the
+ ## image height (H) is too tall by H/24 or 17.5 pixels for the
+ ## default figure height (420 pixels).
+ ##
+ ## My Octave was built on MacOS X, using MacPorts for
dependencies
+ ## and with fltk-aqua-1.1.10.
+ ##
+ ## My FLTK windows do not display the menu bar, and the
resulting
+ ## plot area is too large by half the status-bar height (10
pixels)
+ drawnow ()
+ endif
set (opts.figure, "position", fpos);
## Set figure background to none. This is done both for
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)
{
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?34720>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, (continued)
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Ben Abbott, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Muhali, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Ben Abbott, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Muhali, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Ben Abbott, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Ben Abbott, 2011/11/03
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Muhali, 2011/11/09
- [Octave-bug-tracker] [bug #34720] plot box shifts when printing with FLTK, Ben Abbott, 2011/11/09
- Message not available
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale, Ben Abbott, 2011/11/13
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale, Ben Abbott, 2011/11/15
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale,
Ben Abbott <=
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale, Ben Abbott, 2011/11/22
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale, Ben Abbott, 2011/11/22
- [Octave-bug-tracker] [bug #34720] print() for FLTK produces wrong size and scale, Ben Abbott, 2011/11/22