[cairo-commit] python-cairo/examples cairo-demo.py,1.2,1.3 cairo-knockout.py,1.2,1.3 text.py,1.4,1.5
Carl Worth
commit at pdx.freedesktop.org
Fri Nov 14 07:32:12 PST 2003
Committed by: cworth
Update of /cvs/cairo/python-cairo/examples
In directory pdx:/tmp/cvs-serv23899/examples
Modified Files:
cairo-demo.py cairo-knockout.py text.py
Log Message:
* examples/cairo-demo.py: Add #! magic.
* examples/cairo-knockout.py: Add #! magic.
* examples/text.py: Fixed to not call cairo.text_extents since
cairo_text_extents is not currently working.
* cairo/pycairo-surface.c: Removed calls to
cairo_surface_create_similar_solid which no longer exists in
cairo.
* cairo/cairomodule.c (init_cairo): Removed DISJOINT/CONJOINT
operators that are no longer in cairo.
Index: cairo-demo.py
===================================================================
RCS file: /cvs/cairo/python-cairo/examples/cairo-demo.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cairo-demo.py 24 Sep 2003 01:05:43 -0000 1.2
--- cairo-demo.py 14 Nov 2003 15:32:10 -0000 1.3
***************
*** 1,2 ****
--- 1,3 ----
+ #!/usr/bin/env python
import gtk
import cairo
Index: cairo-knockout.py
===================================================================
RCS file: /cvs/cairo/python-cairo/examples/cairo-knockout.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cairo-knockout.py 24 Sep 2003 01:05:43 -0000 1.2
--- cairo-knockout.py 14 Nov 2003 15:32:10 -0000 1.3
***************
*** 1,2 ****
--- 1,3 ----
+ #!/usr/bin/env python
import math
import gtk
Index: text.py
===================================================================
RCS file: /cvs/cairo/python-cairo/examples/text.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** text.py 24 Sep 2003 01:05:43 -0000 1.4
--- text.py 14 Nov 2003 15:32:10 -0000 1.5
***************
*** 13,17 ****
ctx.select_font('sans-serif')
ctx.scale_font(48)
! (x, y, width, height, dx, dy) = ctx.text_extents('Hello World')
ctx.new_path()
--- 13,20 ----
ctx.select_font('sans-serif')
ctx.scale_font(48)
! # Text extents is currently not working in cairo
! # (x, y, widht, height, dx, dy) = ctx.text_extents('Hello World')
! # Instead, we'll just kluge in some hard-coded values.
! (x, y, width, height, dx, dy) = (0, 41, 280, 48, 280, 0)
ctx.new_path()
More information about the cairo-commit
mailing list