[cairo-commit] rcairo/packages/cairo/lib cairo.rb,1.21,1.22

Kouhei Sutou commit at pdx.freedesktop.org
Sat Oct 14 23:54:10 PDT 2006


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/lib
In directory kemper:/tmp/cvs-serv26671/packages/cairo/lib

Modified Files:
	cairo.rb 
Log Message:
* packages/cairo/ext/rb_cairo.c (Cairo::BINDINGS_VERSION): moved
  from ...
* packages/cairo/lib/cairo.rb: ... here.


Index: cairo.rb
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/lib/cairo.rb,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cairo.rb	15 Oct 2006 06:49:04 -0000	1.21
+++ cairo.rb	15 Oct 2006 06:54:07 -0000	1.22
@@ -1,11 +1,9 @@
 # vim: filetype=ruby:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
 
-require 'cairo.so' 
+require 'cairo.so'
 
 module Cairo
 
-  BINDINGS_VERSION = [1, 0, 0, "beta"]
-
   module_function
   def bindings_version
     major, minor, micro, tag = BINDINGS_VERSION
@@ -30,10 +28,10 @@
 
     def quad_to(x1, y1, x2, y2)
       x0, y0 = current_point
-      cx1 = x0 + 2 * (x1 - x0) / 3
-      cy1 = y0 + 2 * (y1 - y0) / 3
-      cx2 = cx1 + (x2 - x0) / 3
-      cy2 = cy1 + (y2 - y0) / 3
+      cx1 = x0 + 2 * (x1 - x0) / 3.0
+      cy1 = y0 + 2 * (y1 - y0) / 3.0
+      cx2 = cx1 + (x2 - x0) / 3.0
+      cy2 = cy1 + (y2 - y0) / 3.0
       curve_to(cx1, cy1, cx2, cy2, x2, y2)
     end
     



More information about the cairo-commit mailing list