[PULL REQUEST] initial profile printing support
Lubomir I. Ivanov
neolit123 at gmail.com
Sat Jul 13 08:56:37 PDT 2013
the first two patches make fixes related to the table print. the page detection
algorithm is now even slower..
the rest of the series add experimental profile printing support.
it can be accessed for now only via the '6 dives' option and what it does
at the moment is to print each dive profile on a full page instead.
grayscale printing is now supported both profile-internally and via bitmap
coversation to grayscale (experimental). it's under question which one of the
two methods is faster, but also which looks better. the profile-internal
method gives more control, of course, as it reads the grayscale colors
from the profile_colors[] table.
in terms of performance both the table print and profile printing are
much slower in comparison to the GTK build...
QTextDocument aside (table printing), i can understand if QGraphicsScene
is much more sophisticated than cairo, but under the Ubuntu VM here,
by browsing the divelist it can take >3 seconds, where with GTK/cairo it took
~0 seconds. if you have a fast machine you may not notice this at all,
but under a VM you may be measuring with something like a 1.5GHz single core.
also if you test the new profile printing you may notice a blocking operation
of N seconds, while all profiles are rendered. ~42 dive profiles, full page
300 DPI on A4, in color take ~16 seconds on my end.
not sure if performance is much of an issue here..
---
The following changes since commit a69e92d891726e7aa75024d313ec2295faa7cc72:
About: improve dialog layout (2013-07-11 09:22:20 -0300)
are available in the git repository at:
git at github.com:neolit123/subsurface.git print
for you to fetch changes up to b5ed72a705481b69b3d3459be8a747356f297f2c:
Colors: a couple of grayscale color tweaks (2013-07-13 18:31:22 +0300)
----------------------------------------------------------------
Lubomir I. Ivanov (9):
Print: support any resolution for the table print
Print: improve new page detection in table print
Profile: use a printMode flag in ProfileGraphicsView
Print: add experimental code for printing profiles
Print: add method to convert profile to grayscale
Profile: add the isGrayscale flag
Print: pass grayscale flag to setPrintMode()
Profile: support grayscale plotting
Colors: a couple of grayscale color tweaks
qt-ui/graphicsview-common.cpp | 5 +--
qt-ui/printdialog.cpp | 1 +
qt-ui/printlayout.cpp | 88 +++++++++++++++++++++++++++++++++-----
qt-ui/printlayout.h | 1 +
qt-ui/profilegraphics.cpp | 98 ++++++++++++++++++++++++++-----------------
qt-ui/profilegraphics.h | 10 ++++-
6 files changed, 150 insertions(+), 53 deletions(-)
More information about the subsurface
mailing list