[cairo-commit] rcairo/samples png.rb,1.4,1.5
Kouhei Sutou
commit at pdx.freedesktop.org
Sat Oct 8 07:41:42 PDT 2005
Committed by: kou
Update of /cvs/cairo/rcairo/samples
In directory gabe:/tmp/cvs-serv30590/samples
Modified Files:
png.rb
Log Message:
* packages/cairo/ext/rb_cairo_context.c: Supported all API for
cairo_t.
* samples/png.rb: Followed the avobe changes.
Index: png.rb
===================================================================
RCS file: /cvs/cairo/rcairo/samples/png.rb,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- png.rb 7 Oct 2005 13:44:40 -0000 1.4
+++ png.rb 8 Oct 2005 14:41:40 -0000 1.5
@@ -8,7 +8,7 @@
cr=Context.new(SurfaceImage.new(FORMAT_ARGB32, 200,200))
# fill background with white
-cr.set_source_rgb(1.0, 1.0, 1.0)
+cr.set_source(1.0, 1.0, 1.0)
cr.paint
# create shape
@@ -18,9 +18,9 @@
cr.line_to(50, 150)
cr.close_path
-cr.set_source_rgb(0.0, 0.0, 0.0)
+cr.set_source(0.0, 0.0, 0.0)
cr.fill_preserve
-cr.set_source_rgb(1.0, 0.0, 0.0)
+cr.set_source(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