@img/sharp-libvips-dev 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/cplusplus/VConnection.cpp +151 -0
- package/cplusplus/VError.cpp +49 -0
- package/cplusplus/VImage.cpp +1548 -0
- package/cplusplus/VInterpolate.cpp +62 -0
- package/cplusplus/VRegion.cpp +27 -0
- package/cplusplus/index.js +1 -0
- package/cplusplus/vips-operators.cpp +3760 -0
- package/include/aom/aom.h +127 -0
- package/include/aom/aom_codec.h +573 -0
- package/include/aom/aom_decoder.h +257 -0
- package/include/aom/aom_encoder.h +1137 -0
- package/include/aom/aom_external_partition.h +452 -0
- package/include/aom/aom_frame_buffer.h +84 -0
- package/include/aom/aom_image.h +448 -0
- package/include/aom/aom_integer.h +68 -0
- package/include/aom/aomcx.h +2112 -0
- package/include/aom/aomdx.h +604 -0
- package/include/archive.h +1212 -0
- package/include/archive_entry.h +723 -0
- package/include/cairo/cairo-deprecated.h +123 -0
- package/include/cairo/cairo-features.h +29 -0
- package/include/cairo/cairo-ft.h +118 -0
- package/include/cairo/cairo-gobject.h +192 -0
- package/include/cairo/cairo-svg.h +130 -0
- package/include/cairo/cairo-version.h +8 -0
- package/include/cairo/cairo.h +3281 -0
- package/include/cgif.h +80 -0
- package/include/expat.h +1064 -0
- package/include/expat_config.h +140 -0
- package/include/expat_external.h +165 -0
- package/include/ffi.h +531 -0
- package/include/ffitarget.h +164 -0
- package/include/fontconfig/fcfreetype.h +59 -0
- package/include/fontconfig/fcprivate.h +134 -0
- package/include/fontconfig/fontconfig.h +1158 -0
- package/include/freetype2/freetype/config/ftconfig.h +51 -0
- package/include/freetype2/freetype/config/ftheader.h +836 -0
- package/include/freetype2/freetype/config/ftmodule.h +21 -0
- package/include/freetype2/freetype/config/ftoption.h +1014 -0
- package/include/freetype2/freetype/config/ftstdlib.h +185 -0
- package/include/freetype2/freetype/config/integer-types.h +250 -0
- package/include/freetype2/freetype/config/mac-support.h +49 -0
- package/include/freetype2/freetype/config/public-macros.h +138 -0
- package/include/freetype2/freetype/freetype.h +5337 -0
- package/include/freetype2/freetype/ftadvanc.h +188 -0
- package/include/freetype2/freetype/ftbbox.h +101 -0
- package/include/freetype2/freetype/ftbdf.h +212 -0
- package/include/freetype2/freetype/ftbitmap.h +329 -0
- package/include/freetype2/freetype/ftbzip2.h +102 -0
- package/include/freetype2/freetype/ftcache.h +1087 -0
- package/include/freetype2/freetype/ftchapters.h +168 -0
- package/include/freetype2/freetype/ftcid.h +167 -0
- package/include/freetype2/freetype/ftcolor.h +1667 -0
- package/include/freetype2/freetype/ftdriver.h +1246 -0
- package/include/freetype2/freetype/fterrdef.h +283 -0
- package/include/freetype2/freetype/fterrors.h +296 -0
- package/include/freetype2/freetype/ftfntfmt.h +93 -0
- package/include/freetype2/freetype/ftgasp.h +143 -0
- package/include/freetype2/freetype/ftglyph.h +750 -0
- package/include/freetype2/freetype/ftgxval.h +354 -0
- package/include/freetype2/freetype/ftgzip.h +151 -0
- package/include/freetype2/freetype/ftimage.h +1284 -0
- package/include/freetype2/freetype/ftincrem.h +348 -0
- package/include/freetype2/freetype/ftlcdfil.h +323 -0
- package/include/freetype2/freetype/ftlist.h +296 -0
- package/include/freetype2/freetype/ftlzw.h +100 -0
- package/include/freetype2/freetype/ftmac.h +289 -0
- package/include/freetype2/freetype/ftmm.h +805 -0
- package/include/freetype2/freetype/ftmodapi.h +807 -0
- package/include/freetype2/freetype/ftmoderr.h +204 -0
- package/include/freetype2/freetype/ftotval.h +206 -0
- package/include/freetype2/freetype/ftoutln.h +588 -0
- package/include/freetype2/freetype/ftparams.h +218 -0
- package/include/freetype2/freetype/ftpfr.h +179 -0
- package/include/freetype2/freetype/ftrender.h +244 -0
- package/include/freetype2/freetype/ftsizes.h +159 -0
- package/include/freetype2/freetype/ftsnames.h +272 -0
- package/include/freetype2/freetype/ftstroke.h +773 -0
- package/include/freetype2/freetype/ftsynth.h +104 -0
- package/include/freetype2/freetype/ftsystem.h +350 -0
- package/include/freetype2/freetype/fttrigon.h +350 -0
- package/include/freetype2/freetype/fttypes.h +617 -0
- package/include/freetype2/freetype/ftwinfnt.h +276 -0
- package/include/freetype2/freetype/otsvg.h +336 -0
- package/include/freetype2/freetype/t1tables.h +793 -0
- package/include/freetype2/freetype/ttnameid.h +1235 -0
- package/include/freetype2/freetype/tttables.h +855 -0
- package/include/freetype2/freetype/tttags.h +124 -0
- package/include/freetype2/ft2build.h +42 -0
- package/include/fribidi/fribidi-arabic.h +81 -0
- package/include/fribidi/fribidi-begindecls.h +3 -0
- package/include/fribidi/fribidi-bidi-types-list.h +96 -0
- package/include/fribidi/fribidi-bidi-types.h +405 -0
- package/include/fribidi/fribidi-bidi.h +142 -0
- package/include/fribidi/fribidi-brackets.h +89 -0
- package/include/fribidi/fribidi-char-sets-list.h +54 -0
- package/include/fribidi/fribidi-char-sets.h +106 -0
- package/include/fribidi/fribidi-common.h +152 -0
- package/include/fribidi/fribidi-config.h +23 -0
- package/include/fribidi/fribidi-deprecated.h +175 -0
- package/include/fribidi/fribidi-enddecls.h +3 -0
- package/include/fribidi/fribidi-flags.h +72 -0
- package/include/fribidi/fribidi-joining-types-list.h +44 -0
- package/include/fribidi/fribidi-joining-types.h +249 -0
- package/include/fribidi/fribidi-joining.h +74 -0
- package/include/fribidi/fribidi-mirroring.h +86 -0
- package/include/fribidi/fribidi-shape.h +71 -0
- package/include/fribidi/fribidi-types.h +79 -0
- package/include/fribidi/fribidi-unicode-version.h +10 -0
- package/include/fribidi/fribidi-unicode.h +105 -0
- package/include/fribidi/fribidi.h +129 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +221 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h +37 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +525 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h +40 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +115 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +481 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +113 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h +718 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h +33 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +70 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +168 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h +46 -0
- package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h +165 -0
- package/include/gio-unix-2.0/gio/gdesktopappinfo.h +200 -0
- package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +67 -0
- package/include/gio-unix-2.0/gio/gunixfdmessage.h +86 -0
- package/include/gio-unix-2.0/gio/gunixinputstream.h +85 -0
- package/include/gio-unix-2.0/gio/gunixmounts.h +172 -0
- package/include/gio-unix-2.0/gio/gunixoutputstream.h +84 -0
- package/include/glib-2.0/gio/gaction.h +100 -0
- package/include/glib-2.0/gio/gactiongroup.h +163 -0
- package/include/glib-2.0/gio/gactiongroupexporter.h +47 -0
- package/include/glib-2.0/gio/gactionmap.h +101 -0
- package/include/glib-2.0/gio/gappinfo.h +369 -0
- package/include/glib-2.0/gio/gapplication.h +257 -0
- package/include/glib-2.0/gio/gapplicationcommandline.h +124 -0
- package/include/glib-2.0/gio/gasyncinitable.h +132 -0
- package/include/glib-2.0/gio/gasyncresult.h +87 -0
- package/include/glib-2.0/gio/gbufferedinputstream.h +135 -0
- package/include/glib-2.0/gio/gbufferedoutputstream.h +88 -0
- package/include/glib-2.0/gio/gbytesicon.h +54 -0
- package/include/glib-2.0/gio/gcancellable.h +120 -0
- package/include/glib-2.0/gio/gcharsetconverter.h +65 -0
- package/include/glib-2.0/gio/gcontenttype.h +84 -0
- package/include/glib-2.0/gio/gconverter.h +98 -0
- package/include/glib-2.0/gio/gconverterinputstream.h +82 -0
- package/include/glib-2.0/gio/gconverteroutputstream.h +82 -0
- package/include/glib-2.0/gio/gcredentials.h +87 -0
- package/include/glib-2.0/gio/gdatagrambased.h +146 -0
- package/include/glib-2.0/gio/gdatainputstream.h +182 -0
- package/include/glib-2.0/gio/gdataoutputstream.h +127 -0
- package/include/glib-2.0/gio/gdbusactiongroup.h +56 -0
- package/include/glib-2.0/gio/gdbusaddress.h +67 -0
- package/include/glib-2.0/gio/gdbusauthobserver.h +53 -0
- package/include/glib-2.0/gio/gdbusconnection.h +691 -0
- package/include/glib-2.0/gio/gdbuserror.h +111 -0
- package/include/glib-2.0/gio/gdbusinterface.h +83 -0
- package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +129 -0
- package/include/glib-2.0/gio/gdbusintrospection.h +327 -0
- package/include/glib-2.0/gio/gdbusmenumodel.h +47 -0
- package/include/glib-2.0/gio/gdbusmessage.h +204 -0
- package/include/glib-2.0/gio/gdbusmethodinvocation.h +136 -0
- package/include/glib-2.0/gio/gdbusnameowning.h +117 -0
- package/include/glib-2.0/gio/gdbusnamewatching.h +104 -0
- package/include/glib-2.0/gio/gdbusobject.h +80 -0
- package/include/glib-2.0/gio/gdbusobjectmanager.h +96 -0
- package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +148 -0
- package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +95 -0
- package/include/glib-2.0/gio/gdbusobjectproxy.h +81 -0
- package/include/glib-2.0/gio/gdbusobjectskeleton.h +98 -0
- package/include/glib-2.0/gio/gdbusproxy.h +220 -0
- package/include/glib-2.0/gio/gdbusserver.h +62 -0
- package/include/glib-2.0/gio/gdbusutils.h +65 -0
- package/include/glib-2.0/gio/gdebugcontroller.h +81 -0
- package/include/glib-2.0/gio/gdebugcontrollerdbus.h +71 -0
- package/include/glib-2.0/gio/gdrive.h +274 -0
- package/include/glib-2.0/gio/gdtlsclientconnection.h +77 -0
- package/include/glib-2.0/gio/gdtlsconnection.h +230 -0
- package/include/glib-2.0/gio/gdtlsserverconnection.h +71 -0
- package/include/glib-2.0/gio/gemblem.h +63 -0
- package/include/glib-2.0/gio/gemblemedicon.h +83 -0
- package/include/glib-2.0/gio/gfile.h +1359 -0
- package/include/glib-2.0/gio/gfileattribute.h +86 -0
- package/include/glib-2.0/gio/gfileenumerator.h +154 -0
- package/include/glib-2.0/gio/gfileicon.h +59 -0
- package/include/glib-2.0/gio/gfileinfo.h +1546 -0
- package/include/glib-2.0/gio/gfileinputstream.h +116 -0
- package/include/glib-2.0/gio/gfileiostream.h +123 -0
- package/include/glib-2.0/gio/gfilemonitor.h +100 -0
- package/include/glib-2.0/gio/gfilenamecompleter.h +81 -0
- package/include/glib-2.0/gio/gfileoutputstream.h +124 -0
- package/include/glib-2.0/gio/gfilterinputstream.h +80 -0
- package/include/glib-2.0/gio/gfilteroutputstream.h +80 -0
- package/include/glib-2.0/gio/gicon.h +133 -0
- package/include/glib-2.0/gio/ginetaddress.h +125 -0
- package/include/glib-2.0/gio/ginetaddressmask.h +86 -0
- package/include/glib-2.0/gio/ginetsocketaddress.h +80 -0
- package/include/glib-2.0/gio/ginitable.h +107 -0
- package/include/glib-2.0/gio/ginputstream.h +218 -0
- package/include/glib-2.0/gio/gio-autocleanups.h +155 -0
- package/include/glib-2.0/gio/gio-visibility.h +952 -0
- package/include/glib-2.0/gio/gio.h +186 -0
- package/include/glib-2.0/gio/gioenums.h +2149 -0
- package/include/glib-2.0/gio/gioenumtypes.h +207 -0
- package/include/glib-2.0/gio/gioerror.h +58 -0
- package/include/glib-2.0/gio/giomodule.h +199 -0
- package/include/glib-2.0/gio/gioscheduler.h +56 -0
- package/include/glib-2.0/gio/giostream.h +137 -0
- package/include/glib-2.0/gio/giotypes.h +660 -0
- package/include/glib-2.0/gio/glistmodel.h +74 -0
- package/include/glib-2.0/gio/gliststore.h +97 -0
- package/include/glib-2.0/gio/gloadableicon.h +101 -0
- package/include/glib-2.0/gio/gmemoryinputstream.h +92 -0
- package/include/glib-2.0/gio/gmemorymonitor.h +64 -0
- package/include/glib-2.0/gio/gmemoryoutputstream.h +109 -0
- package/include/glib-2.0/gio/gmenu.h +184 -0
- package/include/glib-2.0/gio/gmenuexporter.h +55 -0
- package/include/glib-2.0/gio/gmenumodel.h +307 -0
- package/include/glib-2.0/gio/gmount.h +278 -0
- package/include/glib-2.0/gio/gmountoperation.h +179 -0
- package/include/glib-2.0/gio/gnativesocketaddress.h +67 -0
- package/include/glib-2.0/gio/gnativevolumemonitor.h +63 -0
- package/include/glib-2.0/gio/gnetworkaddress.h +82 -0
- package/include/glib-2.0/gio/gnetworking.h +81 -0
- package/include/glib-2.0/gio/gnetworkmonitor.h +101 -0
- package/include/glib-2.0/gio/gnetworkservice.h +77 -0
- package/include/glib-2.0/gio/gnotification.h +103 -0
- package/include/glib-2.0/gio/goutputstream.h +334 -0
- package/include/glib-2.0/gio/gpermission.h +129 -0
- package/include/glib-2.0/gio/gpollableinputstream.h +106 -0
- package/include/glib-2.0/gio/gpollableoutputstream.h +127 -0
- package/include/glib-2.0/gio/gpollableutils.h +66 -0
- package/include/glib-2.0/gio/gpowerprofilemonitor.h +65 -0
- package/include/glib-2.0/gio/gpropertyaction.h +49 -0
- package/include/glib-2.0/gio/gproxy.h +130 -0
- package/include/glib-2.0/gio/gproxyaddress.h +88 -0
- package/include/glib-2.0/gio/gproxyaddressenumerator.h +83 -0
- package/include/glib-2.0/gio/gproxyresolver.h +97 -0
- package/include/glib-2.0/gio/gremoteactiongroup.h +77 -0
- package/include/glib-2.0/gio/gresolver.h +299 -0
- package/include/glib-2.0/gio/gresource.h +132 -0
- package/include/glib-2.0/gio/gseekable.h +105 -0
- package/include/glib-2.0/gio/gsettings.h +347 -0
- package/include/glib-2.0/gio/gsettingsbackend.h +176 -0
- package/include/glib-2.0/gio/gsettingsschema.h +115 -0
- package/include/glib-2.0/gio/gsimpleaction.h +65 -0
- package/include/glib-2.0/gio/gsimpleactiongroup.h +99 -0
- package/include/glib-2.0/gio/gsimpleasyncresult.h +164 -0
- package/include/glib-2.0/gio/gsimpleiostream.h +47 -0
- package/include/glib-2.0/gio/gsimplepermission.h +47 -0
- package/include/glib-2.0/gio/gsimpleproxyresolver.h +91 -0
- package/include/glib-2.0/gio/gsocket.h +330 -0
- package/include/glib-2.0/gio/gsocketaddress.h +84 -0
- package/include/glib-2.0/gio/gsocketaddressenumerator.h +103 -0
- package/include/glib-2.0/gio/gsocketclient.h +199 -0
- package/include/glib-2.0/gio/gsocketconnectable.h +83 -0
- package/include/glib-2.0/gio/gsocketconnection.h +117 -0
- package/include/glib-2.0/gio/gsocketcontrolmessage.h +113 -0
- package/include/glib-2.0/gio/gsocketlistener.h +157 -0
- package/include/glib-2.0/gio/gsocketservice.h +95 -0
- package/include/glib-2.0/gio/gsrvtarget.h +60 -0
- package/include/glib-2.0/gio/gsubprocess.h +169 -0
- package/include/glib-2.0/gio/gsubprocesslauncher.h +121 -0
- package/include/glib-2.0/gio/gtask.h +207 -0
- package/include/glib-2.0/gio/gtcpconnection.h +71 -0
- package/include/glib-2.0/gio/gtcpwrapperconnection.h +71 -0
- package/include/glib-2.0/gio/gtestdbus.h +74 -0
- package/include/glib-2.0/gio/gthemedicon.h +70 -0
- package/include/glib-2.0/gio/gthreadedsocketservice.h +83 -0
- package/include/glib-2.0/gio/gtlsbackend.h +115 -0
- package/include/glib-2.0/gio/gtlscertificate.h +125 -0
- package/include/glib-2.0/gio/gtlsclientconnection.h +88 -0
- package/include/glib-2.0/gio/gtlsconnection.h +214 -0
- package/include/glib-2.0/gio/gtlsdatabase.h +249 -0
- package/include/glib-2.0/gio/gtlsfiledatabase.h +60 -0
- package/include/glib-2.0/gio/gtlsinteraction.h +150 -0
- package/include/glib-2.0/gio/gtlspassword.h +121 -0
- package/include/glib-2.0/gio/gtlsserverconnection.h +71 -0
- package/include/glib-2.0/gio/gunixconnection.h +102 -0
- package/include/glib-2.0/gio/gunixcredentialsmessage.h +89 -0
- package/include/glib-2.0/gio/gunixfdlist.h +97 -0
- package/include/glib-2.0/gio/gunixsocketaddress.h +83 -0
- package/include/glib-2.0/gio/gvfs.h +170 -0
- package/include/glib-2.0/gio/gvolume.h +255 -0
- package/include/glib-2.0/gio/gvolumemonitor.h +156 -0
- package/include/glib-2.0/gio/gzlibcompressor.h +64 -0
- package/include/glib-2.0/gio/gzlibdecompressor.h +60 -0
- package/include/glib-2.0/glib/deprecated/gallocator.h +88 -0
- package/include/glib-2.0/glib/deprecated/gcache.h +77 -0
- package/include/glib-2.0/glib/deprecated/gcompletion.h +85 -0
- package/include/glib-2.0/glib/deprecated/gmain.h +137 -0
- package/include/glib-2.0/glib/deprecated/grel.h +107 -0
- package/include/glib-2.0/glib/deprecated/gthread.h +295 -0
- package/include/glib-2.0/glib/galloca.h +147 -0
- package/include/glib-2.0/glib/garray.h +323 -0
- package/include/glib-2.0/glib/gasyncqueue.h +126 -0
- package/include/glib-2.0/glib/gatomic.h +587 -0
- package/include/glib-2.0/glib/gbacktrace.h +74 -0
- package/include/glib-2.0/glib/gbase64.h +63 -0
- package/include/glib-2.0/glib/gbitlock.h +78 -0
- package/include/glib-2.0/glib/gbookmarkfile.h +300 -0
- package/include/glib-2.0/glib/gbytes.h +99 -0
- package/include/glib-2.0/glib/gcharset.h +49 -0
- package/include/glib-2.0/glib/gchecksum.h +106 -0
- package/include/glib-2.0/glib/gconvert.h +179 -0
- package/include/glib-2.0/glib/gdataset.h +156 -0
- package/include/glib-2.0/glib/gdate.h +309 -0
- package/include/glib-2.0/glib/gdatetime.h +275 -0
- package/include/glib-2.0/glib/gdir.h +54 -0
- package/include/glib-2.0/glib/genviron.h +65 -0
- package/include/glib-2.0/glib/gerror.h +263 -0
- package/include/glib-2.0/glib/gfileutils.h +223 -0
- package/include/glib-2.0/glib/ggettext.h +65 -0
- package/include/glib-2.0/glib/ghash.h +206 -0
- package/include/glib-2.0/glib/ghmac.h +85 -0
- package/include/glib-2.0/glib/ghook.h +204 -0
- package/include/glib-2.0/glib/ghostutils.h +45 -0
- package/include/glib-2.0/glib/gi18n-lib.h +38 -0
- package/include/glib-2.0/glib/gi18n.h +34 -0
- package/include/glib-2.0/glib/giochannel.h +407 -0
- package/include/glib-2.0/glib/gkeyfile.h +332 -0
- package/include/glib-2.0/glib/glib-autocleanups.h +105 -0
- package/include/glib-2.0/glib/glib-typeof.h +47 -0
- package/include/glib-2.0/glib/glib-visibility.h +952 -0
- package/include/glib-2.0/glib/glist.h +179 -0
- package/include/glib-2.0/glib/gmacros.h +1425 -0
- package/include/glib-2.0/glib/gmain.h +862 -0
- package/include/glib-2.0/glib/gmappedfile.h +60 -0
- package/include/glib-2.0/glib/gmarkup.h +265 -0
- package/include/glib-2.0/glib/gmem.h +425 -0
- package/include/glib-2.0/glib/gmessages.h +690 -0
- package/include/glib-2.0/glib/gnode.h +309 -0
- package/include/glib-2.0/glib/goption.h +409 -0
- package/include/glib-2.0/glib/gpathbuf.h +90 -0
- package/include/glib-2.0/glib/gpattern.h +65 -0
- package/include/glib-2.0/glib/gpoll.h +122 -0
- package/include/glib-2.0/glib/gprimes.h +52 -0
- package/include/glib-2.0/glib/gprintf.h +59 -0
- package/include/glib-2.0/glib/gqsort.h +47 -0
- package/include/glib-2.0/glib/gquark.h +70 -0
- package/include/glib-2.0/glib/gqueue.h +205 -0
- package/include/glib-2.0/glib/grand.h +101 -0
- package/include/glib-2.0/glib/grcbox.h +91 -0
- package/include/glib-2.0/glib/grefcount.h +179 -0
- package/include/glib-2.0/glib/grefstring.h +59 -0
- package/include/glib-2.0/glib/gscanner.h +301 -0
- package/include/glib-2.0/glib/gsequence.h +175 -0
- package/include/glib-2.0/glib/gshell.h +59 -0
- package/include/glib-2.0/glib/gslice.h +117 -0
- package/include/glib-2.0/glib/gslist.h +166 -0
- package/include/glib-2.0/glib/gspawn.h +323 -0
- package/include/glib-2.0/glib/gstdio.h +231 -0
- package/include/glib-2.0/glib/gstrfuncs.h +504 -0
- package/include/glib-2.0/glib/gstring.h +296 -0
- package/include/glib-2.0/glib/gstringchunk.h +59 -0
- package/include/glib-2.0/glib/gstrvbuilder.h +69 -0
- package/include/glib-2.0/glib/gtestutils.h +763 -0
- package/include/glib-2.0/glib/gthread.h +603 -0
- package/include/glib-2.0/glib/gthreadpool.h +105 -0
- package/include/glib-2.0/glib/gtimer.h +80 -0
- package/include/glib-2.0/glib/gtimezone.h +98 -0
- package/include/glib-2.0/glib/gtrashstack.h +60 -0
- package/include/glib-2.0/glib/gtree.h +181 -0
- package/include/glib-2.0/glib/gtypes.h +591 -0
- package/include/glib-2.0/glib/gunicode.h +974 -0
- package/include/glib-2.0/glib/guri.h +420 -0
- package/include/glib-2.0/glib/gutils.h +479 -0
- package/include/glib-2.0/glib/guuid.h +42 -0
- package/include/glib-2.0/glib/gvariant.h +541 -0
- package/include/glib-2.0/glib/gvarianttype.h +384 -0
- package/include/glib-2.0/glib/gversion.h +57 -0
- package/include/glib-2.0/glib/gversionmacros.h +490 -0
- package/include/glib-2.0/glib/gwin32.h +142 -0
- package/include/glib-2.0/glib-object.h +46 -0
- package/include/glib-2.0/glib-unix.h +125 -0
- package/include/glib-2.0/glib.h +121 -0
- package/include/glib-2.0/gmodule/gmodule-visibility.h +952 -0
- package/include/glib-2.0/gmodule.h +147 -0
- package/include/glib-2.0/gobject/gbinding.h +156 -0
- package/include/glib-2.0/gobject/gbindinggroup.h +85 -0
- package/include/glib-2.0/gobject/gboxed.h +124 -0
- package/include/glib-2.0/gobject/gclosure.h +323 -0
- package/include/glib-2.0/gobject/genums.h +381 -0
- package/include/glib-2.0/gobject/glib-enumtypes.h +25 -0
- package/include/glib-2.0/gobject/glib-types.h +400 -0
- package/include/glib-2.0/gobject/gmarshal.h +434 -0
- package/include/glib-2.0/gobject/gobject-autocleanups.h +33 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +952 -0
- package/include/glib-2.0/gobject/gobject.h +953 -0
- package/include/glib-2.0/gobject/gobjectnotifyqueue.c +199 -0
- package/include/glib-2.0/gobject/gparam.h +476 -0
- package/include/glib-2.0/gobject/gparamspecs.h +1151 -0
- package/include/glib-2.0/gobject/gsignal.h +647 -0
- package/include/glib-2.0/gobject/gsignalgroup.h +98 -0
- package/include/glib-2.0/gobject/gsourceclosure.h +40 -0
- package/include/glib-2.0/gobject/gtype.h +2703 -0
- package/include/glib-2.0/gobject/gtypemodule.h +302 -0
- package/include/glib-2.0/gobject/gtypeplugin.h +136 -0
- package/include/glib-2.0/gobject/gvalue.h +212 -0
- package/include/glib-2.0/gobject/gvaluearray.h +106 -0
- package/include/glib-2.0/gobject/gvaluecollector.h +290 -0
- package/include/glib-2.0/gobject/gvaluetypes.h +318 -0
- package/include/harfbuzz/hb-aat-layout.h +795 -0
- package/include/harfbuzz/hb-aat.h +38 -0
- package/include/harfbuzz/hb-blob.h +160 -0
- package/include/harfbuzz/hb-buffer.h +799 -0
- package/include/harfbuzz/hb-common.h +938 -0
- package/include/harfbuzz/hb-cplusplus.hh +223 -0
- package/include/harfbuzz/hb-deprecated.h +309 -0
- package/include/harfbuzz/hb-draw.h +340 -0
- package/include/harfbuzz/hb-face.h +187 -0
- package/include/harfbuzz/hb-features.h +119 -0
- package/include/harfbuzz/hb-font.h +1153 -0
- package/include/harfbuzz/hb-ft.h +145 -0
- package/include/harfbuzz/hb-glib.h +56 -0
- package/include/harfbuzz/hb-map.h +143 -0
- package/include/harfbuzz/hb-ot-color.h +155 -0
- package/include/harfbuzz/hb-ot-deprecated.h +147 -0
- package/include/harfbuzz/hb-ot-font.h +45 -0
- package/include/harfbuzz/hb-ot-layout.h +549 -0
- package/include/harfbuzz/hb-ot-math.h +333 -0
- package/include/harfbuzz/hb-ot-meta.h +72 -0
- package/include/harfbuzz/hb-ot-metrics.h +129 -0
- package/include/harfbuzz/hb-ot-name.h +164 -0
- package/include/harfbuzz/hb-ot-shape.h +53 -0
- package/include/harfbuzz/hb-ot-var.h +191 -0
- package/include/harfbuzz/hb-ot.h +49 -0
- package/include/harfbuzz/hb-paint.h +1029 -0
- package/include/harfbuzz/hb-set.h +203 -0
- package/include/harfbuzz/hb-shape-plan.h +122 -0
- package/include/harfbuzz/hb-shape.h +74 -0
- package/include/harfbuzz/hb-style.h +81 -0
- package/include/harfbuzz/hb-subset-repacker.h +81 -0
- package/include/harfbuzz/hb-subset.h +241 -0
- package/include/harfbuzz/hb-unicode.h +643 -0
- package/include/harfbuzz/hb-version.h +95 -0
- package/include/harfbuzz/hb.h +51 -0
- package/include/index.js +1 -0
- package/include/jconfig.h +37 -0
- package/include/jerror.h +335 -0
- package/include/jmorecfg.h +382 -0
- package/include/jpeglib.h +1210 -0
- package/include/lcms2.h +1958 -0
- package/include/lcms2_plugin.h +700 -0
- package/include/libexif/_stdint.h +2 -0
- package/include/libexif/exif-byte-order.h +48 -0
- package/include/libexif/exif-content.h +181 -0
- package/include/libexif/exif-data-type.h +46 -0
- package/include/libexif/exif-data.h +267 -0
- package/include/libexif/exif-entry.h +186 -0
- package/include/libexif/exif-format.h +65 -0
- package/include/libexif/exif-ifd.h +51 -0
- package/include/libexif/exif-loader.h +128 -0
- package/include/libexif/exif-log.h +116 -0
- package/include/libexif/exif-mem.h +91 -0
- package/include/libexif/exif-mnote-data.h +122 -0
- package/include/libexif/exif-tag.h +307 -0
- package/include/libexif/exif-utils.h +194 -0
- package/include/libheif/heif.h +2092 -0
- package/include/libheif/heif_cxx.h +1359 -0
- package/include/libheif/heif_plugin.h +306 -0
- package/include/libheif/heif_version.h +38 -0
- package/include/libimagequant.h +111 -0
- package/include/libpng16/png.h +3247 -0
- package/include/libpng16/pngconf.h +623 -0
- package/include/libpng16/pnglibconf.h +219 -0
- package/include/librsvg-2.0/librsvg/rsvg-cairo.h +395 -0
- package/include/librsvg-2.0/librsvg/rsvg-features.h +184 -0
- package/include/librsvg-2.0/librsvg/rsvg-version.h +13 -0
- package/include/librsvg-2.0/librsvg/rsvg.h +1456 -0
- package/include/libxml2/libxml/HTMLparser.h +320 -0
- package/include/libxml2/libxml/HTMLtree.h +147 -0
- package/include/libxml2/libxml/SAX.h +204 -0
- package/include/libxml2/libxml/SAX2.h +173 -0
- package/include/libxml2/libxml/c14n.h +128 -0
- package/include/libxml2/libxml/catalog.h +182 -0
- package/include/libxml2/libxml/chvalid.h +230 -0
- package/include/libxml2/libxml/debugXML.h +217 -0
- package/include/libxml2/libxml/dict.h +81 -0
- package/include/libxml2/libxml/encoding.h +233 -0
- package/include/libxml2/libxml/entities.h +151 -0
- package/include/libxml2/libxml/globals.h +529 -0
- package/include/libxml2/libxml/hash.h +236 -0
- package/include/libxml2/libxml/list.h +137 -0
- package/include/libxml2/libxml/nanoftp.h +186 -0
- package/include/libxml2/libxml/nanohttp.h +81 -0
- package/include/libxml2/libxml/parser.h +1265 -0
- package/include/libxml2/libxml/parserInternals.h +662 -0
- package/include/libxml2/libxml/pattern.h +100 -0
- package/include/libxml2/libxml/relaxng.h +218 -0
- package/include/libxml2/libxml/schemasInternals.h +958 -0
- package/include/libxml2/libxml/schematron.h +142 -0
- package/include/libxml2/libxml/threads.h +94 -0
- package/include/libxml2/libxml/tree.h +1314 -0
- package/include/libxml2/libxml/uri.h +94 -0
- package/include/libxml2/libxml/valid.h +448 -0
- package/include/libxml2/libxml/xinclude.h +129 -0
- package/include/libxml2/libxml/xlink.h +189 -0
- package/include/libxml2/libxml/xmlIO.h +369 -0
- package/include/libxml2/libxml/xmlautomata.h +146 -0
- package/include/libxml2/libxml/xmlerror.h +919 -0
- package/include/libxml2/libxml/xmlexports.h +50 -0
- package/include/libxml2/libxml/xmlmemory.h +228 -0
- package/include/libxml2/libxml/xmlmodule.h +57 -0
- package/include/libxml2/libxml/xmlreader.h +428 -0
- package/include/libxml2/libxml/xmlregexp.h +222 -0
- package/include/libxml2/libxml/xmlsave.h +88 -0
- package/include/libxml2/libxml/xmlschemas.h +246 -0
- package/include/libxml2/libxml/xmlschemastypes.h +152 -0
- package/include/libxml2/libxml/xmlstring.h +140 -0
- package/include/libxml2/libxml/xmlunicode.h +202 -0
- package/include/libxml2/libxml/xmlversion.h +526 -0
- package/include/libxml2/libxml/xmlwriter.h +488 -0
- package/include/libxml2/libxml/xpath.h +575 -0
- package/include/libxml2/libxml/xpathInternals.h +632 -0
- package/include/libxml2/libxml/xpointer.h +137 -0
- package/include/orc-0.4/orc/orc-stdint.h +1 -0
- package/include/orc-0.4/orc/orc.h +16 -0
- package/include/orc-0.4/orc/orcarm.h +879 -0
- package/include/orc-0.4/orc/orcbytecode.h +35 -0
- package/include/orc-0.4/orc/orcbytecodes.h +255 -0
- package/include/orc-0.4/orc/orccode.h +53 -0
- package/include/orc-0.4/orc/orccompiler.h +176 -0
- package/include/orc-0.4/orc/orcconstant.h +39 -0
- package/include/orc-0.4/orc/orccpu.h +21 -0
- package/include/orc-0.4/orc/orccpuinsn.h +40 -0
- package/include/orc-0.4/orc/orcdebug.h +158 -0
- package/include/orc-0.4/orc/orcemulateopcodes.h +203 -0
- package/include/orc-0.4/orc/orcexecutor.h +135 -0
- package/include/orc-0.4/orc/orcfunctions.h +93 -0
- package/include/orc-0.4/orc/orcinstruction.h +39 -0
- package/include/orc-0.4/orc/orcinternal.h +46 -0
- package/include/orc-0.4/orc/orclimits.h +94 -0
- package/include/orc-0.4/orc/orcmips.h +229 -0
- package/include/orc-0.4/orc/orcmmx.h +79 -0
- package/include/orc-0.4/orc/orcneon.h +43 -0
- package/include/orc-0.4/orc/orconce.h +166 -0
- package/include/orc-0.4/orc/orcopcode.h +63 -0
- package/include/orc-0.4/orc/orcparse.h +27 -0
- package/include/orc-0.4/orc/orcpowerpc.h +209 -0
- package/include/orc-0.4/orc/orcprogram.h +192 -0
- package/include/orc-0.4/orc/orcrule.h +52 -0
- package/include/orc-0.4/orc/orcsse.h +55 -0
- package/include/orc-0.4/orc/orctarget.h +115 -0
- package/include/orc-0.4/orc/orcutils.h +238 -0
- package/include/orc-0.4/orc/orcvariable.h +81 -0
- package/include/orc-0.4/orc/orcx86.h +199 -0
- package/include/orc-0.4/orc/orcx86insn.h +672 -0
- package/include/pango-1.0/pango/pango-attributes.h +748 -0
- package/include/pango-1.0/pango/pango-bidi-type.h +117 -0
- package/include/pango-1.0/pango/pango-break.h +144 -0
- package/include/pango-1.0/pango/pango-color.h +75 -0
- package/include/pango-1.0/pango/pango-context.h +116 -0
- package/include/pango-1.0/pango/pango-coverage.h +108 -0
- package/include/pango-1.0/pango/pango-direction.h +72 -0
- package/include/pango-1.0/pango/pango-engine.h +457 -0
- package/include/pango-1.0/pango/pango-enum-types.h +120 -0
- package/include/pango-1.0/pango/pango-features.h +10 -0
- package/include/pango-1.0/pango/pango-font.h +699 -0
- package/include/pango-1.0/pango/pango-fontmap.h +132 -0
- package/include/pango-1.0/pango/pango-fontset-simple.h +64 -0
- package/include/pango-1.0/pango/pango-fontset.h +134 -0
- package/include/pango-1.0/pango/pango-glyph-item.h +175 -0
- package/include/pango-1.0/pango/pango-glyph.h +270 -0
- package/include/pango-1.0/pango/pango-gravity.h +137 -0
- package/include/pango-1.0/pango/pango-item.h +165 -0
- package/include/pango-1.0/pango/pango-language.h +70 -0
- package/include/pango-1.0/pango/pango-layout.h +554 -0
- package/include/pango-1.0/pango/pango-markup.h +52 -0
- package/include/pango-1.0/pango/pango-matrix.h +130 -0
- package/include/pango-1.0/pango/pango-modules.h +84 -0
- package/include/pango-1.0/pango/pango-ot.h +427 -0
- package/include/pango-1.0/pango/pango-renderer.h +290 -0
- package/include/pango-1.0/pango/pango-script.h +335 -0
- package/include/pango-1.0/pango/pango-tabs.h +117 -0
- package/include/pango-1.0/pango/pango-types.h +244 -0
- package/include/pango-1.0/pango/pango-utils.h +187 -0
- package/include/pango-1.0/pango/pango-version-macros.h +756 -0
- package/include/pango-1.0/pango/pango.h +54 -0
- package/include/pango-1.0/pango/pangocairo.h +220 -0
- package/include/pango-1.0/pango/pangofc-decoder.h +122 -0
- package/include/pango-1.0/pango/pangofc-font.h +120 -0
- package/include/pango-1.0/pango/pangofc-fontmap.h +244 -0
- package/include/pango-1.0/pango/pangoft2.h +158 -0
- package/include/pixman-1/pixman-version.h +54 -0
- package/include/pixman-1/pixman.h +1419 -0
- package/include/png.h +3247 -0
- package/include/pngconf.h +623 -0
- package/include/pnglibconf.h +219 -0
- package/include/spng.h +537 -0
- package/include/tiff.h +899 -0
- package/include/tiffconf.h +145 -0
- package/include/tiffio.h +653 -0
- package/include/tiffvers.h +36 -0
- package/include/vips/VConnection8.h +150 -0
- package/include/vips/VError8.h +76 -0
- package/include/vips/VImage8.h +6065 -0
- package/include/vips/VInterpolate8.h +77 -0
- package/include/vips/VRegion8.h +155 -0
- package/include/vips/arithmetic.h +571 -0
- package/include/vips/basic.h +113 -0
- package/include/vips/buf.h +118 -0
- package/include/vips/colour.h +306 -0
- package/include/vips/connection.h +570 -0
- package/include/vips/conversion.h +357 -0
- package/include/vips/convolution.h +95 -0
- package/include/vips/create.h +161 -0
- package/include/vips/dbuf.h +103 -0
- package/include/vips/debug.h +74 -0
- package/include/vips/draw.h +113 -0
- package/include/vips/enumtypes.h +181 -0
- package/include/vips/error.h +142 -0
- package/include/vips/foreign.h +993 -0
- package/include/vips/format.h +135 -0
- package/include/vips/freqfilt.h +64 -0
- package/include/vips/gate.h +82 -0
- package/include/vips/generate.h +92 -0
- package/include/vips/header.h +312 -0
- package/include/vips/histogram.h +85 -0
- package/include/vips/image.h +605 -0
- package/include/vips/interpolate.h +141 -0
- package/include/vips/memory.h +96 -0
- package/include/vips/morphology.h +73 -0
- package/include/vips/mosaicing.h +80 -0
- package/include/vips/object.h +706 -0
- package/include/vips/operation.h +182 -0
- package/include/vips/private.h +227 -0
- package/include/vips/rect.h +80 -0
- package/include/vips/region.h +238 -0
- package/include/vips/resample.h +123 -0
- package/include/vips/sbuf.h +144 -0
- package/include/vips/semaphore.h +77 -0
- package/include/vips/thread.h +72 -0
- package/include/vips/threadpool.h +160 -0
- package/include/vips/transform.h +89 -0
- package/include/vips/type.h +305 -0
- package/include/vips/util.h +406 -0
- package/include/vips/vector.h +183 -0
- package/include/vips/version.h +26 -0
- package/include/vips/vips.h +194 -0
- package/include/vips/vips8 +60 -0
- package/include/webp/decode.h +504 -0
- package/include/webp/demux.h +363 -0
- package/include/webp/encode.h +552 -0
- package/include/webp/mux.h +530 -0
- package/include/webp/mux_types.h +98 -0
- package/include/webp/sharpyuv/sharpyuv.h +103 -0
- package/include/webp/sharpyuv/sharpyuv_csp.h +60 -0
- package/include/webp/types.h +72 -0
- package/include/zconf.h +203 -0
- package/include/zlib.h +1855 -0
- package/include/zlib_name_mangling.h +8 -0
- package/package.json +30 -0
- package/versions.json +31 -0
|
@@ -0,0 +1,1456 @@
|
|
|
1
|
+
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
2
|
+
/* vim: set sw=4 sts=4 expandtab: */
|
|
3
|
+
/*
|
|
4
|
+
rsvg.h: SAX-based renderer for SVG files into a GdkPixbuf.
|
|
5
|
+
|
|
6
|
+
Copyright (C) 2000 Eazel, Inc.
|
|
7
|
+
|
|
8
|
+
This library is free software; you can redistribute it and/or
|
|
9
|
+
modify it under the terms of the GNU Lesser General Public
|
|
10
|
+
License as published by the Free Software Foundation; either
|
|
11
|
+
version 2.1 of the License, or (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This library is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16
|
+
Lesser General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU Lesser General Public
|
|
19
|
+
License along with this library; if not, write to the Free Software
|
|
20
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21
|
+
|
|
22
|
+
Author: Raph Levien <raph@artofcode.com>
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
#ifndef RSVG_H
|
|
26
|
+
#define RSVG_H
|
|
27
|
+
|
|
28
|
+
#define __RSVG_RSVG_H_INSIDE__
|
|
29
|
+
|
|
30
|
+
#include <glib-object.h>
|
|
31
|
+
#include <gio/gio.h>
|
|
32
|
+
|
|
33
|
+
#include <cairo.h>
|
|
34
|
+
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
35
|
+
|
|
36
|
+
G_BEGIN_DECLS
|
|
37
|
+
|
|
38
|
+
#ifndef __GTK_DOC_IGNORE__
|
|
39
|
+
|
|
40
|
+
/* Override to export public/semi-public APIs */
|
|
41
|
+
#ifndef RSVG_API
|
|
42
|
+
# define RSVG_API
|
|
43
|
+
#endif
|
|
44
|
+
|
|
45
|
+
#if defined(RSVG_DISABLE_DEPRECATION_WARNINGS) || !GLIB_CHECK_VERSION (2, 31, 0)
|
|
46
|
+
#define RSVG_DEPRECATED RSVG_API
|
|
47
|
+
#define RSVG_DEPRECATED_FOR(f) RSVG_API
|
|
48
|
+
#else
|
|
49
|
+
#define RSVG_DEPRECATED G_DEPRECATED RSVG_API
|
|
50
|
+
#define RSVG_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) RSVG_API
|
|
51
|
+
#endif
|
|
52
|
+
|
|
53
|
+
#endif /* __GTK_DOC_IGNORE__ */
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* RsvgError:
|
|
57
|
+
* @RSVG_ERROR_FAILED: the request failed
|
|
58
|
+
*
|
|
59
|
+
* An enumeration representing possible errors
|
|
60
|
+
*/
|
|
61
|
+
typedef enum {
|
|
62
|
+
RSVG_ERROR_FAILED
|
|
63
|
+
} RsvgError;
|
|
64
|
+
|
|
65
|
+
#define RSVG_ERROR (rsvg_error_quark ())
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* rsvg_error_quark:
|
|
69
|
+
*
|
|
70
|
+
* The error domain for RSVG
|
|
71
|
+
*
|
|
72
|
+
* Returns: The error domain
|
|
73
|
+
*/
|
|
74
|
+
RSVG_API
|
|
75
|
+
GQuark rsvg_error_quark (void) G_GNUC_CONST;
|
|
76
|
+
|
|
77
|
+
RSVG_API
|
|
78
|
+
GType rsvg_error_get_type (void);
|
|
79
|
+
#define RSVG_TYPE_ERROR (rsvg_error_get_type())
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* RsvgHandle:
|
|
83
|
+
*
|
|
84
|
+
* [class@Rsvg.Handle] loads an SVG document into memory.
|
|
85
|
+
*
|
|
86
|
+
* This is the main entry point into the librsvg library. An [class@Rsvg.Handle] is an
|
|
87
|
+
* object that represents SVG data in memory. Your program creates an
|
|
88
|
+
* [class@Rsvg.Handle] from an SVG file, or from a memory buffer that contains SVG data,
|
|
89
|
+
* or in the most general form, from a `GInputStream` that will provide SVG data.
|
|
90
|
+
*
|
|
91
|
+
* Librsvg can load SVG images and render them to Cairo surfaces,
|
|
92
|
+
* using a mixture of SVG's [static mode] and [secure static mode].
|
|
93
|
+
* Librsvg does not do animation nor scripting, and can load
|
|
94
|
+
* references to external data only in some situations; see below.
|
|
95
|
+
*
|
|
96
|
+
* Librsvg supports reading [SVG 1.1](https://www.w3.org/TR/SVG11/) data, and is gradually
|
|
97
|
+
* adding support for features in [SVG 2](https://www.w3.org/TR/SVG2/). Librsvg also
|
|
98
|
+
* supports SVGZ files, which are just an SVG stream compressed with the GZIP algorithm.
|
|
99
|
+
*
|
|
100
|
+
* [static mode]: https://www.w3.org/TR/SVG2/conform.html#static-mode
|
|
101
|
+
* [secure static mode]: https://www.w3.org/TR/SVG2/conform.html#secure-static-mode
|
|
102
|
+
*
|
|
103
|
+
* # The "base file" and resolving references to external files
|
|
104
|
+
*
|
|
105
|
+
* When you load an SVG, librsvg needs to know the location of the "base file"
|
|
106
|
+
* for it. This is so that librsvg can determine the location of referenced
|
|
107
|
+
* entities. For example, say you have an SVG in `/foo/bar/foo.svg`
|
|
108
|
+
* and that it has an image element like this:
|
|
109
|
+
*
|
|
110
|
+
* ```
|
|
111
|
+
* <image href="resources/foo.png" .../>
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* In this case, librsvg needs to know the location of the toplevel
|
|
115
|
+
* `/foo/bar/foo.svg` so that it can generate the appropriate
|
|
116
|
+
* reference to `/foo/bar/resources/foo.png`.
|
|
117
|
+
*
|
|
118
|
+
* ## Security and locations of referenced files
|
|
119
|
+
*
|
|
120
|
+
* When processing an SVG, librsvg will only load referenced files if they are
|
|
121
|
+
* in the same directory as the base file, or in a subdirectory of it. That is,
|
|
122
|
+
* if the base file is `/foo/bar/baz.svg`, then librsvg will
|
|
123
|
+
* only try to load referenced files (from SVG's
|
|
124
|
+
* `<image>` element, for example, or from content
|
|
125
|
+
* included through XML entities) if those files are in `/foo/bar/<anything>` or in `/foo/bar/<anything>\/.../<anything>`.
|
|
126
|
+
* This is so that malicious SVG files cannot include files that are in a directory above.
|
|
127
|
+
*
|
|
128
|
+
* The full set of rules for deciding which URLs may be loaded is as follows;
|
|
129
|
+
* they are applied in order. A referenced URL will not be loaded as soon as
|
|
130
|
+
* one of these rules fails:
|
|
131
|
+
*
|
|
132
|
+
* 1. All `data:` URLs may be loaded. These are sometimes used
|
|
133
|
+
* to include raster image data, encoded as base-64, directly in an SVG file.
|
|
134
|
+
*
|
|
135
|
+
* 2. URLs with queries ("?") or fragment identifiers ("#") are not allowed.
|
|
136
|
+
*
|
|
137
|
+
* 3. All URL schemes other than data: in references require a base URL. For
|
|
138
|
+
* example, this means that if you load an SVG with
|
|
139
|
+
* [ctor@Rsvg.Handle.new_from_data] without calling [method@Rsvg.Handle.set_base_uri],
|
|
140
|
+
* then any referenced files will not be allowed (e.g. raster images to be
|
|
141
|
+
* loaded from other files will not work).
|
|
142
|
+
*
|
|
143
|
+
* 4. If referenced URLs are absolute, rather than relative, then they must
|
|
144
|
+
* have the same scheme as the base URL. For example, if the base URL has a
|
|
145
|
+
* `file` scheme, then all URL references inside the SVG must
|
|
146
|
+
* also have the `file` scheme, or be relative references which
|
|
147
|
+
* will be resolved against the base URL.
|
|
148
|
+
*
|
|
149
|
+
* 5. If referenced URLs have a `resource` scheme, that is,
|
|
150
|
+
* if they are included into your binary program with GLib's resource
|
|
151
|
+
* mechanism, they are allowed to be loaded (provided that the base URL is
|
|
152
|
+
* also a `resource`, per the previous rule).
|
|
153
|
+
*
|
|
154
|
+
* 6. Otherwise, non-`file` schemes are not allowed. For
|
|
155
|
+
* example, librsvg will not load `http` resources, to keep
|
|
156
|
+
* malicious SVG data from "phoning home".
|
|
157
|
+
*
|
|
158
|
+
* 7. A relative URL must resolve to the same directory as the base URL, or to
|
|
159
|
+
* one of its subdirectories. Librsvg will canonicalize filenames, by
|
|
160
|
+
* removing ".." path components and resolving symbolic links, to decide whether
|
|
161
|
+
* files meet these conditions.
|
|
162
|
+
*
|
|
163
|
+
* # Loading an SVG with GIO
|
|
164
|
+
*
|
|
165
|
+
* This is the easiest and most resource-efficient way of loading SVG data into
|
|
166
|
+
* an [class@Rsvg.Handle].
|
|
167
|
+
*
|
|
168
|
+
* If you have a `GFile` that stands for an SVG file, you can simply call
|
|
169
|
+
* [ctor@Rsvg.Handle.new_from_gfile_sync] to load an [class@Rsvg.Handle] from it.
|
|
170
|
+
*
|
|
171
|
+
* Alternatively, if you have a `GInputStream`, you can use
|
|
172
|
+
* [ctor@Rsvg.Handle.new_from_stream_sync].
|
|
173
|
+
*
|
|
174
|
+
* Both of those methods allow specifying a `GCancellable`, so the loading
|
|
175
|
+
* process can be cancelled from another thread.
|
|
176
|
+
*
|
|
177
|
+
* ## Loading an SVG from memory
|
|
178
|
+
*
|
|
179
|
+
* If you already have SVG data in a byte buffer in memory, you can create a
|
|
180
|
+
* memory input stream with [ctor@Gio.MemoryInputStream.new_from_data] and feed that
|
|
181
|
+
* to [ctor@Rsvg.Handle.new_from_stream_sync].
|
|
182
|
+
*
|
|
183
|
+
* Note that in this case, it is important that you specify the base_file for
|
|
184
|
+
* the in-memory SVG data. Librsvg uses the base_file to resolve links to
|
|
185
|
+
* external content, like raster images.
|
|
186
|
+
*
|
|
187
|
+
* # Loading an SVG without GIO
|
|
188
|
+
*
|
|
189
|
+
* You can load an [class@Rsvg.Handle] from a simple filename or URI with
|
|
190
|
+
* [ctor@Rsvg.Handle.new_from_file]. Note that this is a blocking operation; there
|
|
191
|
+
* is no way to cancel it if loading a remote URI takes a long time. Also, note that
|
|
192
|
+
* this method does not let you specify [flags@Rsvg.HandleFlags].
|
|
193
|
+
*
|
|
194
|
+
* Otherwise, loading an SVG without GIO is not recommended, since librsvg will
|
|
195
|
+
* need to buffer your entire data internally before actually being able to
|
|
196
|
+
* parse it. The deprecated way of doing this is by creating a handle with
|
|
197
|
+
* [ctor@Rsvg.Handle.new] or [ctor@Rsvg.Handle.new_with_flags], and then using
|
|
198
|
+
* [method@Rsvg.Handle.write] and [method@Rsvg.Handle.close] to feed the handle with SVG data.
|
|
199
|
+
* Still, please try to use the GIO stream functions instead.
|
|
200
|
+
*
|
|
201
|
+
* # Resolution of the rendered image (dots per inch, or DPI)
|
|
202
|
+
*
|
|
203
|
+
* SVG images can contain dimensions like "`5cm`" or
|
|
204
|
+
* "`2pt`" that must be converted from physical units into
|
|
205
|
+
* device units. To do this, librsvg needs to know the actual dots per inch
|
|
206
|
+
* (DPI) of your target device. You can call [method@Rsvg.Handle.set_dpi] or
|
|
207
|
+
* [method@Rsvg.Handle.set_dpi_x_y] on an [class@Rsvg.Handle] to set the DPI before rendering
|
|
208
|
+
* it.
|
|
209
|
+
*
|
|
210
|
+
* # Rendering
|
|
211
|
+
*
|
|
212
|
+
* The preferred way to render a whole SVG document is to use
|
|
213
|
+
* [method@Rsvg.Handle.render_document]. Please see its documentation for
|
|
214
|
+
* details.
|
|
215
|
+
*
|
|
216
|
+
* # API ordering
|
|
217
|
+
*
|
|
218
|
+
* Due to the way the librsvg API evolved over time, an [class@Rsvg.Handle] object is available
|
|
219
|
+
* for use as soon as it is constructed. However, not all of its methods can be
|
|
220
|
+
* called at any time. For example, an [class@Rsvg.Handle] just constructed with [ctor@Rsvg.Handle.new]
|
|
221
|
+
* is not loaded yet, and it does not make sense to call [method@Rsvg.Handle.render_document] on it
|
|
222
|
+
* just at that point.
|
|
223
|
+
*
|
|
224
|
+
* The documentation for the available methods in [class@Rsvg.Handle] may mention that a particular
|
|
225
|
+
* method is only callable on a "fully loaded handle". This means either:
|
|
226
|
+
*
|
|
227
|
+
* * The handle was loaded with [method@Rsvg.Handle.write] and [method@Rsvg.Handle.close], and
|
|
228
|
+
* those functions returned no errors.
|
|
229
|
+
*
|
|
230
|
+
* * The handle was loaded with [method@Rsvg.Handle.read_stream_sync] and that function
|
|
231
|
+
* returned no errors.
|
|
232
|
+
*
|
|
233
|
+
* Before librsvg 2.46, the library did not fully verify that a handle was in a
|
|
234
|
+
* fully loaded state for the methods that require it. To preserve
|
|
235
|
+
* compatibility with old code which inadvertently called the API without
|
|
236
|
+
* checking for errors, or which called some methods outside of the expected
|
|
237
|
+
* order, librsvg will just emit a `g_critical()` message in those cases.
|
|
238
|
+
*
|
|
239
|
+
* New methods introduced in librsvg 2.46 and later will check for the correct
|
|
240
|
+
* ordering, and panic if they are called out of order. This will abort
|
|
241
|
+
* the program as if it had a failed assertion.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
/***** Begin documentation for RsvgHandle properties *****/
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* RsvgHandle:flags:
|
|
248
|
+
*
|
|
249
|
+
* Flags from [flags@Rsvg.HandleFlags].
|
|
250
|
+
*
|
|
251
|
+
* Since: 2.36
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* RsvgHandle:dpi-x:
|
|
256
|
+
*
|
|
257
|
+
* Horizontal resolution in dots per inch.
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* RsvgHandle:dpi-y:
|
|
262
|
+
*
|
|
263
|
+
* Horizontal resolution in dots per inch.
|
|
264
|
+
*/
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* RsvgHandle:base-uri: (attributes org.gtk.Property.get=rsvg_handle_get_base_uri org.gtk.Property.set=rsvg_handle_set_base_uri)
|
|
268
|
+
*
|
|
269
|
+
* Base URI, to be used to resolve relative references for resources. See the section
|
|
270
|
+
* "Security and locations of referenced files" for details.
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* RsvgHandle:width:
|
|
275
|
+
*
|
|
276
|
+
* Width, in pixels, of the rendered SVG after calling the size callback
|
|
277
|
+
* as specified by [method@Rsvg.Handle.set_size_callback].
|
|
278
|
+
*
|
|
279
|
+
* Deprecated: 2.46. For historical reasons, this property is of integer type,
|
|
280
|
+
* which cannot give the exact size of SVG images that are not pixel-aligned.
|
|
281
|
+
* Moreover, reading each of the size properties causes the size of the SVG to
|
|
282
|
+
* be recomputed, so reading both the `width` and
|
|
283
|
+
* `height` properties will cause two such computations.
|
|
284
|
+
* Please use [method@Rsvg.Handle.get_intrinsic_dimensions] instead.
|
|
285
|
+
*/
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* RsvgHandle:height:
|
|
289
|
+
*
|
|
290
|
+
* Height, in pixels, of the rendered SVG after calling the size callback
|
|
291
|
+
* as specified by [method@Rsvg.Handle.set_size_callback].
|
|
292
|
+
*
|
|
293
|
+
* Deprecated: 2.46. For historical reasons, this property is of integer type,
|
|
294
|
+
* which cannot give the exact size of SVG images that are not pixel-aligned.
|
|
295
|
+
* Moreover, reading each of the size properties causes the size of the SVG to
|
|
296
|
+
* be recomputed, so reading both the `width` and
|
|
297
|
+
* `height` properties will cause two such computations.
|
|
298
|
+
* Please use [method@Rsvg.Handle.get_intrinsic_dimensions] instead.
|
|
299
|
+
*/
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* RsvgHandle:em:
|
|
303
|
+
*
|
|
304
|
+
* Exact width, in pixels, of the rendered SVG before calling the size callback
|
|
305
|
+
* as specified by [method@Rsvg.Handle.set_size_callback].
|
|
306
|
+
*
|
|
307
|
+
* Deprecated: 2.46. Reading each of the size properties causes the size of the
|
|
308
|
+
* SVG to be recomputed, so reading both the `em` and
|
|
309
|
+
* `ex` properties will cause two such computations. Please
|
|
310
|
+
* use [method@Rsvg.Handle.get_intrinsic_dimensions] instead.
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* RsvgHandle:ex:
|
|
315
|
+
*
|
|
316
|
+
* Exact height, in pixels, of the rendered SVG before calling the size callback
|
|
317
|
+
* as specified by [method@Rsvg.Handle.set_size_callback].
|
|
318
|
+
*
|
|
319
|
+
* Deprecated: 2.46. Reading each of the size properties causes the size of the
|
|
320
|
+
* SVG to be recomputed, so reading both the `em` and
|
|
321
|
+
* `ex` properties will cause two such computations. Please
|
|
322
|
+
* use [method@Rsvg.Handle.get_intrinsic_dimensions] instead.
|
|
323
|
+
*/
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* RsvgHandle:title:
|
|
327
|
+
*
|
|
328
|
+
* SVG's title.
|
|
329
|
+
*
|
|
330
|
+
* Deprecated: 2.36. Reading this property always returns `NULL`.
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* RsvgHandle:desc:
|
|
335
|
+
*
|
|
336
|
+
* SVG's description.
|
|
337
|
+
*
|
|
338
|
+
* Deprecated: 2.36. Reading this property always returns `NULL`.
|
|
339
|
+
*/
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* RsvgHandle:metadata:
|
|
343
|
+
*
|
|
344
|
+
* SVG's metadata
|
|
345
|
+
*
|
|
346
|
+
* Deprecated: 2.36. Reading this property always returns `NULL`.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
/***** End documentation for RsvgHandle properties *****/
|
|
350
|
+
|
|
351
|
+
#define RSVG_TYPE_HANDLE (rsvg_handle_get_type ())
|
|
352
|
+
#define RSVG_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RSVG_TYPE_HANDLE, RsvgHandle))
|
|
353
|
+
#define RSVG_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RSVG_TYPE_HANDLE, RsvgHandleClass))
|
|
354
|
+
#define RSVG_IS_HANDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RSVG_TYPE_HANDLE))
|
|
355
|
+
#define RSVG_IS_HANDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RSVG_TYPE_HANDLE))
|
|
356
|
+
#define RSVG_HANDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RSVG_TYPE_HANDLE, RsvgHandleClass))
|
|
357
|
+
|
|
358
|
+
RSVG_API
|
|
359
|
+
GType rsvg_handle_get_type (void);
|
|
360
|
+
|
|
361
|
+
typedef struct _RsvgHandle RsvgHandle;
|
|
362
|
+
typedef struct _RsvgHandleClass RsvgHandleClass;
|
|
363
|
+
typedef struct _RsvgDimensionData RsvgDimensionData;
|
|
364
|
+
typedef struct _RsvgPositionData RsvgPositionData;
|
|
365
|
+
typedef struct _RsvgRectangle RsvgRectangle;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* RsvgHandleClass:
|
|
369
|
+
* @parent: parent class
|
|
370
|
+
*
|
|
371
|
+
* Class structure for [class@Rsvg.Handle].
|
|
372
|
+
*/
|
|
373
|
+
struct _RsvgHandleClass {
|
|
374
|
+
GObjectClass parent;
|
|
375
|
+
|
|
376
|
+
/*< private >*/
|
|
377
|
+
gpointer _abi_padding[15];
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
struct _RsvgHandle {
|
|
381
|
+
GObject parent;
|
|
382
|
+
|
|
383
|
+
/*< private >*/
|
|
384
|
+
|
|
385
|
+
gpointer _abi_padding[16];
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* RsvgDimensionData:
|
|
390
|
+
* @width: SVG's width, in pixels
|
|
391
|
+
* @height: SVG's height, in pixels
|
|
392
|
+
* @em: SVG's original width, unmodified by `RsvgSizeFunc`
|
|
393
|
+
* @ex: SVG's original height, unmodified by `RsvgSizeFunc`
|
|
394
|
+
*
|
|
395
|
+
* Dimensions of an SVG image from [method@Rsvg.Handle.get_dimensions], or an
|
|
396
|
+
* individual element from [method@Rsvg.Handle.get_dimensions_sub]. Please see
|
|
397
|
+
* the deprecation documentation for those functions.
|
|
398
|
+
*
|
|
399
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.get_intrinsic_size_in_pixels] or
|
|
400
|
+
* [method@Rsvg.Handle.get_geometry_for_layer] instead.
|
|
401
|
+
*/
|
|
402
|
+
struct _RsvgDimensionData {
|
|
403
|
+
int width;
|
|
404
|
+
int height;
|
|
405
|
+
gdouble em;
|
|
406
|
+
gdouble ex;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* RsvgPositionData:
|
|
411
|
+
* @x: position on the x axis
|
|
412
|
+
* @y: position on the y axis
|
|
413
|
+
*
|
|
414
|
+
* Position of an SVG fragment from [method@Rsvg.Handle.get_position_sub]. Please
|
|
415
|
+
* the deprecation documentation for that function.
|
|
416
|
+
*
|
|
417
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.get_geometry_for_layer] instead.
|
|
418
|
+
*/
|
|
419
|
+
struct _RsvgPositionData {
|
|
420
|
+
int x;
|
|
421
|
+
int y;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* RsvgRectangle:
|
|
426
|
+
* @x: X coordinate of the left side of the rectangle
|
|
427
|
+
* @y: Y coordinate of the the top side of the rectangle
|
|
428
|
+
* @width: width of the rectangle
|
|
429
|
+
* @height: height of the rectangle
|
|
430
|
+
*
|
|
431
|
+
* A data structure for holding a rectangle.
|
|
432
|
+
*
|
|
433
|
+
* Since: 2.46
|
|
434
|
+
*/
|
|
435
|
+
struct _RsvgRectangle {
|
|
436
|
+
double x;
|
|
437
|
+
double y;
|
|
438
|
+
double width;
|
|
439
|
+
double height;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* rsvg_cleanup:
|
|
444
|
+
*
|
|
445
|
+
* This function does nothing.
|
|
446
|
+
*
|
|
447
|
+
* Since: 2.36
|
|
448
|
+
* Deprecated: 2.46: No-op. This function should not be called from normal programs.
|
|
449
|
+
*/
|
|
450
|
+
RSVG_DEPRECATED
|
|
451
|
+
void rsvg_cleanup (void);
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* rsvg_set_default_dpi:
|
|
455
|
+
* @dpi: Dots Per Inch (aka Pixels Per Inch)
|
|
456
|
+
*
|
|
457
|
+
* Do not use this function. Create an [class@Rsvg.Handle] and call
|
|
458
|
+
* [method@Rsvg.Handle.set_dpi] on it instead.
|
|
459
|
+
*
|
|
460
|
+
* Since: 2.8
|
|
461
|
+
*
|
|
462
|
+
* Deprecated: 2.42.3: This function used to set a global default DPI. However,
|
|
463
|
+
* it only worked if it was called before any [class@Rsvg.Handle] objects had been
|
|
464
|
+
* created; it would not work after that. To avoid global mutable state, please
|
|
465
|
+
* use [method@Rsvg.Handle.set_dpi] instead.
|
|
466
|
+
*/
|
|
467
|
+
RSVG_DEPRECATED
|
|
468
|
+
void rsvg_set_default_dpi (double dpi);
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* rsvg_set_default_dpi_x_y:
|
|
472
|
+
* @dpi_x: Dots Per Inch (aka Pixels Per Inch)
|
|
473
|
+
* @dpi_y: Dots Per Inch (aka Pixels Per Inch)
|
|
474
|
+
*
|
|
475
|
+
* Do not use this function. Create an [class@Rsvg.Handle] and call
|
|
476
|
+
* [method@Rsvg.Handle.set_dpi_x_y] on it instead.
|
|
477
|
+
*
|
|
478
|
+
* Since: 2.8
|
|
479
|
+
*
|
|
480
|
+
* Deprecated: 2.42.3: This function used to set a global default DPI. However,
|
|
481
|
+
* it only worked if it was called before any [class@Rsvg.Handle] objects had been
|
|
482
|
+
* created; it would not work after that. To avoid global mutable state, please
|
|
483
|
+
* use [method@Rsvg.Handle.set_dpi] instead.
|
|
484
|
+
*/
|
|
485
|
+
RSVG_DEPRECATED
|
|
486
|
+
void rsvg_set_default_dpi_x_y (double dpi_x, double dpi_y);
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* rsvg_handle_set_dpi:
|
|
490
|
+
* @handle: An [class@Rsvg.Handle]
|
|
491
|
+
* @dpi: Dots Per Inch (i.e. as Pixels Per Inch)
|
|
492
|
+
*
|
|
493
|
+
* Sets the DPI at which the @handle will be rendered. Common values are
|
|
494
|
+
* 75, 90, and 300 DPI.
|
|
495
|
+
*
|
|
496
|
+
* Passing a number <= 0 to @dpi will reset the DPI to whatever the default
|
|
497
|
+
* value happens to be, but since [id@rsvg_set_default_dpi] is deprecated, please
|
|
498
|
+
* do not pass values <= 0 to this function.
|
|
499
|
+
*
|
|
500
|
+
* Since: 2.8
|
|
501
|
+
*/
|
|
502
|
+
RSVG_API
|
|
503
|
+
void rsvg_handle_set_dpi (RsvgHandle *handle, double dpi);
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* rsvg_handle_set_dpi_x_y:
|
|
507
|
+
* @handle: An [class@Rsvg.Handle]
|
|
508
|
+
* @dpi_x: Dots Per Inch (i.e. Pixels Per Inch)
|
|
509
|
+
* @dpi_y: Dots Per Inch (i.e. Pixels Per Inch)
|
|
510
|
+
*
|
|
511
|
+
* Sets the DPI at which the @handle will be rendered. Common values are
|
|
512
|
+
* 75, 90, and 300 DPI.
|
|
513
|
+
*
|
|
514
|
+
* Passing a number <= 0 to @dpi will reset the DPI to whatever the default
|
|
515
|
+
* value happens to be, but since [id@rsvg_set_default_dpi_x_y] is deprecated,
|
|
516
|
+
* please do not pass values <= 0 to this function.
|
|
517
|
+
*
|
|
518
|
+
* Since: 2.8
|
|
519
|
+
*/
|
|
520
|
+
RSVG_API
|
|
521
|
+
void rsvg_handle_set_dpi_x_y (RsvgHandle *handle, double dpi_x, double dpi_y);
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* rsvg_handle_new:
|
|
525
|
+
*
|
|
526
|
+
* Returns a new rsvg handle. Must be freed with [method@GObject.Object.unref]. This
|
|
527
|
+
* handle can be used to load an image.
|
|
528
|
+
*
|
|
529
|
+
* The preferred way of loading SVG data into the returned [class@Rsvg.Handle] is with
|
|
530
|
+
* [method@Rsvg.Handle.read_stream_sync].
|
|
531
|
+
*
|
|
532
|
+
* The deprecated way of loading SVG data is with [method@Rsvg.Handle.write] and
|
|
533
|
+
* [method@Rsvg.Handle.close]; note that these require buffering the entire file
|
|
534
|
+
* internally, and for this reason it is better to use the stream functions:
|
|
535
|
+
* [ctor@Rsvg.Handle.new_from_stream_sync], [method@Rsvg.Handle.read_stream_sync], or
|
|
536
|
+
* [ctor@Rsvg.Handle.new_from_gfile_sync].
|
|
537
|
+
*
|
|
538
|
+
* After loading the [class@Rsvg.Handle] with data, you can render it using Cairo or get
|
|
539
|
+
* a GdkPixbuf from it. When finished, free the handle with [method@GObject.Object.unref]. No
|
|
540
|
+
* more than one image can be loaded with one handle.
|
|
541
|
+
*
|
|
542
|
+
* Note that this function creates an [class@Rsvg.Handle] with no flags set. If you
|
|
543
|
+
* require any of [flags@Rsvg.HandleFlags] to be set, use any of
|
|
544
|
+
* [ctor@Rsvg.Handle.new_with_flags], [ctor@Rsvg.Handle.new_from_stream_sync], or
|
|
545
|
+
* [ctor@Rsvg.Handle.new_from_gfile_sync].
|
|
546
|
+
*
|
|
547
|
+
* Returns: (transfer full): A new [class@Rsvg.Handle] with no flags set.
|
|
548
|
+
**/
|
|
549
|
+
RSVG_API
|
|
550
|
+
RsvgHandle *rsvg_handle_new (void);
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* rsvg_handle_write:
|
|
554
|
+
* @handle: an [class@Rsvg.Handle]
|
|
555
|
+
* @buf: (array length=count) (element-type guchar): pointer to svg data
|
|
556
|
+
* @count: length of the @buf buffer in bytes
|
|
557
|
+
* @error: return location for a `GError`
|
|
558
|
+
*
|
|
559
|
+
* Loads the next @count bytes of the image. You can call this function multiple
|
|
560
|
+
* times until the whole document is consumed; then you must call [method@Rsvg.Handle.close]
|
|
561
|
+
* to actually parse the document.
|
|
562
|
+
*
|
|
563
|
+
* Before calling this function for the first time, you may need to call
|
|
564
|
+
* [method@Rsvg.Handle.set_base_uri] or [method@Rsvg.Handle.set_base_gfile] to set the "base
|
|
565
|
+
* file" for resolving references to external resources. SVG elements like
|
|
566
|
+
* `<image>` which reference external resources will be
|
|
567
|
+
* resolved relative to the location you specify with those functions.
|
|
568
|
+
*
|
|
569
|
+
* Returns: `TRUE` on success, or `FALSE` on error.
|
|
570
|
+
*
|
|
571
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.read_stream_sync] or the constructor
|
|
572
|
+
* functions [ctor@Rsvg.Handle.new_from_gfile_sync] or
|
|
573
|
+
* [ctor@Rsvg.Handle.new_from_stream_sync]. This function is deprecated because it
|
|
574
|
+
* will accumulate data from the @buf in memory until [method@Rsvg.Handle.close] gets
|
|
575
|
+
* called. To avoid a big temporary buffer, use the suggested functions, which
|
|
576
|
+
* take a `GFile` or a `GInputStream` and do not require a temporary buffer.
|
|
577
|
+
**/
|
|
578
|
+
RSVG_DEPRECATED_FOR(rsvg_handle_read_stream_sync)
|
|
579
|
+
gboolean rsvg_handle_write (RsvgHandle *handle,
|
|
580
|
+
const guchar *buf,
|
|
581
|
+
gsize count,
|
|
582
|
+
GError **error);
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* rsvg_handle_close:
|
|
586
|
+
* @handle: a [class@Rsvg.Handle]
|
|
587
|
+
* @error: return location for a `GError`
|
|
588
|
+
*
|
|
589
|
+
* This is used after calling [method@Rsvg.Handle.write] to indicate that there is no more data
|
|
590
|
+
* to consume, and to start the actual parsing of the SVG document. The only reason to
|
|
591
|
+
* call this function is if you use use [method@Rsvg.Handle.write] to feed data into the @handle;
|
|
592
|
+
* if you use the other methods like [ctor@Rsvg.Handle.new_from_file] or
|
|
593
|
+
* [method@Rsvg.Handle.read_stream_sync], then you do not need to call this function.
|
|
594
|
+
*
|
|
595
|
+
* This will return `TRUE` if the loader closed successfully and the
|
|
596
|
+
* SVG data was parsed correctly. Note that @handle isn't freed until
|
|
597
|
+
* [method@GObject.Object.unref] is called.
|
|
598
|
+
*
|
|
599
|
+
* Returns: `TRUE` on success, or `FALSE` on error.
|
|
600
|
+
*
|
|
601
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.read_stream_sync] or the constructor
|
|
602
|
+
* functions [ctor@Rsvg.Handle.new_from_gfile_sync] or
|
|
603
|
+
* [ctor@Rsvg.Handle.new_from_stream_sync]. See the deprecation notes for
|
|
604
|
+
* [method@Rsvg.Handle.write] for more information.
|
|
605
|
+
**/
|
|
606
|
+
RSVG_DEPRECATED_FOR(rsvg_handle_read_stream_sync)
|
|
607
|
+
gboolean rsvg_handle_close (RsvgHandle *handle, GError **error);
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* rsvg_handle_get_pixbuf:
|
|
611
|
+
* @handle: An [class@Rsvg.Handle]
|
|
612
|
+
*
|
|
613
|
+
* Returns the pixbuf loaded by @handle. The pixbuf returned will be reffed, so
|
|
614
|
+
* the caller of this function must assume that ref.
|
|
615
|
+
*
|
|
616
|
+
* API ordering: This function must be called on a fully-loaded @handle. See
|
|
617
|
+
* the section "[API ordering](class.Handle.html#api-ordering)" for details.
|
|
618
|
+
*
|
|
619
|
+
* This function depends on the [class@Rsvg.Handle]'s dots-per-inch value (DPI) to compute the
|
|
620
|
+
* "natural size" of the document in pixels, so you should call [method@Rsvg.Handle.set_dpi]
|
|
621
|
+
* beforehand.
|
|
622
|
+
*
|
|
623
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
624
|
+
* during rendering.
|
|
625
|
+
**/
|
|
626
|
+
RSVG_API
|
|
627
|
+
GdkPixbuf *rsvg_handle_get_pixbuf (RsvgHandle *handle);
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* rsvg_handle_get_pixbuf_sub:
|
|
631
|
+
* @handle: An #RsvgHandle
|
|
632
|
+
* @id: (nullable): An element's id within the SVG, starting with "#" (a single
|
|
633
|
+
* hash character), for example, `#layer1`. This notation corresponds to a
|
|
634
|
+
* URL's fragment ID. Alternatively, pass `NULL` to use the whole SVG.
|
|
635
|
+
*
|
|
636
|
+
* Creates a `GdkPixbuf` the same size as the entire SVG loaded into @handle, but
|
|
637
|
+
* only renders the sub-element that has the specified @id (and all its
|
|
638
|
+
* sub-sub-elements recursively). If @id is `NULL`, this function renders the
|
|
639
|
+
* whole SVG.
|
|
640
|
+
*
|
|
641
|
+
* This function depends on the [class@Rsvg.Handle]'s dots-per-inch value (DPI) to compute the
|
|
642
|
+
* "natural size" of the document in pixels, so you should call [method@Rsvg.Handle.set_dpi]
|
|
643
|
+
* beforehand.
|
|
644
|
+
*
|
|
645
|
+
* If you need to render an image which is only big enough to fit a particular
|
|
646
|
+
* sub-element of the SVG, consider using [method@Rsvg.Handle.render_element].
|
|
647
|
+
*
|
|
648
|
+
* Element IDs should look like an URL fragment identifier; for example, pass
|
|
649
|
+
* `#foo` (hash `foo`) to get the geometry of the element that
|
|
650
|
+
* has an `id="foo"` attribute.
|
|
651
|
+
*
|
|
652
|
+
* API ordering: This function must be called on a fully-loaded @handle. See
|
|
653
|
+
* the section "[API ordering](class.Handle.html#api-ordering)" for details.
|
|
654
|
+
*
|
|
655
|
+
* Returns: (transfer full) (nullable): a pixbuf, or `NULL` if an error occurs
|
|
656
|
+
* during rendering.
|
|
657
|
+
*
|
|
658
|
+
* Since: 2.14
|
|
659
|
+
**/
|
|
660
|
+
RSVG_API
|
|
661
|
+
GdkPixbuf *rsvg_handle_get_pixbuf_sub (RsvgHandle *handle, const char *id);
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* rsvg_handle_get_base_uri: (attributes org.gtk.Method.get_property=base-uri)
|
|
665
|
+
* @handle: A [class@Rsvg.Handle]
|
|
666
|
+
*
|
|
667
|
+
* Gets the base uri for this [class@Rsvg.Handle].
|
|
668
|
+
*
|
|
669
|
+
* Returns: the base uri, possibly null
|
|
670
|
+
* Since: 2.8
|
|
671
|
+
*/
|
|
672
|
+
RSVG_API
|
|
673
|
+
const char *rsvg_handle_get_base_uri (RsvgHandle *handle);
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* rsvg_handle_set_base_uri: (attributes org.gtk.Method.set_property=base-uri)
|
|
677
|
+
* @handle: A [class@Rsvg.Handle]
|
|
678
|
+
* @base_uri: The base uri
|
|
679
|
+
*
|
|
680
|
+
* Set the base URI for this SVG.
|
|
681
|
+
*
|
|
682
|
+
* Note: This function may only be called before [method@Rsvg.Handle.write] or
|
|
683
|
+
* [method@Rsvg.Handle.read_stream_sync] have been called.
|
|
684
|
+
*
|
|
685
|
+
* Since: 2.9
|
|
686
|
+
*/
|
|
687
|
+
RSVG_API
|
|
688
|
+
void rsvg_handle_set_base_uri (RsvgHandle *handle, const char *base_uri);
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* rsvg_handle_get_dimensions:
|
|
692
|
+
* @handle: A [class@Rsvg.Handle]
|
|
693
|
+
* @dimension_data: (out): A place to store the SVG's size
|
|
694
|
+
*
|
|
695
|
+
* Get the SVG's size. Do not call from within the size_func callback, because
|
|
696
|
+
* an infinite loop will occur.
|
|
697
|
+
*
|
|
698
|
+
* This function depends on the [class@Rsvg.Handle]'s DPI to compute dimensions in
|
|
699
|
+
* pixels, so you should call [method@Rsvg.Handle.set_dpi] beforehand.
|
|
700
|
+
*
|
|
701
|
+
* Deprecated: 2.52. Use [method@Rsvg.Handle.get_intrinsic_size_in_pixels] instead. This
|
|
702
|
+
* function is deprecated because it is not able to return exact fractional dimensions,
|
|
703
|
+
* only integer pixels.
|
|
704
|
+
*
|
|
705
|
+
* Since: 2.14
|
|
706
|
+
*/
|
|
707
|
+
RSVG_DEPRECATED_FOR(rsvg_handle_get_intrinsic_size_in_pixels)
|
|
708
|
+
void rsvg_handle_get_dimensions (RsvgHandle *handle, RsvgDimensionData *dimension_data);
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* rsvg_handle_get_dimensions_sub:
|
|
712
|
+
* @handle: A [class@Rsvg.Handle]
|
|
713
|
+
* @dimension_data: (out): A place to store the SVG's size
|
|
714
|
+
* @id: (nullable): An element's id within the SVG, starting with "#" (a single
|
|
715
|
+
* hash character), for example, `#layer1`. This notation corresponds to a
|
|
716
|
+
* URL's fragment ID. Alternatively, pass `NULL` to use the whole SVG.
|
|
717
|
+
*
|
|
718
|
+
* Get the size of a subelement of the SVG file. Do not call from within the
|
|
719
|
+
* size_func callback, because an infinite loop will occur.
|
|
720
|
+
*
|
|
721
|
+
* This function depends on the [class@Rsvg.Handle]'s DPI to compute dimensions in
|
|
722
|
+
* pixels, so you should call [method@Rsvg.Handle.set_dpi] beforehand.
|
|
723
|
+
*
|
|
724
|
+
* Element IDs should look like an URL fragment identifier; for example, pass
|
|
725
|
+
* `#foo` (hash `foo`) to get the geometry of the element that
|
|
726
|
+
* has an `id="foo"` attribute.
|
|
727
|
+
*
|
|
728
|
+
* Returns: `TRUE` if the dimensions could be obtained, `FALSE` if there was an error.
|
|
729
|
+
*
|
|
730
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.get_geometry_for_layer] instead.
|
|
731
|
+
*
|
|
732
|
+
* Since: 2.22
|
|
733
|
+
*/
|
|
734
|
+
RSVG_DEPRECATED_FOR(rsvg_handle_get_geometry_for_layer)
|
|
735
|
+
gboolean rsvg_handle_get_dimensions_sub (RsvgHandle *handle,
|
|
736
|
+
RsvgDimensionData *dimension_data,
|
|
737
|
+
const char *id);
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* rsvg_handle_get_position_sub:
|
|
741
|
+
* @handle: A [class@Rsvg.Handle]
|
|
742
|
+
* @position_data: (out): A place to store the SVG fragment's position.
|
|
743
|
+
* @id: (nullable): An element's id within the SVG, starting with "#" (a single
|
|
744
|
+
* hash character), for example, `#layer1`. This notation corresponds to a
|
|
745
|
+
* URL's fragment ID. Alternatively, pass %NULL to use the whole SVG.
|
|
746
|
+
*
|
|
747
|
+
* Get the position of a subelement of the SVG file. Do not call from within
|
|
748
|
+
* the size_func callback, because an infinite loop will occur.
|
|
749
|
+
*
|
|
750
|
+
* This function depends on the [class@Rsvg.Handle]'s DPI to compute dimensions in
|
|
751
|
+
* pixels, so you should call [method@Rsvg.Handle.set_dpi] beforehand.
|
|
752
|
+
*
|
|
753
|
+
* Element IDs should look like an URL fragment identifier; for example, pass
|
|
754
|
+
* `#foo` (hash `foo`) to get the geometry of the element that
|
|
755
|
+
* has an `id="foo"` attribute.
|
|
756
|
+
*
|
|
757
|
+
* Returns: `TRUE` if the position could be obtained, `FALSE` if there was an error.
|
|
758
|
+
*
|
|
759
|
+
* Deprecated: 2.46. Use [method@Rsvg.Handle.get_geometry_for_layer] instead. This function is
|
|
760
|
+
* deprecated since it is not able to return exact floating-point positions, only integer
|
|
761
|
+
* pixels.
|
|
762
|
+
*
|
|
763
|
+
* Since: 2.22
|
|
764
|
+
*/
|
|
765
|
+
RSVG_DEPRECATED_FOR(rsvg_handle_get_geometry_for_layer)
|
|
766
|
+
gboolean rsvg_handle_get_position_sub (RsvgHandle *handle,
|
|
767
|
+
RsvgPositionData *position_data,
|
|
768
|
+
const char *id);
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* rsvg_handle_has_sub:
|
|
772
|
+
* @handle: a [class@Rsvg.Handle]
|
|
773
|
+
* @id: An element's id within the SVG, starting with "#" (a single hash
|
|
774
|
+
* character), for example, `#layer1`. This notation corresponds to a URL's
|
|
775
|
+
* fragment ID.
|
|
776
|
+
*
|
|
777
|
+
* Checks whether the element @id exists in the SVG document.
|
|
778
|
+
*
|
|
779
|
+
* Element IDs should look like an URL fragment identifier; for example, pass
|
|
780
|
+
* `#foo` (hash `foo`) to get the geometry of the element that
|
|
781
|
+
* has an `id="foo"` attribute.
|
|
782
|
+
*
|
|
783
|
+
* Returns: `TRUE` if @id exists in the SVG document, `FALSE` otherwise.
|
|
784
|
+
*
|
|
785
|
+
* Since: 2.22
|
|
786
|
+
*/
|
|
787
|
+
RSVG_API
|
|
788
|
+
gboolean rsvg_handle_has_sub (RsvgHandle *handle, const char *id);
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* RsvgUnit:
|
|
792
|
+
* @RSVG_UNIT_PERCENT: percentage values; where <literal>1.0</literal> means 100%.
|
|
793
|
+
* @RSVG_UNIT_PX: pixels
|
|
794
|
+
* @RSVG_UNIT_EM: em, or the current font size
|
|
795
|
+
* @RSVG_UNIT_EX: x-height of the current font
|
|
796
|
+
* @RSVG_UNIT_IN: inches
|
|
797
|
+
* @RSVG_UNIT_CM: centimeters
|
|
798
|
+
* @RSVG_UNIT_MM: millimeters
|
|
799
|
+
* @RSVG_UNIT_PT: points, or 1/72 inch
|
|
800
|
+
* @RSVG_UNIT_PC: picas, or 1/6 inch (12 points)
|
|
801
|
+
*
|
|
802
|
+
* Units for the `RsvgLength` struct. These have the same meaning as [CSS length
|
|
803
|
+
* units](https://www.w3.org/TR/CSS21/syndata.html#length-units).
|
|
804
|
+
*/
|
|
805
|
+
typedef enum {
|
|
806
|
+
RSVG_UNIT_PERCENT,
|
|
807
|
+
RSVG_UNIT_PX,
|
|
808
|
+
RSVG_UNIT_EM,
|
|
809
|
+
RSVG_UNIT_EX,
|
|
810
|
+
RSVG_UNIT_IN,
|
|
811
|
+
RSVG_UNIT_CM,
|
|
812
|
+
RSVG_UNIT_MM,
|
|
813
|
+
RSVG_UNIT_PT,
|
|
814
|
+
RSVG_UNIT_PC
|
|
815
|
+
} RsvgUnit;
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* RsvgLength:
|
|
819
|
+
* @length: numeric part of the length
|
|
820
|
+
* @unit: unit part of the length
|
|
821
|
+
*
|
|
822
|
+
* `RsvgLength` values are used in [method@Rsvg.Handle.get_intrinsic_dimensions], for
|
|
823
|
+
* example, to return the CSS length values of the `width` and
|
|
824
|
+
* `height` attributes of an `<svg>` element.
|
|
825
|
+
*
|
|
826
|
+
* This is equivalent to [CSS lengths](https://www.w3.org/TR/CSS21/syndata.html#length-units).
|
|
827
|
+
*
|
|
828
|
+
* It is up to the calling application to convert lengths in non-pixel units
|
|
829
|
+
* (i.e. those where the @unit field is not `RSVG_UNIT_PX`) into something
|
|
830
|
+
* meaningful to the application. For example, if your application knows the
|
|
831
|
+
* dots-per-inch (DPI) it is using, it can convert lengths with @unit in
|
|
832
|
+
* `RSVG_UNIT_IN` or other physical units.
|
|
833
|
+
*/
|
|
834
|
+
typedef struct {
|
|
835
|
+
double length;
|
|
836
|
+
RsvgUnit unit;
|
|
837
|
+
} RsvgLength;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* rsvg_handle_get_intrinsic_dimensions:
|
|
841
|
+
* @handle: An [class@Rsvg.Handle]
|
|
842
|
+
* @out_has_width: (out)(optional): Will be set to `TRUE`; see below.
|
|
843
|
+
* @out_width: (out)(optional): Will be set to the computed value of the `width` property in the toplevel SVG.
|
|
844
|
+
* @out_has_height: (out)(optional): Will be set to `TRUE`; see below.
|
|
845
|
+
* @out_height: (out)(optional): Will be set to the computed value of the `height` property in the toplevel SVG.
|
|
846
|
+
* @out_has_viewbox: (out)(optional): Will be set to `TRUE` if the toplevel SVG has a `viewBox` attribute
|
|
847
|
+
* @out_viewbox: (out)(optional): Will be set to the value of the `viewBox` attribute in the toplevel SVG
|
|
848
|
+
*
|
|
849
|
+
* In simple terms, queries the `width`, `height`, and `viewBox` attributes in an SVG document.
|
|
850
|
+
*
|
|
851
|
+
* If you are calling this function to compute a scaling factor to render the SVG,
|
|
852
|
+
* consider simply using [method@Rsvg.Handle.render_document] instead; it will do the
|
|
853
|
+
* scaling computations automatically.
|
|
854
|
+
*
|
|
855
|
+
* Before librsvg 2.54.0, the `out_has_width` and `out_has_height` arguments would be set to true or false
|
|
856
|
+
* depending on whether the SVG document actually had `width` and `height` attributes, respectively.
|
|
857
|
+
*
|
|
858
|
+
* However, since librsvg 2.54.0, `width` and `height` are now [geometry
|
|
859
|
+
* properties](https://www.w3.org/TR/SVG2/geometry.html) per the SVG2 specification; they
|
|
860
|
+
* are not plain attributes. SVG2 made it so that the initial value of those properties
|
|
861
|
+
* is `auto`, which is equivalent to specifing a value of `100%`. In this sense, even SVG
|
|
862
|
+
* documents which lack `width` or `height` attributes semantically have to make them
|
|
863
|
+
* default to `100%`. This is why since librsvg 2.54.0, `out_has_width` and
|
|
864
|
+
* `out_has_heigth` are always returned as `TRUE`, since with SVG2 all documents *have* a
|
|
865
|
+
* default width and height of `100%`.
|
|
866
|
+
*
|
|
867
|
+
* As an example, the following SVG element has a `width` of 100 pixels and a `height` of 400 pixels, but no `viewBox`. This
|
|
868
|
+
* function will return those sizes in `out_width` and `out_height`, and set `out_has_viewbox` to `FALSE`.
|
|
869
|
+
*
|
|
870
|
+
* ```
|
|
871
|
+
* <svg xmlns="http://www.w3.org/2000/svg" width="100" height="400">
|
|
872
|
+
* ```
|
|
873
|
+
*
|
|
874
|
+
* Conversely, the following element has a `viewBox`, but no `width` or `height`. This function will
|
|
875
|
+
* set `out_has_viewbox` to `TRUE`, and it will also set `out_has_width` and `out_has_height` to `TRUE` but
|
|
876
|
+
* return both length values as `100%`.
|
|
877
|
+
*
|
|
878
|
+
* ```
|
|
879
|
+
* <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 400">
|
|
880
|
+
* ```
|
|
881
|
+
*
|
|
882
|
+
* Note that the `RsvgLength` return values have `RsvgUnits` in them; you should
|
|
883
|
+
* not assume that they are always in pixels. For example, the following SVG element
|
|
884
|
+
* will return width and height values whose `units` fields are `RSVG_UNIT_MM`.
|
|
885
|
+
*
|
|
886
|
+
* ```
|
|
887
|
+
* <svg xmlns="http://www.w3.org/2000/svg" width="210mm" height="297mm">
|
|
888
|
+
* ```
|
|
889
|
+
*
|
|
890
|
+
* API ordering: This function must be called on a fully-loaded @handle. See
|
|
891
|
+
* the section "[API ordering](class.Handle.html#api-ordering)" for details.
|
|
892
|
+
*
|
|
893
|
+
* Panics: this function will panic if the @handle is not fully-loaded.
|
|
894
|
+
*
|
|
895
|
+
* Since: 2.46
|
|
896
|
+
*/
|
|
897
|
+
RSVG_API
|
|
898
|
+
void rsvg_handle_get_intrinsic_dimensions (RsvgHandle *handle,
|
|
899
|
+
gboolean *out_has_width,
|
|
900
|
+
RsvgLength *out_width,
|
|
901
|
+
gboolean *out_has_height,
|
|
902
|
+
RsvgLength *out_height,
|
|
903
|
+
gboolean *out_has_viewbox,
|
|
904
|
+
RsvgRectangle *out_viewbox);
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* rsvg_handle_get_intrinsic_size_in_pixels:
|
|
908
|
+
* @handle: An [class@Rsvg.Handle]
|
|
909
|
+
* @out_width: (out)(optional): Will be set to the computed width; you should round this up to get integer pixels.
|
|
910
|
+
* @out_height: (out)(optional): Will be set to the computed height; you should round this up to get integer pixels.
|
|
911
|
+
*
|
|
912
|
+
* Converts an SVG document's intrinsic dimensions to pixels, and returns the result.
|
|
913
|
+
*
|
|
914
|
+
* This function is able to extract the size in pixels from an SVG document if the
|
|
915
|
+
* document has both `width` and `height` attributes
|
|
916
|
+
* with physical units (px, in, cm, mm, pt, pc) or font-based units (em, ex). For
|
|
917
|
+
* physical units, the dimensions are normalized to pixels using the dots-per-inch (DPI)
|
|
918
|
+
* value set previously with [method@Rsvg.Handle.set_dpi]. For font-based units, this function
|
|
919
|
+
* uses the computed value of the `font-size` property for the toplevel
|
|
920
|
+
* `<svg>` element. In those cases, this function returns `TRUE`.
|
|
921
|
+
*
|
|
922
|
+
* This function is not able to extract the size in pixels directly from the intrinsic
|
|
923
|
+
* dimensions of the SVG document if the `width` or
|
|
924
|
+
* `height` are in percentage units (or if they do not exist, in which
|
|
925
|
+
* case the SVG spec mandates that they default to 100%), as these require a
|
|
926
|
+
* <firstterm>viewport</firstterm> to be resolved to a final size. In this case, the
|
|
927
|
+
* function returns `FALSE`.
|
|
928
|
+
*
|
|
929
|
+
* For example, the following document fragment has intrinsic dimensions that will resolve
|
|
930
|
+
* to 20x30 pixels.
|
|
931
|
+
*
|
|
932
|
+
* ```
|
|
933
|
+
* <svg xmlns="http://www.w3.org/2000/svg" width="20" height="30"/>
|
|
934
|
+
* ```
|
|
935
|
+
*
|
|
936
|
+
* Similarly, if the DPI is set to 96, this document will resolve to 192×288 pixels (i.e. 96×2 × 96×3).
|
|
937
|
+
*
|
|
938
|
+
* ```
|
|
939
|
+
* <svg xmlns="http://www.w3.org/2000/svg" width="2in" height="3in"/>
|
|
940
|
+
* ```
|
|
941
|
+
*
|
|
942
|
+
* The dimensions of the following documents cannot be resolved to pixels directly, and
|
|
943
|
+
* this function would return `FALSE` for them:
|
|
944
|
+
*
|
|
945
|
+
* ```
|
|
946
|
+
* <!-- Needs a viewport against which to compute the percentages. -->
|
|
947
|
+
* <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"/>
|
|
948
|
+
*
|
|
949
|
+
* <!-- Does not have intrinsic width/height, just a 1:2 aspect ratio which
|
|
950
|
+
* needs to be fitted within a viewport. -->
|
|
951
|
+
* <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 200"/>
|
|
952
|
+
* ```
|
|
953
|
+
*
|
|
954
|
+
* Instead of querying an SVG document's size, applications are encouraged to render SVG
|
|
955
|
+
* documents to a size chosen by the application, by passing a suitably-sized viewport to
|
|
956
|
+
* [method@Rsvg.Handle.render_document].
|
|
957
|
+
*
|
|
958
|
+
* Returns: `TRUE` if the dimensions could be converted directly to pixels; in this case
|
|
959
|
+
* @out_width and @out_height will be set accordingly. Note that the dimensions are
|
|
960
|
+
* floating-point numbers, so your application can know the exact size of an SVG document.
|
|
961
|
+
* To get integer dimensions, you should use `ceil()` to round up to the nearest integer
|
|
962
|
+
* (just using `round()`, may may chop off pixels with fractional coverage). If the
|
|
963
|
+
* dimensions cannot be converted to pixels, returns `FALSE` and puts 0.0 in both
|
|
964
|
+
* @out_width and @out_height.
|
|
965
|
+
*
|
|
966
|
+
* Since: 2.52
|
|
967
|
+
*/
|
|
968
|
+
RSVG_API
|
|
969
|
+
gboolean rsvg_handle_get_intrinsic_size_in_pixels (RsvgHandle *handle,
|
|
970
|
+
gdouble *out_width,
|
|
971
|
+
gdouble *out_height);
|
|
972
|
+
|
|
973
|
+
/* GIO APIs */
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* RsvgHandleFlags:
|
|
977
|
+
* @RSVG_HANDLE_FLAGS_NONE: No flags are set.
|
|
978
|
+
* @RSVG_HANDLE_FLAG_UNLIMITED: Disable safety limits in the XML parser. Libxml2 has
|
|
979
|
+
* [several limits](https://gitlab.gnome.org/GNOME/libxml2/blob/master/include/libxml/parserInternals.h)
|
|
980
|
+
* designed to keep malicious XML content from consuming too much memory while parsing.
|
|
981
|
+
* For security reasons, this should only be used for trusted input! Since: 2.40.3
|
|
982
|
+
* @RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA: Use this if the Cairo surface to which you are
|
|
983
|
+
* rendering is a PDF, PostScript, SVG, or Win32 Printing surface. This will make librsvg
|
|
984
|
+
* and Cairo use the original, compressed data for images in the final output, instead of
|
|
985
|
+
* passing uncompressed images. For example, this will make the a resulting PDF file
|
|
986
|
+
* smaller and faster. Please see [the Cairo
|
|
987
|
+
* documentation](https://www.cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-mime-data)
|
|
988
|
+
* for details.
|
|
989
|
+
*
|
|
990
|
+
* Configuration flags for an [class@Rsvg.Handle]. Note that not all of [class@Rsvg.Handle]'s
|
|
991
|
+
* constructors let you specify flags. For this reason, [ctor@Rsvg.Handle.new_from_gfile_sync]
|
|
992
|
+
* and [ctor@Rsvg.Handle.new_from_stream_sync] are the preferred ways to create a handle.
|
|
993
|
+
*
|
|
994
|
+
* Since: 2.40.3
|
|
995
|
+
*/
|
|
996
|
+
typedef enum /*< flags >*/
|
|
997
|
+
{
|
|
998
|
+
RSVG_HANDLE_FLAGS_NONE = 0,
|
|
999
|
+
RSVG_HANDLE_FLAG_UNLIMITED = 1 << 0,
|
|
1000
|
+
RSVG_HANDLE_FLAG_KEEP_IMAGE_DATA = 1 << 1
|
|
1001
|
+
} RsvgHandleFlags;
|
|
1002
|
+
|
|
1003
|
+
RSVG_API
|
|
1004
|
+
GType rsvg_handle_flags_get_type (void);
|
|
1005
|
+
#define RSVG_TYPE_HANDLE_FLAGS (rsvg_handle_flags_get_type())
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* rsvg_handle_new_with_flags:
|
|
1009
|
+
* @flags: flags from [flags@Rsvg.HandleFlags]
|
|
1010
|
+
*
|
|
1011
|
+
* Creates a new [class@Rsvg.Handle] with flags @flags. After calling this function,
|
|
1012
|
+
* you can feed the resulting handle with SVG data by using
|
|
1013
|
+
* [method@Rsvg.Handle.read_stream_sync].
|
|
1014
|
+
*
|
|
1015
|
+
* Returns: (transfer full): a new [class@Rsvg.Handle]
|
|
1016
|
+
*
|
|
1017
|
+
* Since: 2.36
|
|
1018
|
+
**/
|
|
1019
|
+
RSVG_API
|
|
1020
|
+
RsvgHandle *rsvg_handle_new_with_flags (RsvgHandleFlags flags);
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* rsvg_handle_set_base_gfile:
|
|
1024
|
+
* @handle: a [class@Rsvg.Handle]
|
|
1025
|
+
* @base_file: a `GFile`
|
|
1026
|
+
*
|
|
1027
|
+
* Set the base URI for @handle from @file.
|
|
1028
|
+
*
|
|
1029
|
+
* Note: This function may only be called before [method@Rsvg.Handle.write] or
|
|
1030
|
+
* [method@Rsvg.Handle.read_stream_sync] have been called.
|
|
1031
|
+
*
|
|
1032
|
+
* Since: 2.32
|
|
1033
|
+
*/
|
|
1034
|
+
RSVG_API
|
|
1035
|
+
void rsvg_handle_set_base_gfile (RsvgHandle *handle,
|
|
1036
|
+
GFile *base_file);
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* rsvg_handle_read_stream_sync:
|
|
1040
|
+
* @handle: a [class@Rsvg.Handle]
|
|
1041
|
+
* @stream: a `GInputStream`
|
|
1042
|
+
* @cancellable: (nullable): a `GCancellable`, or `NULL`
|
|
1043
|
+
* @error: return location for a `GError`
|
|
1044
|
+
*
|
|
1045
|
+
* Reads @stream and writes the data from it to @handle.
|
|
1046
|
+
*
|
|
1047
|
+
* Before calling this function, you may need to call [method@Rsvg.Handle.set_base_uri]
|
|
1048
|
+
* or [method@Rsvg.Handle.set_base_gfile] to set the "base file" for resolving
|
|
1049
|
+
* references to external resources. SVG elements like
|
|
1050
|
+
* `<image>` which reference external resources will be
|
|
1051
|
+
* resolved relative to the location you specify with those functions.
|
|
1052
|
+
*
|
|
1053
|
+
* If @cancellable is not `NULL`, then the operation can be cancelled by
|
|
1054
|
+
* triggering the cancellable object from another thread. If the
|
|
1055
|
+
* operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be
|
|
1056
|
+
* returned.
|
|
1057
|
+
*
|
|
1058
|
+
* Returns: `TRUE` if reading @stream succeeded, or `FALSE` otherwise
|
|
1059
|
+
* with @error filled in
|
|
1060
|
+
*
|
|
1061
|
+
* Since: 2.32
|
|
1062
|
+
*/
|
|
1063
|
+
RSVG_API
|
|
1064
|
+
gboolean rsvg_handle_read_stream_sync (RsvgHandle *handle,
|
|
1065
|
+
GInputStream *stream,
|
|
1066
|
+
GCancellable *cancellable,
|
|
1067
|
+
GError **error);
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* rsvg_handle_new_from_gfile_sync:
|
|
1071
|
+
* @file: a `GFile`
|
|
1072
|
+
* @flags: flags from [flags@Rsvg.HandleFlags]
|
|
1073
|
+
* @cancellable: (nullable): a `GCancellable`, or `NULL`
|
|
1074
|
+
* @error: return location for a `GError`
|
|
1075
|
+
*
|
|
1076
|
+
* Creates a new [class@Rsvg.Handle] for @file.
|
|
1077
|
+
*
|
|
1078
|
+
* This function sets the "base file" of the handle to be @file itself, so SVG
|
|
1079
|
+
* elements like `<image>` which reference external
|
|
1080
|
+
* resources will be resolved relative to the location of @file.
|
|
1081
|
+
*
|
|
1082
|
+
* If @cancellable is not `NULL`, then the operation can be cancelled by
|
|
1083
|
+
* triggering the cancellable object from another thread. If the
|
|
1084
|
+
* operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be
|
|
1085
|
+
* returned in @error.
|
|
1086
|
+
*
|
|
1087
|
+
* Returns: (transfer full) (nullable): a new [class@Rsvg.Handle] on success, or `NULL` with @error filled in
|
|
1088
|
+
*
|
|
1089
|
+
* Since: 2.32
|
|
1090
|
+
*/
|
|
1091
|
+
RSVG_API
|
|
1092
|
+
RsvgHandle *rsvg_handle_new_from_gfile_sync (GFile *file,
|
|
1093
|
+
RsvgHandleFlags flags,
|
|
1094
|
+
GCancellable *cancellable,
|
|
1095
|
+
GError **error);
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* rsvg_handle_new_from_stream_sync:
|
|
1099
|
+
* @input_stream: a `GInputStream`
|
|
1100
|
+
* @base_file: (nullable): a `GFile`, or `NULL`
|
|
1101
|
+
* @flags: flags from [flags@Rsvg.HandleFlags]
|
|
1102
|
+
* @cancellable: (nullable): a `GCancellable`, or `NULL`
|
|
1103
|
+
* @error: return location for a `GError`
|
|
1104
|
+
*
|
|
1105
|
+
* Creates a new [class@Rsvg.Handle] for @stream.
|
|
1106
|
+
*
|
|
1107
|
+
* This function sets the "base file" of the handle to be @base_file if
|
|
1108
|
+
* provided. SVG elements like `<image>` which reference
|
|
1109
|
+
* external resources will be resolved relative to the location of @base_file.
|
|
1110
|
+
*
|
|
1111
|
+
* If @cancellable is not `NULL`, then the operation can be cancelled by
|
|
1112
|
+
* triggering the cancellable object from another thread. If the
|
|
1113
|
+
* operation was cancelled, the error `G_IO_ERROR_CANCELLED` will be
|
|
1114
|
+
* returned in @error.
|
|
1115
|
+
*
|
|
1116
|
+
* Returns: (transfer full) (nullable): a new [class@Rsvg.Handle] on success, or `NULL` with @error filled in
|
|
1117
|
+
*
|
|
1118
|
+
* Since: 2.32
|
|
1119
|
+
*/
|
|
1120
|
+
RSVG_API
|
|
1121
|
+
RsvgHandle *rsvg_handle_new_from_stream_sync (GInputStream *input_stream,
|
|
1122
|
+
GFile *base_file,
|
|
1123
|
+
RsvgHandleFlags flags,
|
|
1124
|
+
GCancellable *cancellable,
|
|
1125
|
+
GError **error);
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* rsvg_handle_new_from_data:
|
|
1129
|
+
* @data: (array length=data_len): The SVG data
|
|
1130
|
+
* @data_len: The length of @data, in bytes
|
|
1131
|
+
* @error: return location for a `GError`
|
|
1132
|
+
*
|
|
1133
|
+
* Loads the SVG specified by @data. Note that this function creates an
|
|
1134
|
+
* [class@Rsvg.Handle] without a base URL, and without any [flags@Rsvg.HandleFlags]. If you
|
|
1135
|
+
* need these, use [ctor@Rsvg.Handle.new_from_stream_sync] instead by creating
|
|
1136
|
+
* a [class@Gio.MemoryInputStream] from your data.
|
|
1137
|
+
*
|
|
1138
|
+
* Returns: (transfer full) (nullable): A [class@Rsvg.Handle] or `NULL` if an error occurs.
|
|
1139
|
+
* Since: 2.14
|
|
1140
|
+
*/
|
|
1141
|
+
RSVG_API
|
|
1142
|
+
RsvgHandle *rsvg_handle_new_from_data (const guint8 *data, gsize data_len, GError **error);
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* rsvg_handle_new_from_file:
|
|
1146
|
+
* @filename: The file name to load, or a URI.
|
|
1147
|
+
* @error: return location for a `GError`
|
|
1148
|
+
*
|
|
1149
|
+
* Loads the SVG specified by @file_name. Note that this function, like
|
|
1150
|
+
* [ctor@Rsvg.Handle.new], does not specify any loading flags for the resulting
|
|
1151
|
+
* handle. If you require the use of [flags@Rsvg.HandleFlags], use
|
|
1152
|
+
* [ctor@Rsvg.Handle.new_from_gfile_sync].
|
|
1153
|
+
*
|
|
1154
|
+
* Returns: (transfer full) (nullable): A [class@Rsvg.Handle] or `NULL` if an error occurs.
|
|
1155
|
+
* Since: 2.14
|
|
1156
|
+
*/
|
|
1157
|
+
RSVG_API
|
|
1158
|
+
RsvgHandle *rsvg_handle_new_from_file (const gchar *filename, GError **error);
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* rsvg_handle_set_stylesheet:
|
|
1162
|
+
* @handle: A [class@Rsvg.Handle].
|
|
1163
|
+
* @css: (array length=css_len): String with CSS data; must be valid UTF-8.
|
|
1164
|
+
* @css_len: Length of the @css data in bytes.
|
|
1165
|
+
* @error: return location for a `GError`
|
|
1166
|
+
*
|
|
1167
|
+
* Sets a CSS stylesheet to use for an SVG document.
|
|
1168
|
+
*
|
|
1169
|
+
* The @css_len argument is mandatory; this function will not compute the length
|
|
1170
|
+
* of the @css string. This is because a provided stylesheet, which the calling
|
|
1171
|
+
* program could read from a file, can have nul characters in it.
|
|
1172
|
+
*
|
|
1173
|
+
* During the CSS cascade, the specified stylesheet will be used with a "User"
|
|
1174
|
+
* [origin](https://drafts.csswg.org/css-cascade-3/#cascading-origins).
|
|
1175
|
+
*
|
|
1176
|
+
* Note that `@import` rules will not be resolved, except for `data:` URLs.
|
|
1177
|
+
*
|
|
1178
|
+
* Returns: `TRUE` on success, `FALSE` on error. Errors are returned
|
|
1179
|
+
* in the @error argument.
|
|
1180
|
+
*
|
|
1181
|
+
* Since: 2.48
|
|
1182
|
+
*/
|
|
1183
|
+
RSVG_API
|
|
1184
|
+
gboolean rsvg_handle_set_stylesheet (RsvgHandle *handle,
|
|
1185
|
+
const guint8 *css,
|
|
1186
|
+
gsize css_len,
|
|
1187
|
+
GError **error);
|
|
1188
|
+
|
|
1189
|
+
#ifndef __GTK_DOC_IGNORE__
|
|
1190
|
+
/**
|
|
1191
|
+
* rsvg_handle_internal_set_testing:
|
|
1192
|
+
* @handle: a [class@Rsvg.Handle]
|
|
1193
|
+
* @testing: Whether to enable testing mode
|
|
1194
|
+
*
|
|
1195
|
+
* Do not call this function. This is intended for librsvg's internal
|
|
1196
|
+
* test suite only.
|
|
1197
|
+
**/
|
|
1198
|
+
RSVG_API
|
|
1199
|
+
void rsvg_handle_internal_set_testing (RsvgHandle *handle, gboolean testing);
|
|
1200
|
+
#endif /* __GTK_DOC_IGNORE__ */
|
|
1201
|
+
|
|
1202
|
+
/* BEGIN deprecated APIs. Do not use! */
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* rsvg_init:
|
|
1206
|
+
*
|
|
1207
|
+
* This function does nothing.
|
|
1208
|
+
*
|
|
1209
|
+
* Since: 2.9
|
|
1210
|
+
* Deprecated: 2.36: There is no need to initialize librsvg.
|
|
1211
|
+
**/
|
|
1212
|
+
RSVG_DEPRECATED_FOR(g_type_init)
|
|
1213
|
+
void rsvg_init (void);
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* rsvg_term:
|
|
1217
|
+
*
|
|
1218
|
+
* This function does nothing.
|
|
1219
|
+
*
|
|
1220
|
+
* Since: 2.9
|
|
1221
|
+
* Deprecated: 2.36: There is no need to de-initialize librsvg.
|
|
1222
|
+
**/
|
|
1223
|
+
RSVG_DEPRECATED
|
|
1224
|
+
void rsvg_term (void);
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* rsvg_handle_free:
|
|
1228
|
+
* @handle: An [class@Rsvg.Handle]
|
|
1229
|
+
*
|
|
1230
|
+
* Frees @handle.
|
|
1231
|
+
* Deprecated: Use [method@GObject.Object.unref] instead.
|
|
1232
|
+
**/
|
|
1233
|
+
RSVG_DEPRECATED_FOR(g_object_unref)
|
|
1234
|
+
void rsvg_handle_free (RsvgHandle *handle);
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* RsvgSizeFunc:
|
|
1238
|
+
* @width: (out): the width of the SVG
|
|
1239
|
+
* @height: (out): the height of the SVG
|
|
1240
|
+
* @user_data: user data
|
|
1241
|
+
*
|
|
1242
|
+
* Function to let a user of the library specify the SVG's dimensions
|
|
1243
|
+
*
|
|
1244
|
+
* See the documentation for [method@Rsvg.Handle.set_size_callback] for an example, and
|
|
1245
|
+
* for the reasons for deprecation.
|
|
1246
|
+
*
|
|
1247
|
+
* Deprecated: 2.14. Use [method@Rsvg.Handle.render_document] instead, which lets you specify
|
|
1248
|
+
* a viewport size in which to render the SVG document.
|
|
1249
|
+
*/
|
|
1250
|
+
typedef void (*RsvgSizeFunc) (gint * width, gint * height, gpointer user_data);
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* rsvg_handle_set_size_callback:
|
|
1254
|
+
* @handle: An [class@Rsvg.Handle]
|
|
1255
|
+
* @size_func: (nullable): A sizing function, or `NULL`
|
|
1256
|
+
* @user_data: User data to pass to @size_func, or `NULL`
|
|
1257
|
+
* @user_data_destroy: Function to be called to destroy the data passed in @user_data,
|
|
1258
|
+
* or `NULL`.
|
|
1259
|
+
*
|
|
1260
|
+
* Sets the sizing function for the @handle, which can be used to override the
|
|
1261
|
+
* size that librsvg computes for SVG images. The @size_func is called from the
|
|
1262
|
+
* following functions:
|
|
1263
|
+
*
|
|
1264
|
+
* * [method@Rsvg.Handle.get_dimensions]
|
|
1265
|
+
* * [method@Rsvg.Handle.get_dimensions_sub]
|
|
1266
|
+
* * [method@Rsvg.Handle.get_position_sub]
|
|
1267
|
+
* * [method@Rsvg.Handle.render_cairo]
|
|
1268
|
+
* * [method@Rsvg.Handle.render_cairo_sub]
|
|
1269
|
+
*
|
|
1270
|
+
* Librsvg computes the size of the SVG being rendered, and passes it to the
|
|
1271
|
+
* @size_func, which may then modify these values to set the final size of the
|
|
1272
|
+
* generated image.
|
|
1273
|
+
*
|
|
1274
|
+
* Deprecated: 2.14. Use [method@Rsvg.Handle.render_document] instead.
|
|
1275
|
+
* This function was deprecated because when the @size_func is used, it makes it
|
|
1276
|
+
* unclear when the librsvg functions which call the @size_func will use the
|
|
1277
|
+
* size computed originally, or the callback-specified size, or whether it
|
|
1278
|
+
* refers to the whole SVG or to just a sub-element of it. It is easier, and
|
|
1279
|
+
* unambiguous, to use code similar to the example above.
|
|
1280
|
+
**/
|
|
1281
|
+
RSVG_DEPRECATED
|
|
1282
|
+
void rsvg_handle_set_size_callback (RsvgHandle *handle,
|
|
1283
|
+
RsvgSizeFunc size_func,
|
|
1284
|
+
gpointer user_data,
|
|
1285
|
+
GDestroyNotify user_data_destroy);
|
|
1286
|
+
|
|
1287
|
+
/* GdkPixbuf convenience API */
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* rsvg-pixbuf:
|
|
1291
|
+
*
|
|
1292
|
+
* Years ago, GNOME and GTK used the gdk-pixbuf library as a general mechanism to load
|
|
1293
|
+
* raster images into memory (PNG, JPEG, etc.) and pass them around. The general idiom
|
|
1294
|
+
* was, "load this image file and give me a `GdkPixbuf` object", which is basically a pixel
|
|
1295
|
+
* buffer. Librsvg supports this kind of interface to load and render SVG documents, but
|
|
1296
|
+
* it is deprecated in favor of rendering to Cairo contexts.
|
|
1297
|
+
*/
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* rsvg_pixbuf_from_file:
|
|
1301
|
+
* @filename: A file name
|
|
1302
|
+
* @error: return location for a `GError`
|
|
1303
|
+
*
|
|
1304
|
+
* Loads a new `GdkPixbuf` from @filename and returns it. The caller must
|
|
1305
|
+
* assume the reference to the reurned pixbuf. If an error occurred, @error is
|
|
1306
|
+
* set and `NULL` is returned.
|
|
1307
|
+
*
|
|
1308
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
1309
|
+
* Deprecated: Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead.
|
|
1310
|
+
**/
|
|
1311
|
+
RSVG_DEPRECATED
|
|
1312
|
+
GdkPixbuf *rsvg_pixbuf_from_file (const gchar *filename,
|
|
1313
|
+
GError **error);
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* rsvg_pixbuf_from_file_at_zoom:
|
|
1317
|
+
* @filename: A file name
|
|
1318
|
+
* @x_zoom: The horizontal zoom factor
|
|
1319
|
+
* @y_zoom: The vertical zoom factor
|
|
1320
|
+
* @error: return location for a `GError`
|
|
1321
|
+
*
|
|
1322
|
+
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
|
|
1323
|
+
* from the size indicated by the file by a factor of @x_zoom and @y_zoom. The
|
|
1324
|
+
* caller must assume the reference to the returned pixbuf. If an error
|
|
1325
|
+
* occurred, @error is set and `NULL` is returned.
|
|
1326
|
+
*
|
|
1327
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
1328
|
+
* Deprecated: Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead.
|
|
1329
|
+
**/
|
|
1330
|
+
RSVG_DEPRECATED
|
|
1331
|
+
GdkPixbuf *rsvg_pixbuf_from_file_at_zoom (const gchar *filename,
|
|
1332
|
+
double x_zoom,
|
|
1333
|
+
double y_zoom,
|
|
1334
|
+
GError **error);
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* rsvg_pixbuf_from_file_at_size:
|
|
1338
|
+
* @filename: A file name
|
|
1339
|
+
* @width: The new width, or -1
|
|
1340
|
+
* @height: The new height, or -1
|
|
1341
|
+
* @error: return location for a `GError`
|
|
1342
|
+
*
|
|
1343
|
+
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
|
|
1344
|
+
* from the size indicated to the new size indicated by @width and @height. If
|
|
1345
|
+
* both of these are -1, then the default size of the image being loaded is
|
|
1346
|
+
* used. The caller must assume the reference to the returned pixbuf. If an
|
|
1347
|
+
* error occurred, @error is set and `NULL` is returned.
|
|
1348
|
+
*
|
|
1349
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
1350
|
+
* Deprecated: Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead.
|
|
1351
|
+
**/
|
|
1352
|
+
RSVG_DEPRECATED
|
|
1353
|
+
GdkPixbuf *rsvg_pixbuf_from_file_at_size (const gchar *filename,
|
|
1354
|
+
gint width,
|
|
1355
|
+
gint height,
|
|
1356
|
+
GError **error);
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* rsvg_pixbuf_from_file_at_max_size:
|
|
1360
|
+
* @filename: A file name
|
|
1361
|
+
* @max_width: The requested max width
|
|
1362
|
+
* @max_height: The requested max height
|
|
1363
|
+
* @error: return location for a `GError`
|
|
1364
|
+
*
|
|
1365
|
+
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is uniformly
|
|
1366
|
+
* scaled so that the it fits into a rectangle of size `max_width * max_height`. The
|
|
1367
|
+
* caller must assume the reference to the returned pixbuf. If an error occurred,
|
|
1368
|
+
* @error is set and `NULL` is returned.
|
|
1369
|
+
*
|
|
1370
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
1371
|
+
* Deprecated: Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead.
|
|
1372
|
+
**/
|
|
1373
|
+
RSVG_DEPRECATED
|
|
1374
|
+
GdkPixbuf *rsvg_pixbuf_from_file_at_max_size (const gchar *filename,
|
|
1375
|
+
gint max_width,
|
|
1376
|
+
gint max_height,
|
|
1377
|
+
GError **error);
|
|
1378
|
+
/**
|
|
1379
|
+
* rsvg_pixbuf_from_file_at_zoom_with_max:
|
|
1380
|
+
* @filename: A file name
|
|
1381
|
+
* @x_zoom: The horizontal zoom factor
|
|
1382
|
+
* @y_zoom: The vertical zoom factor
|
|
1383
|
+
* @max_width: The requested max width
|
|
1384
|
+
* @max_height: The requested max height
|
|
1385
|
+
* @error: return location for a `GError`
|
|
1386
|
+
*
|
|
1387
|
+
* Loads a new `GdkPixbuf` from @filename and returns it. This pixbuf is scaled
|
|
1388
|
+
* from the size indicated by the file by a factor of @x_zoom and @y_zoom. If the
|
|
1389
|
+
* resulting pixbuf would be larger than max_width/max_heigh it is uniformly scaled
|
|
1390
|
+
* down to fit in that rectangle. The caller must assume the reference to the
|
|
1391
|
+
* returned pixbuf. If an error occurred, @error is set and `NULL` is returned.
|
|
1392
|
+
*
|
|
1393
|
+
* Returns: (transfer full) (nullable): A pixbuf, or %NULL on error.
|
|
1394
|
+
* Deprecated: Use [ctor@Rsvg.Handle.new_from_file] and [method@Rsvg.Handle.render_document] instead.
|
|
1395
|
+
**/
|
|
1396
|
+
RSVG_DEPRECATED
|
|
1397
|
+
GdkPixbuf *rsvg_pixbuf_from_file_at_zoom_with_max (const gchar *filename,
|
|
1398
|
+
double x_zoom,
|
|
1399
|
+
double y_zoom,
|
|
1400
|
+
gint max_width,
|
|
1401
|
+
gint max_height,
|
|
1402
|
+
GError **error);
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* rsvg_handle_get_title:
|
|
1406
|
+
* @handle: An [class@Rsvg.Handle]
|
|
1407
|
+
*
|
|
1408
|
+
* Returns: (nullable): This function always returns `NULL`.
|
|
1409
|
+
*
|
|
1410
|
+
* Since: 2.4
|
|
1411
|
+
*
|
|
1412
|
+
* Deprecated: 2.36. Librsvg does not read the metadata/desc/title elements;
|
|
1413
|
+
* this function always returns `NULL`.
|
|
1414
|
+
*/
|
|
1415
|
+
RSVG_DEPRECATED
|
|
1416
|
+
const char *rsvg_handle_get_title (RsvgHandle *handle);
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* rsvg_handle_get_desc:
|
|
1420
|
+
* @handle: An [class@Rsvg.Handle]
|
|
1421
|
+
*
|
|
1422
|
+
* Returns: (nullable): This function always returns `NULL`.
|
|
1423
|
+
*
|
|
1424
|
+
* Since: 2.4
|
|
1425
|
+
*
|
|
1426
|
+
* Deprecated: 2.36. Librsvg does not read the metadata/desc/title elements;
|
|
1427
|
+
* this function always returns `NULL`.
|
|
1428
|
+
*/
|
|
1429
|
+
RSVG_DEPRECATED
|
|
1430
|
+
const char *rsvg_handle_get_desc (RsvgHandle *handle);
|
|
1431
|
+
|
|
1432
|
+
/**
|
|
1433
|
+
* rsvg_handle_get_metadata:
|
|
1434
|
+
* @handle: An [class@Rsvg.Handle]
|
|
1435
|
+
*
|
|
1436
|
+
* Returns: (nullable): This function always returns `NULL`.
|
|
1437
|
+
*
|
|
1438
|
+
* Since: 2.9
|
|
1439
|
+
*
|
|
1440
|
+
* Deprecated: 2.36. Librsvg does not read the metadata/desc/title elements;
|
|
1441
|
+
* this function always returns `NULL`.
|
|
1442
|
+
*/
|
|
1443
|
+
RSVG_DEPRECATED
|
|
1444
|
+
const char *rsvg_handle_get_metadata (RsvgHandle *handle);
|
|
1445
|
+
|
|
1446
|
+
/* END deprecated APIs. */
|
|
1447
|
+
|
|
1448
|
+
G_END_DECLS
|
|
1449
|
+
|
|
1450
|
+
#include <librsvg/rsvg-features.h>
|
|
1451
|
+
#include <librsvg/rsvg-version.h>
|
|
1452
|
+
#include <librsvg/rsvg-cairo.h>
|
|
1453
|
+
|
|
1454
|
+
#undef __RSVG_RSVG_H_INSIDE__
|
|
1455
|
+
|
|
1456
|
+
#endif /* RSVG_H */
|