goocanvas 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -1
- data/ext/goocanvas/extconf.rb +14 -9
- data/ext/goocanvas/rbgoocanvas.c +23 -180
- data/ext/goocanvas/rbgoocanvas.h +3 -19
- data/{sample/goocanvas-gi.rb → lib/goo/canvas-item.rb} +12 -21
- data/lib/goocanvas.rb +55 -138
- data/sample/scalability-demo.rb +57 -18
- data/sample/simple-demo.rb +1 -3
- data/sample/table-demo.rb +104 -23
- data/sample/units-demo.rb +1 -3
- data/sample/widgets-demo.rb +112 -32
- metadata +8 -25
- data/ext/goocanvas/rbgoo.c +0 -41
- data/ext/goocanvas/rbgoocairomatrix.c +0 -47
- data/ext/goocanvas/rbgoocairopattern.c +0 -47
- data/ext/goocanvas/rbgoocanvasconversions.h +0 -31
- data/ext/goocanvas/rbgoocanvasellipse.c +0 -52
- data/ext/goocanvas/rbgoocanvasgroup.c +0 -44
- data/ext/goocanvas/rbgoocanvasimage.c +0 -48
- data/ext/goocanvas/rbgoocanvasitem.c +0 -265
- data/ext/goocanvas/rbgoocanvaspoints.c +0 -88
- data/ext/goocanvas/rbgoocanvaspolyline.c +0 -45
- data/ext/goocanvas/rbgoocanvasprivate.h +0 -47
- data/ext/goocanvas/rbgoocanvasrect.c +0 -50
- data/ext/goocanvas/rbgoocanvasstyle.c +0 -62
- data/ext/goocanvas/rbgoocanvastable.c +0 -44
- data/ext/goocanvas/rbgoocanvastext.c +0 -51
- data/ext/goocanvas/rbgoocanvaswidget.c +0 -51
- data/ext/goocanvas/rbgooutils.c +0 -45
data/ext/goocanvas/rbgooutils.c
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2007 Vincent Isambart <vincent.isambart@gmail.com>
|
5
|
-
*
|
6
|
-
* This library is free software; you can redistribute it and/or
|
7
|
-
* modify it under the terms of the GNU Lesser General Public
|
8
|
-
* License as published by the Free Software Foundation; either
|
9
|
-
* version 2.1 of the License, or (at your option) any later version.
|
10
|
-
*
|
11
|
-
* This library is distributed in the hope that it will be useful,
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
-
* Lesser General Public License for more details.
|
15
|
-
*
|
16
|
-
* You should have received a copy of the GNU Lesser General Public
|
17
|
-
* License along with this library; if not, write to the Free Software
|
18
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
-
* MA 02110-1301 USA
|
20
|
-
*/
|
21
|
-
|
22
|
-
#include "rbgoocanvasprivate.h"
|
23
|
-
|
24
|
-
GooCanvasBounds *
|
25
|
-
ruby_to_goo_canvas_bounds(VALUE rb_bounds, GooCanvasBounds *dest_bounds)
|
26
|
-
{
|
27
|
-
if (rb_bounds == Qnil)
|
28
|
-
return NULL;
|
29
|
-
|
30
|
-
if (TYPE(rb_bounds) != T_ARRAY) {
|
31
|
-
VALUE rb_array;
|
32
|
-
rb_array = rb_funcall(rb_bounds, rb_intern("to_a"), 0);
|
33
|
-
return ruby_to_goo_canvas_bounds(rb_array, dest_bounds);
|
34
|
-
}
|
35
|
-
|
36
|
-
if (RARRAY_LEN(rb_bounds) != 4)
|
37
|
-
rb_raise(rb_eRuntimeError, "Bounds must be arrays of length 4");
|
38
|
-
|
39
|
-
dest_bounds->x1 = NUM2DBL(RARRAY_PTR(rb_bounds)[0]);
|
40
|
-
dest_bounds->y1 = NUM2DBL(RARRAY_PTR(rb_bounds)[1]);
|
41
|
-
dest_bounds->x2 = NUM2DBL(RARRAY_PTR(rb_bounds)[2]);
|
42
|
-
dest_bounds->y2 = NUM2DBL(RARRAY_PTR(rb_bounds)[3]);
|
43
|
-
|
44
|
-
return dest_bounds;
|
45
|
-
}
|