mathematical 1.6.17 → 1.6.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/mathematical/lasem/COPYING +502 -0
- data/ext/mathematical/lasem/NEWS.md +146 -0
- data/ext/mathematical/lasem/README.md +65 -0
- data/ext/mathematical/lasem/TODO +50 -0
- data/ext/mathematical/lasem/docs/lasem-render-0.6.1 +106 -0
- data/ext/mathematical/lasem/docs/meson.build +3 -0
- data/ext/mathematical/lasem/docs/reference/lasem/building.md +32 -0
- data/ext/mathematical/lasem/docs/reference/lasem/lasem.toml.in +47 -0
- data/ext/mathematical/lasem/docs/reference/lasem/meson.build +44 -0
- data/ext/mathematical/lasem/docs/reference/lasem/overview.md +24 -0
- data/ext/mathematical/lasem/docs/reference/lasem/urlmap.js +5 -0
- data/ext/mathematical/lasem/itex2mml/COPYING.itex2MML +3 -0
- data/ext/mathematical/lasem/itex2mml/README.itex2MML +16 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.h +63 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.l +1183 -0
- data/ext/mathematical/lasem/itex2mml/itex2MML.y +2108 -0
- data/ext/mathematical/lasem/itex2mml/meson.build +17 -0
- data/ext/mathematical/lasem/lasem.doap +21 -0
- data/ext/mathematical/lasem/meson.build +46 -0
- data/ext/mathematical/lasem/meson_options.txt +5 -0
- data/ext/mathematical/lasem/org.lasem.Viewer.json +41 -0
- data/ext/mathematical/lasem/po/LINGUAS +31 -0
- data/ext/mathematical/lasem/po/POTFILES.in +195 -0
- data/ext/mathematical/lasem/po/POTFILES.skip +1 -0
- data/ext/mathematical/lasem/po/bs.po +65 -0
- data/ext/mathematical/lasem/po/cs.po +102 -0
- data/ext/mathematical/lasem/po/da.po +99 -0
- data/ext/mathematical/lasem/po/de.po +104 -0
- data/ext/mathematical/lasem/po/el.po +73 -0
- data/ext/mathematical/lasem/po/es.po +107 -0
- data/ext/mathematical/lasem/po/eu.po +66 -0
- data/ext/mathematical/lasem/po/fr.po +65 -0
- data/ext/mathematical/lasem/po/fur.po +101 -0
- data/ext/mathematical/lasem/po/gl.po +64 -0
- data/ext/mathematical/lasem/po/hu.po +105 -0
- data/ext/mathematical/lasem/po/id.po +102 -0
- data/ext/mathematical/lasem/po/it.po +104 -0
- data/ext/mathematical/lasem/po/lt.po +106 -0
- data/ext/mathematical/lasem/po/lv.po +109 -0
- data/ext/mathematical/lasem/po/meson.build +4 -0
- data/ext/mathematical/lasem/po/nb.po +62 -0
- data/ext/mathematical/lasem/po/nl.po +102 -0
- data/ext/mathematical/lasem/po/oc.po +65 -0
- data/ext/mathematical/lasem/po/pl.po +102 -0
- data/ext/mathematical/lasem/po/pt.po +77 -0
- data/ext/mathematical/lasem/po/pt_BR.po +105 -0
- data/ext/mathematical/lasem/po/ru.po +66 -0
- data/ext/mathematical/lasem/po/sl.po +117 -0
- data/ext/mathematical/lasem/po/sr.po +105 -0
- data/ext/mathematical/lasem/po/sr@latin.po +105 -0
- data/ext/mathematical/lasem/po/sv.po +105 -0
- data/ext/mathematical/lasem/po/tg.po +64 -0
- data/ext/mathematical/lasem/po/tr.po +105 -0
- data/ext/mathematical/lasem/po/zh_CN.po +100 -0
- data/ext/mathematical/lasem/src/lasemrender.c +357 -0
- data/ext/mathematical/lasem/src/lsm.c +33 -0
- data/ext/mathematical/lasem/src/lsm.h +39 -0
- data/ext/mathematical/lasem/src/lsmattributes.c +276 -0
- data/ext/mathematical/lasem/src/lsmattributes.h +75 -0
- data/ext/mathematical/lasem/src/lsmcairo.c +598 -0
- data/ext/mathematical/lasem/src/lsmcairo.h +51 -0
- data/ext/mathematical/lasem/src/lsmdebug.c +185 -0
- data/ext/mathematical/lasem/src/lsmdebug.h +73 -0
- data/ext/mathematical/lasem/src/lsmdom.h +43 -0
- data/ext/mathematical/lasem/src/lsmdomcharacterdata.c +131 -0
- data/ext/mathematical/lasem/src/lsmdomcharacterdata.h +59 -0
- data/ext/mathematical/lasem/src/lsmdomdocument.c +272 -0
- data/ext/mathematical/lasem/src/lsmdomdocument.h +75 -0
- data/ext/mathematical/lasem/src/lsmdomdocumentfragment.c +81 -0
- data/ext/mathematical/lasem/src/lsmdomdocumentfragment.h +55 -0
- data/ext/mathematical/lasem/src/lsmdomelement.c +148 -0
- data/ext/mathematical/lasem/src/lsmdomelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmdomentities.c +2166 -0
- data/ext/mathematical/lasem/src/lsmdomentities.h +35 -0
- data/ext/mathematical/lasem/src/lsmdomimplementation.c +82 -0
- data/ext/mathematical/lasem/src/lsmdomimplementation.h +41 -0
- data/ext/mathematical/lasem/src/lsmdomnamednodemap.c +118 -0
- data/ext/mathematical/lasem/src/lsmdomnamednodemap.h +64 -0
- data/ext/mathematical/lasem/src/lsmdomnode.c +737 -0
- data/ext/mathematical/lasem/src/lsmdomnode.h +122 -0
- data/ext/mathematical/lasem/src/lsmdomnodelist.c +70 -0
- data/ext/mathematical/lasem/src/lsmdomnodelist.h +58 -0
- data/ext/mathematical/lasem/src/lsmdomparser.c +523 -0
- data/ext/mathematical/lasem/src/lsmdomparser.h +54 -0
- data/ext/mathematical/lasem/src/lsmdomtext.c +82 -0
- data/ext/mathematical/lasem/src/lsmdomtext.h +55 -0
- data/ext/mathematical/lasem/src/lsmdomtypes.h +44 -0
- data/ext/mathematical/lasem/src/lsmdomview.c +423 -0
- data/ext/mathematical/lasem/src/lsmdomview.h +94 -0
- data/ext/mathematical/lasem/src/lsmitex.c +79 -0
- data/ext/mathematical/lasem/src/lsmitex.h +36 -0
- data/ext/mathematical/lasem/src/lsmmathml.h +66 -0
- data/ext/mathematical/lasem/src/lsmmathmlactionelement.c +93 -0
- data/ext/mathematical/lasem/src/lsmmathmlactionelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmmathmlaligngroupelement.c +102 -0
- data/ext/mathematical/lasem/src/lsmmathmlaligngroupelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlalignmarkelement.c +102 -0
- data/ext/mathematical/lasem/src/lsmmathmlalignmarkelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlattributes.c +219 -0
- data/ext/mathematical/lasem/src/lsmmathmlattributes.h +126 -0
- data/ext/mathematical/lasem/src/lsmmathmldocument.c +307 -0
- data/ext/mathematical/lasem/src/lsmmathmldocument.h +61 -0
- data/ext/mathematical/lasem/src/lsmmathmlelement.c +491 -0
- data/ext/mathematical/lasem/src/lsmmathmlelement.h +107 -0
- data/ext/mathematical/lasem/src/lsmmathmlencloseelement.c +142 -0
- data/ext/mathematical/lasem/src/lsmmathmlencloseelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.c +500 -0
- data/ext/mathematical/lasem/src/lsmmathmlenums.h +224 -0
- data/ext/mathematical/lasem/src/lsmmathmlerrorelement.c +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlerrorelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlfencedelement.c +180 -0
- data/ext/mathematical/lasem/src/lsmmathmlfencedelement.h +65 -0
- data/ext/mathematical/lasem/src/lsmmathmlfractionelement.c +253 -0
- data/ext/mathematical/lasem/src/lsmmathmlfractionelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.c +661 -0
- data/ext/mathematical/lasem/src/lsmmathmlglyphtableams.h +45 -0
- data/ext/mathematical/lasem/src/lsmmathmlitexelement.c +189 -0
- data/ext/mathematical/lasem/src/lsmmathmlitexelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmmathmllayoututils.c +191 -0
- data/ext/mathematical/lasem/src/lsmmathmllayoututils.h +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlmathelement.c +212 -0
- data/ext/mathematical/lasem/src/lsmmathmlmathelement.h +81 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.c +3342 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatordictionary.h +55 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatorelement.c +314 -0
- data/ext/mathematical/lasem/src/lsmmathmloperatorelement.h +73 -0
- data/ext/mathematical/lasem/src/lsmmathmlpaddedelement.c +137 -0
- data/ext/mathematical/lasem/src/lsmmathmlpaddedelement.h +61 -0
- data/ext/mathematical/lasem/src/lsmmathmlphantomelement.c +71 -0
- data/ext/mathematical/lasem/src/lsmmathmlphantomelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationcontainer.c +43 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationcontainer.h +54 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationtoken.c +303 -0
- data/ext/mathematical/lasem/src/lsmmathmlpresentationtoken.h +83 -0
- data/ext/mathematical/lasem/src/lsmmathmlradicalelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmmathmlradicalelement.h +71 -0
- data/ext/mathematical/lasem/src/lsmmathmlrowelement.c +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlrowelement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlscriptelement.c +282 -0
- data/ext/mathematical/lasem/src/lsmmathmlscriptelement.h +78 -0
- data/ext/mathematical/lasem/src/lsmmathmlsemanticselement.c +84 -0
- data/ext/mathematical/lasem/src/lsmmathmlsemanticselement.h +56 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.c +156 -0
- data/ext/mathematical/lasem/src/lsmmathmlspaceelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmmathmlstringelement.c +123 -0
- data/ext/mathematical/lasem/src/lsmmathmlstringelement.h +58 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyle.c +130 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyle.h +89 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyleelement.c +391 -0
- data/ext/mathematical/lasem/src/lsmmathmlstyleelement.h +94 -0
- data/ext/mathematical/lasem/src/lsmmathmltablecellelement.c +122 -0
- data/ext/mathematical/lasem/src/lsmmathmltablecellelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmmathmltableelement.c +572 -0
- data/ext/mathematical/lasem/src/lsmmathmltableelement.h +78 -0
- data/ext/mathematical/lasem/src/lsmmathmltablerowelement.c +120 -0
- data/ext/mathematical/lasem/src/lsmmathmltablerowelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmmathmltraits.c +867 -0
- data/ext/mathematical/lasem/src/lsmmathmltraits.h +129 -0
- data/ext/mathematical/lasem/src/lsmmathmltypes.h +67 -0
- data/ext/mathematical/lasem/src/lsmmathmlunderoverelement.c +485 -0
- data/ext/mathematical/lasem/src/lsmmathmlunderoverelement.h +82 -0
- data/ext/mathematical/lasem/src/lsmmathmlutils.c +170 -0
- data/ext/mathematical/lasem/src/lsmmathmlutils.h +57 -0
- data/ext/mathematical/lasem/src/lsmmathmlview.c +1343 -0
- data/ext/mathematical/lasem/src/lsmmathmlview.h +179 -0
- data/ext/mathematical/lasem/src/lsmmisc.c +15 -0
- data/ext/mathematical/lasem/src/lsmmisc.h +32 -0
- data/ext/mathematical/lasem/src/lsmproperties.c +415 -0
- data/ext/mathematical/lasem/src/lsmproperties.h +85 -0
- data/ext/mathematical/lasem/src/lsmstr.c +231 -0
- data/ext/mathematical/lasem/src/lsmstr.h +114 -0
- data/ext/mathematical/lasem/src/lsmsvg.h +67 -0
- data/ext/mathematical/lasem/src/lsmsvgaelement.c +73 -0
- data/ext/mathematical/lasem/src/lsmsvgaelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgattributes.h +168 -0
- data/ext/mathematical/lasem/src/lsmsvgcircleelement.c +153 -0
- data/ext/mathematical/lasem/src/lsmsvgcircleelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgclippathelement.c +134 -0
- data/ext/mathematical/lasem/src/lsmsvgclippathelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgcolors.c +212 -0
- data/ext/mathematical/lasem/src/lsmsvgcolors.h +39 -0
- data/ext/mathematical/lasem/src/lsmsvgdefselement.c +74 -0
- data/ext/mathematical/lasem/src/lsmsvgdefselement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgdocument.c +306 -0
- data/ext/mathematical/lasem/src/lsmsvgdocument.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgelement.c +371 -0
- data/ext/mathematical/lasem/src/lsmsvgelement.h +80 -0
- data/ext/mathematical/lasem/src/lsmsvgellipseelement.c +158 -0
- data/ext/mathematical/lasem/src/lsmsvgellipseelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.c +674 -0
- data/ext/mathematical/lasem/src/lsmsvgenums.h +416 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterblend.c +105 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterblend.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.c +115 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercolormatrix.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercomposite.c +109 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltercomposite.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.c +206 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterconvolvematrix.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.c +124 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterdisplacementmap.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterelement.h +66 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterflood.c +86 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterflood.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltergaussianblur.c +114 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltergaussianblur.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.c +169 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterimage.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermerge.c +98 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermerge.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermergenode.c +87 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermergenode.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.c +116 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltermorphology.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilteroffset.c +112 -0
- data/ext/mathematical/lasem/src/lsmsvgfilteroffset.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterprimitive.c +168 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterprimitive.h +66 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.c +134 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterspecularlighting.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.c +1540 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltersurface.h +92 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltertile.c +102 -0
- data/ext/mathematical/lasem/src/lsmsvgfiltertile.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.c +142 -0
- data/ext/mathematical/lasem/src/lsmsvgfilterturbulence.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvggelement.c +73 -0
- data/ext/mathematical/lasem/src/lsmsvggelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvggradientelement.c +151 -0
- data/ext/mathematical/lasem/src/lsmsvggradientelement.h +68 -0
- data/ext/mathematical/lasem/src/lsmsvgimageelement.c +261 -0
- data/ext/mathematical/lasem/src/lsmsvgimageelement.h +67 -0
- data/ext/mathematical/lasem/src/lsmsvglength.c +152 -0
- data/ext/mathematical/lasem/src/lsmsvglength.h +65 -0
- data/ext/mathematical/lasem/src/lsmsvglineargradientelement.c +271 -0
- data/ext/mathematical/lasem/src/lsmsvglineargradientelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvglineelement.c +153 -0
- data/ext/mathematical/lasem/src/lsmsvglineelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgmarkerelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgmarkerelement.h +74 -0
- data/ext/mathematical/lasem/src/lsmsvgmaskelement.c +232 -0
- data/ext/mathematical/lasem/src/lsmsvgmaskelement.h +64 -0
- data/ext/mathematical/lasem/src/lsmsvgmatrix.c +221 -0
- data/ext/mathematical/lasem/src/lsmsvgmatrix.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgpathelement.c +115 -0
- data/ext/mathematical/lasem/src/lsmsvgpathelement.h +59 -0
- data/ext/mathematical/lasem/src/lsmsvgpatternelement.c +398 -0
- data/ext/mathematical/lasem/src/lsmsvgpatternelement.h +69 -0
- data/ext/mathematical/lasem/src/lsmsvgpolygonelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgpolygonelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgpolylineelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgpolylineelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgradialgradientelement.c +323 -0
- data/ext/mathematical/lasem/src/lsmsvgradialgradientelement.h +61 -0
- data/ext/mathematical/lasem/src/lsmsvgrectelement.c +184 -0
- data/ext/mathematical/lasem/src/lsmsvgrectelement.h +62 -0
- data/ext/mathematical/lasem/src/lsmsvgstopelement.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgstopelement.h +57 -0
- data/ext/mathematical/lasem/src/lsmsvgstyle.c +546 -0
- data/ext/mathematical/lasem/src/lsmsvgstyle.h +217 -0
- data/ext/mathematical/lasem/src/lsmsvgsvgelement.c +266 -0
- data/ext/mathematical/lasem/src/lsmsvgsvgelement.h +71 -0
- data/ext/mathematical/lasem/src/lsmsvgswitchelement.c +103 -0
- data/ext/mathematical/lasem/src/lsmsvgswitchelement.h +55 -0
- data/ext/mathematical/lasem/src/lsmsvgsymbolelement.c +148 -0
- data/ext/mathematical/lasem/src/lsmsvgsymbolelement.h +58 -0
- data/ext/mathematical/lasem/src/lsmsvgtextelement.c +203 -0
- data/ext/mathematical/lasem/src/lsmsvgtextelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.c +1490 -0
- data/ext/mathematical/lasem/src/lsmsvgtraits.h +122 -0
- data/ext/mathematical/lasem/src/lsmsvgtransformable.c +106 -0
- data/ext/mathematical/lasem/src/lsmsvgtransformable.h +54 -0
- data/ext/mathematical/lasem/src/lsmsvgtspanelement.c +174 -0
- data/ext/mathematical/lasem/src/lsmsvgtspanelement.h +60 -0
- data/ext/mathematical/lasem/src/lsmsvgtypes.h +83 -0
- data/ext/mathematical/lasem/src/lsmsvguseelement.c +238 -0
- data/ext/mathematical/lasem/src/lsmsvguseelement.h +69 -0
- data/ext/mathematical/lasem/src/lsmsvgview.c +2797 -0
- data/ext/mathematical/lasem/src/lsmsvgview.h +203 -0
- data/ext/mathematical/lasem/src/lsmtraits.c +171 -0
- data/ext/mathematical/lasem/src/lsmtraits.h +51 -0
- data/ext/mathematical/lasem/src/lsmtypes.h +36 -0
- data/ext/mathematical/lasem/src/lsmutils.c +54 -0
- data/ext/mathematical/lasem/src/lsmutils.h +56 -0
- data/ext/mathematical/lasem/src/meson.build +321 -0
- data/ext/mathematical/lasem/subprojects/gi-docgen.wrap +6 -0
- data/ext/mathematical/lasem/tests/data/mathml/gtkmathview/README +5 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-02.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-03-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction-03.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/fractions/fraction.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/closed.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/multiples.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/integrals/standard.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/matrices/matrix-01.tex +5 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/array.tex +3 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases-cr.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases-space.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/cases.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/color.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex-2.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex-inline.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/complex.tex +7 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/quadratic-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/misc/quadratic.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/radicals/radical-01.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/radicals/radical-02.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/accents.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/script.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/stack.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/subscript.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/sums-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/sums.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/superscript-inline.tex +1 -0
- data/ext/mathematical/lasem/tests/data/mathml/tex/scripts/superscript.tex +1 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/bmpCursor.bmp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/brushedMetal.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/jpeg.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/jpegCursor.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaBridge.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaSteps.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/operaWalk.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_pb.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_pb_tile.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/sm_colors_tile.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/tde.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/batik/resources/images/tiffCursor.tif +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/struct-image-01.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.1/images/struct-image-02.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/CNN.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/SVG-1.1-monolithic-fixed.dtd +1622 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/TraitAccess.common.es +672 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/advice.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/beep.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/boing_x.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/clock.mp4 +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud-ps411q4app.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q25s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q65float.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75p.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud411q75s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloud444q65o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudgsq75s.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudoddq65o.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/cloudqllo.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/copyright-documents-19990405.html +89 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/disco.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/dogandball.mov +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/duckfeeding.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/duckfeeding.mov +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/excuse_me.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/externalscript.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton2.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton3.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/greentopbutton4.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/heroesLanding.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/image2_b.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/myimage.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pacman.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/plant.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image0.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image1.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image2.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image3.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image4.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image5.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image6.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image7.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image8.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/pref_image9.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script1.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script10.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script2.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script3.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script4.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script5.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script6.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script7.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script8.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/script9.js +1 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/skier.3gp +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/skier.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/struct-image-01.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/struct-image-02.jpg +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/svgRef4.css +4 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/welcome.wav +0 -0
- data/ext/mathematical/lasem/tests/data/svg/svg1.2/images/xmltree.xml +4 -0
- data/ext/mathematical/lasem/tests/dom.c +266 -0
- data/ext/mathematical/lasem/tests/filter.c +153 -0
- data/ext/mathematical/lasem/tests/fuzztest.sh +12 -0
- data/ext/mathematical/lasem/tests/lasem.supp +185 -0
- data/ext/mathematical/lasem/tests/lsmtest.c +592 -0
- data/ext/mathematical/lasem/tests/meson.build +39 -0
- data/ext/mathematical/lasem/tests/str.c +44 -0
- data/ext/mathematical/lasem/tests/suite.c +140 -0
- data/ext/mathematical/lasem/tests/suite.ini +27 -0
- data/ext/mathematical/lasem/tools/change-license +3 -0
- data/ext/mathematical/lasem/tools/charlist.dtd +73 -0
- data/ext/mathematical/lasem/tools/entities-to-c.xsl +1067 -0
- data/ext/mathematical/lasem/tools/fuzzxml +243 -0
- data/ext/mathematical/lasem/tools/generate-entity-array.c +2136 -0
- data/ext/mathematical/lasem/tools/unicode.xml +44303 -0
- data/ext/mathematical/lasem/viewer/meson.build +17 -0
- data/ext/mathematical/lasem/viewer/viewer.c +248 -0
- data/ext/mathematical/lasem_overrides.c +4 -8
- data/ext/mathematical/mathematical.c +7 -9
- data/ext/mathematical/mtex2MML/CMakeLists.txt +255 -0
- data/ext/mathematical/mtex2MML/CONTRIBUTING.md +22 -0
- data/ext/mathematical/mtex2MML/README.md +143 -0
- data/ext/mathematical/mtex2MML/SUPPORTED.md +1216 -0
- data/ext/mathematical/mtex2MML/appveyor.yml +35 -0
- data/ext/mathematical/mtex2MML/cmake/Modules/astyle.cmake +12 -0
- data/ext/mathematical/mtex2MML/deps/uthash/package.json +27 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utarray.h +239 -0
- data/ext/mathematical/mtex2MML/deps/uthash/uthash.h +1074 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utlist.h +895 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utringbuffer.h +108 -0
- data/ext/mathematical/mtex2MML/deps/uthash/utstring.h +398 -0
- data/ext/mathematical/mtex2MML/script/bootstrap +39 -0
- data/ext/mathematical/mtex2MML/script/cibuild +58 -0
- data/ext/mathematical/mtex2MML/script/tag +28 -0
- data/ext/mathematical/mtex2MML/src/colors.c +44 -0
- data/ext/mathematical/mtex2MML/src/colors.h +23 -0
- data/ext/mathematical/mtex2MML/src/em.c +99 -0
- data/ext/mathematical/mtex2MML/src/em.h +31 -0
- data/ext/mathematical/mtex2MML/src/environment.c +515 -0
- data/ext/mathematical/mtex2MML/src/environment.h +85 -0
- data/ext/mathematical/mtex2MML/src/lexer.l +1594 -0
- data/ext/mathematical/mtex2MML/src/libmtex2MML.pc.in +10 -0
- data/ext/mathematical/mtex2MML/src/main.c +187 -0
- data/ext/mathematical/mtex2MML/src/mtex2MML.h +89 -0
- data/ext/mathematical/mtex2MML/src/parser.y +3817 -0
- data/ext/mathematical/mtex2MML/src/string_dup.c +23 -0
- data/ext/mathematical/mtex2MML/src/string_dup.h +23 -0
- data/ext/mathematical/mtex2MML/src/string_extras.c +47 -0
- data/ext/mathematical/mtex2MML/src/string_extras.h +30 -0
- data/ext/mathematical/mtex2MML/src/win32-shims/unistd.h +51 -0
- data/ext/mathematical/mtex2MML/tests/array.c +127 -0
- data/ext/mathematical/mtex2MML/tests/basic.c +96 -0
- data/ext/mathematical/mtex2MML/tests/clar/fixtures.h +38 -0
- data/ext/mathematical/mtex2MML/tests/clar/fs.h +335 -0
- data/ext/mathematical/mtex2MML/tests/clar/print.h +66 -0
- data/ext/mathematical/mtex2MML/tests/clar/sandbox.h +141 -0
- data/ext/mathematical/mtex2MML/tests/clar.c +644 -0
- data/ext/mathematical/mtex2MML/tests/clar.h +163 -0
- data/ext/mathematical/mtex2MML/tests/clar_test.h +20 -0
- data/ext/mathematical/mtex2MML/tests/cornercases.c +46 -0
- data/ext/mathematical/mtex2MML/tests/debug/mtex2MML_debug.cc +21 -0
- data/ext/mathematical/mtex2MML/tests/delimiters.c +242 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/file2str.c +62 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/file2str.h +12 -0
- data/ext/mathematical/mtex2MML/tests/deps/file2str/package.json +9 -0
- data/ext/mathematical/mtex2MML/tests/deps/mkdtemp/mkdtemp.c +151 -0
- data/ext/mathematical/mtex2MML/tests/deps/mkdtemp/mkdtemp.h +10 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/package.json +7 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/trim.c +27 -0
- data/ext/mathematical/mtex2MML/tests/deps/trim/trim.h +7 -0
- data/ext/mathematical/mtex2MML/tests/env.c +334 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-1.html +86 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-2.html +148 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/amscd-3.html +188 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/arrows-2.html +156 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/min-1.html +45 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/AMScd/min-2.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-1.html +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/accents-3.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/buildrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue490.html +0 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue877.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/issue937.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbrace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overbracket-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/overset-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/sideset-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/stackrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/subarray-1.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/substack-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underbrace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underbracket-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/above-below/underset-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/mathtip-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/texttip-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/action/toggle-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/Newextarrow-1.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-1.html +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-2.html +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-3.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-4.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/arrows/arrows-5.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathbin-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathinner-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathop-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathopenclose-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathord-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathpunct-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/atoms/mathrel-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/backslashed-1.html +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/basic-operators-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/basic-operators-2.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/basic-operators/remap-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/color-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/colorbox-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/definecolor-1.html +37 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/definecolor-2.html +79 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/fcolorbox-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/issue446.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/colors/namedcolors-1.html +70 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/big-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/delimiters-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/delimiters-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue775.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-1a.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-1b.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-2.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-3.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-4.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/issue776-5.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/delimiters/left-right-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/align-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/align-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignat-1a.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignat-1b.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/aligned-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/aligned-2.html +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/alignedat-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqalign-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqalignno-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/eqnarray-2.html +64 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/equation-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/equation-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gather-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gather-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gathered-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/gathered-2.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-1a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-2a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-2b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-3a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/issue982-3b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/leqalignno-1.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/multline-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/multline-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/environments/split-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/errors/noErrors-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/errors/noUndefined-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/above-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/abovewithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/atop-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/atopwithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/binom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/brace-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/brack-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/cfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/choose-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/dbinom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/dfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/frac-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/frac-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/genfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/issue969.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/overwithdelims-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/tbinom-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/frac/tfrac-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue1152-1.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue1152-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue375.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue856.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1a.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1b.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1c.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/issues/issue901-1d.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/boxes-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/kern-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/kern-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/llap-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/lower-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/mathstrut-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/moveleft-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/moveright-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/newline-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/phantom-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/raise-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/rlap-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/shove-1.html +19 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/skip-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/skip-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/smash-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/spaces-1.html +18 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/strut-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/layout/vcenter-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-1.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-2.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-3.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/greek-4.html +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/letters/hebrew-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/begingroup-1.html +15 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/def-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/let-1.html +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-2.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-3.html +50 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-5.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-6.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/macro/macro-7.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/Bbb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/bf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/boldsymbol-1.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/cal-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/frak-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/it-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-1a.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-1b.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathbf-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathcal-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathfrak-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathrm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathscr-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathsf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mathtt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/mit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/pmb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/rm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/scr-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/sf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/text-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textbf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textit-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textrm-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/textsf-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/texttt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mathvariant/tt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-1a.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-1b.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/array-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/bmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/bmatrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/matrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/matrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/pmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/pmatrix-2.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/smallmatrix-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/vmatrix-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/matrices/vmatrix-2.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-1.html +120 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-2.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/advanced-3.html +138 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/amounts-1.html +46 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/arrows-1.html +235 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/arrows-2.html +159 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/basics-1.html +139 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/bonds-1.html +256 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/environments-1.html +81 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/isotopes-1.html +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/math-1.html +101 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/mhchem/special_symbols-1.html +176 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/Rule-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/Tiny-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/class-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/cssId-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/href-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/href-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/require-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/style-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/non-standard/unicode-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/LaTeX-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/bbox-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/boxed-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/cancel-1.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/cases-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/displaylines-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/enclose-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/functions-1.html +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-2.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/limits-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/mathsize-1.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/mod-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/not-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/pod-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-1.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-2.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/primes-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/style-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/style-2.html +0 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/verb-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/other/verb-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/eqref-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/label-1.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/label-2.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/notag-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-1.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-2.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/references/ref-3.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/root-3.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/sqrt-1.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/roots/sqrt-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/binaryops-1.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/dots-1.html +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/largeops-1.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/largeops-2.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/relations-1.html +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-1.html +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-2.html +31 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-3.html +40 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-4.html +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-5.html +56 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-out/symbols/symbols-6.html +49 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-2.no_tex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/amscd-3.no_tex +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/arrows-1.no_tex +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/arrows-2.no_tex +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/min-1.no_tex +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/AMScd/min-2.no_tex +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-1.txt +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/accents-3.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/buildrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue490.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue877.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/issue937.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overbrace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overbracket-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/overset-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/sideset-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/stackrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/subarray-1.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/substack-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underbrace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underbracket-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/above-below/underset-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/mathtip-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/texttip-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/action/toggle-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/Newextarrow-1.xtex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-1.txt +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-2.txt +30 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-3.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-4.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/arrows/arrows-5.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathbin-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathinner-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathop-2.xtex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathopenclose-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathord-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathpunct-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/atoms/mathrel-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/backslashed-1.txt +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/basic-operators-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/basic-operators-2.xtex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/basic-operators/remap-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/color-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/colorbox-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1a.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1b.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-1c.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/definecolor-2.xtex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/fcolorbox-1.xtex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/issue446.xtex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/colors/namedcolors-1.txt +70 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/big-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/delimiters-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/delimiters-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue775.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-1a.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-1b.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-2.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-3.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-4.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/issue776-5.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/delimiters/left-right-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/align-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/align-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignat-1a.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignat-1b.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/aligned-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/aligned-2.txt +14 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/alignedat-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqalign-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqalignno-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-1c.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/eqnarray-2a.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/equation-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/equation-2.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gather-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gather-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gathered-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/gathered-2.txt +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-1a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-2a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-2b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-3a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/issue982-3b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/leqalignno-1.xtex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/multline-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/multline-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/environments/split-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/errors/noErrors-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/errors/noUndefined-1.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/above-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/abovewithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/atop-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/atopwithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/binom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/brace-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/brack-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/cfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/choose-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/dbinom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/dfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/frac-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/frac-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/genfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/issue969.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/overwithdelims-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/tbinom-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/frac/tfrac-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1151.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1152-1.xtex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue1152-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue375.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue856.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1a.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1b.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1c.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue901-1d.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue903-1.xtex +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/issues/issue903-2.xtex +16 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/boxes-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/kern-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/kern-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/llap-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/lower-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/mathstrut-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/moveleft-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/moveright-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/newline-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/phantom-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/raise-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/rlap-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/shove-1.xtex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/skip-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/skip-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/smash-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/spaces-1.txt +18 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/strut-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/layout/vcenter-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-1.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-2.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-3.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/greek-4.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/letters/hebrew-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/begingroup-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/def-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/let-1.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-1a.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-1b.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-3.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-5.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-6.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/macro/macro-7.no_tex +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/Bbb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/bf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/boldsymbol-1.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/cal-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/frak-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/it-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-1a.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-1b.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathbf-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathcal-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathfrak-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathrm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathscr-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathsf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mathtt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/mit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/pmb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/rm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/scr-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/sf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/text-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textbf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textit-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textrm-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/textsf-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/texttt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mathvariant/tt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-1a.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-1b.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/array-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/bmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/bmatrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/matrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/matrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/pmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/pmatrix-2.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/smallmatrix-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/vmatrix-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/matrices/vmatrix-2.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-1.no_tex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/advanced-3.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/amounts-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/arrows-1.no_tex +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/arrows-2.no_tex +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/basics-1.no_tex +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/bonds-1.no_tex +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/environments-1.no_tex +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/isotopes-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/math-1.no_tex +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/mhchem/special_symbols-1.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/Rule-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/Tiny-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/class-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/cssId-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/href-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/href-2.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/require-1.no_tex +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/style-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/non-standard/unicode-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/LaTeX-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/bbox-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/boxed-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/cancel-1.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/cases-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/displaylines-1.xtex +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/enclose-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/functions-1.txt +34 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-2.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/limits-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/mathsize-1.txt +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/mod-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/not-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/pod-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-1.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-2.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/primes-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/style-1.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/style-2.no_tex +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/verb-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/other/verb-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/eqref-1.no_tex +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/label-1.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/label-2.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/notag-1.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-1a.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-1b.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-2.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/ref-3.no_tex +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-1.no_tex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-2.no_tex +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-3.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/references/tag-4.no_tex +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/root-3.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/sqrt-1.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/roots/sqrt-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/binaryops-1.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/dots-1.txt +26 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/largeops-1.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/largeops-2.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/relations-1.txt +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-1.txt +25 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-2.txt +31 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-3.txt +40 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-4.txt +39 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-5.txt +56 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/LaTeXToMathML-tex/symbols/symbols-6.txt +49 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/MathJax/TODO.md +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_nesting.html +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_nesting.txt +32 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment_with_hline.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_pos_alignment_with_hline.txt +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column_with_align.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_vertical_column_with_align.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline.html +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline.txt +9 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline_and_hdashline.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_hline_and_hdashline.txt +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_vertical_and_horizontal_dashes.html +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/array_with_vertical_and_horizontal_dashes.txt +10 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/augmented_matrix.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/augmented_matrix.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/basic_array.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/basic_array.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/strip_excess_whitespace_in_array_attributes.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/array/strip_excess_whitespace_in_array_attributes.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/block.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/block.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/comments.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/comments.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/filter.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/inline.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/inline.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/strict_filter.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/strict_filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_filter.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_filter.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.html +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/basic/text_rendering.txt +23 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/broken_up_inline_env.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/broken_up_inline_env.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/some_crazy_alignment.html +24 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/cornercases/some_crazy_alignment.txt +24 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/align.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/alignat-1a.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/aligned_ex_spacing.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/basic_array.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/brackets.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_filter.html +2 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_filter.txt +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_text_filter.html +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/dollar_spacings_text_filter.txt +27 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/double_dollar.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping.txt +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_brackets.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_dollars.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/escaping_with_parens.html +35 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/mixed_env.txt +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/parens.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_dollar.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_equation.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/delimiters/single_equation.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/aligned_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bbmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/bmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_lines.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/cases_no_lines.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/gathered_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_lines.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/matrix_no_lines.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/pmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_ex_spacing.html +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_ex_spacing.txt +8 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_ex_spacing.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_ex_spacing.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/smallmatrix_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/spaces_after_rowsep.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/spaces_after_rowsep.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/split_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_ex_spacing.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_ex_spacing.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_lines.html +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vmatrix_no_lines.txt +4 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_ex_spacing.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_ex_spacing.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_lines.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/env/vvmatrix_no_lines.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/max_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/max_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/min_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/min_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/functions/prod_limits.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/excess_parsing.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/just_enough_parsing.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/maliciousness/just_enough_parsing.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_equations.html +11 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_equations.txt +13 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_notag_nonumber.html +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/multiple_notag_nonumber.txt +7 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_equation.html +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_equation.txt +5 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_nonumber.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_nonumber.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_notag.html +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/single_notag.txt +6 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_label.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_label.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_tag.html +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/numbered_equations/skip_tag.txt +3 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.html +12 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/performance/big_file.txt +1755 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/gt.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/lt.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textgreater.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.html +1 -0
- data/ext/mathematical/mtex2MML/tests/fixtures/symbols/textless.txt +1 -0
- data/ext/mathematical/mtex2MML/tests/functions.c +55 -0
- data/ext/mathematical/mtex2MML/tests/generate.py +244 -0
- data/ext/mathematical/mtex2MML/tests/helpers.c +29 -0
- data/ext/mathematical/mtex2MML/tests/helpers.h +8 -0
- data/ext/mathematical/mtex2MML/tests/main.c +35 -0
- data/ext/mathematical/mtex2MML/tests/maliciousness.c +107 -0
- data/ext/mathematical/mtex2MML/tests/mathjax.c +2040 -0
- data/ext/mathematical/mtex2MML/tests/mathjax_generate.py +72 -0
- data/ext/mathematical/mtex2MML/tests/numbered_equations.c +92 -0
- data/ext/mathematical/mtex2MML/tests/performance.c +39 -0
- data/ext/mathematical/mtex2MML/tests/symbols.c +69 -0
- data/lib/mathematical/version.rb +1 -1
- data/mathematical.gemspec +1 -1
- metadata +1191 -6
@@ -0,0 +1,1540 @@
|
|
1
|
+
/* Lasem
|
2
|
+
*
|
3
|
+
* Copyright © 2004 Caleb Moore
|
4
|
+
* Copyright © 2012 Emmanuel Pacaud
|
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 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
|
17
|
+
* Public License along with this library; if not, write to the
|
18
|
+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
19
|
+
* Boston, MA 02110-1335, USA.
|
20
|
+
*
|
21
|
+
* Authors:
|
22
|
+
* Caleb Moore <c.moore@student.unsw.edu.au>
|
23
|
+
* Emmanuel Pacaud <emmanuel@gnome.org>
|
24
|
+
* Mario Klingemann <mario@quasimondo.com>
|
25
|
+
*
|
26
|
+
* Image manipulation routines in this file are an adaptation of the code
|
27
|
+
* of librsvg: https://git.gnome.org/browse/librsvg
|
28
|
+
*/
|
29
|
+
|
30
|
+
#include <lsmsvgfiltersurface.h>
|
31
|
+
#include <lsmsvgenums.h>
|
32
|
+
#include <lsmutils.h>
|
33
|
+
#include <math.h>
|
34
|
+
#include <string.h>
|
35
|
+
|
36
|
+
static const int channelmap[4] = {2, 1, 0, 3};
|
37
|
+
|
38
|
+
struct _LsmSvgFilterSurface {
|
39
|
+
char *name;
|
40
|
+
cairo_surface_t *surface;
|
41
|
+
LsmBox subregion;
|
42
|
+
|
43
|
+
gint ref_count;
|
44
|
+
};
|
45
|
+
|
46
|
+
LsmSvgFilterSurface *
|
47
|
+
lsm_svg_filter_surface_new (const char *name, unsigned int width, unsigned int height, const LsmBox *subregion)
|
48
|
+
{
|
49
|
+
LsmSvgFilterSurface *filter_surface;
|
50
|
+
cairo_surface_t *surface;
|
51
|
+
|
52
|
+
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
53
|
+
|
54
|
+
filter_surface = lsm_svg_filter_surface_new_with_content (name, surface, subregion);
|
55
|
+
|
56
|
+
cairo_surface_destroy (surface);
|
57
|
+
|
58
|
+
return filter_surface;
|
59
|
+
}
|
60
|
+
|
61
|
+
LsmSvgFilterSurface *
|
62
|
+
lsm_svg_filter_surface_new_with_content (const char *name, cairo_surface_t *surface, const LsmBox *subregion)
|
63
|
+
{
|
64
|
+
LsmSvgFilterSurface *filter_surface;
|
65
|
+
LsmBox null_subregion = {0, 0, 0, 0};
|
66
|
+
|
67
|
+
if (surface == NULL ||
|
68
|
+
cairo_surface_get_type (surface) != CAIRO_SURFACE_TYPE_IMAGE ||
|
69
|
+
cairo_image_surface_get_format (surface) != CAIRO_FORMAT_ARGB32) {
|
70
|
+
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
|
71
|
+
subregion = &null_subregion;
|
72
|
+
} else if (subregion == NULL) {
|
73
|
+
subregion = &null_subregion;
|
74
|
+
cairo_surface_reference (surface);
|
75
|
+
} else {
|
76
|
+
cairo_surface_reference (surface);
|
77
|
+
}
|
78
|
+
|
79
|
+
filter_surface = g_new (LsmSvgFilterSurface, 1);
|
80
|
+
filter_surface->name = g_strdup (name);
|
81
|
+
filter_surface->subregion = *subregion;
|
82
|
+
filter_surface->surface = surface;
|
83
|
+
filter_surface->ref_count = 1;
|
84
|
+
|
85
|
+
return filter_surface;
|
86
|
+
}
|
87
|
+
|
88
|
+
LsmSvgFilterSurface *
|
89
|
+
lsm_svg_filter_surface_new_similar (const char *name, LsmSvgFilterSurface *model, const LsmBox *subregion)
|
90
|
+
{
|
91
|
+
if (model == NULL)
|
92
|
+
return lsm_svg_filter_surface_new (name, 0, 0, subregion);
|
93
|
+
|
94
|
+
return lsm_svg_filter_surface_new (name,
|
95
|
+
cairo_image_surface_get_width (model->surface),
|
96
|
+
cairo_image_surface_get_height (model->surface),
|
97
|
+
subregion != NULL ? subregion : &model->subregion);
|
98
|
+
}
|
99
|
+
|
100
|
+
const char *
|
101
|
+
lsm_svg_filter_surface_get_name (LsmSvgFilterSurface *surface)
|
102
|
+
{
|
103
|
+
g_return_val_if_fail (surface != NULL, NULL);
|
104
|
+
|
105
|
+
return surface->name;
|
106
|
+
}
|
107
|
+
|
108
|
+
cairo_surface_t *
|
109
|
+
lsm_svg_filter_surface_get_cairo_surface (LsmSvgFilterSurface *surface)
|
110
|
+
{
|
111
|
+
g_return_val_if_fail (surface != NULL, NULL);
|
112
|
+
|
113
|
+
return surface->surface;
|
114
|
+
}
|
115
|
+
|
116
|
+
const LsmBox *
|
117
|
+
lsm_svg_filter_surface_get_subregion (LsmSvgFilterSurface *surface)
|
118
|
+
{
|
119
|
+
static const LsmBox null_subregion = {0, 0, 0, 0};
|
120
|
+
|
121
|
+
if (surface == NULL)
|
122
|
+
return &null_subregion;
|
123
|
+
|
124
|
+
return &surface->subregion;
|
125
|
+
}
|
126
|
+
|
127
|
+
LsmSvgFilterSurface *
|
128
|
+
lsm_svg_filter_surface_ref (LsmSvgFilterSurface *filter_surface)
|
129
|
+
{
|
130
|
+
g_return_val_if_fail (filter_surface != NULL, NULL);
|
131
|
+
|
132
|
+
g_atomic_int_inc (&filter_surface->ref_count);
|
133
|
+
|
134
|
+
return filter_surface;
|
135
|
+
}
|
136
|
+
|
137
|
+
void
|
138
|
+
lsm_svg_filter_surface_unref (LsmSvgFilterSurface *filter_surface)
|
139
|
+
{
|
140
|
+
g_return_if_fail (filter_surface != NULL);
|
141
|
+
g_return_if_fail (filter_surface->ref_count > 0);
|
142
|
+
|
143
|
+
if (g_atomic_int_dec_and_test (&filter_surface->ref_count)) {
|
144
|
+
cairo_surface_destroy (filter_surface->surface);
|
145
|
+
g_free (filter_surface->name);
|
146
|
+
g_free (filter_surface);
|
147
|
+
}
|
148
|
+
}
|
149
|
+
|
150
|
+
G_DEFINE_BOXED_TYPE (LsmSvgFilterSurface, lsm_svg_filter_surface, lsm_svg_filter_surface_ref, lsm_svg_filter_surface_unref)
|
151
|
+
|
152
|
+
/*
|
153
|
+
* The stack blur algorithm was invented by Mario Klingemann <mario@quasimondo.com>
|
154
|
+
* http://incubator.quasimondo.com/processing/fast_blur_deluxe.php
|
155
|
+
*
|
156
|
+
* Compared to Mario's original source code, the lookup table is removed as the benefit
|
157
|
+
* doesn't worth the memory usage in case of large radiuses. Also, the following code adds
|
158
|
+
* alpha channel support and different radius for vertical and horizontal directions.
|
159
|
+
*/
|
160
|
+
|
161
|
+
static void
|
162
|
+
stack_blur (cairo_surface_t *input, cairo_surface_t *output, int rx, int ry)
|
163
|
+
{
|
164
|
+
guint32 *input_pixels;
|
165
|
+
guint32 *output_pixels;
|
166
|
+
int w, h, wm, hm, wh, div;
|
167
|
+
int *r, *g, *b, *a;
|
168
|
+
|
169
|
+
int rsum,gsum,bsum,asum,x,y,i,p,yp,yi,yw;
|
170
|
+
int *vmin;
|
171
|
+
int divsum;
|
172
|
+
|
173
|
+
yw=yi=0;
|
174
|
+
|
175
|
+
int *stack;
|
176
|
+
int stackpointer;
|
177
|
+
int stackstart;
|
178
|
+
int *sir;
|
179
|
+
int rbs;
|
180
|
+
int r1;
|
181
|
+
int routsum,goutsum,boutsum, aoutsum;
|
182
|
+
int rinsum,ginsum,binsum, ainsum;
|
183
|
+
int rowstride;
|
184
|
+
|
185
|
+
g_return_if_fail (rx > 0 || ry > 0);
|
186
|
+
|
187
|
+
input_pixels = (guint32 *) cairo_image_surface_get_data (input);
|
188
|
+
output_pixels = (guint32 *) cairo_image_surface_get_data (output);
|
189
|
+
rowstride = cairo_image_surface_get_stride (input);
|
190
|
+
w = cairo_image_surface_get_width (input);
|
191
|
+
h = cairo_image_surface_get_height (input);
|
192
|
+
|
193
|
+
g_return_if_fail (cairo_image_surface_get_width (output) == w);
|
194
|
+
g_return_if_fail (cairo_image_surface_get_height (output) == h);
|
195
|
+
g_return_if_fail (cairo_image_surface_get_stride (output) == rowstride);
|
196
|
+
|
197
|
+
wm = w - 1;
|
198
|
+
hm = h - 1;
|
199
|
+
wh = w * h;
|
200
|
+
|
201
|
+
r = g_new (int, wh);
|
202
|
+
g = g_new (int, wh);
|
203
|
+
b = g_new (int, wh);
|
204
|
+
a = g_new (int, wh);
|
205
|
+
|
206
|
+
div = 2 * rx + 1;
|
207
|
+
divsum = (div + 1) >> 1;
|
208
|
+
divsum *= divsum;
|
209
|
+
stack = g_new (int, div * 4);
|
210
|
+
r1 = rx + 1;
|
211
|
+
|
212
|
+
vmin = g_new (int, w);
|
213
|
+
for (y =0; y < h; y++) {
|
214
|
+
rinsum=ginsum=binsum=ainsum=routsum=goutsum=boutsum=aoutsum=rsum=gsum=bsum=asum=0;
|
215
|
+
yi = y * rowstride / 4;
|
216
|
+
|
217
|
+
for (i = -rx; i <= rx; i++) {
|
218
|
+
p = input_pixels [yi + MIN (wm, MAX (i, 0))];
|
219
|
+
sir = &stack [4 * (i + rx)];
|
220
|
+
sir[0]=(p & 0x00ff0000)>>16;
|
221
|
+
sir[1]=(p & 0x0000ff00)>>8;
|
222
|
+
sir[2]=(p & 0x000000ff);
|
223
|
+
sir[3]=(p & 0xff0000ff)>>24;
|
224
|
+
rbs= r1 - ABS (i);
|
225
|
+
rsum+=sir[0]*rbs;
|
226
|
+
gsum+=sir[1]*rbs;
|
227
|
+
bsum+=sir[2]*rbs;
|
228
|
+
asum+=sir[3]*rbs;
|
229
|
+
if (i>0){
|
230
|
+
rinsum+=sir[0];
|
231
|
+
ginsum+=sir[1];
|
232
|
+
binsum+=sir[2];
|
233
|
+
ainsum+=sir[3];
|
234
|
+
} else {
|
235
|
+
routsum+=sir[0];
|
236
|
+
goutsum+=sir[1];
|
237
|
+
boutsum+=sir[2];
|
238
|
+
aoutsum+=sir[3];
|
239
|
+
}
|
240
|
+
}
|
241
|
+
stackpointer=rx;
|
242
|
+
|
243
|
+
for (x=0;x<w;x++){
|
244
|
+
|
245
|
+
r[yi] = rsum / divsum;
|
246
|
+
g[yi] = gsum / divsum;
|
247
|
+
b[yi] = bsum / divsum;
|
248
|
+
a[yi] = asum / divsum;
|
249
|
+
rsum-=routsum;
|
250
|
+
gsum-=goutsum;
|
251
|
+
bsum-=boutsum;
|
252
|
+
asum-=aoutsum;
|
253
|
+
|
254
|
+
stackstart=stackpointer-rx+div;
|
255
|
+
sir = &stack [4 * (stackstart % div)];
|
256
|
+
|
257
|
+
routsum-=sir[0];
|
258
|
+
goutsum-=sir[1];
|
259
|
+
boutsum-=sir[2];
|
260
|
+
aoutsum-=sir[3];
|
261
|
+
|
262
|
+
if(y==0){
|
263
|
+
vmin[x]=MIN (x + rx + 1, wm);
|
264
|
+
}
|
265
|
+
p = input_pixels [yw + vmin[x]];
|
266
|
+
|
267
|
+
sir[0]=(p & 0x00ff0000)>>16;
|
268
|
+
sir[1]=(p & 0x0000ff00)>>8;
|
269
|
+
sir[2]=(p & 0x000000ff);
|
270
|
+
sir[3]=(p & 0xff000000)>>24;
|
271
|
+
|
272
|
+
rinsum+=sir[0];
|
273
|
+
ginsum+=sir[1];
|
274
|
+
binsum+=sir[2];
|
275
|
+
ainsum+=sir[3];
|
276
|
+
|
277
|
+
rsum+=rinsum;
|
278
|
+
gsum+=ginsum;
|
279
|
+
bsum+=binsum;
|
280
|
+
asum+=ainsum;
|
281
|
+
|
282
|
+
stackpointer = (stackpointer + 1) % div;
|
283
|
+
sir = &stack [4 * ((stackpointer) % div)];
|
284
|
+
|
285
|
+
routsum+=sir[0];
|
286
|
+
goutsum+=sir[1];
|
287
|
+
boutsum+=sir[2];
|
288
|
+
aoutsum+=sir[3];
|
289
|
+
|
290
|
+
rinsum-=sir[0];
|
291
|
+
ginsum-=sir[1];
|
292
|
+
binsum-=sir[2];
|
293
|
+
ainsum-=sir[3];
|
294
|
+
|
295
|
+
yi++;
|
296
|
+
}
|
297
|
+
yw+=w;
|
298
|
+
}
|
299
|
+
g_free (vmin);
|
300
|
+
g_free (stack);
|
301
|
+
|
302
|
+
div = 2 * ry + 1;
|
303
|
+
divsum = (div + 1) >> 1;
|
304
|
+
divsum *= divsum;
|
305
|
+
|
306
|
+
stack = g_new0 (int, div * 4);
|
307
|
+
r1 = ry + 1;
|
308
|
+
|
309
|
+
vmin = g_new0 (int, h);
|
310
|
+
for (x=0;x<w;x++){
|
311
|
+
rinsum=ginsum=binsum=ainsum=routsum=goutsum=boutsum=aoutsum=rsum=gsum=bsum=asum=0;
|
312
|
+
yp=-ry*w;
|
313
|
+
for(i=-ry;i<=ry;i++){
|
314
|
+
yi= MAX(0,yp)+x;
|
315
|
+
|
316
|
+
sir = &stack [4 * (i + ry)];
|
317
|
+
|
318
|
+
sir[0]=r[yi];
|
319
|
+
sir[1]=g[yi];
|
320
|
+
sir[2]=b[yi];
|
321
|
+
sir[3]=a[yi];
|
322
|
+
|
323
|
+
rbs=r1 - ABS(i);
|
324
|
+
|
325
|
+
rsum+=r[yi]*rbs;
|
326
|
+
gsum+=g[yi]*rbs;
|
327
|
+
bsum+=b[yi]*rbs;
|
328
|
+
asum+=a[yi]*rbs;
|
329
|
+
|
330
|
+
if (i>0){
|
331
|
+
rinsum+=sir[0];
|
332
|
+
ginsum+=sir[1];
|
333
|
+
binsum+=sir[2];
|
334
|
+
ainsum+=sir[3];
|
335
|
+
} else {
|
336
|
+
routsum+=sir[0];
|
337
|
+
goutsum+=sir[1];
|
338
|
+
boutsum+=sir[2];
|
339
|
+
aoutsum+=sir[3];
|
340
|
+
}
|
341
|
+
|
342
|
+
if(i<hm){
|
343
|
+
yp+=w;
|
344
|
+
}
|
345
|
+
}
|
346
|
+
yi=x;
|
347
|
+
stackpointer=ry;
|
348
|
+
for (y=0;y<h;y++){
|
349
|
+
output_pixels [yi] =
|
350
|
+
((asum / divsum) << 24) |
|
351
|
+
((rsum / divsum) << 16) |
|
352
|
+
((gsum / divsum) << 8) |
|
353
|
+
(bsum / divsum);
|
354
|
+
rsum-=routsum;
|
355
|
+
gsum-=goutsum;
|
356
|
+
bsum-=boutsum;
|
357
|
+
asum-=aoutsum;
|
358
|
+
|
359
|
+
stackstart=stackpointer-ry+div;
|
360
|
+
sir = &stack [4 * (stackstart % div)];
|
361
|
+
|
362
|
+
routsum-=sir[0];
|
363
|
+
goutsum-=sir[1];
|
364
|
+
boutsum-=sir[2];
|
365
|
+
aoutsum-=sir[3];
|
366
|
+
|
367
|
+
if(x==0) {
|
368
|
+
vmin[y] = MIN(y+r1,hm)*w;
|
369
|
+
}
|
370
|
+
p=x+vmin[y];
|
371
|
+
|
372
|
+
sir[0]=r[p];
|
373
|
+
sir[1]=g[p];
|
374
|
+
sir[2]=b[p];
|
375
|
+
sir[3]=a[p];
|
376
|
+
|
377
|
+
rinsum+=sir[0];
|
378
|
+
ginsum+=sir[1];
|
379
|
+
binsum+=sir[2];
|
380
|
+
ainsum+=sir[3];
|
381
|
+
|
382
|
+
rsum+=rinsum;
|
383
|
+
gsum+=ginsum;
|
384
|
+
bsum+=binsum;
|
385
|
+
asum+=ainsum;
|
386
|
+
|
387
|
+
stackpointer=(stackpointer+1)%div;
|
388
|
+
sir = &stack[4 * stackpointer];
|
389
|
+
|
390
|
+
routsum+=sir[0];
|
391
|
+
goutsum+=sir[1];
|
392
|
+
boutsum+=sir[2];
|
393
|
+
aoutsum+=sir[3];
|
394
|
+
|
395
|
+
rinsum-=sir[0];
|
396
|
+
ginsum-=sir[1];
|
397
|
+
binsum-=sir[2];
|
398
|
+
ainsum-=sir[3];
|
399
|
+
|
400
|
+
yi+= rowstride / 4;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
g_free (vmin);
|
404
|
+
g_free (stack);
|
405
|
+
|
406
|
+
g_free (r);
|
407
|
+
g_free (g);
|
408
|
+
g_free (b);
|
409
|
+
g_free (a);
|
410
|
+
}
|
411
|
+
|
412
|
+
void
|
413
|
+
lsm_svg_filter_surface_blur (LsmSvgFilterSurface *input,
|
414
|
+
LsmSvgFilterSurface *output,
|
415
|
+
double sx, double sy)
|
416
|
+
{
|
417
|
+
int kx, ky;
|
418
|
+
int width, height;
|
419
|
+
|
420
|
+
g_return_if_fail (input != NULL);
|
421
|
+
g_return_if_fail (output != NULL);
|
422
|
+
|
423
|
+
cairo_surface_flush (input->surface);
|
424
|
+
|
425
|
+
kx = floor (sx * 3 * sqrt (2 * M_PI) / 4 + 0.5);
|
426
|
+
ky = floor (sy * 3 * sqrt (2 * M_PI) / 4 + 0.5);
|
427
|
+
|
428
|
+
width = cairo_image_surface_get_width (input->surface);
|
429
|
+
height = cairo_image_surface_get_height (input->surface);
|
430
|
+
|
431
|
+
if (width != cairo_image_surface_get_width (output->surface) ||
|
432
|
+
height != cairo_image_surface_get_height (output->surface))
|
433
|
+
return;
|
434
|
+
|
435
|
+
if (width < 1 || height < 1)
|
436
|
+
return;
|
437
|
+
|
438
|
+
if (kx > 1 || ky > 1) {
|
439
|
+
int x1, y1, x2, y2;
|
440
|
+
cairo_surface_t *blur_surface;
|
441
|
+
gboolean do_clip = FALSE;
|
442
|
+
|
443
|
+
x1 = output->subregion.x - kx;
|
444
|
+
y1 = output->subregion.y - ky;
|
445
|
+
x2 = output->subregion.width + output->subregion.x + kx;
|
446
|
+
y2 = output->subregion.height + output->subregion.y + ky;
|
447
|
+
x1 = CLAMP (x1, 0, width);
|
448
|
+
y1 = CLAMP (y1, 0, height);
|
449
|
+
x2 = CLAMP (x2, x1, width);
|
450
|
+
y2 = CLAMP (y2, y1, height);
|
451
|
+
|
452
|
+
|
453
|
+
if (input->subregion.x < output->subregion.x ||
|
454
|
+
input->subregion.y < output->subregion.y ||
|
455
|
+
input->subregion.width > output->subregion.width ||
|
456
|
+
input->subregion.height > output->subregion.height) {
|
457
|
+
do_clip = TRUE;
|
458
|
+
blur_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
459
|
+
} else
|
460
|
+
blur_surface = output->surface;
|
461
|
+
|
462
|
+
stack_blur (input->surface, blur_surface, kx, ky);
|
463
|
+
|
464
|
+
cairo_surface_mark_dirty (blur_surface);
|
465
|
+
|
466
|
+
if (do_clip) {
|
467
|
+
cairo_t *cairo;
|
468
|
+
|
469
|
+
cairo = cairo_create (output->surface);
|
470
|
+
cairo_rectangle (cairo,
|
471
|
+
output->subregion.x, output->subregion.y,
|
472
|
+
output->subregion.width, output->subregion.height);
|
473
|
+
cairo_clip (cairo);
|
474
|
+
cairo_set_source_surface (cairo, blur_surface, 0, 0);
|
475
|
+
cairo_paint (cairo);
|
476
|
+
cairo_destroy (cairo);
|
477
|
+
|
478
|
+
cairo_surface_destroy (blur_surface);
|
479
|
+
}
|
480
|
+
} else {
|
481
|
+
cairo_t *cairo;
|
482
|
+
|
483
|
+
cairo = cairo_create (output->surface);
|
484
|
+
cairo_rectangle (cairo,
|
485
|
+
output->subregion.x, output->subregion.y,
|
486
|
+
output->subregion.width, output->subregion.height);
|
487
|
+
cairo_clip (cairo);
|
488
|
+
cairo_set_source_surface (cairo, input->surface, 0, 0);
|
489
|
+
cairo_paint (cairo);
|
490
|
+
cairo_destroy (cairo);
|
491
|
+
}
|
492
|
+
}
|
493
|
+
|
494
|
+
void
|
495
|
+
lsm_svg_filter_surface_flood (LsmSvgFilterSurface *surface,
|
496
|
+
double red,
|
497
|
+
double green,
|
498
|
+
double blue,
|
499
|
+
double opacity)
|
500
|
+
{
|
501
|
+
cairo_t *cairo;
|
502
|
+
|
503
|
+
g_return_if_fail (surface != NULL);
|
504
|
+
|
505
|
+
cairo = cairo_create (surface->surface);
|
506
|
+
cairo_rectangle (cairo, surface->subregion.x, surface->subregion.y, surface->subregion.width, surface->subregion.height);
|
507
|
+
cairo_clip (cairo);
|
508
|
+
cairo_set_source_rgba (cairo, red, green, blue, opacity);
|
509
|
+
cairo_paint (cairo);
|
510
|
+
cairo_destroy (cairo);
|
511
|
+
}
|
512
|
+
|
513
|
+
void
|
514
|
+
lsm_svg_filter_surface_blend (LsmSvgFilterSurface *input_1,
|
515
|
+
LsmSvgFilterSurface *input_2,
|
516
|
+
LsmSvgFilterSurface *output,
|
517
|
+
int blending_mode)
|
518
|
+
{
|
519
|
+
cairo_t *cairo;
|
520
|
+
cairo_operator_t op;
|
521
|
+
|
522
|
+
g_return_if_fail (input_1 != NULL);
|
523
|
+
g_return_if_fail (input_2 != NULL);
|
524
|
+
g_return_if_fail (output != NULL);
|
525
|
+
|
526
|
+
switch (blending_mode) {
|
527
|
+
case LSM_SVG_BLENDING_MODE_MULTIPLY:
|
528
|
+
op = CAIRO_OPERATOR_MULTIPLY;
|
529
|
+
break;
|
530
|
+
case LSM_SVG_BLENDING_MODE_SCREEN:
|
531
|
+
op = CAIRO_OPERATOR_SCREEN;
|
532
|
+
break;
|
533
|
+
case LSM_SVG_BLENDING_MODE_DARKEN:
|
534
|
+
op = CAIRO_OPERATOR_DARKEN;
|
535
|
+
break;
|
536
|
+
case LSM_SVG_BLENDING_MODE_LIGHTEN:
|
537
|
+
op = CAIRO_OPERATOR_LIGHTEN;
|
538
|
+
break;
|
539
|
+
case LSM_SVG_BLENDING_MODE_IN:
|
540
|
+
op = CAIRO_OPERATOR_IN;
|
541
|
+
break;
|
542
|
+
case LSM_SVG_BLENDING_MODE_OUT:
|
543
|
+
op = CAIRO_OPERATOR_OUT;
|
544
|
+
break;
|
545
|
+
case LSM_SVG_BLENDING_MODE_ATOP:
|
546
|
+
op = CAIRO_OPERATOR_ATOP;
|
547
|
+
break;
|
548
|
+
case LSM_SVG_BLENDING_MODE_XOR:
|
549
|
+
op = CAIRO_OPERATOR_XOR;
|
550
|
+
break;
|
551
|
+
default:
|
552
|
+
op = CAIRO_OPERATOR_OVER;
|
553
|
+
break;
|
554
|
+
}
|
555
|
+
|
556
|
+
cairo = cairo_create (output->surface);
|
557
|
+
cairo_rectangle (cairo, output->subregion.x, output->subregion.y, output->subregion.width, output->subregion.height);
|
558
|
+
cairo_clip (cairo);
|
559
|
+
cairo_set_source_surface (cairo, input_2->surface, 0, 0);
|
560
|
+
cairo_paint (cairo);
|
561
|
+
cairo_set_source_surface (cairo, input_1->surface, 0, 0);
|
562
|
+
cairo_set_operator (cairo, op);
|
563
|
+
cairo_paint (cairo);
|
564
|
+
cairo_destroy (cairo);
|
565
|
+
}
|
566
|
+
|
567
|
+
void
|
568
|
+
lsm_svg_filter_surface_offset (LsmSvgFilterSurface *input,
|
569
|
+
LsmSvgFilterSurface *output,
|
570
|
+
int dx, int dy)
|
571
|
+
{
|
572
|
+
cairo_t *cairo;
|
573
|
+
|
574
|
+
g_return_if_fail (input != NULL);
|
575
|
+
g_return_if_fail (output != NULL);
|
576
|
+
|
577
|
+
cairo = cairo_create (output->surface);
|
578
|
+
cairo_rectangle (cairo, output->subregion.x, output->subregion.y, output->subregion.width, output->subregion.height);
|
579
|
+
cairo_clip (cairo);
|
580
|
+
cairo_set_source_surface (cairo, input->surface, dx, dy);
|
581
|
+
cairo_paint (cairo);
|
582
|
+
cairo_destroy (cairo);
|
583
|
+
}
|
584
|
+
|
585
|
+
void
|
586
|
+
lsm_svg_filter_surface_merge (LsmSvgFilterSurface *input,
|
587
|
+
LsmSvgFilterSurface *output)
|
588
|
+
{
|
589
|
+
cairo_t *cairo;
|
590
|
+
|
591
|
+
g_return_if_fail (input != NULL);
|
592
|
+
g_return_if_fail (output != NULL);
|
593
|
+
|
594
|
+
cairo = cairo_create (output->surface);
|
595
|
+
cairo_rectangle (cairo, output->subregion.x, output->subregion.y, output->subregion.width, output->subregion.height);
|
596
|
+
cairo_clip (cairo);
|
597
|
+
cairo_set_source_surface (cairo, input->surface, 0, 0);
|
598
|
+
cairo_paint (cairo);
|
599
|
+
cairo_destroy (cairo);
|
600
|
+
}
|
601
|
+
|
602
|
+
void
|
603
|
+
lsm_svg_filter_surface_tile (LsmSvgFilterSurface *input, LsmSvgFilterSurface *output)
|
604
|
+
{
|
605
|
+
cairo_t *cairo;
|
606
|
+
cairo_surface_t *surface;
|
607
|
+
cairo_pattern_t *pattern;
|
608
|
+
|
609
|
+
g_return_if_fail (input != NULL);
|
610
|
+
g_return_if_fail (output != NULL);
|
611
|
+
|
612
|
+
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, input->subregion.width, input->subregion.height);
|
613
|
+
cairo = cairo_create (surface);
|
614
|
+
cairo_set_source_surface (cairo, input->surface, -input->subregion.x, -input->subregion.y);
|
615
|
+
cairo_paint (cairo);
|
616
|
+
cairo_destroy (cairo);
|
617
|
+
|
618
|
+
cairo = cairo_create (output->surface);
|
619
|
+
cairo_rectangle (cairo, output->subregion.x, output->subregion.y, output->subregion.width, output->subregion.height);
|
620
|
+
cairo_clip (cairo);
|
621
|
+
cairo_set_source_surface (cairo, surface, input->subregion.x, input->subregion.y);
|
622
|
+
pattern = cairo_get_source (cairo);
|
623
|
+
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
|
624
|
+
cairo_paint (cairo);
|
625
|
+
cairo_destroy (cairo);
|
626
|
+
cairo_surface_destroy (surface);
|
627
|
+
}
|
628
|
+
|
629
|
+
void
|
630
|
+
lsm_svg_filter_surface_alpha (LsmSvgFilterSurface *input, LsmSvgFilterSurface *output)
|
631
|
+
{
|
632
|
+
cairo_t *cairo;
|
633
|
+
|
634
|
+
g_return_if_fail (input != NULL);
|
635
|
+
g_return_if_fail (output != NULL);
|
636
|
+
|
637
|
+
cairo = cairo_create (output->surface);
|
638
|
+
cairo_set_source_rgb (cairo, 0, 0, 0);
|
639
|
+
cairo_mask_surface (cairo, input->surface, 0, 0);
|
640
|
+
|
641
|
+
cairo_destroy (cairo);
|
642
|
+
}
|
643
|
+
|
644
|
+
void
|
645
|
+
lsm_svg_filter_surface_color_matrix (LsmSvgFilterSurface *input, LsmSvgFilterSurface *output,
|
646
|
+
LsmSvgColorFilterType type, unsigned n_values, const double *values)
|
647
|
+
{
|
648
|
+
cairo_t *cairo;
|
649
|
+
unsigned i;
|
650
|
+
int matrix[20];
|
651
|
+
double cosval;
|
652
|
+
double sinval;
|
653
|
+
int ch;
|
654
|
+
gint x, y, x1, x2, y1, y2;
|
655
|
+
gint width, height;
|
656
|
+
gint rowstride;
|
657
|
+
gint sum;
|
658
|
+
guchar *in_pixels;
|
659
|
+
guchar *output_pixels;
|
660
|
+
double setting;
|
661
|
+
|
662
|
+
g_return_if_fail (input != NULL);
|
663
|
+
g_return_if_fail (output != NULL);
|
664
|
+
g_return_if_fail (values != NULL || n_values < 1);
|
665
|
+
|
666
|
+
width = cairo_image_surface_get_width (input->surface);
|
667
|
+
height = cairo_image_surface_get_height (input->surface);
|
668
|
+
|
669
|
+
if (width != cairo_image_surface_get_width (output->surface) ||
|
670
|
+
height != cairo_image_surface_get_height (output->surface))
|
671
|
+
return;
|
672
|
+
|
673
|
+
if (height < 1 || width < 1)
|
674
|
+
return;
|
675
|
+
|
676
|
+
memset (matrix, 0, sizeof (*matrix) * G_N_ELEMENTS (matrix));
|
677
|
+
|
678
|
+
switch (type) {
|
679
|
+
case LSM_SVG_COLOR_FILTER_TYPE_MATRIX:
|
680
|
+
for (i = 0; i < G_N_ELEMENTS (matrix) && i < n_values; i++)
|
681
|
+
matrix[i] = values[i] * 255.0;
|
682
|
+
break;
|
683
|
+
case LSM_SVG_COLOR_FILTER_TYPE_SATURATE:
|
684
|
+
if (n_values > 0)
|
685
|
+
setting = values[0];
|
686
|
+
else
|
687
|
+
setting = 1.0;
|
688
|
+
|
689
|
+
matrix[0] = 255.0 * (0.213 + 0.787 * setting);
|
690
|
+
matrix[1] = 255.0 * (0.715 - 0.715 * setting);
|
691
|
+
matrix[2] = 255.0 * (0.072 - 0.072 * setting);
|
692
|
+
matrix[5] = 255.0 * (0.213 - 0.213 * setting);
|
693
|
+
matrix[6] = 255.0 * (0.715 + 0.285 * setting);
|
694
|
+
matrix[7] = 255.0 * (0.072 - 0.072 * setting);
|
695
|
+
matrix[10] = 255.0 * (0.213 - 0.213 * setting);
|
696
|
+
matrix[11] = 255.0 * (0.715 - 0.715 * setting);
|
697
|
+
matrix[12] = 255.0 * (0.072 + 0.928 * setting);
|
698
|
+
matrix[18] = 255;
|
699
|
+
break;
|
700
|
+
case LSM_SVG_COLOR_FILTER_TYPE_HUE_ROTATE:
|
701
|
+
if (n_values > 0)
|
702
|
+
setting = values[0];
|
703
|
+
else
|
704
|
+
setting = 0.0;
|
705
|
+
|
706
|
+
cosval = cos (setting);
|
707
|
+
sinval = sin (setting);
|
708
|
+
|
709
|
+
matrix[0] = (0.213 + cosval * 0.787 + sinval * -0.213) * 255.;
|
710
|
+
matrix[1] = (0.715 + cosval * -0.715 + sinval * -0.715) * 255.;
|
711
|
+
matrix[2] = (0.072 + cosval * -0.072 + sinval * 0.928) * 255.;
|
712
|
+
matrix[5] = (0.213 + cosval * -0.213 + sinval * 0.143) * 255.;
|
713
|
+
matrix[6] = (0.715 + cosval * 0.285 + sinval * 0.140) * 255.;
|
714
|
+
matrix[7] = (0.072 + cosval * -0.072 + sinval * -0.283) * 255.;
|
715
|
+
matrix[10] = (0.213 + cosval * -0.213 + sinval * -0.787) * 255.;
|
716
|
+
matrix[11] = (0.715 + cosval * -0.715 + sinval * 0.715) * 255.;
|
717
|
+
matrix[12] = (0.072 + cosval * 0.928 + sinval * 0.072) * 255.;
|
718
|
+
matrix[18] = 255;
|
719
|
+
break;
|
720
|
+
case LSM_SVG_COLOR_FILTER_TYPE_LUMINANCE_TO_ALPHA:
|
721
|
+
matrix[15] = 0.2125 * 255.;
|
722
|
+
matrix[16] = 0.7154 * 255.;
|
723
|
+
matrix[17] = 0.0721 * 255.;
|
724
|
+
break;
|
725
|
+
default:
|
726
|
+
return;
|
727
|
+
}
|
728
|
+
|
729
|
+
cairo_surface_flush (input->surface);
|
730
|
+
cairo = cairo_create (output->surface);
|
731
|
+
|
732
|
+
in_pixels = cairo_image_surface_get_data (input->surface);
|
733
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
734
|
+
rowstride = cairo_image_surface_get_stride (input->surface);
|
735
|
+
|
736
|
+
x1 = CLAMP (input->subregion.x, 0, width);
|
737
|
+
x2 = CLAMP (input->subregion.x + input->subregion.width, 0, width);
|
738
|
+
y1 = CLAMP (input->subregion.y, 0, height);
|
739
|
+
y2 = CLAMP (input->subregion.y + input->subregion.height, 0, height);
|
740
|
+
|
741
|
+
for (y = y1; y < y2; y++)
|
742
|
+
for (x = x1; x < x2; x++) {
|
743
|
+
int umch;
|
744
|
+
int alpha = in_pixels[4 * x + y * rowstride + channelmap[3]];
|
745
|
+
if (!alpha)
|
746
|
+
for (umch = 0; umch < 4; umch++) {
|
747
|
+
sum = matrix[umch * 5 + 4];
|
748
|
+
if (sum > 255)
|
749
|
+
sum = 255;
|
750
|
+
if (sum < 0)
|
751
|
+
sum = 0;
|
752
|
+
output_pixels[4 * x + y * rowstride + channelmap[umch]] = sum;
|
753
|
+
} else
|
754
|
+
for (umch = 0; umch < 4; umch++) {
|
755
|
+
int umi;
|
756
|
+
ch = channelmap[umch];
|
757
|
+
sum = 0;
|
758
|
+
for (umi = 0; umi < 4; umi++) {
|
759
|
+
i = channelmap[umi];
|
760
|
+
if (umi != 3)
|
761
|
+
sum += matrix[umch * 5 + umi] *
|
762
|
+
in_pixels[4 * x + y * rowstride + i] / alpha;
|
763
|
+
else
|
764
|
+
sum += matrix[umch * 5 + umi] *
|
765
|
+
in_pixels[4 * x + y * rowstride + i] / 255;
|
766
|
+
}
|
767
|
+
sum += matrix[umch * 5 + 4];
|
768
|
+
|
769
|
+
|
770
|
+
|
771
|
+
if (sum > 255)
|
772
|
+
sum = 255;
|
773
|
+
if (sum < 0)
|
774
|
+
sum = 0;
|
775
|
+
|
776
|
+
output_pixels[4 * x + y * rowstride + ch] = sum;
|
777
|
+
}
|
778
|
+
for (umch = 0; umch < 3; umch++) {
|
779
|
+
ch = channelmap[umch];
|
780
|
+
output_pixels[4 * x + y * rowstride + ch] =
|
781
|
+
output_pixels[4 * x + y * rowstride + ch] *
|
782
|
+
output_pixels[4 * x + y * rowstride + channelmap[3]] / 255;
|
783
|
+
}
|
784
|
+
}
|
785
|
+
|
786
|
+
cairo_surface_mark_dirty (output->surface);
|
787
|
+
|
788
|
+
cairo_destroy (cairo);
|
789
|
+
}
|
790
|
+
|
791
|
+
void
|
792
|
+
lsm_svg_filter_surface_convolve_matrix (LsmSvgFilterSurface *input, LsmSvgFilterSurface *output,
|
793
|
+
unsigned order_x, unsigned order_y, unsigned n_values, const double *values,
|
794
|
+
double divisor, double bias, unsigned target_x, unsigned target_y,
|
795
|
+
LsmSvgEdgeMode edge_mode, gboolean preserve_alpha)
|
796
|
+
{
|
797
|
+
cairo_t *cairo;
|
798
|
+
int ch;
|
799
|
+
gint x, y, x1, x2, y1, y2;
|
800
|
+
gint width, height;
|
801
|
+
gint rowstride;
|
802
|
+
guchar *in_pixels;
|
803
|
+
guchar *output_pixels;
|
804
|
+
double kval, sum;
|
805
|
+
guchar sval;
|
806
|
+
int sx, sy, kx, ky;
|
807
|
+
double dx = 1.0, dy = 1.0;
|
808
|
+
int umch, i, j;
|
809
|
+
gint tempresult;
|
810
|
+
|
811
|
+
g_return_if_fail (input != NULL);
|
812
|
+
g_return_if_fail (output != NULL);
|
813
|
+
g_return_if_fail (values != NULL || n_values < 1);
|
814
|
+
|
815
|
+
if (divisor <= 0.0)
|
816
|
+
return;
|
817
|
+
|
818
|
+
width = cairo_image_surface_get_width (input->surface);
|
819
|
+
height = cairo_image_surface_get_height (input->surface);
|
820
|
+
|
821
|
+
if (width != cairo_image_surface_get_width (output->surface) ||
|
822
|
+
height != cairo_image_surface_get_height (output->surface))
|
823
|
+
return;
|
824
|
+
|
825
|
+
if (height < 1 || width < 1)
|
826
|
+
return;
|
827
|
+
|
828
|
+
if (order_y * order_x != n_values)
|
829
|
+
return;
|
830
|
+
|
831
|
+
if (target_x > order_x || target_y > order_y)
|
832
|
+
return;
|
833
|
+
|
834
|
+
x1 = CLAMP (input->subregion.x, 0, width);
|
835
|
+
x2 = CLAMP (input->subregion.x + input->subregion.width, 0, width);
|
836
|
+
y1 = CLAMP (input->subregion.y, 0, height);
|
837
|
+
y2 = CLAMP (input->subregion.y + input->subregion.height, 0, height);
|
838
|
+
|
839
|
+
cairo_surface_flush (input->surface);
|
840
|
+
cairo = cairo_create (output->surface);
|
841
|
+
|
842
|
+
in_pixels = cairo_image_surface_get_data (input->surface);
|
843
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
844
|
+
rowstride = cairo_image_surface_get_stride (input->surface);
|
845
|
+
|
846
|
+
for (y = y1; y < y2; y++)
|
847
|
+
for (x = x1; x < x2; x++) {
|
848
|
+
for (umch = 0; umch < 3 + !preserve_alpha; umch++) {
|
849
|
+
ch = channelmap[umch];
|
850
|
+
sum = 0;
|
851
|
+
for (i = 0; i < order_y; i++)
|
852
|
+
for (j = 0; j < order_x; j++) {
|
853
|
+
int alpha;
|
854
|
+
sx = x - target_x + j * dx;
|
855
|
+
sy = y - target_y + i * dy;
|
856
|
+
if (edge_mode == LSM_SVG_EDGE_MODE_DUPLICATE) {
|
857
|
+
if (sx < x1)
|
858
|
+
sx = x1;
|
859
|
+
if (sx >= x2)
|
860
|
+
sx = x2 - 1;
|
861
|
+
if (sy < y1)
|
862
|
+
sy = y1;
|
863
|
+
if (sy >= y2)
|
864
|
+
sy = y2 - 1;
|
865
|
+
} else if (edge_mode == LSM_SVG_EDGE_MODE_WRAP) {
|
866
|
+
if (sx < x1 || (sx >= x2))
|
867
|
+
sx = x1 + (sx - x1) % (x2 - x1);
|
868
|
+
if (sy < y1 || (sy >= y2))
|
869
|
+
sy = y1 + (sy - y1) % (y2 - y1);
|
870
|
+
} else if (edge_mode == LSM_SVG_EDGE_MODE_NONE)
|
871
|
+
if (sx < x1 || (sx >= x2) ||
|
872
|
+
sy < y1 || (sy >= y2))
|
873
|
+
continue;
|
874
|
+
|
875
|
+
kx = order_x - j - 1;
|
876
|
+
ky = order_y - i - 1;
|
877
|
+
alpha = in_pixels[4 * sx + sy * rowstride + 3];
|
878
|
+
if (ch == 3)
|
879
|
+
sval = alpha;
|
880
|
+
else if (alpha)
|
881
|
+
sval = in_pixels[4 * sx + sy * rowstride + ch] * 255 / alpha;
|
882
|
+
else
|
883
|
+
sval = 0;
|
884
|
+
kval = values[kx + ky * order_x];
|
885
|
+
sum += (double) sval *kval;
|
886
|
+
}
|
887
|
+
tempresult = sum / divisor + bias;
|
888
|
+
|
889
|
+
if (tempresult > 255)
|
890
|
+
tempresult = 255;
|
891
|
+
if (tempresult < 0)
|
892
|
+
tempresult = 0;
|
893
|
+
|
894
|
+
output_pixels[4 * x + y * rowstride + ch] = tempresult;
|
895
|
+
}
|
896
|
+
if (preserve_alpha)
|
897
|
+
output_pixels[4 * x + y * rowstride + channelmap[3]] =
|
898
|
+
in_pixels[4 * x + y * rowstride + channelmap[3]];
|
899
|
+
for (umch = 0; umch < 3; umch++) {
|
900
|
+
ch = channelmap[umch];
|
901
|
+
output_pixels[4 * x + y * rowstride + ch] =
|
902
|
+
output_pixels[4 * x + y * rowstride + ch] *
|
903
|
+
output_pixels[4 * x + y * rowstride + channelmap[3]] / 255;
|
904
|
+
}
|
905
|
+
}
|
906
|
+
|
907
|
+
cairo_surface_mark_dirty (output->surface);
|
908
|
+
|
909
|
+
cairo_destroy (cairo);
|
910
|
+
}
|
911
|
+
|
912
|
+
static guchar
|
913
|
+
_get_interp_pixel (guchar * src, gdouble ox, gdouble oy, guchar ch,
|
914
|
+
gint x1, gint x2, gint y1, gint y2,
|
915
|
+
guint rowstride)
|
916
|
+
{
|
917
|
+
double xmod, ymod;
|
918
|
+
double dist1, dist2, dist3, dist4;
|
919
|
+
double c, c1, c2, c3, c4;
|
920
|
+
double fox, foy, cox, coy;
|
921
|
+
|
922
|
+
xmod = fmod (ox, 1.0);
|
923
|
+
ymod = fmod (oy, 1.0);
|
924
|
+
|
925
|
+
dist1 = (1 - xmod) * (1 - ymod);
|
926
|
+
dist2 = (xmod) * (1 - ymod);
|
927
|
+
dist3 = (xmod) * (ymod);
|
928
|
+
dist4 = (1 - xmod) * (ymod);
|
929
|
+
|
930
|
+
fox = floor (ox);
|
931
|
+
foy = floor (oy);
|
932
|
+
cox = ceil (ox);
|
933
|
+
coy = ceil (oy);
|
934
|
+
|
935
|
+
if (fox <= x1 || fox >= x2 ||
|
936
|
+
foy <= y1 || foy >= y2)
|
937
|
+
c1 = 0;
|
938
|
+
else
|
939
|
+
c1 = src[(guint) foy * rowstride + (guint) fox * 4 + ch];
|
940
|
+
|
941
|
+
if (cox <= x1 || cox >= x2 ||
|
942
|
+
foy <= y1 || foy >= y2)
|
943
|
+
c2 = 0;
|
944
|
+
else
|
945
|
+
c2 = src[(guint) foy * rowstride + (guint) cox * 4 + ch];
|
946
|
+
|
947
|
+
if (cox <= x1 || cox >= x2 ||
|
948
|
+
coy <= y1 || coy >= y2)
|
949
|
+
c3 = 0;
|
950
|
+
else
|
951
|
+
c3 = src[(guint) coy * rowstride + (guint) cox * 4 + ch];
|
952
|
+
|
953
|
+
if (fox <= x1 || fox >= x2 ||
|
954
|
+
coy <= y1 || coy >= y2)
|
955
|
+
c4 = 0;
|
956
|
+
else
|
957
|
+
c4 = src[(guint) coy * rowstride + (guint) fox * 4 + ch];
|
958
|
+
|
959
|
+
c = (c1 * dist1 + c2 * dist2 + c3 * dist3 + c4 * dist4) / (dist1 + dist2 + dist3 + dist4);
|
960
|
+
|
961
|
+
return (guchar) c;
|
962
|
+
}
|
963
|
+
|
964
|
+
void
|
965
|
+
lsm_svg_filter_surface_displacement_map (LsmSvgFilterSurface *input_1,
|
966
|
+
LsmSvgFilterSurface *input_2,
|
967
|
+
LsmSvgFilterSurface *output,
|
968
|
+
double x_scale,
|
969
|
+
double y_scale,
|
970
|
+
LsmSvgChannelSelector x_channel_selector,
|
971
|
+
LsmSvgChannelSelector y_channel_selector)
|
972
|
+
{
|
973
|
+
guchar ch, xch, ych;
|
974
|
+
gint x, y, x1, x2, y1, y2;
|
975
|
+
double ox, oy;
|
976
|
+
gint rowstride, height, width;
|
977
|
+
guchar *in_pixels;
|
978
|
+
guchar *in2_pixels;
|
979
|
+
guchar *output_pixels;
|
980
|
+
cairo_t *cairo;
|
981
|
+
|
982
|
+
g_return_if_fail (input_1 != NULL);
|
983
|
+
g_return_if_fail (input_2 != NULL);
|
984
|
+
g_return_if_fail (output != NULL);
|
985
|
+
|
986
|
+
height = cairo_image_surface_get_height (input_1->surface);
|
987
|
+
width = cairo_image_surface_get_width (input_1->surface);
|
988
|
+
|
989
|
+
if (width != cairo_image_surface_get_width (input_2->surface) ||
|
990
|
+
height != cairo_image_surface_get_height (input_2->surface))
|
991
|
+
return;
|
992
|
+
|
993
|
+
if (width != cairo_image_surface_get_width (output->surface) ||
|
994
|
+
height != cairo_image_surface_get_height (output->surface))
|
995
|
+
return;
|
996
|
+
|
997
|
+
cairo_surface_flush (input_1->surface);
|
998
|
+
cairo_surface_flush (input_2->surface);
|
999
|
+
|
1000
|
+
cairo = cairo_create (output->surface);
|
1001
|
+
|
1002
|
+
in_pixels = cairo_image_surface_get_data (input_1->surface);
|
1003
|
+
in2_pixels = cairo_image_surface_get_data (input_2->surface);
|
1004
|
+
|
1005
|
+
rowstride = cairo_image_surface_get_stride (input_1->surface);
|
1006
|
+
|
1007
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
1008
|
+
|
1009
|
+
switch (x_channel_selector) {
|
1010
|
+
case LSM_SVG_CHANNEL_SELECTOR_RED:
|
1011
|
+
xch = 0;
|
1012
|
+
break;
|
1013
|
+
case LSM_SVG_CHANNEL_SELECTOR_GREEN:
|
1014
|
+
xch = 1;
|
1015
|
+
break;
|
1016
|
+
case LSM_SVG_CHANNEL_SELECTOR_BLUE:
|
1017
|
+
xch = 2;
|
1018
|
+
break;
|
1019
|
+
case LSM_SVG_CHANNEL_SELECTOR_ALPHA:
|
1020
|
+
xch = 3;
|
1021
|
+
break;
|
1022
|
+
default:
|
1023
|
+
xch = 4;
|
1024
|
+
};
|
1025
|
+
|
1026
|
+
switch (y_channel_selector) {
|
1027
|
+
case LSM_SVG_CHANNEL_SELECTOR_RED:
|
1028
|
+
ych = 0;
|
1029
|
+
break;
|
1030
|
+
case LSM_SVG_CHANNEL_SELECTOR_GREEN:
|
1031
|
+
ych = 1;
|
1032
|
+
break;
|
1033
|
+
case LSM_SVG_CHANNEL_SELECTOR_BLUE:
|
1034
|
+
ych = 2;
|
1035
|
+
break;
|
1036
|
+
case LSM_SVG_CHANNEL_SELECTOR_ALPHA:
|
1037
|
+
ych = 3;
|
1038
|
+
break;
|
1039
|
+
default:
|
1040
|
+
ych = 4;
|
1041
|
+
};
|
1042
|
+
|
1043
|
+
x1 = CLAMP (input_1->subregion.x, 0, width);
|
1044
|
+
x2 = CLAMP (input_1->subregion.x + input_1->subregion.width, 0, width);
|
1045
|
+
y1 = CLAMP (input_1->subregion.y, 0, height);
|
1046
|
+
y2 = CLAMP (input_1->subregion.y + input_1->subregion.height, 0, height);
|
1047
|
+
|
1048
|
+
xch = channelmap[xch];
|
1049
|
+
ych = channelmap[ych];
|
1050
|
+
for (y = y1; y < y2; y++)
|
1051
|
+
for (x = x1; x < x2; x++) {
|
1052
|
+
if (xch != 4)
|
1053
|
+
ox = x + x_scale *
|
1054
|
+
((double) in2_pixels[y * rowstride + x * 4 + xch] / 255.0 - 0.5);
|
1055
|
+
else
|
1056
|
+
ox = x;
|
1057
|
+
|
1058
|
+
if (ych != 4)
|
1059
|
+
oy = y + y_scale *
|
1060
|
+
((double) in2_pixels[y * rowstride + x * 4 + ych] / 255.0 - 0.5);
|
1061
|
+
else
|
1062
|
+
oy = y;
|
1063
|
+
|
1064
|
+
for (ch = 0; ch < 4; ch++) {
|
1065
|
+
output_pixels[y * rowstride + x * 4 + ch] =
|
1066
|
+
_get_interp_pixel (in_pixels, ox, oy, ch, x1, x2, y1, y2, rowstride);
|
1067
|
+
}
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
cairo_surface_mark_dirty (output->surface);
|
1071
|
+
|
1072
|
+
cairo_destroy (cairo);
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
void
|
1076
|
+
lsm_svg_filter_surface_specular_lighting (LsmSvgFilterSurface *output,
|
1077
|
+
double surface_scale, double specular_constant, double specular_exponent,
|
1078
|
+
double dx, double dy)
|
1079
|
+
{
|
1080
|
+
cairo_t *cairo;
|
1081
|
+
int width, height;
|
1082
|
+
#if 0
|
1083
|
+
guchar *output_pixels;
|
1084
|
+
gint rowstride;
|
1085
|
+
gint x1, x2, y1, y2;
|
1086
|
+
#endif
|
1087
|
+
|
1088
|
+
g_return_if_fail (output != NULL);
|
1089
|
+
|
1090
|
+
width = cairo_image_surface_get_width (output->surface);
|
1091
|
+
height = cairo_image_surface_get_height (output->surface);
|
1092
|
+
|
1093
|
+
if (height < 1 || width < 1)
|
1094
|
+
return;
|
1095
|
+
|
1096
|
+
cairo = cairo_create (output->surface);
|
1097
|
+
|
1098
|
+
#if 0
|
1099
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
1100
|
+
rowstride = cairo_image_surface_get_stride (output->surface);
|
1101
|
+
|
1102
|
+
x1 = CLAMP (output->subregion.x, 0, width);
|
1103
|
+
x2 = CLAMP (output->subregion.x + output->subregion.width, 0, width);
|
1104
|
+
y1 = CLAMP (output->subregion.y, 0, height);
|
1105
|
+
y2 = CLAMP (output->subregion.y + output->subregion.height, 0, height);
|
1106
|
+
#endif
|
1107
|
+
|
1108
|
+
cairo_surface_mark_dirty (output->surface);
|
1109
|
+
|
1110
|
+
cairo_destroy (cairo);
|
1111
|
+
}
|
1112
|
+
|
1113
|
+
void
|
1114
|
+
lsm_svg_filter_surface_image (LsmSvgFilterSurface *output, GdkPixbuf *pixbuf,
|
1115
|
+
LsmSvgPreserveAspectRatio preserve_aspect_ratio)
|
1116
|
+
{
|
1117
|
+
cairo_t *cairo;
|
1118
|
+
int width, height;
|
1119
|
+
double zoom_x, zoom_y;
|
1120
|
+
|
1121
|
+
g_return_if_fail (output != NULL);
|
1122
|
+
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
|
1123
|
+
|
1124
|
+
if (output->subregion.width < 1 ||
|
1125
|
+
output->subregion.height < 1)
|
1126
|
+
return;
|
1127
|
+
|
1128
|
+
/* TODO Implement preserve_aspect_ratio support */
|
1129
|
+
|
1130
|
+
width = gdk_pixbuf_get_height (pixbuf);
|
1131
|
+
height = gdk_pixbuf_get_width (pixbuf);
|
1132
|
+
|
1133
|
+
if (height < 1 || width < 1)
|
1134
|
+
return;
|
1135
|
+
|
1136
|
+
zoom_x = (double) output->subregion.width / (double) width;
|
1137
|
+
zoom_y = (double) output->subregion.height / (double) height;
|
1138
|
+
|
1139
|
+
cairo = cairo_create (output->surface);
|
1140
|
+
|
1141
|
+
cairo_translate (cairo, output->subregion.x, output->subregion.y);
|
1142
|
+
cairo_scale (cairo, zoom_x, zoom_y);
|
1143
|
+
lsm_cairo_set_source_pixbuf (cairo, pixbuf, 0, 0);
|
1144
|
+
cairo_paint (cairo);
|
1145
|
+
|
1146
|
+
cairo_destroy (cairo);
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
void
|
1150
|
+
lsm_svg_filter_surface_morphology (LsmSvgFilterSurface *input, LsmSvgFilterSurface *output,
|
1151
|
+
LsmSvgMorphologyOperator op, double rx, double ry)
|
1152
|
+
{
|
1153
|
+
cairo_t *cairo;
|
1154
|
+
int i, j;
|
1155
|
+
int ch, extreme;
|
1156
|
+
gint x, y, x1, x2, y1, y2;
|
1157
|
+
gint width, height;
|
1158
|
+
gint rowstride;
|
1159
|
+
guchar *in_pixels;
|
1160
|
+
guchar *output_pixels;
|
1161
|
+
gint kx, ky;
|
1162
|
+
guchar val;
|
1163
|
+
|
1164
|
+
g_return_if_fail (input != NULL);
|
1165
|
+
g_return_if_fail (output != NULL);
|
1166
|
+
|
1167
|
+
width = cairo_image_surface_get_width (input->surface);
|
1168
|
+
height = cairo_image_surface_get_height (input->surface);
|
1169
|
+
|
1170
|
+
if (width != cairo_image_surface_get_width (output->surface) ||
|
1171
|
+
height != cairo_image_surface_get_height (output->surface))
|
1172
|
+
return;
|
1173
|
+
|
1174
|
+
if (height < 1 || width < 1)
|
1175
|
+
return;
|
1176
|
+
|
1177
|
+
kx = rx;
|
1178
|
+
ky = ry;
|
1179
|
+
|
1180
|
+
if (kx < 1 && ky < 1)
|
1181
|
+
return;
|
1182
|
+
|
1183
|
+
cairo_surface_flush (input->surface);
|
1184
|
+
cairo = cairo_create (output->surface);
|
1185
|
+
|
1186
|
+
in_pixels = cairo_image_surface_get_data (input->surface);
|
1187
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
1188
|
+
rowstride = cairo_image_surface_get_stride (input->surface);
|
1189
|
+
|
1190
|
+
x1 = CLAMP (input->subregion.x, 0, width);
|
1191
|
+
x2 = CLAMP (input->subregion.x + input->subregion.width, 0, width);
|
1192
|
+
y1 = CLAMP (input->subregion.y, 0, height);
|
1193
|
+
y2 = CLAMP (input->subregion.y + input->subregion.height, 0, height);
|
1194
|
+
|
1195
|
+
for (y = y1; y < y2; y++)
|
1196
|
+
for (x = x1; x < x2; x++)
|
1197
|
+
for (ch = 0; ch < 4; ch++) {
|
1198
|
+
if (op == LSM_SVG_MORPHOLOGY_OPERATOR_ERODE)
|
1199
|
+
extreme = 255;
|
1200
|
+
else
|
1201
|
+
extreme = 0;
|
1202
|
+
for (i = -ky; i < ky + 1; i++)
|
1203
|
+
for (j = -kx; j < kx + 1; j++) {
|
1204
|
+
if (y + i >= height || y + i < 0 || x + j >= width || x + j < 0)
|
1205
|
+
continue;
|
1206
|
+
|
1207
|
+
val = in_pixels[(y + i) * rowstride + (x + j) * 4 + ch];
|
1208
|
+
|
1209
|
+
|
1210
|
+
if (op == LSM_SVG_MORPHOLOGY_OPERATOR_ERODE) {
|
1211
|
+
if (extreme > val)
|
1212
|
+
extreme = val;
|
1213
|
+
} else {
|
1214
|
+
if (extreme < val)
|
1215
|
+
extreme = val;
|
1216
|
+
}
|
1217
|
+
|
1218
|
+
}
|
1219
|
+
output_pixels[y * rowstride + x * 4 + ch] = extreme;
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
cairo_surface_mark_dirty (output->surface);
|
1223
|
+
|
1224
|
+
cairo_destroy (cairo);
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
/* Produces results in the range [1, 2**31 - 2].
|
1228
|
+
Algorithm is: r = (a * r) mod m
|
1229
|
+
where a = 16807 and m = 2**31 - 1 = 2147483647
|
1230
|
+
See [Park & Miller], CACM vol. 31 no. 10 p. 1195, Oct. 1988
|
1231
|
+
To test: the algorithm should produce the result 1043618065
|
1232
|
+
as the 10,000th generated number if the original seed is 1.
|
1233
|
+
*/
|
1234
|
+
|
1235
|
+
#define LSM_SVG_TURBULENCE_RAND_m 2147483647 /* 2**31 - 1 */
|
1236
|
+
#define LSM_SVG_TURBULENCE_RAND_a 16807 /* 7**5; primitive root of m */
|
1237
|
+
#define LSM_SVG_TURBULENCE_RAND_q 127773 /* m / a */
|
1238
|
+
#define LSM_SVG_TURBULENCE_RAND_r 2836 /* m % a */
|
1239
|
+
#define LSM_SVG_TURBULENCE_BSize 0x100
|
1240
|
+
#define LSM_SVG_TURBULENCE_BM 0xff
|
1241
|
+
#define LSM_SVG_TURBULENCE_PerlinN 0x1000
|
1242
|
+
#define LSM_SVG_TURBULENCE_NP 12 /* 2^PerlinN */
|
1243
|
+
#define LSM_SVG_TURBULENCE_NM 0xfff
|
1244
|
+
|
1245
|
+
typedef struct {
|
1246
|
+
double base_frequency_x;
|
1247
|
+
double base_frequency_y;
|
1248
|
+
int n_octaves;
|
1249
|
+
double seed;
|
1250
|
+
LsmSvgStitchTiles stitch_tiles;
|
1251
|
+
LsmSvgTurbulenceType type;
|
1252
|
+
|
1253
|
+
int uLatticeSelector[LSM_SVG_TURBULENCE_BSize + LSM_SVG_TURBULENCE_BSize + 2];
|
1254
|
+
double fGradient[4][LSM_SVG_TURBULENCE_BSize + LSM_SVG_TURBULENCE_BSize + 2][2];
|
1255
|
+
} LsmSvgTurbulence;
|
1256
|
+
|
1257
|
+
typedef struct {
|
1258
|
+
int nWidth; /* How much to subtract to wrap for stitching. */
|
1259
|
+
int nHeight;
|
1260
|
+
int nWrapX; /* Minimum value to wrap. */
|
1261
|
+
int nWrapY;
|
1262
|
+
} LsmSvgTurbulenceStitchInfo;
|
1263
|
+
|
1264
|
+
static long
|
1265
|
+
_turbulence_setup_seed (int lSeed)
|
1266
|
+
{
|
1267
|
+
if (lSeed <= 0)
|
1268
|
+
lSeed = -(lSeed % (LSM_SVG_TURBULENCE_RAND_m - 1)) + 1;
|
1269
|
+
if (lSeed > LSM_SVG_TURBULENCE_RAND_m - 1)
|
1270
|
+
lSeed = LSM_SVG_TURBULENCE_RAND_m - 1;
|
1271
|
+
return lSeed;
|
1272
|
+
}
|
1273
|
+
|
1274
|
+
static long
|
1275
|
+
_turbulence_random (int lSeed)
|
1276
|
+
{
|
1277
|
+
long result;
|
1278
|
+
|
1279
|
+
result =
|
1280
|
+
LSM_SVG_TURBULENCE_RAND_a * (lSeed % LSM_SVG_TURBULENCE_RAND_q) -
|
1281
|
+
LSM_SVG_TURBULENCE_RAND_r * (lSeed / LSM_SVG_TURBULENCE_RAND_q);
|
1282
|
+
if (result <= 0)
|
1283
|
+
result += LSM_SVG_TURBULENCE_RAND_m;
|
1284
|
+
return result;
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
static void
|
1288
|
+
_turbulence_init (LsmSvgTurbulence *turbulence)
|
1289
|
+
{
|
1290
|
+
double s;
|
1291
|
+
int i, j, k, lSeed;
|
1292
|
+
|
1293
|
+
lSeed = _turbulence_setup_seed (turbulence->seed);
|
1294
|
+
for (k = 0; k < 4; k++) {
|
1295
|
+
for (i = 0; i < LSM_SVG_TURBULENCE_BSize; i++) {
|
1296
|
+
turbulence->uLatticeSelector[i] = i;
|
1297
|
+
for (j = 0; j < 2; j++)
|
1298
|
+
turbulence->fGradient[k][i][j] =
|
1299
|
+
(double) (((lSeed =
|
1300
|
+
_turbulence_random (lSeed)) % (LSM_SVG_TURBULENCE_BSize +
|
1301
|
+
LSM_SVG_TURBULENCE_BSize)) -
|
1302
|
+
LSM_SVG_TURBULENCE_BSize) / LSM_SVG_TURBULENCE_BSize;
|
1303
|
+
s = (double) (sqrt (turbulence->fGradient[k][i][0] * turbulence->fGradient[k][i][0] +
|
1304
|
+
turbulence->fGradient[k][i][1] * turbulence->fGradient[k][i][1]));
|
1305
|
+
turbulence->fGradient[k][i][0] /= s;
|
1306
|
+
turbulence->fGradient[k][i][1] /= s;
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
while (--i) {
|
1311
|
+
k = turbulence->uLatticeSelector[i];
|
1312
|
+
turbulence->uLatticeSelector[i] = turbulence->uLatticeSelector[j =
|
1313
|
+
(lSeed = _turbulence_random (lSeed)) % LSM_SVG_TURBULENCE_BSize];
|
1314
|
+
turbulence->uLatticeSelector[j] = k;
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
for (i = 0; i < LSM_SVG_TURBULENCE_BSize + 2; i++) {
|
1318
|
+
turbulence->uLatticeSelector[LSM_SVG_TURBULENCE_BSize + i] = turbulence->uLatticeSelector[i];
|
1319
|
+
for (k = 0; k < 4; k++)
|
1320
|
+
for (j = 0; j < 2; j++)
|
1321
|
+
turbulence->fGradient[k][LSM_SVG_TURBULENCE_BSize + i][j] = turbulence->fGradient[k][i][j];
|
1322
|
+
}
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
#define _turbulence_s_curve(t) ( t * t * (3. - 2. * t) )
|
1326
|
+
#define _turbulence_lerp(t, a, b) ( a + t * (b - a) )
|
1327
|
+
|
1328
|
+
static double
|
1329
|
+
_turbulence_noise2 (LsmSvgTurbulence * turbulence,
|
1330
|
+
int nColorChannel, double vec[2], LsmSvgTurbulenceStitchInfo *pStitchInfo)
|
1331
|
+
{
|
1332
|
+
int bx0, bx1, by0, by1, b00, b10, b01, b11;
|
1333
|
+
double rx0, rx1, ry0, ry1, *q, sx, sy, a, b, t, u, v;
|
1334
|
+
register int i, j;
|
1335
|
+
|
1336
|
+
t = vec[0] + LSM_SVG_TURBULENCE_PerlinN;
|
1337
|
+
bx0 = (int) t;
|
1338
|
+
bx1 = bx0 + 1;
|
1339
|
+
rx0 = t - (int) t;
|
1340
|
+
rx1 = rx0 - 1.0f;
|
1341
|
+
t = vec[1] + LSM_SVG_TURBULENCE_PerlinN;
|
1342
|
+
by0 = (int) t;
|
1343
|
+
by1 = by0 + 1;
|
1344
|
+
ry0 = t - (int) t;
|
1345
|
+
ry1 = ry0 - 1.0f;
|
1346
|
+
|
1347
|
+
/* If stitching, adjust lattice points accordingly. */
|
1348
|
+
if (pStitchInfo != NULL) {
|
1349
|
+
if (bx0 >= pStitchInfo->nWrapX)
|
1350
|
+
bx0 -= pStitchInfo->nWidth;
|
1351
|
+
if (bx1 >= pStitchInfo->nWrapX)
|
1352
|
+
bx1 -= pStitchInfo->nWidth;
|
1353
|
+
if (by0 >= pStitchInfo->nWrapY)
|
1354
|
+
by0 -= pStitchInfo->nHeight;
|
1355
|
+
if (by1 >= pStitchInfo->nWrapY)
|
1356
|
+
by1 -= pStitchInfo->nHeight;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
bx0 &= LSM_SVG_TURBULENCE_BM;
|
1360
|
+
bx1 &= LSM_SVG_TURBULENCE_BM;
|
1361
|
+
by0 &= LSM_SVG_TURBULENCE_BM;
|
1362
|
+
by1 &= LSM_SVG_TURBULENCE_BM;
|
1363
|
+
i = turbulence->uLatticeSelector[bx0];
|
1364
|
+
j = turbulence->uLatticeSelector[bx1];
|
1365
|
+
b00 = turbulence->uLatticeSelector[i + by0];
|
1366
|
+
b10 = turbulence->uLatticeSelector[j + by0];
|
1367
|
+
b01 = turbulence->uLatticeSelector[i + by1];
|
1368
|
+
b11 = turbulence->uLatticeSelector[j + by1];
|
1369
|
+
sx = (double) (_turbulence_s_curve (rx0));
|
1370
|
+
sy = (double) (_turbulence_s_curve (ry0));
|
1371
|
+
q = turbulence->fGradient[nColorChannel][b00];
|
1372
|
+
u = rx0 * q[0] + ry0 * q[1];
|
1373
|
+
q = turbulence->fGradient[nColorChannel][b10];
|
1374
|
+
v = rx1 * q[0] + ry0 * q[1];
|
1375
|
+
a = _turbulence_lerp (sx, u, v);
|
1376
|
+
q = turbulence->fGradient[nColorChannel][b01];
|
1377
|
+
u = rx0 * q[0] + ry1 * q[1];
|
1378
|
+
q = turbulence->fGradient[nColorChannel][b11];
|
1379
|
+
v = rx1 * q[0] + ry1 * q[1];
|
1380
|
+
b = _turbulence_lerp (sx, u, v);
|
1381
|
+
|
1382
|
+
return _turbulence_lerp (sy, a, b);
|
1383
|
+
}
|
1384
|
+
|
1385
|
+
static double
|
1386
|
+
_turbulence (LsmSvgTurbulence * turbulence,
|
1387
|
+
int nColorChannel, double *point,
|
1388
|
+
double fTileX, double fTileY, double fTileWidth, double fTileHeight)
|
1389
|
+
{
|
1390
|
+
LsmSvgTurbulenceStitchInfo stitch;
|
1391
|
+
LsmSvgTurbulenceStitchInfo *pStitchInfo = NULL; /* Not stitching when NULL. */
|
1392
|
+
|
1393
|
+
double fSum = 0.0f, vec[2], ratio = 1.;
|
1394
|
+
int nOctave;
|
1395
|
+
|
1396
|
+
/* Adjust the base frequencies if necessary for stitching. */
|
1397
|
+
if (turbulence->stitch_tiles == LSM_SVG_STITCH_TILES_STITCH) {
|
1398
|
+
/* When stitching tiled turbulence, the frequencies must be adjusted
|
1399
|
+
so that the tile borders will be continuous. */
|
1400
|
+
if (turbulence->base_frequency_x != 0.0) {
|
1401
|
+
double fLoFreq = (double) (floor (fTileWidth * turbulence->base_frequency_x)) / fTileWidth;
|
1402
|
+
double fHiFreq = (double) (ceil (fTileWidth * turbulence->base_frequency_x)) / fTileWidth;
|
1403
|
+
if (turbulence->base_frequency_x / fLoFreq < fHiFreq / turbulence->base_frequency_x)
|
1404
|
+
turbulence->base_frequency_x = fLoFreq;
|
1405
|
+
else
|
1406
|
+
turbulence->base_frequency_x = fHiFreq;
|
1407
|
+
}
|
1408
|
+
|
1409
|
+
if (turbulence->base_frequency_y != 0.0) {
|
1410
|
+
double fLoFreq = (double) (floor (fTileHeight * turbulence->base_frequency_y)) / fTileHeight;
|
1411
|
+
double fHiFreq = (double) (ceil (fTileHeight * turbulence->base_frequency_y)) / fTileHeight;
|
1412
|
+
if (turbulence->base_frequency_y / fLoFreq < fHiFreq / turbulence->base_frequency_y)
|
1413
|
+
turbulence->base_frequency_y = fLoFreq;
|
1414
|
+
else
|
1415
|
+
turbulence->base_frequency_y = fHiFreq;
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
/* Set up initial stitch values. */
|
1419
|
+
pStitchInfo = &stitch;
|
1420
|
+
stitch.nWidth = (int) (fTileWidth * turbulence->base_frequency_x + 0.5f);
|
1421
|
+
stitch.nWrapX = fTileX * turbulence->base_frequency_x + LSM_SVG_TURBULENCE_PerlinN + stitch.nWidth;
|
1422
|
+
stitch.nHeight = (int) (fTileHeight * turbulence->base_frequency_y + 0.5f);
|
1423
|
+
stitch.nWrapY = fTileY * turbulence->base_frequency_y + LSM_SVG_TURBULENCE_PerlinN + stitch.nHeight;
|
1424
|
+
}
|
1425
|
+
|
1426
|
+
vec[0] = point[0] * turbulence->base_frequency_x;
|
1427
|
+
vec[1] = point[1] * turbulence->base_frequency_y;
|
1428
|
+
|
1429
|
+
for (nOctave = 0; nOctave < turbulence->n_octaves; nOctave++) {
|
1430
|
+
if (turbulence->type == LSM_SVG_TURBULENCE_TYPE_FRACTAL_NOISE)
|
1431
|
+
fSum +=
|
1432
|
+
(double) (_turbulence_noise2 (turbulence, nColorChannel, vec, pStitchInfo) / ratio);
|
1433
|
+
else
|
1434
|
+
fSum +=
|
1435
|
+
(double) (fabs (_turbulence_noise2 (turbulence, nColorChannel, vec, pStitchInfo)) /
|
1436
|
+
ratio);
|
1437
|
+
|
1438
|
+
vec[0] *= 2;
|
1439
|
+
vec[1] *= 2;
|
1440
|
+
ratio *= 2;
|
1441
|
+
|
1442
|
+
if (pStitchInfo != NULL) {
|
1443
|
+
/* Update stitch values. Subtracting PerlinN before the multiplication and
|
1444
|
+
adding it afterward simplifies to subtracting it once. */
|
1445
|
+
stitch.nWidth *= 2;
|
1446
|
+
stitch.nWrapX = 2 * stitch.nWrapX - LSM_SVG_TURBULENCE_PerlinN;
|
1447
|
+
stitch.nHeight *= 2;
|
1448
|
+
stitch.nWrapY = 2 * stitch.nWrapY - LSM_SVG_TURBULENCE_PerlinN;
|
1449
|
+
}
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
return fSum;
|
1453
|
+
}
|
1454
|
+
|
1455
|
+
void
|
1456
|
+
lsm_svg_filter_surface_turbulence (LsmSvgFilterSurface *output,
|
1457
|
+
double base_frequency_x, double base_frequency_y,
|
1458
|
+
int n_octaves, double seed,
|
1459
|
+
LsmSvgStitchTiles stitch_tiles, LsmSvgTurbulenceType type,
|
1460
|
+
const cairo_matrix_t *transform)
|
1461
|
+
{
|
1462
|
+
LsmSvgTurbulence turbulence;
|
1463
|
+
cairo_t *cairo;
|
1464
|
+
gint x, y, x1, x2, y1, y2;
|
1465
|
+
gint width, height, tileWidth, tileHeight;
|
1466
|
+
gint rowstride;
|
1467
|
+
guchar *output_pixels;
|
1468
|
+
cairo_matrix_t affine;
|
1469
|
+
|
1470
|
+
g_return_if_fail (output != NULL);
|
1471
|
+
g_return_if_fail (transform != NULL);
|
1472
|
+
|
1473
|
+
affine = *transform;
|
1474
|
+
if (cairo_matrix_invert (&affine) != CAIRO_STATUS_SUCCESS)
|
1475
|
+
return;
|
1476
|
+
|
1477
|
+
width = cairo_image_surface_get_width (output->surface);
|
1478
|
+
height = cairo_image_surface_get_height (output->surface);
|
1479
|
+
|
1480
|
+
if (height < 1 || width < 1)
|
1481
|
+
return;
|
1482
|
+
|
1483
|
+
cairo = cairo_create (output->surface);
|
1484
|
+
|
1485
|
+
output_pixels = cairo_image_surface_get_data (output->surface);
|
1486
|
+
rowstride = cairo_image_surface_get_stride (output->surface);
|
1487
|
+
|
1488
|
+
x1 = CLAMP (output->subregion.x, 0, width);
|
1489
|
+
x2 = CLAMP (output->subregion.x + output->subregion.width, 0, width);
|
1490
|
+
y1 = CLAMP (output->subregion.y, 0, height);
|
1491
|
+
y2 = CLAMP (output->subregion.y + output->subregion.height, 0, height);
|
1492
|
+
|
1493
|
+
turbulence.base_frequency_x = base_frequency_x;
|
1494
|
+
turbulence.base_frequency_y = base_frequency_y;
|
1495
|
+
turbulence.n_octaves = n_octaves;
|
1496
|
+
turbulence.seed = seed;
|
1497
|
+
turbulence.stitch_tiles = stitch_tiles;
|
1498
|
+
turbulence.type = type;
|
1499
|
+
|
1500
|
+
_turbulence_init (&turbulence);
|
1501
|
+
|
1502
|
+
tileWidth = x2 - x1;
|
1503
|
+
tileHeight = y2 - y1;
|
1504
|
+
|
1505
|
+
for (y = 0; y < tileHeight; y++) {
|
1506
|
+
for (x = 0; x < tileWidth; x++) {
|
1507
|
+
gint i;
|
1508
|
+
double point[2];
|
1509
|
+
guchar *pixel;
|
1510
|
+
point[0] = affine.xx * (x + x1) + affine.xy * (y + y1) + affine.x0;
|
1511
|
+
point[1] = affine.yx * (x + x1) + affine.yy * (y + y1) + affine.y0;
|
1512
|
+
|
1513
|
+
pixel = output_pixels + 4 * (x + x1) + (y + y1) * rowstride;
|
1514
|
+
|
1515
|
+
for (i = 0; i < 4; i++) {
|
1516
|
+
double cr;
|
1517
|
+
|
1518
|
+
cr = _turbulence (&turbulence, i, point, (double) x, (double) y,
|
1519
|
+
(double) tileWidth, (double) tileHeight);
|
1520
|
+
|
1521
|
+
if (type == LSM_SVG_TURBULENCE_TYPE_FRACTAL_NOISE)
|
1522
|
+
cr = ((cr * 255.) + 255.) / 2.;
|
1523
|
+
else
|
1524
|
+
cr = (cr * 255.);
|
1525
|
+
|
1526
|
+
cr = CLAMP (cr, 0., 255.);
|
1527
|
+
|
1528
|
+
pixel[channelmap[i]] = (guchar) cr;
|
1529
|
+
}
|
1530
|
+
for (i = 0; i < 3; i++)
|
1531
|
+
pixel[channelmap[i]] =
|
1532
|
+
pixel[channelmap[i]] * pixel[channelmap[3]] / 255;
|
1533
|
+
|
1534
|
+
}
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
cairo_surface_mark_dirty (output->surface);
|
1538
|
+
|
1539
|
+
cairo_destroy (cairo);
|
1540
|
+
}
|