pango 3.1.1-x86-mingw32 → 3.1.2-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.
- 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
@@ -0,0 +1,288 @@
|
|
1
|
+
/* graphene-matrix.h: 4x4 matrix
|
2
|
+
*
|
3
|
+
* Copyright 2014 Emmanuele Bassi
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __GRAPHENE_MATRIX_H__
|
25
|
+
#define __GRAPHENE_MATRIX_H__
|
26
|
+
|
27
|
+
#include "graphene-types.h"
|
28
|
+
|
29
|
+
GRAPHENE_BEGIN_DECLS
|
30
|
+
|
31
|
+
/**
|
32
|
+
* graphene_matrix_t:
|
33
|
+
*
|
34
|
+
* A structure capable of holding a 4x4 matrix.
|
35
|
+
*
|
36
|
+
* The contents of the #graphene_matrix_t structure are private and
|
37
|
+
* should never be accessed directly.
|
38
|
+
*/
|
39
|
+
struct _graphene_matrix_t
|
40
|
+
{
|
41
|
+
/*< private >*/
|
42
|
+
GRAPHENE_PRIVATE_FIELD (graphene_simd4x4f_t, value);
|
43
|
+
};
|
44
|
+
|
45
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
46
|
+
graphene_matrix_t * graphene_matrix_alloc (void);
|
47
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
48
|
+
void graphene_matrix_free (graphene_matrix_t *m);
|
49
|
+
|
50
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
51
|
+
graphene_matrix_t * graphene_matrix_init_identity (graphene_matrix_t *m);
|
52
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
53
|
+
graphene_matrix_t * graphene_matrix_init_from_float (graphene_matrix_t *m,
|
54
|
+
const float *v);
|
55
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
56
|
+
graphene_matrix_t * graphene_matrix_init_from_vec4 (graphene_matrix_t *m,
|
57
|
+
const graphene_vec4_t *v0,
|
58
|
+
const graphene_vec4_t *v1,
|
59
|
+
const graphene_vec4_t *v2,
|
60
|
+
const graphene_vec4_t *v3);
|
61
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
62
|
+
graphene_matrix_t * graphene_matrix_init_from_matrix (graphene_matrix_t *m,
|
63
|
+
const graphene_matrix_t *src);
|
64
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
65
|
+
graphene_matrix_t * graphene_matrix_init_perspective (graphene_matrix_t *m,
|
66
|
+
float fovy,
|
67
|
+
float aspect,
|
68
|
+
float z_near,
|
69
|
+
float z_far);
|
70
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
71
|
+
graphene_matrix_t * graphene_matrix_init_ortho (graphene_matrix_t *m,
|
72
|
+
float left,
|
73
|
+
float right,
|
74
|
+
float top,
|
75
|
+
float bottom,
|
76
|
+
float z_near,
|
77
|
+
float z_far);
|
78
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
79
|
+
graphene_matrix_t * graphene_matrix_init_look_at (graphene_matrix_t *m,
|
80
|
+
const graphene_vec3_t *eye,
|
81
|
+
const graphene_vec3_t *center,
|
82
|
+
const graphene_vec3_t *up);
|
83
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
84
|
+
graphene_matrix_t * graphene_matrix_init_frustum (graphene_matrix_t *m,
|
85
|
+
float left,
|
86
|
+
float right,
|
87
|
+
float bottom,
|
88
|
+
float top,
|
89
|
+
float z_near,
|
90
|
+
float z_far);
|
91
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
92
|
+
graphene_matrix_t * graphene_matrix_init_scale (graphene_matrix_t *m,
|
93
|
+
float x,
|
94
|
+
float y,
|
95
|
+
float z);
|
96
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
97
|
+
graphene_matrix_t * graphene_matrix_init_translate (graphene_matrix_t *m,
|
98
|
+
const graphene_point3d_t *p);
|
99
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
100
|
+
graphene_matrix_t * graphene_matrix_init_rotate (graphene_matrix_t *m,
|
101
|
+
float angle,
|
102
|
+
const graphene_vec3_t *axis);
|
103
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
104
|
+
graphene_matrix_t * graphene_matrix_init_skew (graphene_matrix_t *m,
|
105
|
+
float x_skew,
|
106
|
+
float y_skew);
|
107
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
108
|
+
graphene_matrix_t * graphene_matrix_init_from_2d (graphene_matrix_t *m,
|
109
|
+
double xx,
|
110
|
+
double yx,
|
111
|
+
double xy,
|
112
|
+
double yy,
|
113
|
+
double x_0,
|
114
|
+
double y_0);
|
115
|
+
|
116
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
117
|
+
bool graphene_matrix_is_identity (const graphene_matrix_t *m);
|
118
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
119
|
+
bool graphene_matrix_is_2d (const graphene_matrix_t *m);
|
120
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
121
|
+
bool graphene_matrix_is_backface_visible (const graphene_matrix_t *m);
|
122
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
123
|
+
bool graphene_matrix_is_singular (const graphene_matrix_t *m);
|
124
|
+
|
125
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
126
|
+
void graphene_matrix_to_float (const graphene_matrix_t *m,
|
127
|
+
float *v);
|
128
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
129
|
+
bool graphene_matrix_to_2d (const graphene_matrix_t *m,
|
130
|
+
double *xx,
|
131
|
+
double *yx,
|
132
|
+
double *xy,
|
133
|
+
double *yy,
|
134
|
+
double *x_0,
|
135
|
+
double *y_0);
|
136
|
+
|
137
|
+
|
138
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
139
|
+
void graphene_matrix_get_row (const graphene_matrix_t *m,
|
140
|
+
unsigned int index_,
|
141
|
+
graphene_vec4_t *res);
|
142
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
143
|
+
float graphene_matrix_get_value (const graphene_matrix_t *m,
|
144
|
+
unsigned int row,
|
145
|
+
unsigned int col);
|
146
|
+
|
147
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
148
|
+
void graphene_matrix_multiply (const graphene_matrix_t *a,
|
149
|
+
const graphene_matrix_t *b,
|
150
|
+
graphene_matrix_t *res);
|
151
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
152
|
+
float graphene_matrix_determinant (const graphene_matrix_t *m);
|
153
|
+
|
154
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
155
|
+
void graphene_matrix_transform_vec4 (const graphene_matrix_t *m,
|
156
|
+
const graphene_vec4_t *v,
|
157
|
+
graphene_vec4_t *res);
|
158
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
159
|
+
void graphene_matrix_transform_vec3 (const graphene_matrix_t *m,
|
160
|
+
const graphene_vec3_t *v,
|
161
|
+
graphene_vec3_t *res);
|
162
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
163
|
+
void graphene_matrix_transform_point (const graphene_matrix_t *m,
|
164
|
+
const graphene_point_t *p,
|
165
|
+
graphene_point_t *res);
|
166
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
167
|
+
void graphene_matrix_transform_point3d (const graphene_matrix_t *m,
|
168
|
+
const graphene_point3d_t *p,
|
169
|
+
graphene_point3d_t *res);
|
170
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
171
|
+
void graphene_matrix_transform_rect (const graphene_matrix_t *m,
|
172
|
+
const graphene_rect_t *r,
|
173
|
+
graphene_quad_t *res);
|
174
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
175
|
+
void graphene_matrix_transform_bounds (const graphene_matrix_t *m,
|
176
|
+
const graphene_rect_t *r,
|
177
|
+
graphene_rect_t *res);
|
178
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
179
|
+
void graphene_matrix_transform_sphere (const graphene_matrix_t *m,
|
180
|
+
const graphene_sphere_t *s,
|
181
|
+
graphene_sphere_t *res);
|
182
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
183
|
+
void graphene_matrix_transform_box (const graphene_matrix_t *m,
|
184
|
+
const graphene_box_t *b,
|
185
|
+
graphene_box_t *res);
|
186
|
+
GRAPHENE_AVAILABLE_IN_1_4
|
187
|
+
void graphene_matrix_transform_ray (const graphene_matrix_t *m,
|
188
|
+
const graphene_ray_t *r,
|
189
|
+
graphene_ray_t *res);
|
190
|
+
|
191
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
192
|
+
void graphene_matrix_project_point (const graphene_matrix_t *m,
|
193
|
+
const graphene_point_t *p,
|
194
|
+
graphene_point_t *res);
|
195
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
196
|
+
void graphene_matrix_project_rect_bounds (const graphene_matrix_t *m,
|
197
|
+
const graphene_rect_t *r,
|
198
|
+
graphene_rect_t *res);
|
199
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
200
|
+
void graphene_matrix_project_rect (const graphene_matrix_t *m,
|
201
|
+
const graphene_rect_t *r,
|
202
|
+
graphene_quad_t *res);
|
203
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
204
|
+
bool graphene_matrix_untransform_point (const graphene_matrix_t *m,
|
205
|
+
const graphene_point_t *p,
|
206
|
+
const graphene_rect_t *bounds,
|
207
|
+
graphene_point_t *res);
|
208
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
209
|
+
void graphene_matrix_untransform_bounds (const graphene_matrix_t *m,
|
210
|
+
const graphene_rect_t *r,
|
211
|
+
const graphene_rect_t *bounds,
|
212
|
+
graphene_rect_t *res);
|
213
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
214
|
+
void graphene_matrix_unproject_point3d (const graphene_matrix_t *projection,
|
215
|
+
const graphene_matrix_t *modelview,
|
216
|
+
const graphene_point3d_t *point,
|
217
|
+
graphene_point3d_t *res);
|
218
|
+
|
219
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
220
|
+
void graphene_matrix_translate (graphene_matrix_t *m,
|
221
|
+
const graphene_point3d_t *pos);
|
222
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
223
|
+
void graphene_matrix_rotate (graphene_matrix_t *m,
|
224
|
+
float angle,
|
225
|
+
const graphene_vec3_t *axis);
|
226
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
227
|
+
void graphene_matrix_rotate_x (graphene_matrix_t *m,
|
228
|
+
float angle);
|
229
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
230
|
+
void graphene_matrix_rotate_y (graphene_matrix_t *m,
|
231
|
+
float angle);
|
232
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
233
|
+
void graphene_matrix_rotate_z (graphene_matrix_t *m,
|
234
|
+
float angle);
|
235
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
236
|
+
void graphene_matrix_rotate_quaternion (graphene_matrix_t *m,
|
237
|
+
const graphene_quaternion_t *q);
|
238
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
239
|
+
void graphene_matrix_rotate_euler (graphene_matrix_t *m,
|
240
|
+
const graphene_euler_t *e);
|
241
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
242
|
+
void graphene_matrix_scale (graphene_matrix_t *m,
|
243
|
+
float factor_x,
|
244
|
+
float factor_y,
|
245
|
+
float factor_z);
|
246
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
247
|
+
void graphene_matrix_skew_xy (graphene_matrix_t *m,
|
248
|
+
float factor);
|
249
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
250
|
+
void graphene_matrix_skew_xz (graphene_matrix_t *m,
|
251
|
+
float factor);
|
252
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
253
|
+
void graphene_matrix_skew_yz (graphene_matrix_t *m,
|
254
|
+
float factor);
|
255
|
+
|
256
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
257
|
+
void graphene_matrix_transpose (const graphene_matrix_t *m,
|
258
|
+
graphene_matrix_t *res);
|
259
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
260
|
+
bool graphene_matrix_inverse (const graphene_matrix_t *m,
|
261
|
+
graphene_matrix_t *res);
|
262
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
263
|
+
void graphene_matrix_perspective (const graphene_matrix_t *m,
|
264
|
+
float depth,
|
265
|
+
graphene_matrix_t *res);
|
266
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
267
|
+
void graphene_matrix_normalize (const graphene_matrix_t *m,
|
268
|
+
graphene_matrix_t *res);
|
269
|
+
|
270
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
271
|
+
float graphene_matrix_get_x_scale (const graphene_matrix_t *m);
|
272
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
273
|
+
float graphene_matrix_get_y_scale (const graphene_matrix_t *m);
|
274
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
275
|
+
float graphene_matrix_get_z_scale (const graphene_matrix_t *m);
|
276
|
+
|
277
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
278
|
+
void graphene_matrix_interpolate (const graphene_matrix_t *a,
|
279
|
+
const graphene_matrix_t *b,
|
280
|
+
double factor,
|
281
|
+
graphene_matrix_t *res);
|
282
|
+
|
283
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
284
|
+
void graphene_matrix_print (const graphene_matrix_t *m);
|
285
|
+
|
286
|
+
GRAPHENE_END_DECLS
|
287
|
+
|
288
|
+
#endif /* __GRAPHENE_MATRIX_H__ */
|
@@ -0,0 +1,99 @@
|
|
1
|
+
/* graphene-plane.h: A plane in 3D space
|
2
|
+
*
|
3
|
+
* Copyright 2014 Emmanuele Bassi
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __GRAPHENE_PLANE_H__
|
25
|
+
#define __GRAPHENE_PLANE_H__
|
26
|
+
|
27
|
+
#if !defined(GRAPHENE_H_INSIDE) && !defined(GRAPHENE_COMPILATION)
|
28
|
+
#error "Only graphene.h can be included directly."
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#include "graphene-types.h"
|
32
|
+
#include "graphene-vec3.h"
|
33
|
+
|
34
|
+
GRAPHENE_BEGIN_DECLS
|
35
|
+
|
36
|
+
/**
|
37
|
+
* graphene_plane_t:
|
38
|
+
*
|
39
|
+
* A 2D plane that extends infinitely in a 3D volume.
|
40
|
+
*
|
41
|
+
* The contents of the `graphene_plane_t` are private, and should not be
|
42
|
+
* modified directly.
|
43
|
+
*
|
44
|
+
* Since: 1.2
|
45
|
+
*/
|
46
|
+
struct _graphene_plane_t
|
47
|
+
{
|
48
|
+
/*< private >*/
|
49
|
+
GRAPHENE_PRIVATE_FIELD (graphene_vec3_t, normal);
|
50
|
+
GRAPHENE_PRIVATE_FIELD (float, constant);
|
51
|
+
};
|
52
|
+
|
53
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
54
|
+
graphene_plane_t * graphene_plane_alloc (void);
|
55
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
56
|
+
void graphene_plane_free (graphene_plane_t *p);
|
57
|
+
|
58
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
59
|
+
graphene_plane_t * graphene_plane_init (graphene_plane_t *p,
|
60
|
+
const graphene_vec3_t *normal,
|
61
|
+
float constant);
|
62
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
63
|
+
graphene_plane_t * graphene_plane_init_from_vec4 (graphene_plane_t *p,
|
64
|
+
const graphene_vec4_t *src);
|
65
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
66
|
+
graphene_plane_t * graphene_plane_init_from_plane (graphene_plane_t *p,
|
67
|
+
const graphene_plane_t *src);
|
68
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
69
|
+
graphene_plane_t * graphene_plane_init_from_point (graphene_plane_t *p,
|
70
|
+
const graphene_vec3_t *normal,
|
71
|
+
const graphene_point3d_t *point);
|
72
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
73
|
+
graphene_plane_t * graphene_plane_init_from_points (graphene_plane_t *p,
|
74
|
+
const graphene_point3d_t *a,
|
75
|
+
const graphene_point3d_t *b,
|
76
|
+
const graphene_point3d_t *c);
|
77
|
+
|
78
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
79
|
+
void graphene_plane_normalize (const graphene_plane_t *p,
|
80
|
+
graphene_plane_t *res);
|
81
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
82
|
+
void graphene_plane_negate (const graphene_plane_t *p,
|
83
|
+
graphene_plane_t *res);
|
84
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
85
|
+
bool graphene_plane_equal (const graphene_plane_t *a,
|
86
|
+
const graphene_plane_t *b);
|
87
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
88
|
+
float graphene_plane_distance (const graphene_plane_t *p,
|
89
|
+
const graphene_point3d_t *point);
|
90
|
+
|
91
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
92
|
+
void graphene_plane_get_normal (const graphene_plane_t *p,
|
93
|
+
graphene_vec3_t *normal);
|
94
|
+
GRAPHENE_AVAILABLE_IN_1_2
|
95
|
+
float graphene_plane_get_constant (const graphene_plane_t *p);
|
96
|
+
|
97
|
+
GRAPHENE_END_DECLS
|
98
|
+
|
99
|
+
#endif /* __GRAPHENE_PLANE_H__ */
|
@@ -0,0 +1,120 @@
|
|
1
|
+
/* graphene-point.h: Point and Size
|
2
|
+
*
|
3
|
+
* Copyright 2014 Emmanuele Bassi
|
4
|
+
*
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
10
|
+
* furnished to do so, subject to the following conditions:
|
11
|
+
*
|
12
|
+
* The above copyright notice and this permission notice shall be included in
|
13
|
+
* all copies or substantial portions of the Software.
|
14
|
+
*
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
* THE SOFTWARE.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#ifndef __GRAPHENE_POINT_H__
|
25
|
+
#define __GRAPHENE_POINT_H__
|
26
|
+
|
27
|
+
#if !defined(GRAPHENE_H_INSIDE) && !defined(GRAPHENE_COMPILATION)
|
28
|
+
#error "Only graphene.h can be included directly."
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#include "graphene-types.h"
|
32
|
+
|
33
|
+
GRAPHENE_BEGIN_DECLS
|
34
|
+
|
35
|
+
/**
|
36
|
+
* GRAPHENE_POINT_INIT:
|
37
|
+
* @_x: the X coordinate
|
38
|
+
* @_y: the Y coordinate
|
39
|
+
*
|
40
|
+
* Initializes a #graphene_point_t with the given coordinates
|
41
|
+
* when declaring it, e.g:
|
42
|
+
*
|
43
|
+
* |[<!-- language="C" -->
|
44
|
+
* graphene_point_t p = GRAPHENE_POINT_INIT (10.f, 10.f);
|
45
|
+
* ]|
|
46
|
+
*
|
47
|
+
* Since: 1.0
|
48
|
+
*/
|
49
|
+
#define GRAPHENE_POINT_INIT(_x,_y) (graphene_point_t) { .x = (_x), .y = (_y) }
|
50
|
+
|
51
|
+
/**
|
52
|
+
* GRAPHENE_POINT_INIT_ZERO:
|
53
|
+
*
|
54
|
+
* Initializes a #graphene_point_t to (0, 0) when declaring it.
|
55
|
+
*
|
56
|
+
* Since: 1.0
|
57
|
+
*/
|
58
|
+
#define GRAPHENE_POINT_INIT_ZERO GRAPHENE_POINT_INIT (0.f, 0.f)
|
59
|
+
|
60
|
+
/**
|
61
|
+
* graphene_point_t:
|
62
|
+
* @x: the X coordinate of the point
|
63
|
+
* @y: the Y coordinate of the point
|
64
|
+
*
|
65
|
+
* A point with two coordinates.
|
66
|
+
*
|
67
|
+
* Since: 1.0
|
68
|
+
*/
|
69
|
+
struct _graphene_point_t
|
70
|
+
{
|
71
|
+
float x;
|
72
|
+
float y;
|
73
|
+
};
|
74
|
+
|
75
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
76
|
+
graphene_point_t * graphene_point_alloc (void);
|
77
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
78
|
+
void graphene_point_free (graphene_point_t *p);
|
79
|
+
|
80
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
81
|
+
graphene_point_t * graphene_point_init (graphene_point_t *p,
|
82
|
+
float x,
|
83
|
+
float y);
|
84
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
85
|
+
graphene_point_t * graphene_point_init_from_point (graphene_point_t *p,
|
86
|
+
const graphene_point_t *src);
|
87
|
+
GRAPHENE_AVAILABLE_IN_1_4
|
88
|
+
graphene_point_t * graphene_point_init_from_vec2 (graphene_point_t *p,
|
89
|
+
const graphene_vec2_t *src);
|
90
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
91
|
+
bool graphene_point_equal (const graphene_point_t *a,
|
92
|
+
const graphene_point_t *b);
|
93
|
+
|
94
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
95
|
+
float graphene_point_distance (const graphene_point_t *a,
|
96
|
+
const graphene_point_t *b,
|
97
|
+
float *d_x,
|
98
|
+
float *d_y);
|
99
|
+
|
100
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
101
|
+
bool graphene_point_near (const graphene_point_t *a,
|
102
|
+
const graphene_point_t *b,
|
103
|
+
float epsilon);
|
104
|
+
|
105
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
106
|
+
void graphene_point_interpolate (const graphene_point_t *a,
|
107
|
+
const graphene_point_t *b,
|
108
|
+
double factor,
|
109
|
+
graphene_point_t *res);
|
110
|
+
|
111
|
+
GRAPHENE_AVAILABLE_IN_1_4
|
112
|
+
void graphene_point_to_vec2 (const graphene_point_t *p,
|
113
|
+
graphene_vec2_t *v);
|
114
|
+
|
115
|
+
GRAPHENE_AVAILABLE_IN_1_0
|
116
|
+
const graphene_point_t * graphene_point_zero (void);
|
117
|
+
|
118
|
+
GRAPHENE_END_DECLS
|
119
|
+
|
120
|
+
#endif /* __GRAPHENE_POINT_H__ */
|