[PATCH 1/2] print: Use cairo_save/cairo_restore to manage temporary cairo changes

Salvador Cuñat salvador.cunat at gmail.com
Sun Feb 10 07:47:14 PST 2013


Here is a patch for the rest of draw_page().
Nothing exceptional,  just a clearer way of doing things if we are
writing line by line.  Involves changes in the way of think of the
printing model as explained in the patch.

This changes are not for aplying in the case we have a predefined set of
positions  (as in SAC, CNS ...) which makes me doubt if it's posible on
draw_table().  I'll explain:

- In table print we have preset an amount of dives per page (25) which
  can be too much, or too few, for a variable traslations pattern.
  If too much we will print out of the paper.
  If too few we will have an excess of unused paper at the bottom.
- We can make the traslations be constant if we truncate the strings to
  have an only line per dive,  but there's lost information in the
  printout.   This works fine with 30 dives per page.

Finally,  with the change of DPI from 72 to 96  it seems necesary to
make the fonts wider (or use a magnifyer)  ;-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Print.c:-Modify-for-using--pango_layout_get_extents.patch
Type: text/x-diff
Size: 13583 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130210/913f6660/attachment.patch>

More information about the subsurface mailing list