[cairo-commit] rcairo/packages/cairo/ext rb_cairo_context.c, 1.11, 1.12

Kouhei Sutou commit at pdx.freedesktop.org
Sat Oct 8 07:41:42 PDT 2005


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/ext
In directory gabe:/tmp/cvs-serv30590/packages/cairo/ext

Modified Files:
	rb_cairo_context.c 
Log Message:
* packages/cairo/ext/rb_cairo_context.c: Supported all API for
  cairo_t.
* samples/png.rb: Followed the avobe changes.


Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/rb_cairo_context.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- rb_cairo_context.c	7 Oct 2005 14:08:13 -0000	1.11
+++ rb_cairo_context.c	8 Oct 2005 14:41:40 -0000	1.12
@@ -15,24 +15,11 @@
 
 #define _SELF  (RVAL2CRCONTEXT(self))
 
-cairo_t *
-rb_cairo_context_from_ruby_object (VALUE obj)
-{
-  cairo_t  *context;
-  if (!RTEST (rb_obj_is_kind_of (obj, rb_cCairo_Context)))
-    {
-      rb_raise (rb_eTypeError, "not a cairo graphics context");
-    }
[...1445 lines suppressed...]
+  /* Query functions */
+  rb_define_method (rb_cCairo_Context, "operator", cr_get_operator, 0);
+  rb_define_method (rb_cCairo_Context, "source", cr_get_source, 0);
+  rb_define_method (rb_cCairo_Context, "tolerance", cr_get_tolerance, 0);
+  rb_define_method (rb_cCairo_Context, "antialias", cr_get_antialias, 0);
+  rb_define_method (rb_cCairo_Context, "current_point",
+                    cr_get_current_point, 0);
+  rb_define_method (rb_cCairo_Context, "fill_rule", cr_get_fill_rule, 0);
+  rb_define_method (rb_cCairo_Context, "line_width", cr_get_line_width, 0);
+  rb_define_method (rb_cCairo_Context, "line_cap", cr_get_line_cap, 0);
+  rb_define_method (rb_cCairo_Context, "line_join", cr_get_line_join, 0);
+  rb_define_method (rb_cCairo_Context, "miter_limit", cr_get_miter_limit, 0);
+  rb_define_method (rb_cCairo_Context, "matrix", cr_get_matrix, 0);
+  rb_define_method (rb_cCairo_Context, "target", cr_get_target, 0);
+  
+  /* Paths */
+  rb_define_method (rb_cCairo_Context, "copy_path", cr_copy_path, 0);
+  rb_define_method (rb_cCairo_Context, "copy_path_flat", cr_copy_path_flat, 0);
+  rb_define_method (rb_cCairo_Context, "append_path", cr_copy_append_path, 1);
 }



More information about the cairo-commit mailing list