[cairo-commit]
pycairo/examples/svg svgview.py, 1.4, 1.5 svg2png.py, 1.2, 1.3
Steve Chaplin
commit at pdx.freedesktop.org
Fri May 13 18:15:08 PDT 2005
- Previous message: [cairo-commit] pycairo/cairo pycairosvg-private.h, 1.3,
1.4 pycairo-private.h, 1.23, 1.24 pycairo-misc.h, 1.2,
1.3 pycairo.h, 1.30, 1.31 pycairosvg.h, NONE, 1.1 Makefile.am,
1.12, 1.13 cairosvgmodule.c, 1.4, 1.5 pycairo-path.c, 1.3,
1.4 pycairo-context.c, 1.51, 1.52
- Next message: [cairo-commit] pycairo ChangeLog,1.110,1.111
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: stevech1097
Update of /cvs/cairo/pycairo/examples/svg
In directory gabe:/tmp/cvs-serv29632/examples/svg
Modified Files:
svgview.py svg2png.py
Log Message:
SC
Index: svgview.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/svg/svgview.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- svgview.py 29 Apr 2005 09:11:16 -0000 1.4
+++ svgview.py 14 May 2005 01:15:06 -0000 1.5
@@ -105,11 +105,8 @@
width, height = da.allocation.width, da.allocation.height
pixmap = gtk.gdk.Pixmap (da.window, width, height)
- surface = cairo.gtk.surface_create_for_pixmap_with_visual(
- pixmap, self.da.window.get_visual())
- ctx = cairo.Context()
- ctx.set_target_surface (surface)
-
+ ctx = cairo.gtk.create_cairo_context(pixmap)
+
# draw to pixmap
ctx.rectangle(0,0,width,height)
ctx.set_source_rgb(*self.rgb_bg)
Index: svg2png.py
===================================================================
RCS file: /cvs/cairo/pycairo/examples/svg/svg2png.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- svg2png.py 29 Apr 2005 09:11:16 -0000 1.2
+++ svg2png.py 14 May 2005 01:15:06 -0000 1.3
@@ -24,9 +24,8 @@
svg.parse (filename)
width, height = svg.size
- ctx = cairo.Context()
surface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height)
- ctx.set_target_surface (surface)
+ ctx = cairo.Context(surface)
svg.render (ctx)
surface.write_to_png(file_out)
print 'saved', file_out
- Previous message: [cairo-commit] pycairo/cairo pycairosvg-private.h, 1.3,
1.4 pycairo-private.h, 1.23, 1.24 pycairo-misc.h, 1.2,
1.3 pycairo.h, 1.30, 1.31 pycairosvg.h, NONE, 1.1 Makefile.am,
1.12, 1.13 cairosvgmodule.c, 1.4, 1.5 pycairo-path.c, 1.3,
1.4 pycairo-context.c, 1.51, 1.52
- Next message: [cairo-commit] pycairo ChangeLog,1.110,1.111
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list