#!/usr/bin/env python

import cairo

WIDTH, HEIGHT = 400, 300

# Setup Cairo
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT)
ctx = cairo.Context(surface)

# Set thickness of brush
ctx.set_line_width(3)

# Draw out the triangle using absolute coordinates
ctx.move_to(100, 100)
ctx.line_to(200, 200)

# Apply the ink
ctx.stroke()

# Output a PNG file
surface.write_to_png("triangle.png")

