pango 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/ext/pango/extconf.rb +3 -0
  2. data/ext/pango/rbpango.c +312 -12
  3. data/ext/pango/rbpango.h +33 -22
  4. data/ext/pango/rbpangoanalysis.c +98 -58
  5. data/ext/pango/rbpangoattribute.c +94 -85
  6. data/ext/pango/rbpangoattriterator.c +39 -28
  7. data/ext/pango/rbpangoattrlist.c +42 -32
  8. data/ext/pango/rbpangocairo.c +38 -172
  9. data/ext/pango/rbpangocairocontext.c +151 -0
  10. data/ext/pango/rbpangocolor.c +49 -38
  11. data/ext/pango/rbpangocontext.c +109 -102
  12. data/ext/pango/rbpangoconversions.h +111 -0
  13. data/ext/pango/rbpangocoverage.c +45 -37
  14. data/ext/pango/rbpangoengine.c +22 -12
  15. data/ext/pango/rbpangofont.c +52 -43
  16. data/ext/pango/rbpangofontdescription.c +102 -91
  17. data/ext/pango/rbpangofontface.c +32 -21
  18. data/ext/pango/rbpangofontfamily.c +31 -20
  19. data/ext/pango/rbpangofontmap.c +44 -36
  20. data/ext/pango/rbpangofontmetrics.c +41 -30
  21. data/ext/pango/rbpangofontset.c +32 -21
  22. data/ext/pango/rbpangofontsetsimple.c +34 -24
  23. data/ext/pango/rbpangoglyphinfo.c +48 -35
  24. data/ext/pango/rbpangoglyphitem.c +43 -33
  25. data/ext/pango/rbpangoglyphstring.c +59 -59
  26. data/ext/pango/rbpangogravity.c +34 -23
  27. data/ext/pango/rbpangoitem.c +43 -34
  28. data/ext/pango/rbpangolanguage.c +44 -34
  29. data/ext/pango/rbpangolayout.c +167 -160
  30. data/ext/pango/rbpangolayoutiter.c +70 -59
  31. data/ext/pango/rbpangolayoutline.c +106 -71
  32. data/ext/pango/rbpangologattr.c +42 -31
  33. data/ext/pango/rbpangomatrix.c +47 -35
  34. data/ext/pango/rbpangoprivate.h +53 -0
  35. data/ext/pango/rbpangorectangle.c +58 -49
  36. data/ext/pango/rbpangorenderer.c +81 -70
  37. data/ext/pango/rbpangoscript.c +37 -27
  38. data/ext/pango/rbpangoscriptiter.c +32 -22
  39. data/ext/pango/rbpangotabarray.c +48 -37
  40. metadata +12 -12
  41. data/ChangeLog +0 -721
  42. data/ext/pango/rbpangoinits.c +0 -72
  43. data/ext/pango/rbpangomain.c +0 -202
@@ -1,50 +1,61 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbpangoattrlist.c -
5
-
6
- $Author: sakai $
7
- $Date: 2007/07/08 02:53:10 $
8
-
9
- Copyright (C) 2002-2005 Masao Mutoh
10
- ************************************************/
11
-
12
- #include "rbpango.h"
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 _SELF(self) ((PangoAttrList*)RVAL2BOXED(self, PANGO_TYPE_ATTR_LIST))
26
+ #define RG_TARGET_NAMESPACE cAttrList
27
+ #define _SELF(self) (RVAL2PANGOATTRLIST(self))
17
28
 
18
29
  static VALUE
19
- attrlist_initialize(VALUE self)
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
- attrlist_insert(VALUE self, VALUE attr)
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
- attrlist_insert_before(VALUE self, VALUE attr)
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
- attrlist_change(VALUE self, VALUE attr)
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
- attrlist_splice(VALUE self, VALUE other, VALUE pos, VALUE len)
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
- attrlist_filter(VALUE self)
72
+ rg_filter(VALUE self)
62
73
  {
63
74
  VALUE func = rb_block_proc();
64
75
  G_RELATIVE(self, func);
65
- return BOXED2RVAL(pango_attr_list_filter(_SELF(self),
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
- attrlist_get_iterator(VALUE self)
83
+ rg_iterator(VALUE self)
74
84
  {
75
- return BOXED2RVAL(pango_attr_list_get_iterator(_SELF(self)), PANGO_TYPE_ATTR_ITERATOR);
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 pAttrlist = G_DEF_CLASS(PANGO_TYPE_ATTR_LIST, "AttrList", mPango);
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
- rb_define_method(pAttrlist, "initialize", attrlist_initialize, 0);
86
- rb_define_method(pAttrlist, "insert", attrlist_insert, 1);
87
- rb_define_method(pAttrlist, "insert_before", attrlist_insert_before, 1);
88
- rb_define_method(pAttrlist, "change", attrlist_change, 1);
89
- rb_define_method(pAttrlist, "splice", attrlist_splice, 3);
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
- rb_define_method(pAttrlist, "filter", attrlist_filter, 0);
101
+ RG_DEF_METHOD(filter, 0);
92
102
  #endif
93
- rb_define_method(pAttrlist, "iterator", attrlist_get_iterator, 0);
103
+ RG_DEF_METHOD(iterator, 0);
94
104
 
95
105
  }
@@ -1,215 +1,81 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbpangocairo.c -
5
-
6
- $Author: ktou $
7
- $Date: 2007/08/13 11:10:22 $
8
-
9
- Copyright (C) 2005 Kouhei Sutou
10
- Copyright (C) 2006 Ruby-GNOME2 Project Team
11
- ************************************************/
12
-
13
- #include "rbpango.h"
14
-
15
- #if PANGO_CHECK_VERSION(1,10,0) && defined(HAVE_RB_CAIRO_H)
16
- # define CAIRO_AVAILABLE 1
17
- #endif
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 _SELF(self) (PANGO_CAIRO_FONT_MAP(RVAL2GOBJ(self)))
22
- #define RVAL2CONTEXT(v) (PANGO_CONTEXT(RVAL2GOBJ(v)))
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
- font_map_create(VALUE klass)
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
- font_map_get_default(VALUE klass)
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
- font_map_set_resolution(VALUE self, VALUE dpi)
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
- font_map_get_resolution(VALUE self)
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
- font_map_create_context(VALUE self)
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 pFontMap;
67
+ VALUE RG_TARGET_NAMESPACE;
167
68
 
168
69
  /* Pango::CairoFontMap */
169
- pFontMap = G_DEF_CLASS(PANGO_TYPE_CAIRO_FONT_MAP, "CairoFontMap", mPango);
70
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_CAIRO_FONT_MAP, "CairoFontMap", mPango);
170
71
 
171
- rb_define_singleton_method(pFontMap, "create", font_map_create, 0);
172
- rb_define_singleton_method(pFontMap, "default", font_map_get_default, 0);
72
+ RG_DEF_SMETHOD(create, 0);
73
+ RG_DEF_SMETHOD(default, 0);
173
74
 
174
- rb_define_method(pFontMap, "set_resolution", font_map_set_resolution, 1);
175
- rb_define_method(pFontMap, "resolution", font_map_get_resolution, 0);
176
- rb_define_method(pFontMap, "create_context", font_map_create_context, 0);
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(pFontMap);
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
+ }