[cairo-commit] pycairo/examples/cairo_snippets/snippets gradient_mask.py, NONE, 1.1

Steve Chaplin commit at pdx.freedesktop.org
Mon Aug 7 05:50:33 PDT 2006


Committed by: stevech1097

Update of /cvs/cairo/pycairo/examples/cairo_snippets/snippets
In directory kemper:/tmp/cvs-serv20313/examples/cairo_snippets/snippets

Added Files:
	gradient_mask.py 
Log Message:
'SC'

--- NEW FILE: gradient_mask.py ---
snippet_normalize (cr, width, height)

pattern = cairo.LinearGradient (0, 0, 1, 1)
pattern.add_color_stop_rgb (0, 0, 0.3, 0.8)
pattern.add_color_stop_rgb (1, 0, 0.8, 0.3)

mask = cairo.RadialGradient (0.5, 0.5, 0.25, 0.5, 0.5, 0.5)
mask.add_color_stop_rgba (0, 0, 0, 0, 1)
mask.add_color_stop_rgba (0.5, 0, 0, 0, 0)

cr.set_source (pattern)
cr.mask (mask)



More information about the cairo-commit mailing list