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

Salvador Cuñat salvador.cunat at gmail.com
Sat Feb 2 07:23:15 PST 2013


On Fri, Feb 01, 2013 at 04:08:31PM +1100, Dirk Hohndel wrote:
> Carl Worth <cworth at cworth.org> writes:
> >
> > Pretty much every drawing function in print.c should have similar
> > treatment applied. I'm just doing this one to enable my next patch,
> > (which fixes the line spacing in the "weight system" box), and to
> > teach you guys. So it should be straightforward to similarly fix the
> > other functions.
> Salvador, is this something you can take a look at in the next few days?
> I'm planning to apply Carl's patches and would love to see this applied
> to all of print.c in the hope that this gives us more robust print
> rendering.

Hi.

Carl's way is, off course, the correct way, and we can get rid of the
dammned back translations.

His corrections made fail the alineation in the next prints, and attached
is a patch to fix it.

I'll look how to change the whole print.c with the pango_get_extents
function.

Think have read you talking about a week and a half (or so) to jump to
3.0.  I mention not only for this, but because I've been thinking on
passing some parameters to draw_page from print_dialog_apply with something like:

typedef struct _Print_params {
	int rotation, dives;             rotation as 1/0 (boolean)
	double w_scale, h_scale;
	} Print_params;

Then using this params to have a single draw_page which can manage 1 to n
prints per page, rotate counterclockwise the layout to plot two dives in
the actual size (or A5 why not?), or even have an only A4 (gargantuan)
print, if the user likes to print to .pdf and manage the file whith,
say, acrobat reader.
As a side efect, the fact of passing the scale factors would let us
manage the font scaling in a automated layout basis (bigger fonts for
bigger layouts).

Regards

Salva.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix-print-displacement-on-SAC-CNS-and-OTUs.patch
Type: text/x-diff
Size: 1698 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130202/8a4ee7d9/attachment.patch>


More information about the subsurface mailing list