[cairo-commit] [cairo-www] src/pycairo.mdwn
Carl Worth
cworth at freedesktop.org
Thu Jan 1 17:00:50 PST 2009
src/pycairo.mdwn | 33 ++-------------------------------
1 file changed, 2 insertions(+), 31 deletions(-)
New commits:
commit ea4b21e845fd36ef4d7a152dadeab6bde4d7e8b2
Author: Carl Worth <cworth at freedesktop.org>
Date: Thu Jan 1 17:00:50 2009 -0800
web commit by SteveChaplin: Remove the 'Example' section, so pycairo homepage is reduced to one screen of info, like cairo homepage.
diff --git a/src/pycairo.mdwn b/src/pycairo.mdwn
index 48a1d7d..ff78338 100644
--- a/src/pycairo.mdwn
+++ b/src/pycairo.mdwn
@@ -17,40 +17,11 @@ Occasionally a development snapshot may also be released.
# Documentation
-Online [documentation](http://cairographics.org/documentation/pycairo)
+Online [documentation](/documentation/pycairo)
Downloadable [tar archive](/releases)
-# Example
-
-This simple examples draws a blue triangle into a png file.
-
- #!/usr/bin/env python
-
- import cairo
-
- WIDTH, HEIGHT = 400, 400
-
- # Setup Cairo
- surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT)
- ctx = cairo.Context(surface)
-
- # Set thickness of brush
- ctx.set_line_width(15)
-
- # Draw out the triangle using absolute coordinates
- ctx.move_to(200, 100)
- ctx.line_to(300, 300)
- ctx.rel_line_to(-200, 0)
- ctx.close_path()
-
- # Apply the ink
- ctx.stroke()
-
- # Output a PNG file
- surface.write_to_png("triangle.png")
-
-Several other [[pycairo_resources|resources]] are available.
+Several other [pycairo_resources](/pycairo/resources) are available.
# License
More information about the cairo-commit
mailing list