[cairo-commit] pycairo/examples/cairo_snippets snippets_ps.py, 1.1,
1.2 snippets_pdf.py, 1.6, 1.7
Steve Chaplin
commit at pdx.freedesktop.org
Wed Jun 15 04:47:14 PDT 2005
Committed by: stevech1097
Update of /cvs/cairo/pycairo/examples/cairo_snippets
In directory gabe:/tmp/cvs-serv15244/examples/cairo_snippets
Modified Files:
snippets_ps.py snippets_pdf.py
Log Message:
SC
Index: snippets_ps.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets_ps.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- snippets_ps.py 20 May 2005 08:57:45 -0000 1.1
+++ snippets_ps.py 15 Jun 2005 11:47:12 -0000 1.2
@@ -10,8 +10,9 @@
from snippets import snip_list, snippet_normalize, snippet_set_bg_svg
-X_inches, Y_inches = 2, 2
-width, height = X_inches * 72, Y_inches * 72 # used by snippet_normalize()
+width_in_inches, height_in_inches = 2, 2
+width_in_points, height_in_points = width_in_inches * 72, height_in_inches * 72
+width, height = width_in_points, height_in_points # used by snippet_normalize()
Verbose_mode = True
@@ -20,7 +21,7 @@
print 'processing %s' % snippet,
filename = 'snippets/%s.ps' % snippet
- surface = cairo.PSSurface (filename, width, height)
+ surface = cairo.PSSurface (filename, width_in_points, height_in_points)
cr = cairo.Context (surface)
cr.save()
Index: snippets_pdf.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/cairo_snippets/snippets_pdf.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- snippets_pdf.py 18 May 2005 04:42:42 -0000 1.6
+++ snippets_pdf.py 15 Jun 2005 11:47:12 -0000 1.7
@@ -10,8 +10,9 @@
from snippets import snip_list, snippet_normalize, snippet_set_bg_svg
-X_inches, Y_inches = 2, 2
-width, height = X_inches * 72, Y_inches * 72 # used by snippet_normalize()
+width_in_inches, height_in_inches = 2, 2
+width_in_points, height_in_points = width_in_inches * 72, height_in_inches * 72
+width, height = width_in_points, height_in_points # used by snippet_normalize()
Verbose_mode = True
@@ -20,7 +21,7 @@
print 'processing %s' % snippet,
filename = 'snippets/%s.pdf' % snippet
- surface = cairo.PDFSurface (filename, width, height)
+ surface = cairo.PDFSurface (filename, width_in_points, height_in_points)
cr = cairo.Context (surface)
cr.save()
More information about the cairo-commit
mailing list