[cairo-commit] rcairo/samples png.rb,1.7,1.8

Kouhei Sutou commit at pdx.freedesktop.org
Wed Oct 12 07:58:54 PDT 2005


Committed by: kou

Update of /cvs/cairo/rcairo/samples
In directory gabe:/tmp/cvs-serv32100/samples

Modified Files:
	png.rb 
Log Message:
* samples/png.rb: Use Cairo::Context#set_source_rgb instead of
  Cairo::Context#set_source.


Index: png.rb
===================================================================
RCS file: /cvs/cairo/rcairo/samples/png.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- png.rb	12 Oct 2005 01:14:35 -0000	1.7
+++ png.rb	12 Oct 2005 14:58:52 -0000	1.8
@@ -8,7 +8,7 @@
 cr=Context.new(ImageSurface.new(FORMAT_ARGB32, 200,200))
 
 # fill background with white
-cr.set_source_rgba(1.0, 1.0, 1.0)
+cr.set_source_rgba(1.0, 1.0, 1.0, 0.8)
 cr.paint
 
 # create shape
@@ -18,9 +18,9 @@
 cr.line_to(50, 150)
 cr.close_path
 
-cr.set_source(0.0, 0.0, 0.0)
+cr.set_source_rgb(0.0, 0.0, 0.0)
 cr.fill_preserve
-cr.set_source(1.0, 0.0, 0.0)
+cr.set_source_rgb(1.0, 0.0, 0.0)
 cr.set_line_join(LINE_JOIN_MITER)
 cr.set_line_width(4)
 cr.stroke



More information about the cairo-commit mailing list