Re: Print scaling

Richard Hult <[email protected]> 27 May 2003 18:02:20 +0200
Newsgroups gmane.comp.gnome.apps.mr-project.user
Organization CodeFactory AB
Message-ID <[email protected]>
tis 2003-05-27 klockan 17.55 skrev Robert Feldbauer:
> Any advice on implementing something like "fit to page"?  I might be
> interested in adding it to MrProject if I can find some free time.  A 
> kludge might be to get it into an image format, then scale that to 
> fit your paper size?  I don't have much of an idea how to implement
> it, but if someone could point me in the right direction I might
> stand a chance ;)  Would "fit to page" be similar between gnome-based
> apps, or entirely application specific?

It would be pretty MrProject specific. It would be pretty easy, I think,
since it would probably suffice to change the scale factor, with
gnome-print. Something like:

 double affine[6];
		
 art_affine_scale (affine, foo, bar);
 gnome_print_concat (pc, affine);

taking the width and height of the page in consideration. 

The page size handling is in src/util/mg-print-job.c if you want to take
a look.

Regards,
Richard

-- 
Richard Hult                    [email protected]
CodeFactory AB                  http://www.codefactory.se/