pango 3.1.1-x86-mingw32 → 3.1.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +27 -5
- data/ext/pango/depend +2 -2
- data/ext/pango/extconf.rb +32 -28
- data/ext/pango/pango.def +0 -16
- data/ext/pango/rb-pango-attr-list.c +64 -0
- data/ext/pango/rb-pango-attribute.c +147 -0
- data/ext/pango/rb-pango-context.c +79 -0
- data/ext/pango/{rbpangoconversions.h → rb-pango-conversions.h} +4 -6
- data/ext/pango/rb-pango-private.h +27 -0
- data/ext/pango/rb-pango.c +32 -0
- data/ext/pango/rb-pango.h +29 -0
- data/extconf.rb +25 -9
- data/lib/2.2/pango.so +0 -0
- data/lib/2.3/pango.so +0 -0
- data/lib/2.4/pango.so +0 -0
- data/lib/pango.rb +24 -68
- data/lib/pango/cairo-loader.rb +63 -0
- data/lib/pango/color.rb +31 -0
- data/lib/pango/deprecated.rb +37 -0
- data/lib/pango/font-description.rb +29 -0
- data/lib/pango/language.rb +29 -0
- data/lib/pango/layout.rb +41 -0
- data/lib/pango/loader.rb +87 -0
- data/lib/pango/markup.rb +31 -0
- data/lib/pango/matrix.rb +64 -0
- data/lib/pango/rectangle.rb +28 -0
- data/lib/pango/version.rb +30 -0
- data/test/pango-test-utils.rb +7 -7
- data/test/run-test.rb +34 -8
- data/test/test-attr-list.rb +28 -0
- data/test/test-color.rb +1 -3
- data/test/test-context.rb +4 -4
- data/test/test-enum.rb +37 -0
- data/test/test-font-description.rb +31 -0
- data/test/test-language.rb +2 -1
- data/test/test-layout.rb +12 -0
- data/test/test-markup.rb +30 -0
- data/test/test-matrix.rb +131 -5
- data/test/test-rectangle.rb +16 -3
- data/vendor/local/bin/derb.exe +0 -0
- data/vendor/local/bin/genbrk.exe +0 -0
- data/vendor/local/bin/genccode.exe +0 -0
- data/vendor/local/bin/gencfu.exe +0 -0
- data/vendor/local/bin/gencmn.exe +0 -0
- data/vendor/local/bin/gencnval.exe +0 -0
- data/vendor/local/bin/gendict.exe +0 -0
- data/vendor/local/bin/gennorm2.exe +0 -0
- data/vendor/local/bin/genrb.exe +0 -0
- data/vendor/local/bin/gensprep.exe +0 -0
- data/vendor/local/bin/hb-ot-shape-closure.exe +0 -0
- data/vendor/local/bin/hb-shape.exe +0 -0
- data/vendor/local/bin/hb-view.exe +0 -0
- data/vendor/local/bin/icuinfo.exe +0 -0
- data/vendor/local/bin/icupkg.exe +0 -0
- data/vendor/local/bin/libgraphene-1.0-0.dll +0 -0
- data/vendor/local/bin/libharfbuzz-0.dll +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/makeconv.exe +0 -0
- data/vendor/local/bin/pango-view.exe +0 -0
- data/vendor/local/bin/pkgdata.exe +0 -0
- data/vendor/local/bin/uconv.exe +0 -0
- data/vendor/local/include/graphene-1.0/graphene-box.h +148 -0
- data/vendor/local/include/graphene-1.0/graphene-euler.h +140 -0
- data/vendor/local/include/graphene-1.0/graphene-frustum.h +93 -0
- data/vendor/local/include/graphene-1.0/graphene-gobject.h +119 -0
- data/vendor/local/include/graphene-1.0/graphene-macros.h +105 -0
- data/vendor/local/include/graphene-1.0/graphene-matrix.h +288 -0
- data/vendor/local/include/graphene-1.0/graphene-plane.h +99 -0
- data/vendor/local/include/graphene-1.0/graphene-point.h +120 -0
- data/vendor/local/include/graphene-1.0/graphene-point3d.h +140 -0
- data/vendor/local/include/graphene-1.0/graphene-quad.h +80 -0
- data/vendor/local/include/graphene-1.0/graphene-quaternion.h +136 -0
- data/vendor/local/include/graphene-1.0/graphene-ray.h +98 -0
- data/vendor/local/include/graphene-1.0/graphene-rect.h +180 -0
- data/vendor/local/include/graphene-1.0/graphene-simd4f.h +1870 -0
- data/vendor/local/include/graphene-1.0/graphene-simd4x4f.h +1045 -0
- data/vendor/local/include/graphene-1.0/graphene-size.h +105 -0
- data/vendor/local/include/graphene-1.0/graphene-sphere.h +97 -0
- data/vendor/local/include/graphene-1.0/graphene-triangle.h +105 -0
- data/vendor/local/include/graphene-1.0/graphene-types.h +88 -0
- data/vendor/local/include/graphene-1.0/graphene-vec2.h +130 -0
- data/vendor/local/include/graphene-1.0/graphene-vec3.h +155 -0
- data/vendor/local/include/graphene-1.0/graphene-vec4.h +156 -0
- data/vendor/local/include/graphene-1.0/graphene-version-macros.h +185 -0
- data/vendor/local/include/graphene-1.0/graphene-version.h +70 -0
- data/vendor/local/include/graphene-1.0/graphene.h +61 -0
- data/vendor/local/include/harfbuzz/hb-common.h +36 -0
- data/vendor/local/include/harfbuzz/hb-font.h +18 -1
- data/vendor/local/include/harfbuzz/hb-ot-var.h +105 -0
- data/vendor/local/include/harfbuzz/hb-ot.h +1 -0
- data/vendor/local/include/harfbuzz/hb-shape.h +0 -16
- data/vendor/local/include/harfbuzz/hb-version.h +2 -2
- data/vendor/local/include/pango-1.0/pango/pango-engine.h +6 -6
- data/vendor/local/include/pango-1.0/pango/pango-features.h +2 -2
- data/vendor/local/include/pango-1.0/pango/pango-layout.h +1 -1
- data/vendor/local/lib/girepository-1.0/Graphene-1.0.typelib +0 -0
- data/vendor/local/lib/girepository-1.0/Pango-1.0.typelib +0 -0
- data/vendor/local/lib/graphene-1.0/include/graphene-config.h +89 -0
- data/vendor/local/lib/icudt.dll +0 -0
- data/vendor/local/lib/icudt58.dll +0 -0
- data/vendor/local/lib/icuin.dll +0 -0
- data/vendor/local/lib/icuin58.dll +0 -0
- data/vendor/local/lib/icuio.dll +0 -0
- data/vendor/local/lib/icuio58.dll +0 -0
- data/vendor/local/lib/icutest.dll +0 -0
- data/vendor/local/lib/icutest58.dll +0 -0
- data/vendor/local/lib/icutu.dll +0 -0
- data/vendor/local/lib/icutu58.dll +0 -0
- data/vendor/local/lib/icuuc.dll +0 -0
- data/vendor/local/lib/icuuc58.dll +0 -0
- data/vendor/local/lib/libgraphene-1.0.dll.a +0 -0
- data/vendor/local/lib/libgraphene-1.0.la +41 -0
- data/vendor/local/lib/libharfbuzz-icu.a +0 -0
- data/vendor/local/lib/libharfbuzz-icu.la +1 -1
- data/vendor/local/lib/libharfbuzz.dll.a +0 -0
- data/vendor/local/lib/libharfbuzz.la +1 -1
- data/vendor/local/lib/libicudt.dll.a +0 -0
- data/vendor/local/lib/libicudt58.dll +0 -0
- data/vendor/local/lib/libicuin.dll.a +0 -0
- data/vendor/local/lib/libicuio.dll.a +0 -0
- data/vendor/local/lib/libicutest.dll.a +0 -0
- data/vendor/local/lib/libicutu.dll.a +0 -0
- data/vendor/local/lib/libicuuc.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.dll.a +0 -0
- data/vendor/local/lib/libpango-1.0.la +1 -1
- data/vendor/local/lib/libpangocairo-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangocairo-1.0.la +1 -1
- data/vendor/local/lib/libpangoft2-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangoft2-1.0.la +1 -1
- data/vendor/local/lib/libpangowin32-1.0.dll.a +0 -0
- data/vendor/local/lib/libpangowin32-1.0.la +1 -1
- data/vendor/local/lib/pkgconfig/graphene-1.0.pc +15 -0
- data/vendor/local/lib/pkgconfig/graphene-gobject-1.0.pc +15 -0
- data/vendor/local/lib/pkgconfig/harfbuzz-icu.pc +1 -1
- data/vendor/local/lib/pkgconfig/harfbuzz.pc +1 -1
- 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/share/gir-1.0/Graphene-1.0.gir +8180 -0
- data/vendor/local/share/gir-1.0/Pango-1.0.gir +12 -16
- data/vendor/local/share/gtk-doc/html/graphene/annotation-glossary.html +57 -0
- data/vendor/local/share/gtk-doc/html/graphene/api-index.html +1985 -0
- data/vendor/local/share/gtk-doc/html/graphene/ch01.html +97 -0
- data/vendor/local/share/gtk-doc/html/graphene/deprecated-api-index.html +34 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Box.html +1252 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Euler.html +886 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Frustum.html +527 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-GObject-integration.html +147 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Matrix.html +2959 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Plane.html +641 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Point.html +689 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Point3D.html +916 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Quad.html +418 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Quaternion.html +1056 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Ray.html +596 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Rectangle.html +1483 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-SIMD-matrix.html +1475 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-SIMD-vector.html +3046 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Size.html +489 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Sphere.html +641 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Triangle.html +705 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Vectors.html +3715 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene-Versioning-information.html +104 -0
- data/vendor/local/share/gtk-doc/html/graphene/graphene.devhelp2 +534 -0
- data/vendor/local/share/gtk-doc/html/graphene/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/index.html +107 -0
- data/vendor/local/share/gtk-doc/html/graphene/ix03.html +1313 -0
- data/vendor/local/share/gtk-doc/html/graphene/ix04.html +582 -0
- data/vendor/local/share/gtk-doc/html/graphene/ix05.html +151 -0
- data/vendor/local/share/gtk-doc/html/graphene/ix06.html +34 -0
- data/vendor/local/share/gtk-doc/html/graphene/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/{pango/api-index-1-40.html → graphene/object-tree.html} +14 -11
- data/vendor/local/share/gtk-doc/html/graphene/rectangle-intersection.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/rectangle-union.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/rectangle.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/style.css +479 -0
- data/vendor/local/share/gtk-doc/html/graphene/triangle-barycentric.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/graphene/up.png +0 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-1-2-3.html +2 -2
- data/vendor/local/share/gtk-doc/html/harfbuzz/{api-index-1-4-0.html → api-index-1-3-3.html} +2 -2
- data/vendor/local/share/gtk-doc/html/harfbuzz/api-index-full.html +104 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/deprecated-api-index.html +9 -2
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-Shaping.html +1 -1
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-font.html +156 -40
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-gobject.html +73 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-graphite2.html +1 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-layout.html +49 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-ot-math.html +174 -177
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-shape-plan.html +40 -0
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz-hb-version.html +2 -2
- data/vendor/local/share/gtk-doc/html/harfbuzz/harfbuzz.devhelp2 +28 -10
- data/vendor/local/share/gtk-doc/html/harfbuzz/index.html +1 -1
- data/vendor/local/share/gtk-doc/html/harfbuzz/pt02.html +2 -2
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineLang.html +2 -2
- data/vendor/local/share/gtk-doc/html/pango/PangoEngineShape.html +2 -2
- data/vendor/local/share/gtk-doc/html/pango/PangoFcDecoder.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFont.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/PangoFcFontMap.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/PangoMarkupFormat.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/PangoRenderer.html +2 -2
- data/vendor/local/share/gtk-doc/html/pango/annotation-glossary.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/api-index-full.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/index.html +2 -23
- data/vendor/local/share/gtk-doc/html/pango/lowlevel.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Bidirectional-Text.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Cairo-Rendering.html +69 -69
- data/vendor/local/share/gtk-doc/html/pango/pango-CoreText-Fonts.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Coverage-Maps.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Engines.html +5 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Fonts.html +5 -4
- data/vendor/local/share/gtk-doc/html/pango/pango-FreeType-Fonts-and-Rendering.html +8 -4
- data/vendor/local/share/gtk-doc/html/pango/pango-Glyph-Storage.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-Layout-Objects.html +4 -4
- data/vendor/local/share/gtk-doc/html/pango/pango-Miscellaneous-Utilities.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Modules.html +3 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-OpenType-Font-Handling.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Scripts-and-Languages.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-Tab-Stops.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Attributes.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Text-Processing.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-Version-Checking.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-Vertical-Text.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-Win32-Fonts-and-Rendering.html +3 -3
- data/vendor/local/share/gtk-doc/html/pango/pango-Xft-Fonts-and-Rendering.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango-hierarchy.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/pango.html +1 -1
- data/vendor/local/share/gtk-doc/html/pango/rendering.html +1 -1
- data/vendor/local/share/man/man1/pango-view.1 +2 -2
- metadata +119 -78
- data/README +0 -32
- data/ext/pango/rbpango.c +0 -356
- data/ext/pango/rbpango.h +0 -95
- data/ext/pango/rbpangoanalysis.c +0 -218
- data/ext/pango/rbpangoattribute.c +0 -506
- data/ext/pango/rbpangoattriterator.c +0 -141
- data/ext/pango/rbpangoattrlist.c +0 -101
- data/ext/pango/rbpangocairo.c +0 -122
- data/ext/pango/rbpangocairocontext.c +0 -131
- data/ext/pango/rbpangocolor.c +0 -120
- data/ext/pango/rbpangocontext.c +0 -344
- data/ext/pango/rbpangocoverage.c +0 -106
- data/ext/pango/rbpangoengine.c +0 -73
- data/ext/pango/rbpangofont.c +0 -110
- data/ext/pango/rbpangofontdescription.c +0 -282
- data/ext/pango/rbpangofontface.c +0 -73
- data/ext/pango/rbpangofontfamily.c +0 -79
- data/ext/pango/rbpangofontmap.c +0 -102
- data/ext/pango/rbpangofontmetrics.c +0 -85
- data/ext/pango/rbpangofontset.c +0 -69
- data/ext/pango/rbpangofontsetsimple.c +0 -60
- data/ext/pango/rbpangoglyphinfo.c +0 -123
- data/ext/pango/rbpangoglyphitem.c +0 -125
- data/ext/pango/rbpangoglyphstring.c +0 -151
- data/ext/pango/rbpangogravity.c +0 -54
- data/ext/pango/rbpangoitem.c +0 -95
- data/ext/pango/rbpangolanguage.c +0 -94
- data/ext/pango/rbpangolayout.c +0 -583
- data/ext/pango/rbpangolayoutiter.c +0 -189
- data/ext/pango/rbpangolayoutline.c +0 -243
- data/ext/pango/rbpangologattr.c +0 -109
- data/ext/pango/rbpangomatrix.c +0 -143
- data/ext/pango/rbpangoprivate.h +0 -49
- data/ext/pango/rbpangorectangle.c +0 -170
- data/ext/pango/rbpangorenderer.c +0 -193
- data/ext/pango/rbpangoscript.c +0 -84
- data/ext/pango/rbpangoscriptiter.c +0 -92
- data/ext/pango/rbpangotabarray.c +0 -128
- data/sample/attribute.rb +0 -82
- data/sample/break.rb +0 -28
- data/sample/gdk_layout.rb +0 -27
- data/sample/glyphstring.rb +0 -61
- data/sample/item.rb +0 -37
- data/sample/label.rb +0 -23
- data/sample/layout.rb +0 -102
- data/sample/pango_cairo.rb +0 -66
- data/sample/parse.rb +0 -33
- data/sample/sample.txt +0 -10
- data/sample/script.rb +0 -23
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-10.html +0 -134
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-12.html +0 -48
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-14.html +0 -63
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-16.html +0 -227
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-18.html +0 -151
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-2.html +0 -121
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-20.html +0 -86
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-22.html +0 -123
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-24.html +0 -96
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-26.html +0 -45
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-30.html +0 -38
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-31-0.html +0 -38
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-32-4.html +0 -52
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-32.html +0 -41
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-34.html +0 -38
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-38.html +0 -79
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-4.html +0 -200
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-6.html +0 -164
- data/vendor/local/share/gtk-doc/html/pango/api-index-1-8.html +0 -170
- data/vendor/local/share/gtk-doc/html/pango/api-index-deprecated.html +0 -441
data/ext/pango/rbpangomatrix.c
DELETED
@@ -1,143 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 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"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cMatrix
|
25
|
-
#define _SELF(self) (RVAL2PANGOMATRIX(self))
|
26
|
-
|
27
|
-
#define ATTR_FLOAT(name)\
|
28
|
-
static VALUE \
|
29
|
-
matrix_get_ ## name (VALUE self)\
|
30
|
-
{\
|
31
|
-
return rb_float_new(_SELF(self)->name);\
|
32
|
-
}\
|
33
|
-
static VALUE \
|
34
|
-
matrix_set_ ## name (VALUE self, VALUE val)\
|
35
|
-
{\
|
36
|
-
_SELF(self)->name = NUM2DBL(val);\
|
37
|
-
return self;\
|
38
|
-
}
|
39
|
-
|
40
|
-
#define DEFINE_ACCESSOR(name) \
|
41
|
-
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(name), matrix_get_ ## name, 0);\
|
42
|
-
rbg_define_method(RG_TARGET_NAMESPACE, G_STRINGIFY(set_ ## name), matrix_set_## name, 1);
|
43
|
-
|
44
|
-
static VALUE
|
45
|
-
rg_initialize(int argc, VALUE *argv, VALUE self)
|
46
|
-
{
|
47
|
-
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
48
|
-
VALUE xx, xy, yx, yy, x0, y0;
|
49
|
-
|
50
|
-
rb_scan_args(argc, argv, "06", &xx, &xy, &yx, &yy, &x0, &y0);
|
51
|
-
|
52
|
-
if (argc > 0){
|
53
|
-
matrix.xx = NUM2DBL(xx);
|
54
|
-
matrix.xy = NUM2DBL(xy);
|
55
|
-
matrix.yx = NUM2DBL(yx);
|
56
|
-
matrix.yy = NUM2DBL(yy);
|
57
|
-
matrix.x0 = NUM2DBL(x0);
|
58
|
-
matrix.y0 = NUM2DBL(y0);
|
59
|
-
}
|
60
|
-
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_MATRIX, &matrix));
|
61
|
-
return Qnil;
|
62
|
-
}
|
63
|
-
|
64
|
-
static VALUE
|
65
|
-
rg_translate_bang(VALUE self, VALUE tx, VALUE ty)
|
66
|
-
{
|
67
|
-
pango_matrix_translate(_SELF(self), NUM2DBL(tx), NUM2DBL(ty));
|
68
|
-
return self;
|
69
|
-
}
|
70
|
-
|
71
|
-
static VALUE
|
72
|
-
rg_scale_bang(VALUE self, VALUE scale_x, VALUE scale_y)
|
73
|
-
{
|
74
|
-
pango_matrix_scale(_SELF(self), NUM2DBL(scale_x), NUM2DBL(scale_y));
|
75
|
-
return self;
|
76
|
-
}
|
77
|
-
|
78
|
-
static VALUE
|
79
|
-
rg_rotate_bang(VALUE self, VALUE degrees)
|
80
|
-
{
|
81
|
-
pango_matrix_rotate(_SELF(self), NUM2DBL(degrees));
|
82
|
-
return self;
|
83
|
-
}
|
84
|
-
|
85
|
-
#if PANGO_VERSION_CHECK(1,16,0)
|
86
|
-
static VALUE
|
87
|
-
rg_gravity(VALUE self)
|
88
|
-
{
|
89
|
-
return PANGOGRAVITY2RVAL(pango_gravity_get_for_matrix(_SELF(self)));
|
90
|
-
}
|
91
|
-
#endif
|
92
|
-
|
93
|
-
static VALUE
|
94
|
-
rg_concat_bang(VALUE self, VALUE new_matrix)
|
95
|
-
{
|
96
|
-
pango_matrix_concat(_SELF(self), _SELF(new_matrix));
|
97
|
-
return self;
|
98
|
-
}
|
99
|
-
|
100
|
-
static VALUE
|
101
|
-
rg_font_scale_factor(VALUE self)
|
102
|
-
{
|
103
|
-
return rb_float_new(pango_matrix_get_font_scale_factor(_SELF(self)));
|
104
|
-
}
|
105
|
-
|
106
|
-
ATTR_FLOAT(xx);
|
107
|
-
ATTR_FLOAT(xy);
|
108
|
-
ATTR_FLOAT(yx);
|
109
|
-
ATTR_FLOAT(yy);
|
110
|
-
ATTR_FLOAT(x0);
|
111
|
-
ATTR_FLOAT(y0);
|
112
|
-
|
113
|
-
static VALUE
|
114
|
-
rg_to_a(VALUE self)
|
115
|
-
{
|
116
|
-
PangoMatrix* matrix = _SELF(self);
|
117
|
-
return rb_ary_new3(6, INT2NUM(matrix->xx), INT2NUM(matrix->xy), INT2NUM(matrix->yx),
|
118
|
-
INT2NUM(matrix->yy), INT2NUM(matrix->x0), INT2NUM(matrix->y0));
|
119
|
-
}
|
120
|
-
|
121
|
-
void
|
122
|
-
Init_pango_matrix(VALUE mPango)
|
123
|
-
{
|
124
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_MATRIX, "Matrix", mPango);
|
125
|
-
|
126
|
-
RG_DEF_METHOD(initialize, -1);
|
127
|
-
RG_DEF_METHOD_BANG(translate, 2);
|
128
|
-
RG_DEF_METHOD_BANG(scale, 2);
|
129
|
-
RG_DEF_METHOD_BANG(rotate, 1);
|
130
|
-
RG_DEF_METHOD_BANG(concat, 1);
|
131
|
-
RG_DEF_METHOD(font_scale_factor, 0);
|
132
|
-
#if PANGO_VERSION_CHECK(1,16,0)
|
133
|
-
RG_DEF_METHOD(gravity, 0);
|
134
|
-
#endif
|
135
|
-
RG_DEF_METHOD(to_a, 0);
|
136
|
-
|
137
|
-
DEFINE_ACCESSOR(xx);
|
138
|
-
DEFINE_ACCESSOR(xy);
|
139
|
-
DEFINE_ACCESSOR(yx);
|
140
|
-
DEFINE_ACCESSOR(yy);
|
141
|
-
DEFINE_ACCESSOR(x0);
|
142
|
-
DEFINE_ACCESSOR(y0);
|
143
|
-
}
|
data/ext/pango/rbpangoprivate.h
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
#ifndef RB_PANGO_PRIVATE_H
|
2
|
-
#define RB_PANGO_PRIVATE_H
|
3
|
-
|
4
|
-
#include "rbpango.h"
|
5
|
-
|
6
|
-
#ifndef HAVE_RB_ERRINFO
|
7
|
-
# define rb_errinfo() (ruby_errinfo)
|
8
|
-
#endif
|
9
|
-
|
10
|
-
G_BEGIN_DECLS
|
11
|
-
|
12
|
-
G_GNUC_INTERNAL void Init_pango_analysis(VALUE mPango);
|
13
|
-
G_GNUC_INTERNAL void Init_pango_attribute(VALUE mPango);
|
14
|
-
G_GNUC_INTERNAL void Init_pango_attriterator(VALUE mPango);
|
15
|
-
G_GNUC_INTERNAL void Init_pango_attrlist(VALUE mPango);
|
16
|
-
G_GNUC_INTERNAL void Init_pango_cairo(VALUE mPango);
|
17
|
-
G_GNUC_INTERNAL void Init_pango_cairo_context(VALUE mPango);
|
18
|
-
G_GNUC_INTERNAL void Init_pango_color(VALUE mPango);
|
19
|
-
G_GNUC_INTERNAL void Init_pango_context(VALUE mPango);
|
20
|
-
G_GNUC_INTERNAL void Init_pango_coverage(VALUE mPango);
|
21
|
-
G_GNUC_INTERNAL void Init_pango_engine(VALUE mPango);
|
22
|
-
G_GNUC_INTERNAL void Init_pango_font(VALUE mPango);
|
23
|
-
G_GNUC_INTERNAL void Init_pango_font_description(VALUE mPango);
|
24
|
-
G_GNUC_INTERNAL void Init_pango_font_face(VALUE mPango);
|
25
|
-
G_GNUC_INTERNAL void Init_pango_font_family(VALUE mPango);
|
26
|
-
G_GNUC_INTERNAL void Init_pango_font_map(VALUE mPango);
|
27
|
-
G_GNUC_INTERNAL void Init_pango_font_metrics(VALUE mPango);
|
28
|
-
G_GNUC_INTERNAL void Init_pango_fontset(VALUE mPango);
|
29
|
-
G_GNUC_INTERNAL void Init_pango_fontset_simple(VALUE mPango);
|
30
|
-
G_GNUC_INTERNAL void Init_pango_glyph_info(VALUE mPango);
|
31
|
-
G_GNUC_INTERNAL void Init_pango_glyph_item(VALUE mPango);
|
32
|
-
G_GNUC_INTERNAL void Init_pango_glyph_string(VALUE mPango);
|
33
|
-
G_GNUC_INTERNAL void Init_pango_gravity(VALUE mPango);
|
34
|
-
G_GNUC_INTERNAL void Init_pango_item(VALUE mPango);
|
35
|
-
G_GNUC_INTERNAL void Init_pango_language(VALUE mPango);
|
36
|
-
G_GNUC_INTERNAL void Init_pango_layout(VALUE mPango);
|
37
|
-
G_GNUC_INTERNAL void Init_pango_layout_iter(VALUE mPango);
|
38
|
-
G_GNUC_INTERNAL void Init_pango_layout_line(VALUE mPango);
|
39
|
-
G_GNUC_INTERNAL void Init_pango_logattr(VALUE mPango);
|
40
|
-
G_GNUC_INTERNAL void Init_pango_matrix(VALUE mPango);
|
41
|
-
G_GNUC_INTERNAL void Init_pango_rectangle(VALUE mPango);
|
42
|
-
G_GNUC_INTERNAL void Init_pangorenderer(VALUE mPango);
|
43
|
-
G_GNUC_INTERNAL void Init_pango_script(VALUE mPango);
|
44
|
-
G_GNUC_INTERNAL void Init_pango_script_iter(VALUE mPango);
|
45
|
-
G_GNUC_INTERNAL void Init_pango_array(VALUE mPango);
|
46
|
-
|
47
|
-
G_END_DECLS
|
48
|
-
|
49
|
-
#endif /* RB_PANGO_PRIVATE_H */
|
@@ -1,170 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2002,2003 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"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cRectangle
|
25
|
-
#define _SELF(s) (RVAL2PANGORECTANGLE(s))
|
26
|
-
|
27
|
-
/**********************************/
|
28
|
-
static PangoRectangle*
|
29
|
-
pango_rectangle_copy(const PangoRectangle *ref)
|
30
|
-
{
|
31
|
-
PangoRectangle* new_ref;
|
32
|
-
g_return_val_if_fail (ref != NULL, NULL);
|
33
|
-
new_ref = g_new(PangoRectangle, 1);
|
34
|
-
*new_ref = *ref;
|
35
|
-
return new_ref;
|
36
|
-
}
|
37
|
-
|
38
|
-
GType
|
39
|
-
pango_rectangle_get_type(void)
|
40
|
-
{
|
41
|
-
static GType our_type = 0;
|
42
|
-
|
43
|
-
if (our_type == 0)
|
44
|
-
our_type = g_boxed_type_register_static ("PangoRectangle",
|
45
|
-
(GBoxedCopyFunc)pango_rectangle_copy,
|
46
|
-
(GBoxedFreeFunc)g_free);
|
47
|
-
return our_type;
|
48
|
-
}
|
49
|
-
/**********************************/
|
50
|
-
|
51
|
-
static VALUE
|
52
|
-
rg_initialize(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
53
|
-
{
|
54
|
-
PangoRectangle rectangle;
|
55
|
-
|
56
|
-
rectangle.x = NUM2INT(x);
|
57
|
-
rectangle.y = NUM2INT(y);
|
58
|
-
rectangle.width = NUM2INT(width);
|
59
|
-
rectangle.height = NUM2INT(height);
|
60
|
-
|
61
|
-
G_INITIALIZE(self, g_boxed_copy(PANGO_TYPE_RECTANGLE, &rectangle));
|
62
|
-
return Qnil;
|
63
|
-
}
|
64
|
-
|
65
|
-
static VALUE
|
66
|
-
rg_x(VALUE self)
|
67
|
-
{
|
68
|
-
return INT2NUM(_SELF(self)->x);
|
69
|
-
}
|
70
|
-
|
71
|
-
static VALUE
|
72
|
-
rg_y(VALUE self)
|
73
|
-
{
|
74
|
-
return INT2NUM(_SELF(self)->y);
|
75
|
-
}
|
76
|
-
|
77
|
-
static VALUE
|
78
|
-
rg_width(VALUE self)
|
79
|
-
{
|
80
|
-
return INT2NUM(_SELF(self)->width);
|
81
|
-
}
|
82
|
-
|
83
|
-
static VALUE
|
84
|
-
rg_height(VALUE self)
|
85
|
-
{
|
86
|
-
return INT2NUM(_SELF(self)->height);
|
87
|
-
}
|
88
|
-
|
89
|
-
static VALUE
|
90
|
-
rg_set_x(VALUE self, VALUE x)
|
91
|
-
{
|
92
|
-
_SELF(self)->x = NUM2INT(x);
|
93
|
-
return self;
|
94
|
-
}
|
95
|
-
|
96
|
-
static VALUE
|
97
|
-
rg_set_y(VALUE self, VALUE y)
|
98
|
-
{
|
99
|
-
_SELF(self)->y = NUM2INT(y);
|
100
|
-
return self;
|
101
|
-
}
|
102
|
-
static VALUE
|
103
|
-
rg_set_width(VALUE self, VALUE width)
|
104
|
-
{
|
105
|
-
_SELF(self)->width = NUM2INT(width);
|
106
|
-
return self;
|
107
|
-
}
|
108
|
-
|
109
|
-
static VALUE
|
110
|
-
rg_set_height(VALUE self, VALUE height)
|
111
|
-
{
|
112
|
-
_SELF(self)->height = NUM2INT(height);
|
113
|
-
return self;
|
114
|
-
}
|
115
|
-
static VALUE
|
116
|
-
rg_to_a(VALUE self)
|
117
|
-
{
|
118
|
-
PangoRectangle* a = _SELF(self);
|
119
|
-
return rb_ary_new3(4, INT2FIX(a->x), INT2FIX(a->y),
|
120
|
-
INT2FIX(a->width), INT2FIX(a->height));
|
121
|
-
}
|
122
|
-
|
123
|
-
static VALUE
|
124
|
-
rg_ascent(VALUE self)
|
125
|
-
{
|
126
|
-
PangoRectangle* r =_SELF(self);
|
127
|
-
return INT2NUM(PANGO_ASCENT(*r));
|
128
|
-
}
|
129
|
-
|
130
|
-
static VALUE
|
131
|
-
rg_descent(VALUE self)
|
132
|
-
{
|
133
|
-
PangoRectangle* r =_SELF(self);
|
134
|
-
return INT2NUM(PANGO_DESCENT(*r));
|
135
|
-
}
|
136
|
-
|
137
|
-
static VALUE
|
138
|
-
rg_lbearing(VALUE self)
|
139
|
-
{
|
140
|
-
PangoRectangle* r =_SELF(self);
|
141
|
-
return INT2NUM(PANGO_LBEARING(*r));
|
142
|
-
}
|
143
|
-
|
144
|
-
static VALUE
|
145
|
-
rg_rbearing(VALUE self)
|
146
|
-
{
|
147
|
-
PangoRectangle* r =_SELF(self);
|
148
|
-
return INT2NUM(PANGO_RBEARING(*r));
|
149
|
-
}
|
150
|
-
|
151
|
-
void
|
152
|
-
Init_pango_rectangle(VALUE mPango)
|
153
|
-
{
|
154
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RECTANGLE, "Rectangle", mPango);
|
155
|
-
RG_DEF_METHOD(initialize, 4);
|
156
|
-
RG_DEF_METHOD(x, 0);
|
157
|
-
RG_DEF_METHOD(y, 0);
|
158
|
-
RG_DEF_METHOD(width, 0);
|
159
|
-
RG_DEF_METHOD(height, 0);
|
160
|
-
RG_DEF_METHOD(set_x, 1);
|
161
|
-
RG_DEF_METHOD(set_y, 1);
|
162
|
-
RG_DEF_METHOD(set_width, 1);
|
163
|
-
RG_DEF_METHOD(set_height, 1);
|
164
|
-
RG_DEF_METHOD(to_a, 0);
|
165
|
-
|
166
|
-
RG_DEF_METHOD(ascent, 0);
|
167
|
-
RG_DEF_METHOD(descent, 0);
|
168
|
-
RG_DEF_METHOD(lbearing, 0);
|
169
|
-
RG_DEF_METHOD(rbearing, 0);
|
170
|
-
}
|
data/ext/pango/rbpangorenderer.c
DELETED
@@ -1,193 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 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"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cRenderer
|
25
|
-
#define _SELF(self) (RVAL2PANGORENDERER(self))
|
26
|
-
|
27
|
-
static VALUE
|
28
|
-
rg_draw_layout(VALUE self, VALUE layout, VALUE x, VALUE y)
|
29
|
-
{
|
30
|
-
pango_renderer_draw_layout(_SELF(self),
|
31
|
-
RVAL2PANGOLAYOUT(layout),
|
32
|
-
NUM2INT(x), NUM2INT(y));
|
33
|
-
return self;
|
34
|
-
}
|
35
|
-
|
36
|
-
static VALUE
|
37
|
-
rg_draw_layout_line(VALUE self, VALUE line, VALUE x, VALUE y)
|
38
|
-
{
|
39
|
-
pango_renderer_draw_layout_line(_SELF(self),
|
40
|
-
RVAL2PANGOLAYOUTLINE(line),
|
41
|
-
NUM2INT(x), NUM2INT(y));
|
42
|
-
return self;
|
43
|
-
}
|
44
|
-
|
45
|
-
static VALUE
|
46
|
-
rg_draw_glyphs(VALUE self, VALUE font, VALUE glyphs, VALUE x, VALUE y)
|
47
|
-
{
|
48
|
-
pango_renderer_draw_glyphs(_SELF(self),
|
49
|
-
RVAL2PANGOFONT(font),
|
50
|
-
RVAL2PANGOGLYPHSTRING(glyphs),
|
51
|
-
NUM2INT(x), NUM2INT(y));
|
52
|
-
return self;
|
53
|
-
}
|
54
|
-
|
55
|
-
static VALUE
|
56
|
-
rg_draw_rectangle(VALUE self, VALUE part, VALUE x, VALUE y, VALUE width, VALUE height)
|
57
|
-
{
|
58
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
59
|
-
pango_renderer_draw_rectangle(_SELF(self), RVAL2PANGORENDERPART(part),
|
60
|
-
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
61
|
-
#else
|
62
|
-
pango_renderer_draw_rectangle(_SELF(self), NUM2INT(part),
|
63
|
-
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
64
|
-
#endif
|
65
|
-
return self;
|
66
|
-
}
|
67
|
-
|
68
|
-
static VALUE
|
69
|
-
rg_draw_error_underline(VALUE self, VALUE x, VALUE y, VALUE width, VALUE height)
|
70
|
-
{
|
71
|
-
pango_renderer_draw_error_underline(_SELF(self),
|
72
|
-
NUM2INT(x), NUM2INT(y), NUM2INT(width), NUM2INT(height));
|
73
|
-
return self;
|
74
|
-
}
|
75
|
-
|
76
|
-
static VALUE
|
77
|
-
rg_draw_trapezoid(VALUE self, VALUE part, VALUE y1, VALUE x11, VALUE x21, VALUE y2, VALUE x12, VALUE x22)
|
78
|
-
{
|
79
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
80
|
-
pango_renderer_draw_trapezoid(_SELF(self),
|
81
|
-
RVAL2PANGORENDERPART(part),
|
82
|
-
NUM2DBL(y1), NUM2DBL(x11), NUM2DBL(x21),
|
83
|
-
NUM2DBL(y2), NUM2DBL(x12), NUM2DBL(x22));
|
84
|
-
#else
|
85
|
-
pango_renderer_draw_trapezoid(_SELF(self), NUM2INT(part),
|
86
|
-
NUM2DBL(y1), NUM2DBL(x11), NUM2DBL(x21),
|
87
|
-
NUM2DBL(y2), NUM2DBL(x12), NUM2DBL(x22));
|
88
|
-
#endif
|
89
|
-
return self;
|
90
|
-
}
|
91
|
-
|
92
|
-
static VALUE
|
93
|
-
rg_draw_glyph(VALUE self, VALUE font, VALUE glyph, VALUE x, VALUE y)
|
94
|
-
{
|
95
|
-
pango_renderer_draw_glyph(_SELF(self), RVAL2PANGOFONT(font),
|
96
|
-
NUM2INT(glyph), NUM2INT(x), NUM2INT(y));
|
97
|
-
return self;
|
98
|
-
}
|
99
|
-
|
100
|
-
static VALUE
|
101
|
-
rg_deactivate(VALUE self)
|
102
|
-
{
|
103
|
-
pango_renderer_deactivate(_SELF(self));
|
104
|
-
return self;
|
105
|
-
}
|
106
|
-
|
107
|
-
static VALUE
|
108
|
-
rg_activate(VALUE self)
|
109
|
-
{
|
110
|
-
pango_renderer_activate(_SELF(self));
|
111
|
-
if (rb_block_given_p()) {
|
112
|
-
rb_ensure(rb_yield, self, rg_deactivate, self);
|
113
|
-
}
|
114
|
-
return self;
|
115
|
-
}
|
116
|
-
|
117
|
-
static VALUE
|
118
|
-
rg_part_changed(VALUE self, VALUE part)
|
119
|
-
{
|
120
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
121
|
-
pango_renderer_part_changed(_SELF(self), RVAL2PANGORENDERPART(part));
|
122
|
-
#else
|
123
|
-
pango_renderer_part_changed(_SELF(self), NUM2INT(part));
|
124
|
-
#endif
|
125
|
-
return self;
|
126
|
-
}
|
127
|
-
|
128
|
-
static VALUE
|
129
|
-
rg_set_color(VALUE self, VALUE part, VALUE color)
|
130
|
-
{
|
131
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
132
|
-
pango_renderer_set_color(_SELF(self), RVAL2PANGORENDERPART(part),
|
133
|
-
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
134
|
-
#else
|
135
|
-
pango_renderer_set_color(_SELF(self), NUM2INT(part),
|
136
|
-
NIL_P(color) ? NULL : RVAL2PANGOCOLOR(color));
|
137
|
-
#endif
|
138
|
-
return self;
|
139
|
-
}
|
140
|
-
|
141
|
-
static VALUE
|
142
|
-
rg_get_color(VALUE self, VALUE part)
|
143
|
-
{
|
144
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
145
|
-
PangoColor* color = pango_renderer_get_color(_SELF(self),
|
146
|
-
RVAL2PANGORENDERPART(part));
|
147
|
-
#else
|
148
|
-
PangoColor* color = pango_renderer_get_color(_SELF(self),NUM2INT(part));
|
149
|
-
#endif
|
150
|
-
return PANGOCOLOR2RVAL(color);
|
151
|
-
}
|
152
|
-
|
153
|
-
static VALUE
|
154
|
-
rg_set_matrix(VALUE self, VALUE matrix)
|
155
|
-
{
|
156
|
-
pango_renderer_set_matrix(_SELF(self),
|
157
|
-
NIL_P(matrix) ? NULL : RVAL2PANGOMATRIX(matrix));
|
158
|
-
return self;
|
159
|
-
}
|
160
|
-
|
161
|
-
static VALUE
|
162
|
-
rg_matrix(VALUE self)
|
163
|
-
{
|
164
|
-
const PangoMatrix* matrix = pango_renderer_get_matrix(_SELF(self));
|
165
|
-
return PANGOMATRIX2RVAL((PangoMatrix*)matrix);
|
166
|
-
}
|
167
|
-
|
168
|
-
void
|
169
|
-
Init_pangorenderer(VALUE mPango)
|
170
|
-
{
|
171
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(PANGO_TYPE_RENDERER, "Renderer", mPango);
|
172
|
-
|
173
|
-
RG_DEF_METHOD(draw_layout, 3);
|
174
|
-
RG_DEF_METHOD(draw_layout_line, 3);
|
175
|
-
RG_DEF_METHOD(draw_glyphs, 4);
|
176
|
-
RG_DEF_METHOD(draw_rectangle, 5);
|
177
|
-
RG_DEF_METHOD(draw_error_underline, 4);
|
178
|
-
RG_DEF_METHOD(draw_trapezoid, 7);
|
179
|
-
RG_DEF_METHOD(draw_glyph, 4);
|
180
|
-
RG_DEF_METHOD(activate, 0);
|
181
|
-
RG_DEF_METHOD(deactivate, 0);
|
182
|
-
RG_DEF_METHOD(part_changed, 1);
|
183
|
-
RG_DEF_METHOD(set_color, 2);
|
184
|
-
RG_DEF_METHOD(get_color, 1);
|
185
|
-
RG_DEF_METHOD(set_matrix, 1);
|
186
|
-
RG_DEF_METHOD(matrix, 0);
|
187
|
-
|
188
|
-
/* PangoRenderPart */
|
189
|
-
#ifdef HAVE_PANGO_RENDER_PART_GET_TYPE
|
190
|
-
G_DEF_CLASS(PANGO_TYPE_RENDER_PART, "Part", RG_TARGET_NAMESPACE);
|
191
|
-
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, PANGO_TYPE_RENDER_PART, "PANGO_RENDER_");
|
192
|
-
#endif
|
193
|
-
}
|