A S�b, 2004-03-06 �s 06:02, Alex Roitman escreveu:
> Gustavo, thanks for your help!
>
> Now I'm in for another round, this time trying to figure how to
> add an image to the print job. Trying to run example_02.py from CVS:
>
> Traceback (most recent call last):
> File "./example_02.py", line 107, in ?
> my_print()
> File "./example_02.py", line 101, in my_print
> my_draw(gpc)
> File "./example_02.py", line 89, in my_draw
> my_print_image_from_memory(gpc)
> File "./example_02.py", line 82, in my_print_image_from_memory
> gpc.grestore()
> AttributeError: 'gnomeprint.Context' object has no attribute 'grestore'
>
> It seems that gnomeprint.Config does not have grestore() method wrapped
> for python. Am I missing something, or should I go ahead and file a bug
> in Bugzilla?
No need. It has been fixed in CVS for a long time, but gnome-python
hasn't had a release for a long time also :)
If you are going to checkout gnome-python from CVS, beware about
branching. Either you have gnome 2.5 libs, or you better use the
gnome-python-2-0 branch.
>
> While we're at it, what does
> gpc.scale(144, 144)
> do in example_02.py? Where does 144 come from?
Documentation for gnome_print_rgbaimage says:
"Draws RGB color image with transparency channel image into unit
square (0,0 - 1,1) in current coordinate system."
I think the default gnomeprint units are 'points'. IIRC, one inch is
72 points. So, what gpc.scale(144, 144) does is make the image 2 by 2
inches.
Regards.
--
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/