[cairo-commit] rcairo/packages/cairo/lib cairo.rb,1.9,1.10

Kouhei Sutou commit at pdx.freedesktop.org
Thu Sep 29 19:43:32 PDT 2005


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/lib
In directory gabe:/tmp/cvs-serv31155/packages/cairo/lib

Modified Files:
	cairo.rb 
Log Message:
* packages/cairo/lib/cairo.rb: change indentation style to
  style of ruby-mode.el.


Index: cairo.rb
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/lib/cairo.rb,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo.rb	13 Sep 2005 16:22:30 -0000	1.9
+++ cairo.rb	30 Sep 2005 02:43:30 -0000	1.10
@@ -1,4 +1,4 @@
-# vim: filetype=ruby:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
+# vim: filetype=ruby:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
 
 require 'cairo.so' 
 
@@ -9,78 +9,78 @@
     names = klass.instance_methods(false)
     names.each do |name|
       if /^set_(.*)/ =~ name and
-          not names.include? "#{$1}=" and
-          klass.instance_method(name).arity == 1
+        not names.include? "#{$1}=" and
+        klass.instance_method(name).arity == 1
         klass.module_eval("def #{$1}=(val); set_#{$1}(val); val; end")
       end
     end
   end
 
-class Context
+  class Context
     Cairo.__add_one_arg_setter(self)
 
     def dup
-        copy = Context.new
-        copy.copy(self)
-        return copy
+      copy = Context.new
+      copy.copy(self)
+      return copy
     end
     def clone
-        copy = Context.new
-        copy.copy(self)
-        copy.freeze if self.frozen?
-        return copy
+      copy = Context.new
+      copy.copy(self)
+      copy.freeze if self.frozen?
+      return copy
     end
 
     def set_target_png(port, format, width, height)
-        set_target_surface(Surface.new_png(port, format, width, height))
+      set_target_surface(Surface.new_png(port, format, width, height))
     end
 
     def set_target_ps(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch)
-        set_target_surface(Surface.new_ps(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch))
+      set_target_surface(Surface.new_ps(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch))
     end
 
     def set_target_pdf(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch)
-        set_target_surface(Surface.new_pdf(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch))
+      set_target_surface(Surface.new_pdf(port, width_inches, height_inches, x_pixels_inch, y_pixels_inch))
     end
 
     def quad_to(x1, y1, x2, y2)
-        ( x0, y0 ) = get_point
-        cx1 = x0 + 2 * ( x1 - x0 ) / 3
-        cy1 = y0 + 2 * ( y1 - y0 ) / 3
-        cx2 = cx1 + ( x2 - x0 ) / 3
-        cy2 = cy1 + ( y2 - y0 ) / 3
-        curve_to(cx1, cy1, cx2, cy2, x2, y2)
+      ( x0, y0 ) = get_point
+      cx1 = x0 + 2 * ( x1 - x0 ) / 3
+      cy1 = y0 + 2 * ( y1 - y0 ) / 3
+      cx2 = cx1 + ( x2 - x0 ) / 3
+      cy2 = cy1 + ( y2 - y0 ) / 3
+      curve_to(cx1, cy1, cx2, cy2, x2, y2)
     end
     def rel_quad_to(x1, y1, x2, y2)
-        ( x0, y0 ) = get_point
-        quad_to(x1 + x0, y1 + y0, x2 + x0, y2 + x0)
+      ( x0, y0 ) = get_point
+      quad_to(x1 + x0, y1 + y0, x2 + x0, y2 + x0)
     end
-end
+  end
 
-class Glyph
+  class Glyph
     Cairo.__add_one_arg_setter(self)
-end
+  end
 
-class Surface
+  class Surface
     def dup
-        raise NotImplementedError
+      raise NotImplementedError
     end
     def clone
-        raise NotImplementedError
+      raise NotImplementedError
     end
-end
+  end
 
-class Matrix
+  class Matrix
     def dup
-        copy = Matrix.new
-        copy.copy(self)
-        return copy
+      copy = Matrix.new
+      copy.copy(self)
+      return copy
     end
     def clone
-        copy = Matrix.new
-        copy.copy(self)
-        copy.freeze if self.frozen?
-        return copy
+      copy = Matrix.new
+      copy.copy(self)
+      copy.freeze if self.frozen?
+      return copy
     end
 
     def transform(tx, ty) ; dup.transform!(tx, ty) ; end
@@ -92,5 +92,5 @@
     def multiply(other) ; Matrix.new.set_product(self, other) ; end
 
     def *(other) ; Matrix.new.set_product(self, other) ; end
-end
+  end
 end



More information about the cairo-commit mailing list