[cairo-commit] rcairo/src/lib cairo.rb,NONE,1.1
Kouhei Sutou
commit at pdx.freedesktop.org
Tue Mar 6 04:17:41 PST 2007
- Previous message: [cairo-commit] rcairo/packages/cairo/lib/cairo/context circle.rb,
1.1, NONE path.rb, 1.1, NONE quad.rb, 1.1, NONE rectangle.rb,
1.1, NONE
- Next message: [cairo-commit] rcairo/src .cvsignore, NONE, 1.1 cairo.def, NONE,
1.1 depend, NONE, 1.1 rb_cairo.c, NONE, 1.1 rb_cairo.h, NONE,
1.1 rb_cairo_constants.c, NONE, 1.1 rb_cairo_context.c, NONE,
1.1 rb_cairo_exception.c, NONE, 1.1 rb_cairo_font_extents.c,
NONE, 1.1 rb_cairo_font_face.c, NONE,
1.1 rb_cairo_font_options.c, NONE, 1.1 rb_cairo_glyph.c, NONE,
1.1 rb_cairo_matrix.c, NONE, 1.1 rb_cairo_path.c, NONE,
1.1 rb_cairo_pattern.c, NONE, 1.1 rb_cairo_private.c, NONE,
1.1 rb_cairo_private.h, NONE, 1.1 rb_cairo_scaled_font.c, NONE,
1.1 rb_cairo_surface.c, NONE, 1.1 rb_cairo_text_extents.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: kou
Update of /cvs/cairo/rcairo/src/lib
In directory kemper:/tmp/cvs-serv14983/src/lib
Added Files:
cairo.rb
Log Message:
* setup.rb: removed dependency on setup.rb. used Ruby-GNOME2 style.
* extconf.rb: moved from packages/cairo/ext/.
* packages/cairo/ext: move to ...
* src/: ... here.
* packages/cairo/lib: move to ...
* src/lib: ... here.
* README, samples/: followed the changes.
--- NEW FILE: cairo.rb ---
# vim: filetype=ruby:expandtab:shiftwidth=2:tabstop=8:softtabstop=2 :
if /mingw|mswin|mswin32/ =~ RUBY_PLATFORM
require 'rbconfig'
ENV['PATH'] = %w(bin lib).collect do |dir|
"#{Config::CONFIG["prefix"]}\\lib\\GTK\\#{dir};"
end.join('') + ENV['PATH']
end
module Cairo
def self.__add_one_arg_setter(klass)
names = klass.instance_methods(false)
names.each do |name|
if /^set_(.*)/ =~ name and
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
end
require 'cairo.so'
module Cairo
class << self
undef __add_one_arg_setter
end
module_function
def bindings_version
major, minor, micro, tag = BINDINGS_VERSION
version = [major, minor, micro].join('.')
version << "-#{tag}" if tag
version
end
class Surface
def dup
raise NotImplementedError
end
def clone
raise NotImplementedError
end
end
class SVGSurface
class << self
def versions_as_string
versions.collect do |version|
version_to_string(version)
end
end
end
end
class Matrix
def dup
Matrix.new(*to_a)
end
def clone
copy = dup
copy.freeze if self.frozen?
copy
end
def translate(tx, ty); dup.translate!(tx, ty); end
def scale(sx, sy); dup.scale!(sx, sy); end
def rotate(radians); dup.rotate!(radians); end
def invert; dup.invert!; end
def multiply(other); dup.multiply!(other); end
alias * multiply
end
end
require 'cairo/context'
- Previous message: [cairo-commit] rcairo/packages/cairo/lib/cairo/context circle.rb,
1.1, NONE path.rb, 1.1, NONE quad.rb, 1.1, NONE rectangle.rb,
1.1, NONE
- Next message: [cairo-commit] rcairo/src .cvsignore, NONE, 1.1 cairo.def, NONE,
1.1 depend, NONE, 1.1 rb_cairo.c, NONE, 1.1 rb_cairo.h, NONE,
1.1 rb_cairo_constants.c, NONE, 1.1 rb_cairo_context.c, NONE,
1.1 rb_cairo_exception.c, NONE, 1.1 rb_cairo_font_extents.c,
NONE, 1.1 rb_cairo_font_face.c, NONE,
1.1 rb_cairo_font_options.c, NONE, 1.1 rb_cairo_glyph.c, NONE,
1.1 rb_cairo_matrix.c, NONE, 1.1 rb_cairo_path.c, NONE,
1.1 rb_cairo_pattern.c, NONE, 1.1 rb_cairo_private.c, NONE,
1.1 rb_cairo_private.h, NONE, 1.1 rb_cairo_scaled_font.c, NONE,
1.1 rb_cairo_surface.c, NONE, 1.1 rb_cairo_text_extents.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list