pango 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/pango/extconf.rb +3 -0
- data/ext/pango/rbpango.c +312 -12
- data/ext/pango/rbpango.h +33 -22
- data/ext/pango/rbpangoanalysis.c +98 -58
- data/ext/pango/rbpangoattribute.c +94 -85
- data/ext/pango/rbpangoattriterator.c +39 -28
- data/ext/pango/rbpangoattrlist.c +42 -32
- data/ext/pango/rbpangocairo.c +38 -172
- data/ext/pango/rbpangocairocontext.c +151 -0
- data/ext/pango/rbpangocolor.c +49 -38
- data/ext/pango/rbpangocontext.c +109 -102
- data/ext/pango/rbpangoconversions.h +111 -0
- data/ext/pango/rbpangocoverage.c +45 -37
- data/ext/pango/rbpangoengine.c +22 -12
- data/ext/pango/rbpangofont.c +52 -43
- data/ext/pango/rbpangofontdescription.c +102 -91
- data/ext/pango/rbpangofontface.c +32 -21
- data/ext/pango/rbpangofontfamily.c +31 -20
- data/ext/pango/rbpangofontmap.c +44 -36
- data/ext/pango/rbpangofontmetrics.c +41 -30
- data/ext/pango/rbpangofontset.c +32 -21
- data/ext/pango/rbpangofontsetsimple.c +34 -24
- data/ext/pango/rbpangoglyphinfo.c +48 -35
- data/ext/pango/rbpangoglyphitem.c +43 -33
- data/ext/pango/rbpangoglyphstring.c +59 -59
- data/ext/pango/rbpangogravity.c +34 -23
- data/ext/pango/rbpangoitem.c +43 -34
- data/ext/pango/rbpangolanguage.c +44 -34
- data/ext/pango/rbpangolayout.c +167 -160
- data/ext/pango/rbpangolayoutiter.c +70 -59
- data/ext/pango/rbpangolayoutline.c +106 -71
- data/ext/pango/rbpangologattr.c +42 -31
- data/ext/pango/rbpangomatrix.c +47 -35
- data/ext/pango/rbpangoprivate.h +53 -0
- data/ext/pango/rbpangorectangle.c +58 -49
- data/ext/pango/rbpangorenderer.c +81 -70
- data/ext/pango/rbpangoscript.c +37 -27
- data/ext/pango/rbpangoscriptiter.c +32 -22
- data/ext/pango/rbpangotabarray.c +48 -37
- data/lib/1.8/pango.so +0 -0
- data/lib/1.9/pango.so +0 -0
- data/vendor/local/bin/libpango-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangocairo-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangoft2-1.0-0.dll +0 -0
- data/vendor/local/bin/libpangowin32-1.0-0.dll +0 -0
- data/vendor/local/bin/pango-querymodules.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/etc/pango/pango.modules +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-attributes.h +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-context.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-features.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-font.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-language.h +3 -3
- data/vendor/local/include/pango-1.0/pango/pango-layout.h +6 -1
- data/vendor/local/include/pango-1.0/pango/pango-renderer.h +1 -1
- data/vendor/local/include/pango-1.0/pango/pango-script.h +6 -6
- data/vendor/local/include/pango-1.0/pango/pango-utils.h +6 -6
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/pango-1.0.def +2 -0
- data/vendor/local/lib/pango-1.0.lib +0 -0
- data/vendor/local/lib/pangocairo-1.0.lib +0 -0
- data/vendor/local/lib/pangoft2-1.0.lib +0 -0
- data/vendor/local/lib/pangowin32-1.0.def +1 -1
- data/vendor/local/lib/pangowin32-1.0.lib +0 -0
- data/vendor/local/lib/pkgconfig/pango.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangocairo.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangoft2.pc +1 -1
- data/vendor/local/lib/pkgconfig/pangowin32.pc +1 -1
- data/vendor/local/manifest/{pango-dev_1.28.3-1_win32.mft → pango-dev_1.29.4-1_win32.mft} +5 -5
- data/vendor/local/manifest/{pango_1.28.3-1_win32.mft → pango_1.29.4-1_win32.mft} +2 -2
- data/vendor/local/share/doc/{pango-1.28.3 → pango-1.29.4}/COPYING +0 -0
- data/vendor/local/share/doc/{pango-dev-1.28.3 → pango-dev-1.29.4}/COPYING +0 -0
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +9 -10
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +25 -27
- data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +19 -28
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +42 -60
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +97 -147
- data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +6 -6
- data/vendor/local/share/gtk-doc/html/pango/index-1.10.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.12.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.14.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.16.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.18.html +3 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.2.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.20.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.22.html +5 -5
- data/vendor/local/share/gtk-doc/html/pango/index-1.24.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.26.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-1.28.html +8 -11
- data/vendor/local/share/gtk-doc/html/pango/index-1.30.html +38 -0
- data/vendor/local/share/gtk-doc/html/pango/index-1.4.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index-1.6.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-1.8.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/index-all.html +38 -40
- data/vendor/local/share/gtk-doc/html/pango/index-deprecated.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/index.html +6 -5
- data/vendor/local/share/gtk-doc/html/pango/index.sgml +71 -34
- data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-ATSUI-Fonts.html +4 -66
- data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +52 -50
- data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +217 -278
- data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +40 -41
- data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +37 -49
- data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +481 -628
- data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +76 -118
- data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +302 -452
- data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +492 -517
- data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +134 -164
- data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +34 -45
- data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +244 -359
- data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +117 -122
- data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +112 -120
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +394 -523
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +269 -364
- data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +26 -40
- data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +72 -75
- data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +97 -145
- data/vendor/local/share/gtk-doc/html/pango/pango-X-Fonts-and-Rendering.html +114 -188
- data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +114 -176
- data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +42 -8
- data/vendor/local/share/gtk-doc/html/pango/pango-pango-renderer.html +106 -150
- data/vendor/local/share/gtk-doc/html/pango/pango-querymodules.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango.devhelp2 +35 -35
- data/vendor/local/share/gtk-doc/html/pango/pango.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/rendering.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/style.css +2 -1
- data/vendor/local/share/gtk-doc/html/pango/tools.html +3 -3
- data/vendor/local/share/man/man1/pango-querymodules.1 +12 -3
- data/vendor/local/share/man/man1/pango-view.1 +2 -2
- data/vendor/local/src/dieterv/packaging/pango_1.29.4-1_win32.log +806 -0
- data/vendor/local/src/{tml/packaging/pango_1.28.3-1_win32.sh → dieterv/packaging/pango_1.29.4-1_win32.sh} +7 -7
- metadata +19 -19
- data/ChangeLog +0 -721
- data/ext/pango/rbpangoinits.c +0 -72
- data/ext/pango/rbpangomain.c +0 -202
- data/vendor/local/share/gtk-doc/html/pango/pango.devhelp +0 -799
- data/vendor/local/src/tml/packaging/pango_1.28.3-1_win32.log +0 -950
data/ext/pango/rbpangoattrlist.c
CHANGED
@@ -1,50 +1,61 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2002-2005 Masao Mutoh
|
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 "rbpangoprivate.h"
|
13
23
|
|
14
24
|
static ID id_call;
|
15
25
|
|
16
|
-
#define
|
26
|
+
#define RG_TARGET_NAMESPACE cAttrList
|
27
|
+
#define _SELF(self) (RVAL2PANGOATTRLIST(self))
|
17
28
|
|
18
29
|
static VALUE
|
19
|
-
|
30
|
+
rg_initialize(VALUE self)
|
20
31
|
{
|
21
32
|
G_INITIALIZE(self, pango_attr_list_new());
|
22
33
|
return Qnil;
|
23
34
|
}
|
24
35
|
|
25
36
|
static VALUE
|
26
|
-
|
37
|
+
rg_insert(VALUE self, VALUE attr)
|
27
38
|
{
|
28
39
|
pango_attr_list_insert(_SELF(self), RVAL2ATTR(attr));
|
29
40
|
return self;
|
30
41
|
}
|
31
42
|
|
32
43
|
static VALUE
|
33
|
-
|
44
|
+
rg_insert_before(VALUE self, VALUE attr)
|
34
45
|
{
|
35
46
|
pango_attr_list_insert_before(_SELF(self), RVAL2ATTR(attr));
|
36
47
|
return self;
|
37
48
|
}
|
38
49
|
|
39
50
|
static VALUE
|
40
|
-
|
51
|
+
rg_change(VALUE self, VALUE attr)
|
41
52
|
{
|
42
53
|
pango_attr_list_change(_SELF(self), RVAL2ATTR(attr));
|
43
54
|
return self;
|
44
55
|
}
|
45
56
|
|
46
57
|
static VALUE
|
47
|
-
|
58
|
+
rg_splice(VALUE self, VALUE other, VALUE pos, VALUE len)
|
48
59
|
{
|
49
60
|
pango_attr_list_splice(_SELF(self), _SELF(other), NUM2INT(pos), NUM2INT(len));
|
50
61
|
return self;
|
@@ -58,38 +69,37 @@ filter_func(PangoAttribute *attr, gpointer data)
|
|
58
69
|
}
|
59
70
|
|
60
71
|
static VALUE
|
61
|
-
|
72
|
+
rg_filter(VALUE self)
|
62
73
|
{
|
63
74
|
VALUE func = rb_block_proc();
|
64
75
|
G_RELATIVE(self, func);
|
65
|
-
return
|
76
|
+
return PANGOATTRLIST2RVAL(pango_attr_list_filter(_SELF(self),
|
66
77
|
(PangoAttrFilterFunc)filter_func,
|
67
|
-
(gpointer)func)
|
68
|
-
PANGO_TYPE_ATTR_LIST);
|
78
|
+
(gpointer)func));
|
69
79
|
}
|
70
80
|
#endif
|
71
81
|
|
72
82
|
static VALUE
|
73
|
-
|
83
|
+
rg_iterator(VALUE self)
|
74
84
|
{
|
75
|
-
return
|
85
|
+
return PANGOATTRITERATOR2RVAL(pango_attr_list_get_iterator(_SELF(self)));
|
76
86
|
}
|
77
87
|
|
78
88
|
void
|
79
|
-
Init_pango_attrlist()
|
89
|
+
Init_pango_attrlist(VALUE mPango)
|
80
90
|
{
|
81
|
-
VALUE
|
91
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_ATTR_LIST, "AttrList", mPango);
|
82
92
|
|
83
93
|
id_call = rb_intern("call");
|
84
94
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
95
|
+
RG_DEF_METHOD(initialize, 0);
|
96
|
+
RG_DEF_METHOD(insert, 1);
|
97
|
+
RG_DEF_METHOD(insert_before, 1);
|
98
|
+
RG_DEF_METHOD(change, 1);
|
99
|
+
RG_DEF_METHOD(splice, 3);
|
90
100
|
#if PANGO_CHECK_VERSION(1,4,0)
|
91
|
-
|
101
|
+
RG_DEF_METHOD(filter, 0);
|
92
102
|
#endif
|
93
|
-
|
103
|
+
RG_DEF_METHOD(iterator, 0);
|
94
104
|
|
95
105
|
}
|
data/ext/pango/rbpangocairo.c
CHANGED
@@ -1,215 +1,81 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2006 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 2005 Kouhei Sutou
|
6
|
+
*
|
7
|
+
* This library is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation; either
|
10
|
+
* version 2.1 of the License, or (at your option) any later version.
|
11
|
+
*
|
12
|
+
* This library is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
+
* Lesser General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
18
|
+
* License along with this library; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20
|
+
* MA 02110-1301 USA
|
21
|
+
*/
|
22
|
+
|
23
|
+
#include "rbpangoprivate.h"
|
18
24
|
|
19
25
|
#ifdef CAIRO_AVAILABLE
|
20
26
|
|
21
|
-
#define
|
22
|
-
#define
|
23
|
-
#define RVAL2LAYOUT(v) (PANGO_LAYOUT(RVAL2GOBJ(v)))
|
24
|
-
#define RVAL2FONT(v) (PANGO_FONT(RVAL2GOBJ(v)))
|
25
|
-
#define RVAL2GLYPH(v) ((PangoGlyphString*)(RVAL2BOXED(self, PANGO_TYPE_GLYPH_STRING)))
|
26
|
-
#define RVAL2LINE(v) ((PangoLayoutLine*)RVAL2BOXED(v, PANGO_TYPE_LAYOUT_LINE))
|
27
|
+
#define RG_TARGET_NAMESPACE cCairoFontMap
|
28
|
+
#define _SELF(self) (RVAL2PANGOCAIROFONTMAP(self))
|
27
29
|
|
28
30
|
static VALUE
|
29
|
-
|
31
|
+
rg_s_create(VALUE klass)
|
30
32
|
{
|
31
33
|
return GOBJ2RVAL(pango_cairo_font_map_new());
|
32
34
|
}
|
33
35
|
|
34
36
|
static VALUE
|
35
|
-
|
37
|
+
rg_s_default(VALUE klass)
|
36
38
|
{
|
37
39
|
return GOBJ2RVAL(pango_cairo_font_map_get_default());
|
38
40
|
}
|
39
41
|
|
40
42
|
static VALUE
|
41
|
-
|
43
|
+
rg_set_resolution(VALUE self, VALUE dpi)
|
42
44
|
{
|
43
45
|
pango_cairo_font_map_set_resolution(_SELF(self), NUM2DBL(dpi));
|
44
46
|
return self;
|
45
47
|
}
|
46
48
|
|
47
49
|
static VALUE
|
48
|
-
|
50
|
+
rg_resolution(VALUE self)
|
49
51
|
{
|
50
52
|
return rb_float_new(pango_cairo_font_map_get_resolution(_SELF(self)));
|
51
53
|
}
|
52
54
|
|
53
55
|
static VALUE
|
54
|
-
|
56
|
+
rg_create_context(VALUE self)
|
55
57
|
{
|
56
58
|
return GOBJ2RVAL_UNREF(pango_cairo_font_map_create_context(_SELF(self)));
|
57
59
|
}
|
58
60
|
|
59
|
-
static VALUE
|
60
|
-
update_context(VALUE self, VALUE context)
|
61
|
-
{
|
62
|
-
pango_cairo_update_context(RVAL2CRCONTEXT(self), RVAL2CONTEXT(context));
|
63
|
-
return self;
|
64
|
-
}
|
65
|
-
|
66
|
-
/* Convenience */
|
67
|
-
static VALUE
|
68
|
-
create_layout(VALUE self)
|
69
|
-
{
|
70
|
-
return GOBJ2RVAL_UNREF(pango_cairo_create_layout(RVAL2CRCONTEXT(self)));
|
71
|
-
}
|
72
|
-
|
73
|
-
static VALUE
|
74
|
-
update_layout(VALUE self, VALUE layout)
|
75
|
-
{
|
76
|
-
pango_cairo_update_layout(RVAL2CRCONTEXT(self), RVAL2LAYOUT(layout));
|
77
|
-
return self;
|
78
|
-
}
|
79
|
-
|
80
|
-
/* Rendering */
|
81
|
-
static VALUE
|
82
|
-
show_glyph_string(VALUE self, VALUE font, VALUE glyphs)
|
83
|
-
{
|
84
|
-
pango_cairo_show_glyph_string(RVAL2CRCONTEXT(self),
|
85
|
-
RVAL2FONT(font),
|
86
|
-
RVAL2GLYPH(glyphs));
|
87
|
-
return self;
|
88
|
-
}
|
89
|
-
|
90
|
-
static VALUE
|
91
|
-
show_layout_line(VALUE self, VALUE line)
|
92
|
-
{
|
93
|
-
pango_cairo_show_layout_line(RVAL2CRCONTEXT(self), RVAL2LINE(line));
|
94
|
-
return self;
|
95
|
-
}
|
96
|
-
|
97
|
-
static VALUE
|
98
|
-
show_layout(VALUE self, VALUE layout)
|
99
|
-
{
|
100
|
-
pango_cairo_show_layout(RVAL2CRCONTEXT(self), RVAL2LAYOUT(layout));
|
101
|
-
return self;
|
102
|
-
}
|
103
|
-
|
104
|
-
#if PANGO_CHECK_VERSION(1,14,0)
|
105
|
-
static VALUE
|
106
|
-
show_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
107
|
-
{
|
108
|
-
pango_cairo_show_error_underline(RVAL2CRCONTEXT(self),
|
109
|
-
NUM2DBL(x), NUM2DBL(y),
|
110
|
-
NUM2DBL(width), NUM2DBL(height));
|
111
|
-
return self;
|
112
|
-
}
|
113
|
-
#endif
|
114
|
-
|
115
|
-
/* Rendering to a path */
|
116
|
-
static VALUE
|
117
|
-
glyph_string_path(VALUE self, VALUE font, VALUE glyphs)
|
118
|
-
{
|
119
|
-
pango_cairo_glyph_string_path(RVAL2CRCONTEXT(self),
|
120
|
-
RVAL2FONT(font),
|
121
|
-
RVAL2GLYPH(glyphs));
|
122
|
-
return self;
|
123
|
-
}
|
124
|
-
|
125
|
-
static VALUE
|
126
|
-
layout_line_path(VALUE self, VALUE line)
|
127
|
-
{
|
128
|
-
pango_cairo_layout_line_path(RVAL2CRCONTEXT(self), RVAL2LINE(line));
|
129
|
-
return self;
|
130
|
-
}
|
131
|
-
|
132
|
-
static VALUE
|
133
|
-
layout_path(VALUE self, VALUE layout)
|
134
|
-
{
|
135
|
-
pango_cairo_layout_path(RVAL2CRCONTEXT(self), RVAL2LAYOUT(layout));
|
136
|
-
return self;
|
137
|
-
}
|
138
|
-
|
139
|
-
#if PANGO_CHECK_VERSION(1,14,0)
|
140
|
-
static VALUE
|
141
|
-
error_underline_path(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
142
|
-
{
|
143
|
-
pango_cairo_error_underline_path(RVAL2CRCONTEXT(self),
|
144
|
-
NUM2DBL(x), NUM2DBL(y),
|
145
|
-
NUM2DBL(width), NUM2DBL(height));
|
146
|
-
return self;
|
147
|
-
}
|
148
|
-
#endif
|
149
|
-
|
150
|
-
#endif
|
151
|
-
|
152
|
-
static VALUE
|
153
|
-
cairo_available_p(VALUE self)
|
154
|
-
{
|
155
|
-
#if CAIRO_AVAILABLE
|
156
|
-
return Qtrue;
|
157
|
-
#else
|
158
|
-
return Qfalse;
|
159
61
|
#endif
|
160
|
-
}
|
161
62
|
|
162
63
|
void
|
163
|
-
Init_pango_cairo()
|
64
|
+
Init_pango_cairo(VALUE mPango)
|
164
65
|
{
|
165
66
|
#ifdef CAIRO_AVAILABLE
|
166
|
-
VALUE
|
67
|
+
VALUE RG_TARGET_NAMESPACE;
|
167
68
|
|
168
69
|
/* Pango::CairoFontMap */
|
169
|
-
|
70
|
+
RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_CAIRO_FONT_MAP, "CairoFontMap", mPango);
|
170
71
|
|
171
|
-
|
172
|
-
|
72
|
+
RG_DEF_SMETHOD(create, 0);
|
73
|
+
RG_DEF_SMETHOD(default, 0);
|
173
74
|
|
174
|
-
|
175
|
-
|
176
|
-
|
75
|
+
RG_DEF_METHOD(set_resolution, 1);
|
76
|
+
RG_DEF_METHOD(resolution, 0);
|
77
|
+
RG_DEF_METHOD(create_context, 0);
|
177
78
|
|
178
|
-
G_DEF_SETTERS(
|
179
|
-
|
180
|
-
/* Cairo::Context */
|
181
|
-
rb_define_method(rb_cCairo_Context, "update_pango_context",
|
182
|
-
update_context, 1);
|
183
|
-
/* Convenience */
|
184
|
-
rb_define_method(rb_cCairo_Context, "create_pango_layout",
|
185
|
-
create_layout, 0);
|
186
|
-
rb_define_method(rb_cCairo_Context, "update_pango_layout",
|
187
|
-
update_layout, 1);
|
188
|
-
/* Rendering */
|
189
|
-
rb_define_method(rb_cCairo_Context, "show_pango_glyph_string",
|
190
|
-
show_glyph_string, 2);
|
191
|
-
rb_define_method(rb_cCairo_Context, "show_pango_layout_line",
|
192
|
-
show_layout_line, 1);
|
193
|
-
rb_define_method(rb_cCairo_Context, "show_pango_layout",
|
194
|
-
show_layout, 1);
|
195
|
-
#if PANGO_CHECK_VERSION(1,14,0)
|
196
|
-
rb_define_method(rb_cCairo_Context, "show_pango_error_underline",
|
197
|
-
show_error_underline, 4);
|
79
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
198
80
|
#endif
|
199
|
-
/* Rendering to a path */
|
200
|
-
rb_define_method(rb_cCairo_Context, "pango_glyph_string_path",
|
201
|
-
glyph_string_path, 2);
|
202
|
-
rb_define_method(rb_cCairo_Context, "pango_layout_line_path",
|
203
|
-
layout_line_path, 1);
|
204
|
-
rb_define_method(rb_cCairo_Context, "pango_layout_path",
|
205
|
-
layout_path, 1);
|
206
|
-
|
207
|
-
#if PANGO_CHECK_VERSION(1,14,0)
|
208
|
-
rb_define_method(rb_cCairo_Context, "pango_error_underline_path",
|
209
|
-
error_underline_path, 4);
|
210
|
-
#endif
|
211
|
-
|
212
|
-
#endif
|
213
|
-
|
214
|
-
rb_define_module_function(mPango, "cairo_available?", cairo_available_p, 0);
|
215
81
|
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2006 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 2005 Kouhei Sutou
|
6
|
+
*
|
7
|
+
* This library is free software; you can redistribute it and/or
|
8
|
+
* modify it under the terms of the GNU Lesser General Public
|
9
|
+
* License as published by the Free Software Foundation; either
|
10
|
+
* version 2.1 of the License, or (at your option) any later version.
|
11
|
+
*
|
12
|
+
* This library is distributed in the hope that it will be useful,
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
15
|
+
* Lesser General Public License for more details.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
18
|
+
* License along with this library; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20
|
+
* MA 02110-1301 USA
|
21
|
+
*/
|
22
|
+
|
23
|
+
#include "rbpangoprivate.h"
|
24
|
+
|
25
|
+
#if PANGO_CHECK_VERSION(1,10,0) && defined(HAVE_RB_CAIRO_H)
|
26
|
+
# define CAIRO_AVAILABLE 1
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#ifdef CAIRO_AVAILABLE
|
30
|
+
|
31
|
+
#define RG_TARGET_NAMESPACE rb_cCairo_Context
|
32
|
+
|
33
|
+
static VALUE
|
34
|
+
rg_update_pango_context(VALUE self, VALUE context)
|
35
|
+
{
|
36
|
+
pango_cairo_update_context(RVAL2CRCONTEXT(self), RVAL2PANGOCONTEXT(context));
|
37
|
+
return self;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Convenience */
|
41
|
+
static VALUE
|
42
|
+
rg_create_pango_layout(VALUE self)
|
43
|
+
{
|
44
|
+
return GOBJ2RVAL_UNREF(pango_cairo_create_layout(RVAL2CRCONTEXT(self)));
|
45
|
+
}
|
46
|
+
|
47
|
+
static VALUE
|
48
|
+
rg_update_pango_layout(VALUE self, VALUE layout)
|
49
|
+
{
|
50
|
+
pango_cairo_update_layout(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
51
|
+
return self;
|
52
|
+
}
|
53
|
+
|
54
|
+
/* Rendering */
|
55
|
+
static VALUE
|
56
|
+
rg_show_pango_glyph_string(VALUE self, VALUE font, VALUE glyphs)
|
57
|
+
{
|
58
|
+
pango_cairo_show_glyph_string(RVAL2CRCONTEXT(self),
|
59
|
+
RVAL2PANGOFONT(font),
|
60
|
+
RVAL2PANGOGLYPHSTRING(glyphs));
|
61
|
+
return self;
|
62
|
+
}
|
63
|
+
|
64
|
+
static VALUE
|
65
|
+
rg_show_pango_layout_line(VALUE self, VALUE line)
|
66
|
+
{
|
67
|
+
pango_cairo_show_layout_line(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUTLINE(line));
|
68
|
+
return self;
|
69
|
+
}
|
70
|
+
|
71
|
+
static VALUE
|
72
|
+
rg_show_pango_layout(VALUE self, VALUE layout)
|
73
|
+
{
|
74
|
+
pango_cairo_show_layout(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
75
|
+
return self;
|
76
|
+
}
|
77
|
+
|
78
|
+
#if PANGO_CHECK_VERSION(1,14,0)
|
79
|
+
static VALUE
|
80
|
+
rg_show_pango_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
81
|
+
{
|
82
|
+
pango_cairo_show_error_underline(RVAL2CRCONTEXT(self),
|
83
|
+
NUM2DBL(x), NUM2DBL(y),
|
84
|
+
NUM2DBL(width), NUM2DBL(height));
|
85
|
+
return self;
|
86
|
+
}
|
87
|
+
#endif
|
88
|
+
|
89
|
+
/* Rendering to a path */
|
90
|
+
static VALUE
|
91
|
+
rg_pango_glyph_string_path(VALUE self, VALUE font, VALUE glyphs)
|
92
|
+
{
|
93
|
+
pango_cairo_glyph_string_path(RVAL2CRCONTEXT(self),
|
94
|
+
RVAL2PANGOFONT(font),
|
95
|
+
RVAL2PANGOGLYPHSTRING(glyphs));
|
96
|
+
return self;
|
97
|
+
}
|
98
|
+
|
99
|
+
static VALUE
|
100
|
+
rg_pango_layout_line_path(VALUE self, VALUE line)
|
101
|
+
{
|
102
|
+
pango_cairo_layout_line_path(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUTLINE(line));
|
103
|
+
return self;
|
104
|
+
}
|
105
|
+
|
106
|
+
static VALUE
|
107
|
+
rg_pango_layout_path(VALUE self, VALUE layout)
|
108
|
+
{
|
109
|
+
pango_cairo_layout_path(RVAL2CRCONTEXT(self), RVAL2PANGOLAYOUT(layout));
|
110
|
+
return self;
|
111
|
+
}
|
112
|
+
|
113
|
+
#if PANGO_CHECK_VERSION(1,14,0)
|
114
|
+
static VALUE
|
115
|
+
rg_pango_error_underline_path(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
116
|
+
{
|
117
|
+
pango_cairo_error_underline_path(RVAL2CRCONTEXT(self),
|
118
|
+
NUM2DBL(x), NUM2DBL(y),
|
119
|
+
NUM2DBL(width), NUM2DBL(height));
|
120
|
+
return self;
|
121
|
+
}
|
122
|
+
#endif
|
123
|
+
|
124
|
+
#endif
|
125
|
+
|
126
|
+
void
|
127
|
+
Init_pango_cairo_context(VALUE mPango)
|
128
|
+
{
|
129
|
+
#ifdef CAIRO_AVAILABLE
|
130
|
+
/* Cairo::Context */
|
131
|
+
RG_DEF_METHOD(update_pango_context, 1);
|
132
|
+
/* Convenience */
|
133
|
+
RG_DEF_METHOD(create_pango_layout, 0);
|
134
|
+
RG_DEF_METHOD(update_pango_layout, 1);
|
135
|
+
/* Rendering */
|
136
|
+
RG_DEF_METHOD(show_pango_glyph_string, 2);
|
137
|
+
RG_DEF_METHOD(show_pango_layout_line, 1);
|
138
|
+
RG_DEF_METHOD(show_pango_layout, 1);
|
139
|
+
#if PANGO_CHECK_VERSION(1,14,0)
|
140
|
+
RG_DEF_METHOD(show_pango_error_underline, 4);
|
141
|
+
#endif
|
142
|
+
/* Rendering to a path */
|
143
|
+
RG_DEF_METHOD(pango_glyph_string_path, 2);
|
144
|
+
RG_DEF_METHOD(pango_layout_line_path, 1);
|
145
|
+
RG_DEF_METHOD(pango_layout_path, 1);
|
146
|
+
|
147
|
+
#if PANGO_CHECK_VERSION(1,14,0)
|
148
|
+
RG_DEF_METHOD(pango_error_underline_path, 4);
|
149
|
+
#endif
|
150
|
+
#endif
|
151
|
+
}
|