Commit graph

53 commits

Author SHA1 Message Date
Riccardo Albertini
9a853c564c Fix Segmentation fault when trying to print an empty plot.
When printing an empty plot, the function was missing nullability check for 'current_dive'. Now the print of an empty plot results with an empty blank page.
A better solution could be making unsensitive the Print entry in the menu, until a plot is loaded.

Signed-off-by: Riccardo Albertini <ssirowain@gmail.com>
2011-09-20 14:44:45 +02:00
Linus Torvalds
a0096f3a6b Make the printout look different
Not *better* mint you. Just different.

I suck at graphs.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-13 19:49:48 -07:00
Linus Torvalds
ce86289eed Add the capability to print a dive profile
Ok, this is the ugliest f*&$ing printout I have ever seen in my life,
but think of it as a "the concept of printing works" commit, and you'll
be able to hold your lunch down and not gouge out your eyeballs with a
spoon.  Maybe.

I'm just doing the cairo display as-is for the printout, which is a
seriously bad idea.  I need to not try to do colors etc, and instead of
having white lines on a black background I just need to make thelines be
black on white paper.

But that would involve actually changing the current "plot()" routine,
which is against the point of the exercise right now.  This really is
just a demonstration of how to add printing capabilities.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-09-13 16:02:42 -07:00