[cairo-commit] rcairo/src/lib/cairo point.rb,NONE,1.1

Kouhei Sutou commit at pdx.freedesktop.org
Wed May 2 19:03:16 PDT 2007


Committed by: kou

Update of /cvs/cairo/rcairo/src/lib/cairo
In directory kemper:/tmp/cvs-serv2604/src/lib/cairo

Added Files:
	point.rb 
Log Message:
* src/rb_cairo.h, src/rb_cairo_path.c: added Cairo::Point and
  Cairo::PathData.

* src/lib/cairo/point.rb (Cairo::Point#distance): moved from
  Cairo::Context::Path::Point.
* src/lib/cairo/context/path.rb (Cairo::Context::Path::Point):
  removed.
* src/lib/cairo.rb, src/lib/cairo/context/path.rb: used Cairo::Point.


--- NEW FILE: point.rb ---
module Cairo
  class Point
    def distance(other)
      Math.sqrt((other.x - x) ** 2 + (other.y - y) ** 2)
    end
  end
end



More information about the cairo-commit mailing list