@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.
Files changed (656) hide show
  1. package/README.md +47 -0
  2. package/cplusplus/VConnection.cpp +151 -0
  3. package/cplusplus/VError.cpp +49 -0
  4. package/cplusplus/VImage.cpp +1548 -0
  5. package/cplusplus/VInterpolate.cpp +62 -0
  6. package/cplusplus/VRegion.cpp +27 -0
  7. package/cplusplus/index.js +1 -0
  8. package/cplusplus/vips-operators.cpp +3760 -0
  9. package/include/aom/aom.h +127 -0
  10. package/include/aom/aom_codec.h +573 -0
  11. package/include/aom/aom_decoder.h +257 -0
  12. package/include/aom/aom_encoder.h +1137 -0
  13. package/include/aom/aom_external_partition.h +452 -0
  14. package/include/aom/aom_frame_buffer.h +84 -0
  15. package/include/aom/aom_image.h +448 -0
  16. package/include/aom/aom_integer.h +68 -0
  17. package/include/aom/aomcx.h +2112 -0
  18. package/include/aom/aomdx.h +604 -0
  19. package/include/archive.h +1212 -0
  20. package/include/archive_entry.h +723 -0
  21. package/include/cairo/cairo-deprecated.h +123 -0
  22. package/include/cairo/cairo-features.h +29 -0
  23. package/include/cairo/cairo-ft.h +118 -0
  24. package/include/cairo/cairo-gobject.h +192 -0
  25. package/include/cairo/cairo-svg.h +130 -0
  26. package/include/cairo/cairo-version.h +8 -0
  27. package/include/cairo/cairo.h +3281 -0
  28. package/include/cgif.h +80 -0
  29. package/include/expat.h +1064 -0
  30. package/include/expat_config.h +140 -0
  31. package/include/expat_external.h +165 -0
  32. package/include/ffi.h +531 -0
  33. package/include/ffitarget.h +164 -0
  34. package/include/fontconfig/fcfreetype.h +59 -0
  35. package/include/fontconfig/fcprivate.h +134 -0
  36. package/include/fontconfig/fontconfig.h +1158 -0
  37. package/include/freetype2/freetype/config/ftconfig.h +51 -0
  38. package/include/freetype2/freetype/config/ftheader.h +836 -0
  39. package/include/freetype2/freetype/config/ftmodule.h +21 -0
  40. package/include/freetype2/freetype/config/ftoption.h +1014 -0
  41. package/include/freetype2/freetype/config/ftstdlib.h +185 -0
  42. package/include/freetype2/freetype/config/integer-types.h +250 -0
  43. package/include/freetype2/freetype/config/mac-support.h +49 -0
  44. package/include/freetype2/freetype/config/public-macros.h +138 -0
  45. package/include/freetype2/freetype/freetype.h +5337 -0
  46. package/include/freetype2/freetype/ftadvanc.h +188 -0
  47. package/include/freetype2/freetype/ftbbox.h +101 -0
  48. package/include/freetype2/freetype/ftbdf.h +212 -0
  49. package/include/freetype2/freetype/ftbitmap.h +329 -0
  50. package/include/freetype2/freetype/ftbzip2.h +102 -0
  51. package/include/freetype2/freetype/ftcache.h +1087 -0
  52. package/include/freetype2/freetype/ftchapters.h +168 -0
  53. package/include/freetype2/freetype/ftcid.h +167 -0
  54. package/include/freetype2/freetype/ftcolor.h +1667 -0
  55. package/include/freetype2/freetype/ftdriver.h +1246 -0
  56. package/include/freetype2/freetype/fterrdef.h +283 -0
  57. package/include/freetype2/freetype/fterrors.h +296 -0
  58. package/include/freetype2/freetype/ftfntfmt.h +93 -0
  59. package/include/freetype2/freetype/ftgasp.h +143 -0
  60. package/include/freetype2/freetype/ftglyph.h +750 -0
  61. package/include/freetype2/freetype/ftgxval.h +354 -0
  62. package/include/freetype2/freetype/ftgzip.h +151 -0
  63. package/include/freetype2/freetype/ftimage.h +1284 -0
  64. package/include/freetype2/freetype/ftincrem.h +348 -0
  65. package/include/freetype2/freetype/ftlcdfil.h +323 -0
  66. package/include/freetype2/freetype/ftlist.h +296 -0
  67. package/include/freetype2/freetype/ftlzw.h +100 -0
  68. package/include/freetype2/freetype/ftmac.h +289 -0
  69. package/include/freetype2/freetype/ftmm.h +805 -0
  70. package/include/freetype2/freetype/ftmodapi.h +807 -0
  71. package/include/freetype2/freetype/ftmoderr.h +204 -0
  72. package/include/freetype2/freetype/ftotval.h +206 -0
  73. package/include/freetype2/freetype/ftoutln.h +588 -0
  74. package/include/freetype2/freetype/ftparams.h +218 -0
  75. package/include/freetype2/freetype/ftpfr.h +179 -0
  76. package/include/freetype2/freetype/ftrender.h +244 -0
  77. package/include/freetype2/freetype/ftsizes.h +159 -0
  78. package/include/freetype2/freetype/ftsnames.h +272 -0
  79. package/include/freetype2/freetype/ftstroke.h +773 -0
  80. package/include/freetype2/freetype/ftsynth.h +104 -0
  81. package/include/freetype2/freetype/ftsystem.h +350 -0
  82. package/include/freetype2/freetype/fttrigon.h +350 -0
  83. package/include/freetype2/freetype/fttypes.h +617 -0
  84. package/include/freetype2/freetype/ftwinfnt.h +276 -0
  85. package/include/freetype2/freetype/otsvg.h +336 -0
  86. package/include/freetype2/freetype/t1tables.h +793 -0
  87. package/include/freetype2/freetype/ttnameid.h +1235 -0
  88. package/include/freetype2/freetype/tttables.h +855 -0
  89. package/include/freetype2/freetype/tttags.h +124 -0
  90. package/include/freetype2/ft2build.h +42 -0
  91. package/include/fribidi/fribidi-arabic.h +81 -0
  92. package/include/fribidi/fribidi-begindecls.h +3 -0
  93. package/include/fribidi/fribidi-bidi-types-list.h +96 -0
  94. package/include/fribidi/fribidi-bidi-types.h +405 -0
  95. package/include/fribidi/fribidi-bidi.h +142 -0
  96. package/include/fribidi/fribidi-brackets.h +89 -0
  97. package/include/fribidi/fribidi-char-sets-list.h +54 -0
  98. package/include/fribidi/fribidi-char-sets.h +106 -0
  99. package/include/fribidi/fribidi-common.h +152 -0
  100. package/include/fribidi/fribidi-config.h +23 -0
  101. package/include/fribidi/fribidi-deprecated.h +175 -0
  102. package/include/fribidi/fribidi-enddecls.h +3 -0
  103. package/include/fribidi/fribidi-flags.h +72 -0
  104. package/include/fribidi/fribidi-joining-types-list.h +44 -0
  105. package/include/fribidi/fribidi-joining-types.h +249 -0
  106. package/include/fribidi/fribidi-joining.h +74 -0
  107. package/include/fribidi/fribidi-mirroring.h +86 -0
  108. package/include/fribidi/fribidi-shape.h +71 -0
  109. package/include/fribidi/fribidi-types.h +79 -0
  110. package/include/fribidi/fribidi-unicode-version.h +10 -0
  111. package/include/fribidi/fribidi-unicode.h +105 -0
  112. package/include/fribidi/fribidi.h +129 -0
  113. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +221 -0
  114. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h +37 -0
  115. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +525 -0
  116. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h +40 -0
  117. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +115 -0
  118. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +481 -0
  119. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +113 -0
  120. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h +718 -0
  121. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h +33 -0
  122. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +70 -0
  123. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +168 -0
  124. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h +46 -0
  125. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h +165 -0
  126. package/include/gio-unix-2.0/gio/gdesktopappinfo.h +200 -0
  127. package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +67 -0
  128. package/include/gio-unix-2.0/gio/gunixfdmessage.h +86 -0
  129. package/include/gio-unix-2.0/gio/gunixinputstream.h +85 -0
  130. package/include/gio-unix-2.0/gio/gunixmounts.h +172 -0
  131. package/include/gio-unix-2.0/gio/gunixoutputstream.h +84 -0
  132. package/include/glib-2.0/gio/gaction.h +100 -0
  133. package/include/glib-2.0/gio/gactiongroup.h +163 -0
  134. package/include/glib-2.0/gio/gactiongroupexporter.h +47 -0
  135. package/include/glib-2.0/gio/gactionmap.h +101 -0
  136. package/include/glib-2.0/gio/gappinfo.h +369 -0
  137. package/include/glib-2.0/gio/gapplication.h +257 -0
  138. package/include/glib-2.0/gio/gapplicationcommandline.h +124 -0
  139. package/include/glib-2.0/gio/gasyncinitable.h +132 -0
  140. package/include/glib-2.0/gio/gasyncresult.h +87 -0
  141. package/include/glib-2.0/gio/gbufferedinputstream.h +135 -0
  142. package/include/glib-2.0/gio/gbufferedoutputstream.h +88 -0
  143. package/include/glib-2.0/gio/gbytesicon.h +54 -0
  144. package/include/glib-2.0/gio/gcancellable.h +120 -0
  145. package/include/glib-2.0/gio/gcharsetconverter.h +65 -0
  146. package/include/glib-2.0/gio/gcontenttype.h +84 -0
  147. package/include/glib-2.0/gio/gconverter.h +98 -0
  148. package/include/glib-2.0/gio/gconverterinputstream.h +82 -0
  149. package/include/glib-2.0/gio/gconverteroutputstream.h +82 -0
  150. package/include/glib-2.0/gio/gcredentials.h +87 -0
  151. package/include/glib-2.0/gio/gdatagrambased.h +146 -0
  152. package/include/glib-2.0/gio/gdatainputstream.h +182 -0
  153. package/include/glib-2.0/gio/gdataoutputstream.h +127 -0
  154. package/include/glib-2.0/gio/gdbusactiongroup.h +56 -0
  155. package/include/glib-2.0/gio/gdbusaddress.h +67 -0
  156. package/include/glib-2.0/gio/gdbusauthobserver.h +53 -0
  157. package/include/glib-2.0/gio/gdbusconnection.h +691 -0
  158. package/include/glib-2.0/gio/gdbuserror.h +111 -0
  159. package/include/glib-2.0/gio/gdbusinterface.h +83 -0
  160. package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +129 -0
  161. package/include/glib-2.0/gio/gdbusintrospection.h +327 -0
  162. package/include/glib-2.0/gio/gdbusmenumodel.h +47 -0
  163. package/include/glib-2.0/gio/gdbusmessage.h +204 -0
  164. package/include/glib-2.0/gio/gdbusmethodinvocation.h +136 -0
  165. package/include/glib-2.0/gio/gdbusnameowning.h +117 -0
  166. package/include/glib-2.0/gio/gdbusnamewatching.h +104 -0
  167. package/include/glib-2.0/gio/gdbusobject.h +80 -0
  168. package/include/glib-2.0/gio/gdbusobjectmanager.h +96 -0
  169. package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +148 -0
  170. package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +95 -0
  171. package/include/glib-2.0/gio/gdbusobjectproxy.h +81 -0
  172. package/include/glib-2.0/gio/gdbusobjectskeleton.h +98 -0
  173. package/include/glib-2.0/gio/gdbusproxy.h +220 -0
  174. package/include/glib-2.0/gio/gdbusserver.h +62 -0
  175. package/include/glib-2.0/gio/gdbusutils.h +65 -0
  176. package/include/glib-2.0/gio/gdebugcontroller.h +81 -0
  177. package/include/glib-2.0/gio/gdebugcontrollerdbus.h +71 -0
  178. package/include/glib-2.0/gio/gdrive.h +274 -0
  179. package/include/glib-2.0/gio/gdtlsclientconnection.h +77 -0
  180. package/include/glib-2.0/gio/gdtlsconnection.h +230 -0
  181. package/include/glib-2.0/gio/gdtlsserverconnection.h +71 -0
  182. package/include/glib-2.0/gio/gemblem.h +63 -0
  183. package/include/glib-2.0/gio/gemblemedicon.h +83 -0
  184. package/include/glib-2.0/gio/gfile.h +1359 -0
  185. package/include/glib-2.0/gio/gfileattribute.h +86 -0
  186. package/include/glib-2.0/gio/gfileenumerator.h +154 -0
  187. package/include/glib-2.0/gio/gfileicon.h +59 -0
  188. package/include/glib-2.0/gio/gfileinfo.h +1546 -0
  189. package/include/glib-2.0/gio/gfileinputstream.h +116 -0
  190. package/include/glib-2.0/gio/gfileiostream.h +123 -0
  191. package/include/glib-2.0/gio/gfilemonitor.h +100 -0
  192. package/include/glib-2.0/gio/gfilenamecompleter.h +81 -0
  193. package/include/glib-2.0/gio/gfileoutputstream.h +124 -0
  194. package/include/glib-2.0/gio/gfilterinputstream.h +80 -0
  195. package/include/glib-2.0/gio/gfilteroutputstream.h +80 -0
  196. package/include/glib-2.0/gio/gicon.h +133 -0
  197. package/include/glib-2.0/gio/ginetaddress.h +125 -0
  198. package/include/glib-2.0/gio/ginetaddressmask.h +86 -0
  199. package/include/glib-2.0/gio/ginetsocketaddress.h +80 -0
  200. package/include/glib-2.0/gio/ginitable.h +107 -0
  201. package/include/glib-2.0/gio/ginputstream.h +218 -0
  202. package/include/glib-2.0/gio/gio-autocleanups.h +155 -0
  203. package/include/glib-2.0/gio/gio-visibility.h +952 -0
  204. package/include/glib-2.0/gio/gio.h +186 -0
  205. package/include/glib-2.0/gio/gioenums.h +2149 -0
  206. package/include/glib-2.0/gio/gioenumtypes.h +207 -0
  207. package/include/glib-2.0/gio/gioerror.h +58 -0
  208. package/include/glib-2.0/gio/giomodule.h +199 -0
  209. package/include/glib-2.0/gio/gioscheduler.h +56 -0
  210. package/include/glib-2.0/gio/giostream.h +137 -0
  211. package/include/glib-2.0/gio/giotypes.h +660 -0
  212. package/include/glib-2.0/gio/glistmodel.h +74 -0
  213. package/include/glib-2.0/gio/gliststore.h +97 -0
  214. package/include/glib-2.0/gio/gloadableicon.h +101 -0
  215. package/include/glib-2.0/gio/gmemoryinputstream.h +92 -0
  216. package/include/glib-2.0/gio/gmemorymonitor.h +64 -0
  217. package/include/glib-2.0/gio/gmemoryoutputstream.h +109 -0
  218. package/include/glib-2.0/gio/gmenu.h +184 -0
  219. package/include/glib-2.0/gio/gmenuexporter.h +55 -0
  220. package/include/glib-2.0/gio/gmenumodel.h +307 -0
  221. package/include/glib-2.0/gio/gmount.h +278 -0
  222. package/include/glib-2.0/gio/gmountoperation.h +179 -0
  223. package/include/glib-2.0/gio/gnativesocketaddress.h +67 -0
  224. package/include/glib-2.0/gio/gnativevolumemonitor.h +63 -0
  225. package/include/glib-2.0/gio/gnetworkaddress.h +82 -0
  226. package/include/glib-2.0/gio/gnetworking.h +81 -0
  227. package/include/glib-2.0/gio/gnetworkmonitor.h +101 -0
  228. package/include/glib-2.0/gio/gnetworkservice.h +77 -0
  229. package/include/glib-2.0/gio/gnotification.h +103 -0
  230. package/include/glib-2.0/gio/goutputstream.h +334 -0
  231. package/include/glib-2.0/gio/gpermission.h +129 -0
  232. package/include/glib-2.0/gio/gpollableinputstream.h +106 -0
  233. package/include/glib-2.0/gio/gpollableoutputstream.h +127 -0
  234. package/include/glib-2.0/gio/gpollableutils.h +66 -0
  235. package/include/glib-2.0/gio/gpowerprofilemonitor.h +65 -0
  236. package/include/glib-2.0/gio/gpropertyaction.h +49 -0
  237. package/include/glib-2.0/gio/gproxy.h +130 -0
  238. package/include/glib-2.0/gio/gproxyaddress.h +88 -0
  239. package/include/glib-2.0/gio/gproxyaddressenumerator.h +83 -0
  240. package/include/glib-2.0/gio/gproxyresolver.h +97 -0
  241. package/include/glib-2.0/gio/gremoteactiongroup.h +77 -0
  242. package/include/glib-2.0/gio/gresolver.h +299 -0
  243. package/include/glib-2.0/gio/gresource.h +132 -0
  244. package/include/glib-2.0/gio/gseekable.h +105 -0
  245. package/include/glib-2.0/gio/gsettings.h +347 -0
  246. package/include/glib-2.0/gio/gsettingsbackend.h +176 -0
  247. package/include/glib-2.0/gio/gsettingsschema.h +115 -0
  248. package/include/glib-2.0/gio/gsimpleaction.h +65 -0
  249. package/include/glib-2.0/gio/gsimpleactiongroup.h +99 -0
  250. package/include/glib-2.0/gio/gsimpleasyncresult.h +164 -0
  251. package/include/glib-2.0/gio/gsimpleiostream.h +47 -0
  252. package/include/glib-2.0/gio/gsimplepermission.h +47 -0
  253. package/include/glib-2.0/gio/gsimpleproxyresolver.h +91 -0
  254. package/include/glib-2.0/gio/gsocket.h +330 -0
  255. package/include/glib-2.0/gio/gsocketaddress.h +84 -0
  256. package/include/glib-2.0/gio/gsocketaddressenumerator.h +103 -0
  257. package/include/glib-2.0/gio/gsocketclient.h +199 -0
  258. package/include/glib-2.0/gio/gsocketconnectable.h +83 -0
  259. package/include/glib-2.0/gio/gsocketconnection.h +117 -0
  260. package/include/glib-2.0/gio/gsocketcontrolmessage.h +113 -0
  261. package/include/glib-2.0/gio/gsocketlistener.h +157 -0
  262. package/include/glib-2.0/gio/gsocketservice.h +95 -0
  263. package/include/glib-2.0/gio/gsrvtarget.h +60 -0
  264. package/include/glib-2.0/gio/gsubprocess.h +169 -0
  265. package/include/glib-2.0/gio/gsubprocesslauncher.h +121 -0
  266. package/include/glib-2.0/gio/gtask.h +207 -0
  267. package/include/glib-2.0/gio/gtcpconnection.h +71 -0
  268. package/include/glib-2.0/gio/gtcpwrapperconnection.h +71 -0
  269. package/include/glib-2.0/gio/gtestdbus.h +74 -0
  270. package/include/glib-2.0/gio/gthemedicon.h +70 -0
  271. package/include/glib-2.0/gio/gthreadedsocketservice.h +83 -0
  272. package/include/glib-2.0/gio/gtlsbackend.h +115 -0
  273. package/include/glib-2.0/gio/gtlscertificate.h +125 -0
  274. package/include/glib-2.0/gio/gtlsclientconnection.h +88 -0
  275. package/include/glib-2.0/gio/gtlsconnection.h +214 -0
  276. package/include/glib-2.0/gio/gtlsdatabase.h +249 -0
  277. package/include/glib-2.0/gio/gtlsfiledatabase.h +60 -0
  278. package/include/glib-2.0/gio/gtlsinteraction.h +150 -0
  279. package/include/glib-2.0/gio/gtlspassword.h +121 -0
  280. package/include/glib-2.0/gio/gtlsserverconnection.h +71 -0
  281. package/include/glib-2.0/gio/gunixconnection.h +102 -0
  282. package/include/glib-2.0/gio/gunixcredentialsmessage.h +89 -0
  283. package/include/glib-2.0/gio/gunixfdlist.h +97 -0
  284. package/include/glib-2.0/gio/gunixsocketaddress.h +83 -0
  285. package/include/glib-2.0/gio/gvfs.h +170 -0
  286. package/include/glib-2.0/gio/gvolume.h +255 -0
  287. package/include/glib-2.0/gio/gvolumemonitor.h +156 -0
  288. package/include/glib-2.0/gio/gzlibcompressor.h +64 -0
  289. package/include/glib-2.0/gio/gzlibdecompressor.h +60 -0
  290. package/include/glib-2.0/glib/deprecated/gallocator.h +88 -0
  291. package/include/glib-2.0/glib/deprecated/gcache.h +77 -0
  292. package/include/glib-2.0/glib/deprecated/gcompletion.h +85 -0
  293. package/include/glib-2.0/glib/deprecated/gmain.h +137 -0
  294. package/include/glib-2.0/glib/deprecated/grel.h +107 -0
  295. package/include/glib-2.0/glib/deprecated/gthread.h +295 -0
  296. package/include/glib-2.0/glib/galloca.h +147 -0
  297. package/include/glib-2.0/glib/garray.h +323 -0
  298. package/include/glib-2.0/glib/gasyncqueue.h +126 -0
  299. package/include/glib-2.0/glib/gatomic.h +587 -0
  300. package/include/glib-2.0/glib/gbacktrace.h +74 -0
  301. package/include/glib-2.0/glib/gbase64.h +63 -0
  302. package/include/glib-2.0/glib/gbitlock.h +78 -0
  303. package/include/glib-2.0/glib/gbookmarkfile.h +300 -0
  304. package/include/glib-2.0/glib/gbytes.h +99 -0
  305. package/include/glib-2.0/glib/gcharset.h +49 -0
  306. package/include/glib-2.0/glib/gchecksum.h +106 -0
  307. package/include/glib-2.0/glib/gconvert.h +179 -0
  308. package/include/glib-2.0/glib/gdataset.h +156 -0
  309. package/include/glib-2.0/glib/gdate.h +309 -0
  310. package/include/glib-2.0/glib/gdatetime.h +275 -0
  311. package/include/glib-2.0/glib/gdir.h +54 -0
  312. package/include/glib-2.0/glib/genviron.h +65 -0
  313. package/include/glib-2.0/glib/gerror.h +263 -0
  314. package/include/glib-2.0/glib/gfileutils.h +223 -0
  315. package/include/glib-2.0/glib/ggettext.h +65 -0
  316. package/include/glib-2.0/glib/ghash.h +206 -0
  317. package/include/glib-2.0/glib/ghmac.h +85 -0
  318. package/include/glib-2.0/glib/ghook.h +204 -0
  319. package/include/glib-2.0/glib/ghostutils.h +45 -0
  320. package/include/glib-2.0/glib/gi18n-lib.h +38 -0
  321. package/include/glib-2.0/glib/gi18n.h +34 -0
  322. package/include/glib-2.0/glib/giochannel.h +407 -0
  323. package/include/glib-2.0/glib/gkeyfile.h +332 -0
  324. package/include/glib-2.0/glib/glib-autocleanups.h +105 -0
  325. package/include/glib-2.0/glib/glib-typeof.h +47 -0
  326. package/include/glib-2.0/glib/glib-visibility.h +952 -0
  327. package/include/glib-2.0/glib/glist.h +179 -0
  328. package/include/glib-2.0/glib/gmacros.h +1425 -0
  329. package/include/glib-2.0/glib/gmain.h +862 -0
  330. package/include/glib-2.0/glib/gmappedfile.h +60 -0
  331. package/include/glib-2.0/glib/gmarkup.h +265 -0
  332. package/include/glib-2.0/glib/gmem.h +425 -0
  333. package/include/glib-2.0/glib/gmessages.h +690 -0
  334. package/include/glib-2.0/glib/gnode.h +309 -0
  335. package/include/glib-2.0/glib/goption.h +409 -0
  336. package/include/glib-2.0/glib/gpathbuf.h +90 -0
  337. package/include/glib-2.0/glib/gpattern.h +65 -0
  338. package/include/glib-2.0/glib/gpoll.h +122 -0
  339. package/include/glib-2.0/glib/gprimes.h +52 -0
  340. package/include/glib-2.0/glib/gprintf.h +59 -0
  341. package/include/glib-2.0/glib/gqsort.h +47 -0
  342. package/include/glib-2.0/glib/gquark.h +70 -0
  343. package/include/glib-2.0/glib/gqueue.h +205 -0
  344. package/include/glib-2.0/glib/grand.h +101 -0
  345. package/include/glib-2.0/glib/grcbox.h +91 -0
  346. package/include/glib-2.0/glib/grefcount.h +179 -0
  347. package/include/glib-2.0/glib/grefstring.h +59 -0
  348. package/include/glib-2.0/glib/gscanner.h +301 -0
  349. package/include/glib-2.0/glib/gsequence.h +175 -0
  350. package/include/glib-2.0/glib/gshell.h +59 -0
  351. package/include/glib-2.0/glib/gslice.h +117 -0
  352. package/include/glib-2.0/glib/gslist.h +166 -0
  353. package/include/glib-2.0/glib/gspawn.h +323 -0
  354. package/include/glib-2.0/glib/gstdio.h +231 -0
  355. package/include/glib-2.0/glib/gstrfuncs.h +504 -0
  356. package/include/glib-2.0/glib/gstring.h +296 -0
  357. package/include/glib-2.0/glib/gstringchunk.h +59 -0
  358. package/include/glib-2.0/glib/gstrvbuilder.h +69 -0
  359. package/include/glib-2.0/glib/gtestutils.h +763 -0
  360. package/include/glib-2.0/glib/gthread.h +603 -0
  361. package/include/glib-2.0/glib/gthreadpool.h +105 -0
  362. package/include/glib-2.0/glib/gtimer.h +80 -0
  363. package/include/glib-2.0/glib/gtimezone.h +98 -0
  364. package/include/glib-2.0/glib/gtrashstack.h +60 -0
  365. package/include/glib-2.0/glib/gtree.h +181 -0
  366. package/include/glib-2.0/glib/gtypes.h +591 -0
  367. package/include/glib-2.0/glib/gunicode.h +974 -0
  368. package/include/glib-2.0/glib/guri.h +420 -0
  369. package/include/glib-2.0/glib/gutils.h +479 -0
  370. package/include/glib-2.0/glib/guuid.h +42 -0
  371. package/include/glib-2.0/glib/gvariant.h +541 -0
  372. package/include/glib-2.0/glib/gvarianttype.h +384 -0
  373. package/include/glib-2.0/glib/gversion.h +57 -0
  374. package/include/glib-2.0/glib/gversionmacros.h +490 -0
  375. package/include/glib-2.0/glib/gwin32.h +142 -0
  376. package/include/glib-2.0/glib-object.h +46 -0
  377. package/include/glib-2.0/glib-unix.h +125 -0
  378. package/include/glib-2.0/glib.h +121 -0
  379. package/include/glib-2.0/gmodule/gmodule-visibility.h +952 -0
  380. package/include/glib-2.0/gmodule.h +147 -0
  381. package/include/glib-2.0/gobject/gbinding.h +156 -0
  382. package/include/glib-2.0/gobject/gbindinggroup.h +85 -0
  383. package/include/glib-2.0/gobject/gboxed.h +124 -0
  384. package/include/glib-2.0/gobject/gclosure.h +323 -0
  385. package/include/glib-2.0/gobject/genums.h +381 -0
  386. package/include/glib-2.0/gobject/glib-enumtypes.h +25 -0
  387. package/include/glib-2.0/gobject/glib-types.h +400 -0
  388. package/include/glib-2.0/gobject/gmarshal.h +434 -0
  389. package/include/glib-2.0/gobject/gobject-autocleanups.h +33 -0
  390. package/include/glib-2.0/gobject/gobject-visibility.h +952 -0
  391. package/include/glib-2.0/gobject/gobject.h +953 -0
  392. package/include/glib-2.0/gobject/gobjectnotifyqueue.c +199 -0
  393. package/include/glib-2.0/gobject/gparam.h +476 -0
  394. package/include/glib-2.0/gobject/gparamspecs.h +1151 -0
  395. package/include/glib-2.0/gobject/gsignal.h +647 -0
  396. package/include/glib-2.0/gobject/gsignalgroup.h +98 -0
  397. package/include/glib-2.0/gobject/gsourceclosure.h +40 -0
  398. package/include/glib-2.0/gobject/gtype.h +2703 -0
  399. package/include/glib-2.0/gobject/gtypemodule.h +302 -0
  400. package/include/glib-2.0/gobject/gtypeplugin.h +136 -0
  401. package/include/glib-2.0/gobject/gvalue.h +212 -0
  402. package/include/glib-2.0/gobject/gvaluearray.h +106 -0
  403. package/include/glib-2.0/gobject/gvaluecollector.h +290 -0
  404. package/include/glib-2.0/gobject/gvaluetypes.h +318 -0
  405. package/include/harfbuzz/hb-aat-layout.h +795 -0
  406. package/include/harfbuzz/hb-aat.h +38 -0
  407. package/include/harfbuzz/hb-blob.h +160 -0
  408. package/include/harfbuzz/hb-buffer.h +799 -0
  409. package/include/harfbuzz/hb-common.h +938 -0
  410. package/include/harfbuzz/hb-cplusplus.hh +223 -0
  411. package/include/harfbuzz/hb-deprecated.h +309 -0
  412. package/include/harfbuzz/hb-draw.h +340 -0
  413. package/include/harfbuzz/hb-face.h +187 -0
  414. package/include/harfbuzz/hb-features.h +119 -0
  415. package/include/harfbuzz/hb-font.h +1153 -0
  416. package/include/harfbuzz/hb-ft.h +145 -0
  417. package/include/harfbuzz/hb-glib.h +56 -0
  418. package/include/harfbuzz/hb-map.h +143 -0
  419. package/include/harfbuzz/hb-ot-color.h +155 -0
  420. package/include/harfbuzz/hb-ot-deprecated.h +147 -0
  421. package/include/harfbuzz/hb-ot-font.h +45 -0
  422. package/include/harfbuzz/hb-ot-layout.h +549 -0
  423. package/include/harfbuzz/hb-ot-math.h +333 -0
  424. package/include/harfbuzz/hb-ot-meta.h +72 -0
  425. package/include/harfbuzz/hb-ot-metrics.h +129 -0
  426. package/include/harfbuzz/hb-ot-name.h +164 -0
  427. package/include/harfbuzz/hb-ot-shape.h +53 -0
  428. package/include/harfbuzz/hb-ot-var.h +191 -0
  429. package/include/harfbuzz/hb-ot.h +49 -0
  430. package/include/harfbuzz/hb-paint.h +1029 -0
  431. package/include/harfbuzz/hb-set.h +203 -0
  432. package/include/harfbuzz/hb-shape-plan.h +122 -0
  433. package/include/harfbuzz/hb-shape.h +74 -0
  434. package/include/harfbuzz/hb-style.h +81 -0
  435. package/include/harfbuzz/hb-subset-repacker.h +81 -0
  436. package/include/harfbuzz/hb-subset.h +241 -0
  437. package/include/harfbuzz/hb-unicode.h +643 -0
  438. package/include/harfbuzz/hb-version.h +95 -0
  439. package/include/harfbuzz/hb.h +51 -0
  440. package/include/index.js +1 -0
  441. package/include/jconfig.h +37 -0
  442. package/include/jerror.h +335 -0
  443. package/include/jmorecfg.h +382 -0
  444. package/include/jpeglib.h +1210 -0
  445. package/include/lcms2.h +1958 -0
  446. package/include/lcms2_plugin.h +700 -0
  447. package/include/libexif/_stdint.h +2 -0
  448. package/include/libexif/exif-byte-order.h +48 -0
  449. package/include/libexif/exif-content.h +181 -0
  450. package/include/libexif/exif-data-type.h +46 -0
  451. package/include/libexif/exif-data.h +267 -0
  452. package/include/libexif/exif-entry.h +186 -0
  453. package/include/libexif/exif-format.h +65 -0
  454. package/include/libexif/exif-ifd.h +51 -0
  455. package/include/libexif/exif-loader.h +128 -0
  456. package/include/libexif/exif-log.h +116 -0
  457. package/include/libexif/exif-mem.h +91 -0
  458. package/include/libexif/exif-mnote-data.h +122 -0
  459. package/include/libexif/exif-tag.h +307 -0
  460. package/include/libexif/exif-utils.h +194 -0
  461. package/include/libheif/heif.h +2092 -0
  462. package/include/libheif/heif_cxx.h +1359 -0
  463. package/include/libheif/heif_plugin.h +306 -0
  464. package/include/libheif/heif_version.h +38 -0
  465. package/include/libimagequant.h +111 -0
  466. package/include/libpng16/png.h +3247 -0
  467. package/include/libpng16/pngconf.h +623 -0
  468. package/include/libpng16/pnglibconf.h +219 -0
  469. package/include/librsvg-2.0/librsvg/rsvg-cairo.h +395 -0
  470. package/include/librsvg-2.0/librsvg/rsvg-features.h +184 -0
  471. package/include/librsvg-2.0/librsvg/rsvg-version.h +13 -0
  472. package/include/librsvg-2.0/librsvg/rsvg.h +1456 -0
  473. package/include/libxml2/libxml/HTMLparser.h +320 -0
  474. package/include/libxml2/libxml/HTMLtree.h +147 -0
  475. package/include/libxml2/libxml/SAX.h +204 -0
  476. package/include/libxml2/libxml/SAX2.h +173 -0
  477. package/include/libxml2/libxml/c14n.h +128 -0
  478. package/include/libxml2/libxml/catalog.h +182 -0
  479. package/include/libxml2/libxml/chvalid.h +230 -0
  480. package/include/libxml2/libxml/debugXML.h +217 -0
  481. package/include/libxml2/libxml/dict.h +81 -0
  482. package/include/libxml2/libxml/encoding.h +233 -0
  483. package/include/libxml2/libxml/entities.h +151 -0
  484. package/include/libxml2/libxml/globals.h +529 -0
  485. package/include/libxml2/libxml/hash.h +236 -0
  486. package/include/libxml2/libxml/list.h +137 -0
  487. package/include/libxml2/libxml/nanoftp.h +186 -0
  488. package/include/libxml2/libxml/nanohttp.h +81 -0
  489. package/include/libxml2/libxml/parser.h +1265 -0
  490. package/include/libxml2/libxml/parserInternals.h +662 -0
  491. package/include/libxml2/libxml/pattern.h +100 -0
  492. package/include/libxml2/libxml/relaxng.h +218 -0
  493. package/include/libxml2/libxml/schemasInternals.h +958 -0
  494. package/include/libxml2/libxml/schematron.h +142 -0
  495. package/include/libxml2/libxml/threads.h +94 -0
  496. package/include/libxml2/libxml/tree.h +1314 -0
  497. package/include/libxml2/libxml/uri.h +94 -0
  498. package/include/libxml2/libxml/valid.h +448 -0
  499. package/include/libxml2/libxml/xinclude.h +129 -0
  500. package/include/libxml2/libxml/xlink.h +189 -0
  501. package/include/libxml2/libxml/xmlIO.h +369 -0
  502. package/include/libxml2/libxml/xmlautomata.h +146 -0
  503. package/include/libxml2/libxml/xmlerror.h +919 -0
  504. package/include/libxml2/libxml/xmlexports.h +50 -0
  505. package/include/libxml2/libxml/xmlmemory.h +228 -0
  506. package/include/libxml2/libxml/xmlmodule.h +57 -0
  507. package/include/libxml2/libxml/xmlreader.h +428 -0
  508. package/include/libxml2/libxml/xmlregexp.h +222 -0
  509. package/include/libxml2/libxml/xmlsave.h +88 -0
  510. package/include/libxml2/libxml/xmlschemas.h +246 -0
  511. package/include/libxml2/libxml/xmlschemastypes.h +152 -0
  512. package/include/libxml2/libxml/xmlstring.h +140 -0
  513. package/include/libxml2/libxml/xmlunicode.h +202 -0
  514. package/include/libxml2/libxml/xmlversion.h +526 -0
  515. package/include/libxml2/libxml/xmlwriter.h +488 -0
  516. package/include/libxml2/libxml/xpath.h +575 -0
  517. package/include/libxml2/libxml/xpathInternals.h +632 -0
  518. package/include/libxml2/libxml/xpointer.h +137 -0
  519. package/include/orc-0.4/orc/orc-stdint.h +1 -0
  520. package/include/orc-0.4/orc/orc.h +16 -0
  521. package/include/orc-0.4/orc/orcarm.h +879 -0
  522. package/include/orc-0.4/orc/orcbytecode.h +35 -0
  523. package/include/orc-0.4/orc/orcbytecodes.h +255 -0
  524. package/include/orc-0.4/orc/orccode.h +53 -0
  525. package/include/orc-0.4/orc/orccompiler.h +176 -0
  526. package/include/orc-0.4/orc/orcconstant.h +39 -0
  527. package/include/orc-0.4/orc/orccpu.h +21 -0
  528. package/include/orc-0.4/orc/orccpuinsn.h +40 -0
  529. package/include/orc-0.4/orc/orcdebug.h +158 -0
  530. package/include/orc-0.4/orc/orcemulateopcodes.h +203 -0
  531. package/include/orc-0.4/orc/orcexecutor.h +135 -0
  532. package/include/orc-0.4/orc/orcfunctions.h +93 -0
  533. package/include/orc-0.4/orc/orcinstruction.h +39 -0
  534. package/include/orc-0.4/orc/orcinternal.h +46 -0
  535. package/include/orc-0.4/orc/orclimits.h +94 -0
  536. package/include/orc-0.4/orc/orcmips.h +229 -0
  537. package/include/orc-0.4/orc/orcmmx.h +79 -0
  538. package/include/orc-0.4/orc/orcneon.h +43 -0
  539. package/include/orc-0.4/orc/orconce.h +166 -0
  540. package/include/orc-0.4/orc/orcopcode.h +63 -0
  541. package/include/orc-0.4/orc/orcparse.h +27 -0
  542. package/include/orc-0.4/orc/orcpowerpc.h +209 -0
  543. package/include/orc-0.4/orc/orcprogram.h +192 -0
  544. package/include/orc-0.4/orc/orcrule.h +52 -0
  545. package/include/orc-0.4/orc/orcsse.h +55 -0
  546. package/include/orc-0.4/orc/orctarget.h +115 -0
  547. package/include/orc-0.4/orc/orcutils.h +238 -0
  548. package/include/orc-0.4/orc/orcvariable.h +81 -0
  549. package/include/orc-0.4/orc/orcx86.h +199 -0
  550. package/include/orc-0.4/orc/orcx86insn.h +672 -0
  551. package/include/pango-1.0/pango/pango-attributes.h +748 -0
  552. package/include/pango-1.0/pango/pango-bidi-type.h +117 -0
  553. package/include/pango-1.0/pango/pango-break.h +144 -0
  554. package/include/pango-1.0/pango/pango-color.h +75 -0
  555. package/include/pango-1.0/pango/pango-context.h +116 -0
  556. package/include/pango-1.0/pango/pango-coverage.h +108 -0
  557. package/include/pango-1.0/pango/pango-direction.h +72 -0
  558. package/include/pango-1.0/pango/pango-engine.h +457 -0
  559. package/include/pango-1.0/pango/pango-enum-types.h +120 -0
  560. package/include/pango-1.0/pango/pango-features.h +10 -0
  561. package/include/pango-1.0/pango/pango-font.h +699 -0
  562. package/include/pango-1.0/pango/pango-fontmap.h +132 -0
  563. package/include/pango-1.0/pango/pango-fontset-simple.h +64 -0
  564. package/include/pango-1.0/pango/pango-fontset.h +134 -0
  565. package/include/pango-1.0/pango/pango-glyph-item.h +175 -0
  566. package/include/pango-1.0/pango/pango-glyph.h +270 -0
  567. package/include/pango-1.0/pango/pango-gravity.h +137 -0
  568. package/include/pango-1.0/pango/pango-item.h +165 -0
  569. package/include/pango-1.0/pango/pango-language.h +70 -0
  570. package/include/pango-1.0/pango/pango-layout.h +554 -0
  571. package/include/pango-1.0/pango/pango-markup.h +52 -0
  572. package/include/pango-1.0/pango/pango-matrix.h +130 -0
  573. package/include/pango-1.0/pango/pango-modules.h +84 -0
  574. package/include/pango-1.0/pango/pango-ot.h +427 -0
  575. package/include/pango-1.0/pango/pango-renderer.h +290 -0
  576. package/include/pango-1.0/pango/pango-script.h +335 -0
  577. package/include/pango-1.0/pango/pango-tabs.h +117 -0
  578. package/include/pango-1.0/pango/pango-types.h +244 -0
  579. package/include/pango-1.0/pango/pango-utils.h +187 -0
  580. package/include/pango-1.0/pango/pango-version-macros.h +756 -0
  581. package/include/pango-1.0/pango/pango.h +54 -0
  582. package/include/pango-1.0/pango/pangocairo.h +220 -0
  583. package/include/pango-1.0/pango/pangofc-decoder.h +122 -0
  584. package/include/pango-1.0/pango/pangofc-font.h +120 -0
  585. package/include/pango-1.0/pango/pangofc-fontmap.h +244 -0
  586. package/include/pango-1.0/pango/pangoft2.h +158 -0
  587. package/include/pixman-1/pixman-version.h +54 -0
  588. package/include/pixman-1/pixman.h +1419 -0
  589. package/include/png.h +3247 -0
  590. package/include/pngconf.h +623 -0
  591. package/include/pnglibconf.h +219 -0
  592. package/include/spng.h +537 -0
  593. package/include/tiff.h +899 -0
  594. package/include/tiffconf.h +145 -0
  595. package/include/tiffio.h +653 -0
  596. package/include/tiffvers.h +36 -0
  597. package/include/vips/VConnection8.h +150 -0
  598. package/include/vips/VError8.h +76 -0
  599. package/include/vips/VImage8.h +6065 -0
  600. package/include/vips/VInterpolate8.h +77 -0
  601. package/include/vips/VRegion8.h +155 -0
  602. package/include/vips/arithmetic.h +571 -0
  603. package/include/vips/basic.h +113 -0
  604. package/include/vips/buf.h +118 -0
  605. package/include/vips/colour.h +306 -0
  606. package/include/vips/connection.h +570 -0
  607. package/include/vips/conversion.h +357 -0
  608. package/include/vips/convolution.h +95 -0
  609. package/include/vips/create.h +161 -0
  610. package/include/vips/dbuf.h +103 -0
  611. package/include/vips/debug.h +74 -0
  612. package/include/vips/draw.h +113 -0
  613. package/include/vips/enumtypes.h +181 -0
  614. package/include/vips/error.h +142 -0
  615. package/include/vips/foreign.h +993 -0
  616. package/include/vips/format.h +135 -0
  617. package/include/vips/freqfilt.h +64 -0
  618. package/include/vips/gate.h +82 -0
  619. package/include/vips/generate.h +92 -0
  620. package/include/vips/header.h +312 -0
  621. package/include/vips/histogram.h +85 -0
  622. package/include/vips/image.h +605 -0
  623. package/include/vips/interpolate.h +141 -0
  624. package/include/vips/memory.h +96 -0
  625. package/include/vips/morphology.h +73 -0
  626. package/include/vips/mosaicing.h +80 -0
  627. package/include/vips/object.h +706 -0
  628. package/include/vips/operation.h +182 -0
  629. package/include/vips/private.h +227 -0
  630. package/include/vips/rect.h +80 -0
  631. package/include/vips/region.h +238 -0
  632. package/include/vips/resample.h +123 -0
  633. package/include/vips/sbuf.h +144 -0
  634. package/include/vips/semaphore.h +77 -0
  635. package/include/vips/thread.h +72 -0
  636. package/include/vips/threadpool.h +160 -0
  637. package/include/vips/transform.h +89 -0
  638. package/include/vips/type.h +305 -0
  639. package/include/vips/util.h +406 -0
  640. package/include/vips/vector.h +183 -0
  641. package/include/vips/version.h +26 -0
  642. package/include/vips/vips.h +194 -0
  643. package/include/vips/vips8 +60 -0
  644. package/include/webp/decode.h +504 -0
  645. package/include/webp/demux.h +363 -0
  646. package/include/webp/encode.h +552 -0
  647. package/include/webp/mux.h +530 -0
  648. package/include/webp/mux_types.h +98 -0
  649. package/include/webp/sharpyuv/sharpyuv.h +103 -0
  650. package/include/webp/sharpyuv/sharpyuv_csp.h +60 -0
  651. package/include/webp/types.h +72 -0
  652. package/include/zconf.h +203 -0
  653. package/include/zlib.h +1855 -0
  654. package/include/zlib_name_mangling.h +8 -0
  655. package/package.json +30 -0
  656. package/versions.json +31 -0
@@ -0,0 +1,3281 @@
1
+ /* cairo - a vector graphics library with display and print output
2
+ *
3
+ * Copyright © 2002 University of Southern California
4
+ * Copyright © 2005 Red Hat, Inc.
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it either under the terms of the GNU Lesser General Public
8
+ * License version 2.1 as published by the Free Software Foundation
9
+ * (the "LGPL") or, at your option, under the terms of the Mozilla
10
+ * Public License Version 1.1 (the "MPL"). If you do not alter this
11
+ * notice, a recipient may use your version of this file under either
12
+ * the MPL or the LGPL.
13
+ *
14
+ * You should have received a copy of the LGPL along with this library
15
+ * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
17
+ * You should have received a copy of the MPL along with this library
18
+ * in the file COPYING-MPL-1.1
19
+ *
20
+ * The contents of this file are subject to the Mozilla Public License
21
+ * Version 1.1 (the "License"); you may not use this file except in
22
+ * compliance with the License. You may obtain a copy of the License at
23
+ * http://www.mozilla.org/MPL/
24
+ *
25
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26
+ * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27
+ * the specific language governing rights and limitations.
28
+ *
29
+ * The Original Code is the cairo graphics library.
30
+ *
31
+ * The Initial Developer of the Original Code is University of Southern
32
+ * California.
33
+ *
34
+ * Contributor(s):
35
+ * Carl D. Worth <cworth@cworth.org>
36
+ */
37
+
38
+ #ifndef CAIRO_H
39
+ #define CAIRO_H
40
+
41
+ #include "cairo-version.h"
42
+ #include "cairo-features.h"
43
+ #include "cairo-deprecated.h"
44
+
45
+ #ifdef __cplusplus
46
+ # define CAIRO_BEGIN_DECLS extern "C" {
47
+ # define CAIRO_END_DECLS }
48
+ #else
49
+ # define CAIRO_BEGIN_DECLS
50
+ # define CAIRO_END_DECLS
51
+ #endif
52
+
53
+ #ifndef cairo_public
54
+ # if defined (_MSC_VER) && ! defined (CAIRO_WIN32_STATIC_BUILD)
55
+ # define cairo_public __declspec(dllimport)
56
+ # else
57
+ # define cairo_public
58
+ # endif
59
+ #endif
60
+
61
+ CAIRO_BEGIN_DECLS
62
+
63
+ #define CAIRO_VERSION_ENCODE(major, minor, micro) ( \
64
+ ((major) * 10000) \
65
+ + ((minor) * 100) \
66
+ + ((micro) * 1))
67
+
68
+ #define CAIRO_VERSION CAIRO_VERSION_ENCODE( \
69
+ CAIRO_VERSION_MAJOR, \
70
+ CAIRO_VERSION_MINOR, \
71
+ CAIRO_VERSION_MICRO)
72
+
73
+
74
+ #define CAIRO_VERSION_STRINGIZE_(major, minor, micro) \
75
+ #major"."#minor"."#micro
76
+ #define CAIRO_VERSION_STRINGIZE(major, minor, micro) \
77
+ CAIRO_VERSION_STRINGIZE_(major, minor, micro)
78
+
79
+ #define CAIRO_VERSION_STRING CAIRO_VERSION_STRINGIZE( \
80
+ CAIRO_VERSION_MAJOR, \
81
+ CAIRO_VERSION_MINOR, \
82
+ CAIRO_VERSION_MICRO)
83
+
84
+
85
+ cairo_public int
86
+ cairo_version (void);
87
+
88
+ cairo_public const char*
89
+ cairo_version_string (void);
90
+
91
+ /**
92
+ * cairo_bool_t:
93
+ *
94
+ * #cairo_bool_t is used for boolean values. Returns of type
95
+ * #cairo_bool_t will always be either 0 or 1, but testing against
96
+ * these values explicitly is not encouraged; just use the
97
+ * value as a boolean condition.
98
+ *
99
+ * <informalexample><programlisting>
100
+ * if (cairo_in_stroke (cr, x, y)) {
101
+ * /<!-- -->* do something *<!-- -->/
102
+ * }
103
+ * </programlisting></informalexample>
104
+ *
105
+ * Since: 1.0
106
+ **/
107
+ typedef int cairo_bool_t;
108
+
109
+ /**
110
+ * cairo_t:
111
+ *
112
+ * A #cairo_t contains the current state of the rendering device,
113
+ * including coordinates of yet to be drawn shapes.
114
+ *
115
+ * Cairo contexts, as #cairo_t objects are named, are central to
116
+ * cairo and all drawing with cairo is always done to a #cairo_t
117
+ * object.
118
+ *
119
+ * Memory management of #cairo_t is done with
120
+ * cairo_reference() and cairo_destroy().
121
+ *
122
+ * Since: 1.0
123
+ **/
124
+ typedef struct _cairo cairo_t;
125
+
126
+ /**
127
+ * cairo_surface_t:
128
+ *
129
+ * A #cairo_surface_t represents an image, either as the destination
130
+ * of a drawing operation or as source when drawing onto another
131
+ * surface. To draw to a #cairo_surface_t, create a cairo context
132
+ * with the surface as the target, using cairo_create().
133
+ *
134
+ * There are different subtypes of #cairo_surface_t for
135
+ * different drawing backends; for example, cairo_image_surface_create()
136
+ * creates a bitmap image in memory.
137
+ * The type of a surface can be queried with cairo_surface_get_type().
138
+ *
139
+ * The initial contents of a surface after creation depend upon the manner
140
+ * of its creation. If cairo creates the surface and backing storage for
141
+ * the user, it will be initially cleared; for example,
142
+ * cairo_image_surface_create() and cairo_surface_create_similar().
143
+ * Alternatively, if the user passes in a reference to some backing storage
144
+ * and asks cairo to wrap that in a #cairo_surface_t, then the contents are
145
+ * not modified; for example, cairo_image_surface_create_for_data() and
146
+ * cairo_xlib_surface_create().
147
+ *
148
+ * Memory management of #cairo_surface_t is done with
149
+ * cairo_surface_reference() and cairo_surface_destroy().
150
+ *
151
+ * Since: 1.0
152
+ **/
153
+ typedef struct _cairo_surface cairo_surface_t;
154
+
155
+ /**
156
+ * cairo_device_t:
157
+ *
158
+ * A #cairo_device_t represents the driver interface for drawing
159
+ * operations to a #cairo_surface_t. There are different subtypes of
160
+ * #cairo_device_t for different drawing backends.
161
+ *
162
+ * The type of a device can be queried with cairo_device_get_type().
163
+ *
164
+ * Memory management of #cairo_device_t is done with
165
+ * cairo_device_reference() and cairo_device_destroy().
166
+ *
167
+ * Since: 1.10
168
+ **/
169
+ typedef struct _cairo_device cairo_device_t;
170
+
171
+ /**
172
+ * cairo_matrix_t:
173
+ * @xx: xx component of the affine transformation
174
+ * @yx: yx component of the affine transformation
175
+ * @xy: xy component of the affine transformation
176
+ * @yy: yy component of the affine transformation
177
+ * @x0: X translation component of the affine transformation
178
+ * @y0: Y translation component of the affine transformation
179
+ *
180
+ * A #cairo_matrix_t holds an affine transformation, such as a scale,
181
+ * rotation, shear, or a combination of those. The transformation of
182
+ * a point (x, y) is given by:
183
+ * <programlisting>
184
+ * x_new = xx * x + xy * y + x0;
185
+ * y_new = yx * x + yy * y + y0;
186
+ * </programlisting>
187
+ *
188
+ * Since: 1.0
189
+ **/
190
+ typedef struct _cairo_matrix {
191
+ double xx; double yx;
192
+ double xy; double yy;
193
+ double x0; double y0;
194
+ } cairo_matrix_t;
195
+
196
+ /**
197
+ * cairo_pattern_t:
198
+ *
199
+ * A #cairo_pattern_t represents a source when drawing onto a
200
+ * surface. There are different subtypes of #cairo_pattern_t,
201
+ * for different types of sources; for example,
202
+ * cairo_pattern_create_rgb() creates a pattern for a solid
203
+ * opaque color.
204
+ *
205
+ * Other than various
206
+ * <function>cairo_pattern_create_<emphasis>type</emphasis>()</function>
207
+ * functions, some of the pattern types can be implicitly created using various
208
+ * <function>cairo_set_source_<emphasis>type</emphasis>()</function> functions;
209
+ * for example cairo_set_source_rgb().
210
+ *
211
+ * The type of a pattern can be queried with cairo_pattern_get_type().
212
+ *
213
+ * Memory management of #cairo_pattern_t is done with
214
+ * cairo_pattern_reference() and cairo_pattern_destroy().
215
+ *
216
+ * Since: 1.0
217
+ **/
218
+ typedef struct _cairo_pattern cairo_pattern_t;
219
+
220
+ /**
221
+ * cairo_destroy_func_t:
222
+ * @data: The data element being destroyed.
223
+ *
224
+ * #cairo_destroy_func_t the type of function which is called when a
225
+ * data element is destroyed. It is passed the pointer to the data
226
+ * element and should free any memory and resources allocated for it.
227
+ *
228
+ * Since: 1.0
229
+ **/
230
+ typedef void (*cairo_destroy_func_t) (void *data);
231
+
232
+ /**
233
+ * cairo_user_data_key_t:
234
+ * @unused: not used; ignore.
235
+ *
236
+ * #cairo_user_data_key_t is used for attaching user data to cairo
237
+ * data structures. The actual contents of the struct is never used,
238
+ * and there is no need to initialize the object; only the unique
239
+ * address of a #cairo_data_key_t object is used. Typically, you
240
+ * would just use the address of a static #cairo_data_key_t object.
241
+ *
242
+ * Since: 1.0
243
+ **/
244
+ typedef struct _cairo_user_data_key {
245
+ int unused;
246
+ } cairo_user_data_key_t;
247
+
248
+ /**
249
+ * cairo_status_t:
250
+ * @CAIRO_STATUS_SUCCESS: no error has occurred (Since 1.0)
251
+ * @CAIRO_STATUS_NO_MEMORY: out of memory (Since 1.0)
252
+ * @CAIRO_STATUS_INVALID_RESTORE: cairo_restore() called without matching cairo_save() (Since 1.0)
253
+ * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)
254
+ * @CAIRO_STATUS_NO_CURRENT_POINT: no current point defined (Since 1.0)
255
+ * @CAIRO_STATUS_INVALID_MATRIX: invalid matrix (not invertible) (Since 1.0)
256
+ * @CAIRO_STATUS_INVALID_STATUS: invalid value for an input #cairo_status_t (Since 1.0)
257
+ * @CAIRO_STATUS_NULL_POINTER: %NULL pointer (Since 1.0)
258
+ * @CAIRO_STATUS_INVALID_STRING: input string not valid UTF-8 (Since 1.0)
259
+ * @CAIRO_STATUS_INVALID_PATH_DATA: input path data not valid (Since 1.0)
260
+ * @CAIRO_STATUS_READ_ERROR: error while reading from input stream (Since 1.0)
261
+ * @CAIRO_STATUS_WRITE_ERROR: error while writing to output stream (Since 1.0)
262
+ * @CAIRO_STATUS_SURFACE_FINISHED: target surface has been finished (Since 1.0)
263
+ * @CAIRO_STATUS_SURFACE_TYPE_MISMATCH: the surface type is not appropriate for the operation (Since 1.0)
264
+ * @CAIRO_STATUS_PATTERN_TYPE_MISMATCH: the pattern type is not appropriate for the operation (Since 1.0)
265
+ * @CAIRO_STATUS_INVALID_CONTENT: invalid value for an input #cairo_content_t (Since 1.0)
266
+ * @CAIRO_STATUS_INVALID_FORMAT: invalid value for an input #cairo_format_t (Since 1.0)
267
+ * @CAIRO_STATUS_INVALID_VISUAL: invalid value for an input Visual* (Since 1.0)
268
+ * @CAIRO_STATUS_FILE_NOT_FOUND: file not found (Since 1.0)
269
+ * @CAIRO_STATUS_INVALID_DASH: invalid value for a dash setting (Since 1.0)
270
+ * @CAIRO_STATUS_INVALID_DSC_COMMENT: invalid value for a DSC comment (Since 1.2)
271
+ * @CAIRO_STATUS_INVALID_INDEX: invalid index passed to getter (Since 1.4)
272
+ * @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4)
273
+ * @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6)
274
+ * @CAIRO_STATUS_INVALID_STRIDE: invalid value for stride (Since 1.6)
275
+ * @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8)
276
+ * @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8)
277
+ * @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8)
278
+ * @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8)
279
+ * @CAIRO_STATUS_INVALID_CLUSTERS: input clusters do not represent the accompanying text and glyph array (Since 1.8)
280
+ * @CAIRO_STATUS_INVALID_SLANT: invalid value for an input #cairo_font_slant_t (Since 1.8)
281
+ * @CAIRO_STATUS_INVALID_WEIGHT: invalid value for an input #cairo_font_weight_t (Since 1.8)
282
+ * @CAIRO_STATUS_INVALID_SIZE: invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
283
+ * @CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: user-font method not implemented (Since 1.10)
284
+ * @CAIRO_STATUS_DEVICE_TYPE_MISMATCH: the device type is not appropriate for the operation (Since 1.10)
285
+ * @CAIRO_STATUS_DEVICE_ERROR: an operation to the device caused an unspecified error (Since 1.10)
286
+ * @CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: a mesh pattern
287
+ * construction operation was used outside of a
288
+ * cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch()
289
+ * pair (Since 1.12)
290
+ * @CAIRO_STATUS_DEVICE_FINISHED: target device has been finished (Since 1.12)
291
+ * @CAIRO_STATUS_JBIG2_GLOBAL_MISSING: %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image
292
+ * but no image provided %CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14)
293
+ * @CAIRO_STATUS_PNG_ERROR: error occurred in libpng while reading from or writing to a PNG file (Since 1.16)
294
+ * @CAIRO_STATUS_FREETYPE_ERROR: error occurred in libfreetype (Since 1.16)
295
+ * @CAIRO_STATUS_WIN32_GDI_ERROR: error occurred in the Windows Graphics Device Interface (Since 1.16)
296
+ * @CAIRO_STATUS_TAG_ERROR: invalid tag name, attributes, or nesting (Since 1.16)
297
+ * @CAIRO_STATUS_DWRITE_ERROR: error occurred in the Windows Direct Write API (Since 1.18)
298
+ * @CAIRO_STATUS_LAST_STATUS: this is a special value indicating the number of
299
+ * status values defined in this enumeration. When using this value, note
300
+ * that the version of cairo at run-time may have additional status values
301
+ * defined than the value of this symbol at compile-time. (Since 1.10)
302
+ *
303
+ * #cairo_status_t is used to indicate errors that can occur when
304
+ * using Cairo. In some cases it is returned directly by functions.
305
+ * but when using #cairo_t, the last error, if any, is stored in
306
+ * the context and can be retrieved with cairo_status().
307
+ *
308
+ * New entries may be added in future versions. Use cairo_status_to_string()
309
+ * to get a human-readable representation of an error message.
310
+ *
311
+ * Since: 1.0
312
+ **/
313
+ typedef enum _cairo_status {
314
+ CAIRO_STATUS_SUCCESS = 0,
315
+
316
+ CAIRO_STATUS_NO_MEMORY,
317
+ CAIRO_STATUS_INVALID_RESTORE,
318
+ CAIRO_STATUS_INVALID_POP_GROUP,
319
+ CAIRO_STATUS_NO_CURRENT_POINT,
320
+ CAIRO_STATUS_INVALID_MATRIX,
321
+ CAIRO_STATUS_INVALID_STATUS,
322
+ CAIRO_STATUS_NULL_POINTER,
323
+ CAIRO_STATUS_INVALID_STRING,
324
+ CAIRO_STATUS_INVALID_PATH_DATA,
325
+ CAIRO_STATUS_READ_ERROR,
326
+ CAIRO_STATUS_WRITE_ERROR,
327
+ CAIRO_STATUS_SURFACE_FINISHED,
328
+ CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
329
+ CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
330
+ CAIRO_STATUS_INVALID_CONTENT,
331
+ CAIRO_STATUS_INVALID_FORMAT,
332
+ CAIRO_STATUS_INVALID_VISUAL,
333
+ CAIRO_STATUS_FILE_NOT_FOUND,
334
+ CAIRO_STATUS_INVALID_DASH,
335
+ CAIRO_STATUS_INVALID_DSC_COMMENT,
336
+ CAIRO_STATUS_INVALID_INDEX,
337
+ CAIRO_STATUS_CLIP_NOT_REPRESENTABLE,
338
+ CAIRO_STATUS_TEMP_FILE_ERROR,
339
+ CAIRO_STATUS_INVALID_STRIDE,
340
+ CAIRO_STATUS_FONT_TYPE_MISMATCH,
341
+ CAIRO_STATUS_USER_FONT_IMMUTABLE,
342
+ CAIRO_STATUS_USER_FONT_ERROR,
343
+ CAIRO_STATUS_NEGATIVE_COUNT,
344
+ CAIRO_STATUS_INVALID_CLUSTERS,
345
+ CAIRO_STATUS_INVALID_SLANT,
346
+ CAIRO_STATUS_INVALID_WEIGHT,
347
+ CAIRO_STATUS_INVALID_SIZE,
348
+ CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED,
349
+ CAIRO_STATUS_DEVICE_TYPE_MISMATCH,
350
+ CAIRO_STATUS_DEVICE_ERROR,
351
+ CAIRO_STATUS_INVALID_MESH_CONSTRUCTION,
352
+ CAIRO_STATUS_DEVICE_FINISHED,
353
+ CAIRO_STATUS_JBIG2_GLOBAL_MISSING,
354
+ CAIRO_STATUS_PNG_ERROR,
355
+ CAIRO_STATUS_FREETYPE_ERROR,
356
+ CAIRO_STATUS_WIN32_GDI_ERROR,
357
+ CAIRO_STATUS_TAG_ERROR,
358
+ CAIRO_STATUS_DWRITE_ERROR,
359
+ CAIRO_STATUS_SVG_FONT_ERROR,
360
+
361
+ CAIRO_STATUS_LAST_STATUS
362
+ } cairo_status_t;
363
+
364
+ /**
365
+ * cairo_content_t:
366
+ * @CAIRO_CONTENT_COLOR: The surface will hold color content only. (Since 1.0)
367
+ * @CAIRO_CONTENT_ALPHA: The surface will hold alpha content only. (Since 1.0)
368
+ * @CAIRO_CONTENT_COLOR_ALPHA: The surface will hold color and alpha content. (Since 1.0)
369
+ *
370
+ * #cairo_content_t is used to describe the content that a surface will
371
+ * contain, whether color information, alpha information (translucence
372
+ * vs. opacity), or both.
373
+ *
374
+ * Note: The large values here are designed to keep #cairo_content_t
375
+ * values distinct from #cairo_format_t values so that the
376
+ * implementation can detect the error if users confuse the two types.
377
+ *
378
+ * Since: 1.0
379
+ **/
380
+ typedef enum _cairo_content {
381
+ CAIRO_CONTENT_COLOR = 0x1000,
382
+ CAIRO_CONTENT_ALPHA = 0x2000,
383
+ CAIRO_CONTENT_COLOR_ALPHA = 0x3000
384
+ } cairo_content_t;
385
+
386
+ /**
387
+ * cairo_format_t:
388
+ * @CAIRO_FORMAT_INVALID: no such format exists or is supported.
389
+ * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
390
+ * alpha in the upper 8 bits, then red, then green, then blue.
391
+ * The 32-bit quantities are stored native-endian. Pre-multiplied
392
+ * alpha is used. (That is, 50% transparent red is 0x80800000,
393
+ * not 0x80ff0000.) (Since 1.0)
394
+ * @CAIRO_FORMAT_RGB24: each pixel is a 32-bit quantity, with
395
+ * the upper 8 bits unused. Red, Green, and Blue are stored
396
+ * in the remaining 24 bits in that order. (Since 1.0)
397
+ * @CAIRO_FORMAT_A8: each pixel is a 8-bit quantity holding
398
+ * an alpha value. (Since 1.0)
399
+ * @CAIRO_FORMAT_A1: each pixel is a 1-bit quantity holding
400
+ * an alpha value. Pixels are packed together into 32-bit
401
+ * quantities. The ordering of the bits matches the
402
+ * endianness of the platform. On a big-endian machine, the
403
+ * first pixel is in the uppermost bit, on a little-endian
404
+ * machine the first pixel is in the least-significant bit. (Since 1.0)
405
+ * @CAIRO_FORMAT_RGB16_565: each pixel is a 16-bit quantity
406
+ * with red in the upper 5 bits, then green in the middle
407
+ * 6 bits, and blue in the lower 5 bits. (Since 1.2)
408
+ * @CAIRO_FORMAT_RGB30: like RGB24 but with 10bpc. (Since 1.12)
409
+ * @CAIRO_FORMAT_RGB96F: 3 floats, R, G, B. (Since 1.17.2)
410
+ * @CAIRO_FORMAT_RGBA128F: 4 floats, R, G, B, A. (Since 1.17.2)
411
+ *
412
+ * #cairo_format_t is used to identify the memory format of
413
+ * image data.
414
+ *
415
+ * New entries may be added in future versions.
416
+ *
417
+ * Since: 1.0
418
+ **/
419
+ typedef enum _cairo_format {
420
+ CAIRO_FORMAT_INVALID = -1,
421
+ CAIRO_FORMAT_ARGB32 = 0,
422
+ CAIRO_FORMAT_RGB24 = 1,
423
+ CAIRO_FORMAT_A8 = 2,
424
+ CAIRO_FORMAT_A1 = 3,
425
+ CAIRO_FORMAT_RGB16_565 = 4,
426
+ CAIRO_FORMAT_RGB30 = 5,
427
+ CAIRO_FORMAT_RGB96F = 6,
428
+ CAIRO_FORMAT_RGBA128F = 7
429
+ } cairo_format_t;
430
+
431
+
432
+ /**
433
+ * cairo_write_func_t:
434
+ * @closure: the output closure
435
+ * @data: the buffer containing the data to write
436
+ * @length: the amount of data to write
437
+ *
438
+ * #cairo_write_func_t is the type of function which is called when a
439
+ * backend needs to write data to an output stream. It is passed the
440
+ * closure which was specified by the user at the time the write
441
+ * function was registered, the data to write and the length of the
442
+ * data in bytes. The write function should return
443
+ * %CAIRO_STATUS_SUCCESS if all the data was successfully written,
444
+ * %CAIRO_STATUS_WRITE_ERROR otherwise.
445
+ *
446
+ * Returns: the status code of the write operation
447
+ *
448
+ * Since: 1.0
449
+ **/
450
+ typedef cairo_status_t (*cairo_write_func_t) (void *closure,
451
+ const unsigned char *data,
452
+ unsigned int length);
453
+
454
+ /**
455
+ * cairo_read_func_t:
456
+ * @closure: the input closure
457
+ * @data: the buffer into which to read the data
458
+ * @length: the amount of data to read
459
+ *
460
+ * #cairo_read_func_t is the type of function which is called when a
461
+ * backend needs to read data from an input stream. It is passed the
462
+ * closure which was specified by the user at the time the read
463
+ * function was registered, the buffer to read the data into and the
464
+ * length of the data in bytes. The read function should return
465
+ * %CAIRO_STATUS_SUCCESS if all the data was successfully read,
466
+ * %CAIRO_STATUS_READ_ERROR otherwise.
467
+ *
468
+ * Returns: the status code of the read operation
469
+ *
470
+ * Since: 1.0
471
+ **/
472
+ typedef cairo_status_t (*cairo_read_func_t) (void *closure,
473
+ unsigned char *data,
474
+ unsigned int length);
475
+
476
+ /**
477
+ * cairo_rectangle_int_t:
478
+ * @x: X coordinate of the left side of the rectangle
479
+ * @y: Y coordinate of the top side of the rectangle
480
+ * @width: width of the rectangle
481
+ * @height: height of the rectangle
482
+ *
483
+ * A data structure for holding a rectangle with integer coordinates.
484
+ *
485
+ * Since: 1.10
486
+ **/
487
+
488
+ typedef struct _cairo_rectangle_int {
489
+ int x, y;
490
+ int width, height;
491
+ } cairo_rectangle_int_t;
492
+
493
+
494
+ /* Functions for manipulating state objects */
495
+ cairo_public cairo_t *
496
+ cairo_create (cairo_surface_t *target);
497
+
498
+ cairo_public cairo_t *
499
+ cairo_reference (cairo_t *cr);
500
+
501
+ cairo_public void
502
+ cairo_destroy (cairo_t *cr);
503
+
504
+ cairo_public unsigned int
505
+ cairo_get_reference_count (cairo_t *cr);
506
+
507
+ cairo_public void *
508
+ cairo_get_user_data (cairo_t *cr,
509
+ const cairo_user_data_key_t *key);
510
+
511
+ cairo_public cairo_status_t
512
+ cairo_set_user_data (cairo_t *cr,
513
+ const cairo_user_data_key_t *key,
514
+ void *user_data,
515
+ cairo_destroy_func_t destroy);
516
+
517
+ cairo_public void
518
+ cairo_save (cairo_t *cr);
519
+
520
+ cairo_public void
521
+ cairo_restore (cairo_t *cr);
522
+
523
+ cairo_public void
524
+ cairo_push_group (cairo_t *cr);
525
+
526
+ cairo_public void
527
+ cairo_push_group_with_content (cairo_t *cr, cairo_content_t content);
528
+
529
+ cairo_public cairo_pattern_t *
530
+ cairo_pop_group (cairo_t *cr);
531
+
532
+ cairo_public void
533
+ cairo_pop_group_to_source (cairo_t *cr);
534
+
535
+ /* Modify state */
536
+
537
+ /**
538
+ * cairo_operator_t:
539
+ * @CAIRO_OPERATOR_CLEAR: clear destination layer (bounded) (Since 1.0)
540
+ * @CAIRO_OPERATOR_SOURCE: replace destination layer (bounded) (Since 1.0)
541
+ * @CAIRO_OPERATOR_OVER: draw source layer on top of destination layer
542
+ * (bounded) (Since 1.0)
543
+ * @CAIRO_OPERATOR_IN: draw source where there was destination content
544
+ * (unbounded) (Since 1.0)
545
+ * @CAIRO_OPERATOR_OUT: draw source where there was no destination
546
+ * content (unbounded) (Since 1.0)
547
+ * @CAIRO_OPERATOR_ATOP: draw source on top of destination content and
548
+ * only there (Since 1.0)
549
+ * @CAIRO_OPERATOR_DEST: ignore the source (Since 1.0)
550
+ * @CAIRO_OPERATOR_DEST_OVER: draw destination on top of source (Since 1.0)
551
+ * @CAIRO_OPERATOR_DEST_IN: leave destination only where there was
552
+ * source content (unbounded) (Since 1.0)
553
+ * @CAIRO_OPERATOR_DEST_OUT: leave destination only where there was no
554
+ * source content (Since 1.0)
555
+ * @CAIRO_OPERATOR_DEST_ATOP: leave destination on top of source content
556
+ * and only there (unbounded) (Since 1.0)
557
+ * @CAIRO_OPERATOR_XOR: source and destination are shown where there is only
558
+ * one of them (Since 1.0)
559
+ * @CAIRO_OPERATOR_ADD: source and destination layers are accumulated (Since 1.0)
560
+ * @CAIRO_OPERATOR_SATURATE: like over, but assuming source and dest are
561
+ * disjoint geometries (Since 1.0)
562
+ * @CAIRO_OPERATOR_MULTIPLY: source and destination layers are multiplied.
563
+ * This causes the result to be at least as dark as the darker inputs. (Since 1.10)
564
+ * @CAIRO_OPERATOR_SCREEN: source and destination are complemented and
565
+ * multiplied. This causes the result to be at least as light as the lighter
566
+ * inputs. (Since 1.10)
567
+ * @CAIRO_OPERATOR_OVERLAY: multiplies or screens, depending on the
568
+ * lightness of the destination color. (Since 1.10)
569
+ * @CAIRO_OPERATOR_DARKEN: replaces the destination with the source if it
570
+ * is darker, otherwise keeps the source. (Since 1.10)
571
+ * @CAIRO_OPERATOR_LIGHTEN: replaces the destination with the source if it
572
+ * is lighter, otherwise keeps the source. (Since 1.10)
573
+ * @CAIRO_OPERATOR_COLOR_DODGE: brightens the destination color to reflect
574
+ * the source color. (Since 1.10)
575
+ * @CAIRO_OPERATOR_COLOR_BURN: darkens the destination color to reflect
576
+ * the source color. (Since 1.10)
577
+ * @CAIRO_OPERATOR_HARD_LIGHT: Multiplies or screens, dependent on source
578
+ * color. (Since 1.10)
579
+ * @CAIRO_OPERATOR_SOFT_LIGHT: Darkens or lightens, dependent on source
580
+ * color. (Since 1.10)
581
+ * @CAIRO_OPERATOR_DIFFERENCE: Takes the difference of the source and
582
+ * destination color. (Since 1.10)
583
+ * @CAIRO_OPERATOR_EXCLUSION: Produces an effect similar to difference, but
584
+ * with lower contrast. (Since 1.10)
585
+ * @CAIRO_OPERATOR_HSL_HUE: Creates a color with the hue of the source
586
+ * and the saturation and luminosity of the target. (Since 1.10)
587
+ * @CAIRO_OPERATOR_HSL_SATURATION: Creates a color with the saturation
588
+ * of the source and the hue and luminosity of the target. Painting with
589
+ * this mode onto a gray area produces no change. (Since 1.10)
590
+ * @CAIRO_OPERATOR_HSL_COLOR: Creates a color with the hue and saturation
591
+ * of the source and the luminosity of the target. This preserves the gray
592
+ * levels of the target and is useful for coloring monochrome images or
593
+ * tinting color images. (Since 1.10)
594
+ * @CAIRO_OPERATOR_HSL_LUMINOSITY: Creates a color with the luminosity of
595
+ * the source and the hue and saturation of the target. This produces an
596
+ * inverse effect to @CAIRO_OPERATOR_HSL_COLOR. (Since 1.10)
597
+ *
598
+ * #cairo_operator_t is used to set the compositing operator for all cairo
599
+ * drawing operations.
600
+ *
601
+ * The default operator is %CAIRO_OPERATOR_OVER.
602
+ *
603
+ * The operators marked as <firstterm>unbounded</firstterm> modify their
604
+ * destination even outside of the mask layer (that is, their effect is not
605
+ * bound by the mask layer). However, their effect can still be limited by
606
+ * way of clipping.
607
+ *
608
+ * To keep things simple, the operator descriptions here
609
+ * document the behavior for when both source and destination are either fully
610
+ * transparent or fully opaque. The actual implementation works for
611
+ * translucent layers too.
612
+ * For a more detailed explanation of the effects of each operator, including
613
+ * the mathematical definitions, see
614
+ * <ulink url="https://cairographics.org/operators/">https://cairographics.org/operators/</ulink>.
615
+ *
616
+ * Since: 1.0
617
+ **/
618
+ typedef enum _cairo_operator {
619
+ CAIRO_OPERATOR_CLEAR,
620
+
621
+ CAIRO_OPERATOR_SOURCE,
622
+ CAIRO_OPERATOR_OVER,
623
+ CAIRO_OPERATOR_IN,
624
+ CAIRO_OPERATOR_OUT,
625
+ CAIRO_OPERATOR_ATOP,
626
+
627
+ CAIRO_OPERATOR_DEST,
628
+ CAIRO_OPERATOR_DEST_OVER,
629
+ CAIRO_OPERATOR_DEST_IN,
630
+ CAIRO_OPERATOR_DEST_OUT,
631
+ CAIRO_OPERATOR_DEST_ATOP,
632
+
633
+ CAIRO_OPERATOR_XOR,
634
+ CAIRO_OPERATOR_ADD,
635
+ CAIRO_OPERATOR_SATURATE,
636
+
637
+ CAIRO_OPERATOR_MULTIPLY,
638
+ CAIRO_OPERATOR_SCREEN,
639
+ CAIRO_OPERATOR_OVERLAY,
640
+ CAIRO_OPERATOR_DARKEN,
641
+ CAIRO_OPERATOR_LIGHTEN,
642
+ CAIRO_OPERATOR_COLOR_DODGE,
643
+ CAIRO_OPERATOR_COLOR_BURN,
644
+ CAIRO_OPERATOR_HARD_LIGHT,
645
+ CAIRO_OPERATOR_SOFT_LIGHT,
646
+ CAIRO_OPERATOR_DIFFERENCE,
647
+ CAIRO_OPERATOR_EXCLUSION,
648
+ CAIRO_OPERATOR_HSL_HUE,
649
+ CAIRO_OPERATOR_HSL_SATURATION,
650
+ CAIRO_OPERATOR_HSL_COLOR,
651
+ CAIRO_OPERATOR_HSL_LUMINOSITY
652
+ } cairo_operator_t;
653
+
654
+ cairo_public void
655
+ cairo_set_operator (cairo_t *cr, cairo_operator_t op);
656
+
657
+ cairo_public void
658
+ cairo_set_source (cairo_t *cr, cairo_pattern_t *source);
659
+
660
+ cairo_public void
661
+ cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue);
662
+
663
+ cairo_public void
664
+ cairo_set_source_rgba (cairo_t *cr,
665
+ double red, double green, double blue,
666
+ double alpha);
667
+
668
+ cairo_public void
669
+ cairo_set_source_surface (cairo_t *cr,
670
+ cairo_surface_t *surface,
671
+ double x,
672
+ double y);
673
+
674
+ cairo_public void
675
+ cairo_set_tolerance (cairo_t *cr, double tolerance);
676
+
677
+ /**
678
+ * cairo_antialias_t:
679
+ * @CAIRO_ANTIALIAS_DEFAULT: Use the default antialiasing for
680
+ * the subsystem and target device, since 1.0
681
+ * @CAIRO_ANTIALIAS_NONE: Use a bilevel alpha mask, since 1.0
682
+ * @CAIRO_ANTIALIAS_GRAY: Perform single-color antialiasing (using
683
+ * shades of gray for black text on a white background, for example), since 1.0
684
+ * @CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking
685
+ * advantage of the order of subpixel elements on devices
686
+ * such as LCD panels, since 1.0
687
+ * @CAIRO_ANTIALIAS_FAST: Hint that the backend should perform some
688
+ * antialiasing but prefer speed over quality, since 1.12
689
+ * @CAIRO_ANTIALIAS_GOOD: The backend should balance quality against
690
+ * performance, since 1.12
691
+ * @CAIRO_ANTIALIAS_BEST: Hint that the backend should render at the highest
692
+ * quality, sacrificing speed if necessary, since 1.12
693
+ *
694
+ * Specifies the type of antialiasing to do when rendering text or shapes.
695
+ *
696
+ * As it is not necessarily clear from the above what advantages a particular
697
+ * antialias method provides, since 1.12, there is also a set of hints:
698
+ * @CAIRO_ANTIALIAS_FAST: Allow the backend to degrade raster quality for speed
699
+ * @CAIRO_ANTIALIAS_GOOD: A balance between speed and quality
700
+ * @CAIRO_ANTIALIAS_BEST: A high-fidelity, but potentially slow, raster mode
701
+ *
702
+ * These make no guarantee on how the backend will perform its rasterisation
703
+ * (if it even rasterises!), nor that they have any differing effect other
704
+ * than to enable some form of antialiasing. In the case of glyph rendering,
705
+ * @CAIRO_ANTIALIAS_FAST and @CAIRO_ANTIALIAS_GOOD will be mapped to
706
+ * @CAIRO_ANTIALIAS_GRAY, with @CAIRO_ANTALIAS_BEST being equivalent to
707
+ * @CAIRO_ANTIALIAS_SUBPIXEL.
708
+ *
709
+ * The interpretation of @CAIRO_ANTIALIAS_DEFAULT is left entirely up to
710
+ * the backend, typically this will be similar to @CAIRO_ANTIALIAS_GOOD.
711
+ *
712
+ * Since: 1.0
713
+ **/
714
+ typedef enum _cairo_antialias {
715
+ CAIRO_ANTIALIAS_DEFAULT,
716
+
717
+ /* method */
718
+ CAIRO_ANTIALIAS_NONE,
719
+ CAIRO_ANTIALIAS_GRAY,
720
+ CAIRO_ANTIALIAS_SUBPIXEL,
721
+
722
+ /* hints */
723
+ CAIRO_ANTIALIAS_FAST,
724
+ CAIRO_ANTIALIAS_GOOD,
725
+ CAIRO_ANTIALIAS_BEST
726
+ } cairo_antialias_t;
727
+
728
+ cairo_public void
729
+ cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias);
730
+
731
+ /**
732
+ * cairo_fill_rule_t:
733
+ * @CAIRO_FILL_RULE_WINDING: If the path crosses the ray from
734
+ * left-to-right, counts +1. If the path crosses the ray
735
+ * from right to left, counts -1. (Left and right are determined
736
+ * from the perspective of looking along the ray from the starting
737
+ * point.) If the total count is non-zero, the point will be filled. (Since 1.0)
738
+ * @CAIRO_FILL_RULE_EVEN_ODD: Counts the total number of
739
+ * intersections, without regard to the orientation of the contour. If
740
+ * the total number of intersections is odd, the point will be
741
+ * filled. (Since 1.0)
742
+ *
743
+ * #cairo_fill_rule_t is used to select how paths are filled. For both
744
+ * fill rules, whether or not a point is included in the fill is
745
+ * determined by taking a ray from that point to infinity and looking
746
+ * at intersections with the path. The ray can be in any direction,
747
+ * as long as it doesn't pass through the end point of a segment
748
+ * or have a tricky intersection such as intersecting tangent to the path.
749
+ * (Note that filling is not actually implemented in this way. This
750
+ * is just a description of the rule that is applied.)
751
+ *
752
+ * The default fill rule is %CAIRO_FILL_RULE_WINDING.
753
+ *
754
+ * New entries may be added in future versions.
755
+ *
756
+ * Since: 1.0
757
+ **/
758
+ typedef enum _cairo_fill_rule {
759
+ CAIRO_FILL_RULE_WINDING,
760
+ CAIRO_FILL_RULE_EVEN_ODD
761
+ } cairo_fill_rule_t;
762
+
763
+ cairo_public void
764
+ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
765
+
766
+ cairo_public void
767
+ cairo_set_line_width (cairo_t *cr, double width);
768
+
769
+ cairo_public void
770
+ cairo_set_hairline (cairo_t *cr, cairo_bool_t set_hairline);
771
+
772
+ /**
773
+ * cairo_line_cap_t:
774
+ * @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point (Since 1.0)
775
+ * @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point (Since 1.0)
776
+ * @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point (Since 1.0)
777
+ *
778
+ * Specifies how to render the endpoints of the path when stroking.
779
+ *
780
+ * The default line cap style is %CAIRO_LINE_CAP_BUTT.
781
+ *
782
+ * Since: 1.0
783
+ **/
784
+ typedef enum _cairo_line_cap {
785
+ CAIRO_LINE_CAP_BUTT,
786
+ CAIRO_LINE_CAP_ROUND,
787
+ CAIRO_LINE_CAP_SQUARE
788
+ } cairo_line_cap_t;
789
+
790
+ cairo_public void
791
+ cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap);
792
+
793
+ /**
794
+ * cairo_line_join_t:
795
+ * @CAIRO_LINE_JOIN_MITER: use a sharp (angled) corner, see
796
+ * cairo_set_miter_limit() (Since 1.0)
797
+ * @CAIRO_LINE_JOIN_ROUND: use a rounded join, the center of the circle is the
798
+ * joint point (Since 1.0)
799
+ * @CAIRO_LINE_JOIN_BEVEL: use a cut-off join, the join is cut off at half
800
+ * the line width from the joint point (Since 1.0)
801
+ *
802
+ * Specifies how to render the junction of two lines when stroking.
803
+ *
804
+ * The default line join style is %CAIRO_LINE_JOIN_MITER.
805
+ *
806
+ * Since: 1.0
807
+ **/
808
+ typedef enum _cairo_line_join {
809
+ CAIRO_LINE_JOIN_MITER,
810
+ CAIRO_LINE_JOIN_ROUND,
811
+ CAIRO_LINE_JOIN_BEVEL
812
+ } cairo_line_join_t;
813
+
814
+ cairo_public void
815
+ cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join);
816
+
817
+ cairo_public void
818
+ cairo_set_dash (cairo_t *cr,
819
+ const double *dashes,
820
+ int num_dashes,
821
+ double offset);
822
+
823
+ cairo_public void
824
+ cairo_set_miter_limit (cairo_t *cr, double limit);
825
+
826
+ cairo_public void
827
+ cairo_translate (cairo_t *cr, double tx, double ty);
828
+
829
+ cairo_public void
830
+ cairo_scale (cairo_t *cr, double sx, double sy);
831
+
832
+ cairo_public void
833
+ cairo_rotate (cairo_t *cr, double angle);
834
+
835
+ cairo_public void
836
+ cairo_transform (cairo_t *cr,
837
+ const cairo_matrix_t *matrix);
838
+
839
+ cairo_public void
840
+ cairo_set_matrix (cairo_t *cr,
841
+ const cairo_matrix_t *matrix);
842
+
843
+ cairo_public void
844
+ cairo_identity_matrix (cairo_t *cr);
845
+
846
+ cairo_public void
847
+ cairo_user_to_device (cairo_t *cr, double *x, double *y);
848
+
849
+ cairo_public void
850
+ cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy);
851
+
852
+ cairo_public void
853
+ cairo_device_to_user (cairo_t *cr, double *x, double *y);
854
+
855
+ cairo_public void
856
+ cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
857
+
858
+ /* Path creation functions */
859
+ cairo_public void
860
+ cairo_new_path (cairo_t *cr);
861
+
862
+ cairo_public void
863
+ cairo_move_to (cairo_t *cr, double x, double y);
864
+
865
+ cairo_public void
866
+ cairo_new_sub_path (cairo_t *cr);
867
+
868
+ cairo_public void
869
+ cairo_line_to (cairo_t *cr, double x, double y);
870
+
871
+ cairo_public void
872
+ cairo_curve_to (cairo_t *cr,
873
+ double x1, double y1,
874
+ double x2, double y2,
875
+ double x3, double y3);
876
+
877
+ cairo_public void
878
+ cairo_arc (cairo_t *cr,
879
+ double xc, double yc,
880
+ double radius,
881
+ double angle1, double angle2);
882
+
883
+ cairo_public void
884
+ cairo_arc_negative (cairo_t *cr,
885
+ double xc, double yc,
886
+ double radius,
887
+ double angle1, double angle2);
888
+
889
+ /* XXX: NYI
890
+ cairo_public void
891
+ cairo_arc_to (cairo_t *cr,
892
+ double x1, double y1,
893
+ double x2, double y2,
894
+ double radius);
895
+ */
896
+
897
+ cairo_public void
898
+ cairo_rel_move_to (cairo_t *cr, double dx, double dy);
899
+
900
+ cairo_public void
901
+ cairo_rel_line_to (cairo_t *cr, double dx, double dy);
902
+
903
+ cairo_public void
904
+ cairo_rel_curve_to (cairo_t *cr,
905
+ double dx1, double dy1,
906
+ double dx2, double dy2,
907
+ double dx3, double dy3);
908
+
909
+ cairo_public void
910
+ cairo_rectangle (cairo_t *cr,
911
+ double x, double y,
912
+ double width, double height);
913
+
914
+ /* XXX: NYI
915
+ cairo_public void
916
+ cairo_stroke_to_path (cairo_t *cr);
917
+ */
918
+
919
+ cairo_public void
920
+ cairo_close_path (cairo_t *cr);
921
+
922
+ cairo_public void
923
+ cairo_path_extents (cairo_t *cr,
924
+ double *x1, double *y1,
925
+ double *x2, double *y2);
926
+
927
+ /* Painting functions */
928
+ cairo_public void
929
+ cairo_paint (cairo_t *cr);
930
+
931
+ cairo_public void
932
+ cairo_paint_with_alpha (cairo_t *cr,
933
+ double alpha);
934
+
935
+ cairo_public void
936
+ cairo_mask (cairo_t *cr,
937
+ cairo_pattern_t *pattern);
938
+
939
+ cairo_public void
940
+ cairo_mask_surface (cairo_t *cr,
941
+ cairo_surface_t *surface,
942
+ double surface_x,
943
+ double surface_y);
944
+
945
+ cairo_public void
946
+ cairo_stroke (cairo_t *cr);
947
+
948
+ cairo_public void
949
+ cairo_stroke_preserve (cairo_t *cr);
950
+
951
+ cairo_public void
952
+ cairo_fill (cairo_t *cr);
953
+
954
+ cairo_public void
955
+ cairo_fill_preserve (cairo_t *cr);
956
+
957
+ cairo_public void
958
+ cairo_copy_page (cairo_t *cr);
959
+
960
+ cairo_public void
961
+ cairo_show_page (cairo_t *cr);
962
+
963
+ /* Insideness testing */
964
+ cairo_public cairo_bool_t
965
+ cairo_in_stroke (cairo_t *cr, double x, double y);
966
+
967
+ cairo_public cairo_bool_t
968
+ cairo_in_fill (cairo_t *cr, double x, double y);
969
+
970
+ cairo_public cairo_bool_t
971
+ cairo_in_clip (cairo_t *cr, double x, double y);
972
+
973
+ /* Rectangular extents */
974
+ cairo_public void
975
+ cairo_stroke_extents (cairo_t *cr,
976
+ double *x1, double *y1,
977
+ double *x2, double *y2);
978
+
979
+ cairo_public void
980
+ cairo_fill_extents (cairo_t *cr,
981
+ double *x1, double *y1,
982
+ double *x2, double *y2);
983
+
984
+ /* Clipping */
985
+ cairo_public void
986
+ cairo_reset_clip (cairo_t *cr);
987
+
988
+ cairo_public void
989
+ cairo_clip (cairo_t *cr);
990
+
991
+ cairo_public void
992
+ cairo_clip_preserve (cairo_t *cr);
993
+
994
+ cairo_public void
995
+ cairo_clip_extents (cairo_t *cr,
996
+ double *x1, double *y1,
997
+ double *x2, double *y2);
998
+
999
+ /**
1000
+ * cairo_rectangle_t:
1001
+ * @x: X coordinate of the left side of the rectangle
1002
+ * @y: Y coordinate of the top side of the rectangle
1003
+ * @width: width of the rectangle
1004
+ * @height: height of the rectangle
1005
+ *
1006
+ * A data structure for holding a rectangle.
1007
+ *
1008
+ * Since: 1.4
1009
+ **/
1010
+ typedef struct _cairo_rectangle {
1011
+ double x, y, width, height;
1012
+ } cairo_rectangle_t;
1013
+
1014
+ /**
1015
+ * cairo_rectangle_list_t:
1016
+ * @status: Error status of the rectangle list
1017
+ * @rectangles: Array containing the rectangles
1018
+ * @num_rectangles: Number of rectangles in this list
1019
+ *
1020
+ * A data structure for holding a dynamically allocated
1021
+ * array of rectangles.
1022
+ *
1023
+ * Since: 1.4
1024
+ **/
1025
+ typedef struct _cairo_rectangle_list {
1026
+ cairo_status_t status;
1027
+ cairo_rectangle_t *rectangles;
1028
+ int num_rectangles;
1029
+ } cairo_rectangle_list_t;
1030
+
1031
+ cairo_public cairo_rectangle_list_t *
1032
+ cairo_copy_clip_rectangle_list (cairo_t *cr);
1033
+
1034
+ cairo_public void
1035
+ cairo_rectangle_list_destroy (cairo_rectangle_list_t *rectangle_list);
1036
+
1037
+ /* Logical structure tagging functions */
1038
+
1039
+ #define CAIRO_TAG_DEST "cairo.dest"
1040
+ #define CAIRO_TAG_LINK "Link"
1041
+
1042
+ cairo_public void
1043
+ cairo_tag_begin (cairo_t *cr, const char *tag_name, const char *attributes);
1044
+
1045
+ cairo_public void
1046
+ cairo_tag_end (cairo_t *cr, const char *tag_name);
1047
+
1048
+ /* Font/Text functions */
1049
+
1050
+ /**
1051
+ * cairo_scaled_font_t:
1052
+ *
1053
+ * A #cairo_scaled_font_t is a font scaled to a particular size and device
1054
+ * resolution. A #cairo_scaled_font_t is most useful for low-level font
1055
+ * usage where a library or application wants to cache a reference
1056
+ * to a scaled font to speed up the computation of metrics.
1057
+ *
1058
+ * There are various types of scaled fonts, depending on the
1059
+ * <firstterm>font backend</firstterm> they use. The type of a
1060
+ * scaled font can be queried using cairo_scaled_font_get_type().
1061
+ *
1062
+ * Memory management of #cairo_scaled_font_t is done with
1063
+ * cairo_scaled_font_reference() and cairo_scaled_font_destroy().
1064
+ *
1065
+ * Since: 1.0
1066
+ **/
1067
+ typedef struct _cairo_scaled_font cairo_scaled_font_t;
1068
+
1069
+ /**
1070
+ * cairo_font_face_t:
1071
+ *
1072
+ * A #cairo_font_face_t specifies all aspects of a font other
1073
+ * than the size or font matrix (a font matrix is used to distort
1074
+ * a font by shearing it or scaling it unequally in the two
1075
+ * directions) . A font face can be set on a #cairo_t by using
1076
+ * cairo_set_font_face(); the size and font matrix are set with
1077
+ * cairo_set_font_size() and cairo_set_font_matrix().
1078
+ *
1079
+ * There are various types of font faces, depending on the
1080
+ * <firstterm>font backend</firstterm> they use. The type of a
1081
+ * font face can be queried using cairo_font_face_get_type().
1082
+ *
1083
+ * Memory management of #cairo_font_face_t is done with
1084
+ * cairo_font_face_reference() and cairo_font_face_destroy().
1085
+ *
1086
+ * Since: 1.0
1087
+ **/
1088
+ typedef struct _cairo_font_face cairo_font_face_t;
1089
+
1090
+ /**
1091
+ * cairo_glyph_t:
1092
+ * @index: glyph index in the font. The exact interpretation of the
1093
+ * glyph index depends on the font technology being used.
1094
+ * @x: the offset in the X direction between the origin used for
1095
+ * drawing or measuring the string and the origin of this glyph.
1096
+ * @y: the offset in the Y direction between the origin used for
1097
+ * drawing or measuring the string and the origin of this glyph.
1098
+ *
1099
+ * The #cairo_glyph_t structure holds information about a single glyph
1100
+ * when drawing or measuring text. A font is (in simple terms) a
1101
+ * collection of shapes used to draw text. A glyph is one of these
1102
+ * shapes. There can be multiple glyphs for a single character
1103
+ * (alternates to be used in different contexts, for example), or a
1104
+ * glyph can be a <firstterm>ligature</firstterm> of multiple
1105
+ * characters. Cairo doesn't expose any way of converting input text
1106
+ * into glyphs, so in order to use the Cairo interfaces that take
1107
+ * arrays of glyphs, you must directly access the appropriate
1108
+ * underlying font system.
1109
+ *
1110
+ * Note that the offsets given by @x and @y are not cumulative. When
1111
+ * drawing or measuring text, each glyph is individually positioned
1112
+ * with respect to the overall origin
1113
+ *
1114
+ * Since: 1.0
1115
+ **/
1116
+ typedef struct {
1117
+ unsigned long index;
1118
+ double x;
1119
+ double y;
1120
+ } cairo_glyph_t;
1121
+
1122
+ cairo_public cairo_glyph_t *
1123
+ cairo_glyph_allocate (int num_glyphs);
1124
+
1125
+ cairo_public void
1126
+ cairo_glyph_free (cairo_glyph_t *glyphs);
1127
+
1128
+ /**
1129
+ * cairo_text_cluster_t:
1130
+ * @num_bytes: the number of bytes of UTF-8 text covered by cluster
1131
+ * @num_glyphs: the number of glyphs covered by cluster
1132
+ *
1133
+ * The #cairo_text_cluster_t structure holds information about a single
1134
+ * <firstterm>text cluster</firstterm>. A text cluster is a minimal
1135
+ * mapping of some glyphs corresponding to some UTF-8 text.
1136
+ *
1137
+ * For a cluster to be valid, both @num_bytes and @num_glyphs should
1138
+ * be non-negative, and at least one should be non-zero.
1139
+ * Note that clusters with zero glyphs are not as well supported as
1140
+ * normal clusters. For example, PDF rendering applications typically
1141
+ * ignore those clusters when PDF text is being selected.
1142
+ *
1143
+ * See cairo_show_text_glyphs() for how clusters are used in advanced
1144
+ * text operations.
1145
+ *
1146
+ * Since: 1.8
1147
+ **/
1148
+ typedef struct {
1149
+ int num_bytes;
1150
+ int num_glyphs;
1151
+ } cairo_text_cluster_t;
1152
+
1153
+ cairo_public cairo_text_cluster_t *
1154
+ cairo_text_cluster_allocate (int num_clusters);
1155
+
1156
+ cairo_public void
1157
+ cairo_text_cluster_free (cairo_text_cluster_t *clusters);
1158
+
1159
+ /**
1160
+ * cairo_text_cluster_flags_t:
1161
+ * @CAIRO_TEXT_CLUSTER_FLAG_BACKWARD: The clusters in the cluster array
1162
+ * map to glyphs in the glyph array from end to start. (Since 1.8)
1163
+ *
1164
+ * Specifies properties of a text cluster mapping.
1165
+ *
1166
+ * Since: 1.8
1167
+ **/
1168
+ typedef enum _cairo_text_cluster_flags {
1169
+ CAIRO_TEXT_CLUSTER_FLAG_BACKWARD = 0x00000001
1170
+ } cairo_text_cluster_flags_t;
1171
+
1172
+ /**
1173
+ * cairo_text_extents_t:
1174
+ * @x_bearing: the horizontal distance from the origin to the
1175
+ * leftmost part of the glyphs as drawn. Positive if the
1176
+ * glyphs lie entirely to the right of the origin.
1177
+ * @y_bearing: the vertical distance from the origin to the
1178
+ * topmost part of the glyphs as drawn. Positive only if the
1179
+ * glyphs lie completely below the origin; will usually be
1180
+ * negative.
1181
+ * @width: width of the glyphs as drawn
1182
+ * @height: height of the glyphs as drawn
1183
+ * @x_advance:distance to advance in the X direction
1184
+ * after drawing these glyphs
1185
+ * @y_advance: distance to advance in the Y direction
1186
+ * after drawing these glyphs. Will typically be zero except
1187
+ * for vertical text layout as found in East-Asian languages.
1188
+ *
1189
+ * The #cairo_text_extents_t structure stores the extents of a single
1190
+ * glyph or a string of glyphs in user-space coordinates. Because text
1191
+ * extents are in user-space coordinates, they are mostly, but not
1192
+ * entirely, independent of the current transformation matrix. If you call
1193
+ * <literal>cairo_scale(cr, 2.0, 2.0)</literal>, text will
1194
+ * be drawn twice as big, but the reported text extents will not be
1195
+ * doubled. They will change slightly due to hinting (so you can't
1196
+ * assume that metrics are independent of the transformation matrix),
1197
+ * but otherwise will remain unchanged.
1198
+ *
1199
+ * Since: 1.0
1200
+ **/
1201
+ typedef struct {
1202
+ double x_bearing;
1203
+ double y_bearing;
1204
+ double width;
1205
+ double height;
1206
+ double x_advance;
1207
+ double y_advance;
1208
+ } cairo_text_extents_t;
1209
+
1210
+ /**
1211
+ * cairo_font_extents_t:
1212
+ * @ascent: the distance that the font extends above the baseline.
1213
+ * Note that this is not always exactly equal to the maximum
1214
+ * of the extents of all the glyphs in the font, but rather
1215
+ * is picked to express the font designer's intent as to
1216
+ * how the font should align with elements above it.
1217
+ * @descent: the distance that the font extends below the baseline.
1218
+ * This value is positive for typical fonts that include
1219
+ * portions below the baseline. Note that this is not always
1220
+ * exactly equal to the maximum of the extents of all the
1221
+ * glyphs in the font, but rather is picked to express the
1222
+ * font designer's intent as to how the font should
1223
+ * align with elements below it.
1224
+ * @height: the recommended vertical distance between baselines when
1225
+ * setting consecutive lines of text with the font. This
1226
+ * is greater than @ascent+@descent by a
1227
+ * quantity known as the <firstterm>line spacing</firstterm>
1228
+ * or <firstterm>external leading</firstterm>. When space
1229
+ * is at a premium, most fonts can be set with only
1230
+ * a distance of @ascent+@descent between lines.
1231
+ * @max_x_advance: the maximum distance in the X direction that
1232
+ * the origin is advanced for any glyph in the font.
1233
+ * @max_y_advance: the maximum distance in the Y direction that
1234
+ * the origin is advanced for any glyph in the font.
1235
+ * This will be zero for normal fonts used for horizontal
1236
+ * writing. (The scripts of East Asia are sometimes written
1237
+ * vertically.)
1238
+ *
1239
+ * The #cairo_font_extents_t structure stores metric information for
1240
+ * a font. Values are given in the current user-space coordinate
1241
+ * system.
1242
+ *
1243
+ * Because font metrics are in user-space coordinates, they are
1244
+ * mostly, but not entirely, independent of the current transformation
1245
+ * matrix. If you call <literal>cairo_scale(cr, 2.0, 2.0)</literal>,
1246
+ * text will be drawn twice as big, but the reported text extents will
1247
+ * not be doubled. They will change slightly due to hinting (so you
1248
+ * can't assume that metrics are independent of the transformation
1249
+ * matrix), but otherwise will remain unchanged.
1250
+ *
1251
+ * Since: 1.0
1252
+ **/
1253
+ typedef struct {
1254
+ double ascent;
1255
+ double descent;
1256
+ double height;
1257
+ double max_x_advance;
1258
+ double max_y_advance;
1259
+ } cairo_font_extents_t;
1260
+
1261
+ /**
1262
+ * cairo_font_slant_t:
1263
+ * @CAIRO_FONT_SLANT_NORMAL: Upright font style, since 1.0
1264
+ * @CAIRO_FONT_SLANT_ITALIC: Italic font style, since 1.0
1265
+ * @CAIRO_FONT_SLANT_OBLIQUE: Oblique font style, since 1.0
1266
+ *
1267
+ * Specifies variants of a font face based on their slant.
1268
+ *
1269
+ * Since: 1.0
1270
+ **/
1271
+ typedef enum _cairo_font_slant {
1272
+ CAIRO_FONT_SLANT_NORMAL,
1273
+ CAIRO_FONT_SLANT_ITALIC,
1274
+ CAIRO_FONT_SLANT_OBLIQUE
1275
+ } cairo_font_slant_t;
1276
+
1277
+ /**
1278
+ * cairo_font_weight_t:
1279
+ * @CAIRO_FONT_WEIGHT_NORMAL: Normal font weight, since 1.0
1280
+ * @CAIRO_FONT_WEIGHT_BOLD: Bold font weight, since 1.0
1281
+ *
1282
+ * Specifies variants of a font face based on their weight.
1283
+ *
1284
+ * Since: 1.0
1285
+ **/
1286
+ typedef enum _cairo_font_weight {
1287
+ CAIRO_FONT_WEIGHT_NORMAL,
1288
+ CAIRO_FONT_WEIGHT_BOLD
1289
+ } cairo_font_weight_t;
1290
+
1291
+ /**
1292
+ * cairo_subpixel_order_t:
1293
+ * @CAIRO_SUBPIXEL_ORDER_DEFAULT: Use the default subpixel order for
1294
+ * for the target device, since 1.0
1295
+ * @CAIRO_SUBPIXEL_ORDER_RGB: Subpixel elements are arranged horizontally
1296
+ * with red at the left, since 1.0
1297
+ * @CAIRO_SUBPIXEL_ORDER_BGR: Subpixel elements are arranged horizontally
1298
+ * with blue at the left, since 1.0
1299
+ * @CAIRO_SUBPIXEL_ORDER_VRGB: Subpixel elements are arranged vertically
1300
+ * with red at the top, since 1.0
1301
+ * @CAIRO_SUBPIXEL_ORDER_VBGR: Subpixel elements are arranged vertically
1302
+ * with blue at the top, since 1.0
1303
+ *
1304
+ * The subpixel order specifies the order of color elements within
1305
+ * each pixel on the display device when rendering with an
1306
+ * antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
1307
+ *
1308
+ * Since: 1.0
1309
+ **/
1310
+ typedef enum _cairo_subpixel_order {
1311
+ CAIRO_SUBPIXEL_ORDER_DEFAULT,
1312
+ CAIRO_SUBPIXEL_ORDER_RGB,
1313
+ CAIRO_SUBPIXEL_ORDER_BGR,
1314
+ CAIRO_SUBPIXEL_ORDER_VRGB,
1315
+ CAIRO_SUBPIXEL_ORDER_VBGR
1316
+ } cairo_subpixel_order_t;
1317
+
1318
+ /**
1319
+ * cairo_hint_style_t:
1320
+ * @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for
1321
+ * font backend and target device, since 1.0
1322
+ * @CAIRO_HINT_STYLE_NONE: Do not hint outlines, since 1.0
1323
+ * @CAIRO_HINT_STYLE_SLIGHT: Hint outlines slightly to improve
1324
+ * contrast while retaining good fidelity to the original
1325
+ * shapes, since 1.0
1326
+ * @CAIRO_HINT_STYLE_MEDIUM: Hint outlines with medium strength
1327
+ * giving a compromise between fidelity to the original shapes
1328
+ * and contrast, since 1.0
1329
+ * @CAIRO_HINT_STYLE_FULL: Hint outlines to maximize contrast, since 1.0
1330
+ *
1331
+ * Specifies the type of hinting to do on font outlines. Hinting
1332
+ * is the process of fitting outlines to the pixel grid in order
1333
+ * to improve the appearance of the result. Since hinting outlines
1334
+ * involves distorting them, it also reduces the faithfulness
1335
+ * to the original outline shapes. Not all of the outline hinting
1336
+ * styles are supported by all font backends.
1337
+ *
1338
+ * New entries may be added in future versions.
1339
+ *
1340
+ * Since: 1.0
1341
+ **/
1342
+ typedef enum _cairo_hint_style {
1343
+ CAIRO_HINT_STYLE_DEFAULT,
1344
+ CAIRO_HINT_STYLE_NONE,
1345
+ CAIRO_HINT_STYLE_SLIGHT,
1346
+ CAIRO_HINT_STYLE_MEDIUM,
1347
+ CAIRO_HINT_STYLE_FULL
1348
+ } cairo_hint_style_t;
1349
+
1350
+ /**
1351
+ * cairo_hint_metrics_t:
1352
+ * @CAIRO_HINT_METRICS_DEFAULT: Hint metrics in the default
1353
+ * manner for the font backend and target device, since 1.0
1354
+ * @CAIRO_HINT_METRICS_OFF: Do not hint font metrics, since 1.0
1355
+ * @CAIRO_HINT_METRICS_ON: Hint font metrics, since 1.0
1356
+ *
1357
+ * Specifies whether to hint font metrics; hinting font metrics
1358
+ * means quantizing them so that they are integer values in
1359
+ * device space. Doing this improves the consistency of
1360
+ * letter and line spacing, however it also means that text
1361
+ * will be laid out differently at different zoom factors.
1362
+ *
1363
+ * Since: 1.0
1364
+ **/
1365
+ typedef enum _cairo_hint_metrics {
1366
+ CAIRO_HINT_METRICS_DEFAULT,
1367
+ CAIRO_HINT_METRICS_OFF,
1368
+ CAIRO_HINT_METRICS_ON
1369
+ } cairo_hint_metrics_t;
1370
+
1371
+ /**
1372
+ * cairo_color_mode_t:
1373
+ * @CAIRO_COLOR_MODE_DEFAULT: Use the default color mode for
1374
+ * font backend and target device, since 1.18.
1375
+ * @CAIRO_COLOR_MODE_NO_COLOR: Disable rendering color glyphs. Glyphs are
1376
+ * always rendered as outline glyphs, since 1.18.
1377
+ * @CAIRO_COLOR_MODE_COLOR: Enable rendering color glyphs. If the font
1378
+ * contains a color presentation for a glyph, and when supported by
1379
+ * the font backend, the glyph will be rendered in color, since 1.18.
1380
+ *
1381
+ * Specifies if color fonts are to be rendered using the color
1382
+ * glyphs or outline glyphs. Glyphs that do not have a color
1383
+ * presentation, and non-color fonts are not affected by this font
1384
+ * option.
1385
+ *
1386
+ * Since: 1.18
1387
+ **/
1388
+ typedef enum _cairo_color_mode {
1389
+ CAIRO_COLOR_MODE_DEFAULT,
1390
+ CAIRO_COLOR_MODE_NO_COLOR,
1391
+ CAIRO_COLOR_MODE_COLOR
1392
+ } cairo_color_mode_t;
1393
+
1394
+ /**
1395
+ * cairo_font_options_t:
1396
+ *
1397
+ * An opaque structure holding all options that are used when
1398
+ * rendering fonts.
1399
+ *
1400
+ * Individual features of a #cairo_font_options_t can be set or
1401
+ * accessed using functions named
1402
+ * <function>cairo_font_options_set_<emphasis>feature_name</emphasis>()</function> and
1403
+ * <function>cairo_font_options_get_<emphasis>feature_name</emphasis>()</function>, like
1404
+ * cairo_font_options_set_antialias() and
1405
+ * cairo_font_options_get_antialias().
1406
+ *
1407
+ * New features may be added to a #cairo_font_options_t in the
1408
+ * future. For this reason, cairo_font_options_copy(),
1409
+ * cairo_font_options_equal(), cairo_font_options_merge(), and
1410
+ * cairo_font_options_hash() should be used to copy, check
1411
+ * for equality, merge, or compute a hash value of
1412
+ * #cairo_font_options_t objects.
1413
+ *
1414
+ * Since: 1.0
1415
+ **/
1416
+ typedef struct _cairo_font_options cairo_font_options_t;
1417
+
1418
+ cairo_public cairo_font_options_t *
1419
+ cairo_font_options_create (void);
1420
+
1421
+ cairo_public cairo_font_options_t *
1422
+ cairo_font_options_copy (const cairo_font_options_t *original);
1423
+
1424
+ cairo_public void
1425
+ cairo_font_options_destroy (cairo_font_options_t *options);
1426
+
1427
+ cairo_public cairo_status_t
1428
+ cairo_font_options_status (cairo_font_options_t *options);
1429
+
1430
+ cairo_public void
1431
+ cairo_font_options_merge (cairo_font_options_t *options,
1432
+ const cairo_font_options_t *other);
1433
+ cairo_public cairo_bool_t
1434
+ cairo_font_options_equal (const cairo_font_options_t *options,
1435
+ const cairo_font_options_t *other);
1436
+
1437
+ cairo_public unsigned long
1438
+ cairo_font_options_hash (const cairo_font_options_t *options);
1439
+
1440
+ cairo_public void
1441
+ cairo_font_options_set_antialias (cairo_font_options_t *options,
1442
+ cairo_antialias_t antialias);
1443
+ cairo_public cairo_antialias_t
1444
+ cairo_font_options_get_antialias (const cairo_font_options_t *options);
1445
+
1446
+ cairo_public void
1447
+ cairo_font_options_set_subpixel_order (cairo_font_options_t *options,
1448
+ cairo_subpixel_order_t subpixel_order);
1449
+ cairo_public cairo_subpixel_order_t
1450
+ cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
1451
+
1452
+ cairo_public void
1453
+ cairo_font_options_set_hint_style (cairo_font_options_t *options,
1454
+ cairo_hint_style_t hint_style);
1455
+ cairo_public cairo_hint_style_t
1456
+ cairo_font_options_get_hint_style (const cairo_font_options_t *options);
1457
+
1458
+ cairo_public void
1459
+ cairo_font_options_set_hint_metrics (cairo_font_options_t *options,
1460
+ cairo_hint_metrics_t hint_metrics);
1461
+ cairo_public cairo_hint_metrics_t
1462
+ cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
1463
+
1464
+ cairo_public const char *
1465
+ cairo_font_options_get_variations (cairo_font_options_t *options);
1466
+
1467
+ cairo_public void
1468
+ cairo_font_options_set_variations (cairo_font_options_t *options,
1469
+ const char *variations);
1470
+
1471
+ #define CAIRO_COLOR_PALETTE_DEFAULT 0
1472
+
1473
+ cairo_public void
1474
+ cairo_font_options_set_color_mode (cairo_font_options_t *options,
1475
+ cairo_color_mode_t color_mode);
1476
+
1477
+ cairo_public cairo_color_mode_t
1478
+ cairo_font_options_get_color_mode (const cairo_font_options_t *options);
1479
+
1480
+ cairo_public unsigned int
1481
+ cairo_font_options_get_color_palette (const cairo_font_options_t *options);
1482
+
1483
+ cairo_public void
1484
+ cairo_font_options_set_color_palette (cairo_font_options_t *options,
1485
+ unsigned int palette_index);
1486
+
1487
+ cairo_public void
1488
+ cairo_font_options_set_custom_palette_color (cairo_font_options_t *options,
1489
+ unsigned int index,
1490
+ double red, double green,
1491
+ double blue, double alpha);
1492
+
1493
+ cairo_public cairo_status_t
1494
+ cairo_font_options_get_custom_palette_color (cairo_font_options_t *options,
1495
+ unsigned int index,
1496
+ double *red, double *green,
1497
+ double *blue, double *alpha);
1498
+
1499
+ /* This interface is for dealing with text as text, not caring about the
1500
+ font object inside the cairo_t. */
1501
+
1502
+ cairo_public void
1503
+ cairo_select_font_face (cairo_t *cr,
1504
+ const char *family,
1505
+ cairo_font_slant_t slant,
1506
+ cairo_font_weight_t weight);
1507
+
1508
+ cairo_public void
1509
+ cairo_set_font_size (cairo_t *cr, double size);
1510
+
1511
+ cairo_public void
1512
+ cairo_set_font_matrix (cairo_t *cr,
1513
+ const cairo_matrix_t *matrix);
1514
+
1515
+ cairo_public void
1516
+ cairo_get_font_matrix (cairo_t *cr,
1517
+ cairo_matrix_t *matrix);
1518
+
1519
+ cairo_public void
1520
+ cairo_set_font_options (cairo_t *cr,
1521
+ const cairo_font_options_t *options);
1522
+
1523
+ cairo_public void
1524
+ cairo_get_font_options (cairo_t *cr,
1525
+ cairo_font_options_t *options);
1526
+
1527
+ cairo_public void
1528
+ cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face);
1529
+
1530
+ cairo_public cairo_font_face_t *
1531
+ cairo_get_font_face (cairo_t *cr);
1532
+
1533
+ cairo_public void
1534
+ cairo_set_scaled_font (cairo_t *cr,
1535
+ const cairo_scaled_font_t *scaled_font);
1536
+
1537
+ cairo_public cairo_scaled_font_t *
1538
+ cairo_get_scaled_font (cairo_t *cr);
1539
+
1540
+ cairo_public void
1541
+ cairo_show_text (cairo_t *cr, const char *utf8);
1542
+
1543
+ cairo_public void
1544
+ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1545
+
1546
+ cairo_public void
1547
+ cairo_show_text_glyphs (cairo_t *cr,
1548
+ const char *utf8,
1549
+ int utf8_len,
1550
+ const cairo_glyph_t *glyphs,
1551
+ int num_glyphs,
1552
+ const cairo_text_cluster_t *clusters,
1553
+ int num_clusters,
1554
+ cairo_text_cluster_flags_t cluster_flags);
1555
+
1556
+ cairo_public void
1557
+ cairo_text_path (cairo_t *cr, const char *utf8);
1558
+
1559
+ cairo_public void
1560
+ cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1561
+
1562
+ cairo_public void
1563
+ cairo_text_extents (cairo_t *cr,
1564
+ const char *utf8,
1565
+ cairo_text_extents_t *extents);
1566
+
1567
+ cairo_public void
1568
+ cairo_glyph_extents (cairo_t *cr,
1569
+ const cairo_glyph_t *glyphs,
1570
+ int num_glyphs,
1571
+ cairo_text_extents_t *extents);
1572
+
1573
+ cairo_public void
1574
+ cairo_font_extents (cairo_t *cr,
1575
+ cairo_font_extents_t *extents);
1576
+
1577
+ /* Generic identifier for a font style */
1578
+
1579
+ cairo_public cairo_font_face_t *
1580
+ cairo_font_face_reference (cairo_font_face_t *font_face);
1581
+
1582
+ cairo_public void
1583
+ cairo_font_face_destroy (cairo_font_face_t *font_face);
1584
+
1585
+ cairo_public unsigned int
1586
+ cairo_font_face_get_reference_count (cairo_font_face_t *font_face);
1587
+
1588
+ cairo_public cairo_status_t
1589
+ cairo_font_face_status (cairo_font_face_t *font_face);
1590
+
1591
+
1592
+ /**
1593
+ * cairo_font_type_t:
1594
+ * @CAIRO_FONT_TYPE_TOY: The font was created using cairo's toy font api (Since: 1.2)
1595
+ * @CAIRO_FONT_TYPE_FT: The font is of type FreeType (Since: 1.2)
1596
+ * @CAIRO_FONT_TYPE_WIN32: The font is of type Win32 (Since: 1.2)
1597
+ * @CAIRO_FONT_TYPE_QUARTZ: The font is of type Quartz (Since: 1.6, in 1.2 and
1598
+ * 1.4 it was named CAIRO_FONT_TYPE_ATSUI)
1599
+ * @CAIRO_FONT_TYPE_USER: The font was create using cairo's user font api (Since: 1.8)
1600
+ * @CAIRO_FONT_TYPE_DWRITE: The font is of type Win32 DWrite (Since: 1.18)
1601
+ *
1602
+ * #cairo_font_type_t is used to describe the type of a given font
1603
+ * face or scaled font. The font types are also known as "font
1604
+ * backends" within cairo.
1605
+ *
1606
+ * The type of a font face is determined by the function used to
1607
+ * create it, which will generally be of the form
1608
+ * <function>cairo_<emphasis>type</emphasis>_font_face_create(<!-- -->)</function>.
1609
+ * The font face type can be queried with cairo_font_face_get_type()
1610
+ *
1611
+ * The various #cairo_font_face_t functions can be used with a font face
1612
+ * of any type.
1613
+ *
1614
+ * The type of a scaled font is determined by the type of the font
1615
+ * face passed to cairo_scaled_font_create(). The scaled font type can
1616
+ * be queried with cairo_scaled_font_get_type()
1617
+ *
1618
+ * The various #cairo_scaled_font_t functions can be used with scaled
1619
+ * fonts of any type, but some font backends also provide
1620
+ * type-specific functions that must only be called with a scaled font
1621
+ * of the appropriate type. These functions have names that begin with
1622
+ * <function>cairo_<emphasis>type</emphasis>_scaled_font(<!-- -->)</function>
1623
+ * such as cairo_ft_scaled_font_lock_face().
1624
+ *
1625
+ * The behavior of calling a type-specific function with a scaled font
1626
+ * of the wrong type is undefined.
1627
+ *
1628
+ * New entries may be added in future versions.
1629
+ *
1630
+ * Since: 1.2
1631
+ **/
1632
+ typedef enum _cairo_font_type {
1633
+ CAIRO_FONT_TYPE_TOY,
1634
+ CAIRO_FONT_TYPE_FT,
1635
+ CAIRO_FONT_TYPE_WIN32,
1636
+ CAIRO_FONT_TYPE_QUARTZ,
1637
+ CAIRO_FONT_TYPE_USER,
1638
+ CAIRO_FONT_TYPE_DWRITE
1639
+ } cairo_font_type_t;
1640
+
1641
+ cairo_public cairo_font_type_t
1642
+ cairo_font_face_get_type (cairo_font_face_t *font_face);
1643
+
1644
+ cairo_public void *
1645
+ cairo_font_face_get_user_data (cairo_font_face_t *font_face,
1646
+ const cairo_user_data_key_t *key);
1647
+
1648
+ cairo_public cairo_status_t
1649
+ cairo_font_face_set_user_data (cairo_font_face_t *font_face,
1650
+ const cairo_user_data_key_t *key,
1651
+ void *user_data,
1652
+ cairo_destroy_func_t destroy);
1653
+
1654
+ /* Portable interface to general font features. */
1655
+
1656
+ cairo_public cairo_scaled_font_t *
1657
+ cairo_scaled_font_create (cairo_font_face_t *font_face,
1658
+ const cairo_matrix_t *font_matrix,
1659
+ const cairo_matrix_t *ctm,
1660
+ const cairo_font_options_t *options);
1661
+
1662
+ cairo_public cairo_scaled_font_t *
1663
+ cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font);
1664
+
1665
+ cairo_public void
1666
+ cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font);
1667
+
1668
+ cairo_public unsigned int
1669
+ cairo_scaled_font_get_reference_count (cairo_scaled_font_t *scaled_font);
1670
+
1671
+ cairo_public cairo_status_t
1672
+ cairo_scaled_font_status (cairo_scaled_font_t *scaled_font);
1673
+
1674
+ cairo_public cairo_font_type_t
1675
+ cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font);
1676
+
1677
+ cairo_public void *
1678
+ cairo_scaled_font_get_user_data (cairo_scaled_font_t *scaled_font,
1679
+ const cairo_user_data_key_t *key);
1680
+
1681
+ cairo_public cairo_status_t
1682
+ cairo_scaled_font_set_user_data (cairo_scaled_font_t *scaled_font,
1683
+ const cairo_user_data_key_t *key,
1684
+ void *user_data,
1685
+ cairo_destroy_func_t destroy);
1686
+
1687
+ cairo_public void
1688
+ cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font,
1689
+ cairo_font_extents_t *extents);
1690
+
1691
+ cairo_public void
1692
+ cairo_scaled_font_text_extents (cairo_scaled_font_t *scaled_font,
1693
+ const char *utf8,
1694
+ cairo_text_extents_t *extents);
1695
+
1696
+ cairo_public void
1697
+ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
1698
+ const cairo_glyph_t *glyphs,
1699
+ int num_glyphs,
1700
+ cairo_text_extents_t *extents);
1701
+
1702
+ cairo_public cairo_status_t
1703
+ cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
1704
+ double x,
1705
+ double y,
1706
+ const char *utf8,
1707
+ int utf8_len,
1708
+ cairo_glyph_t **glyphs,
1709
+ int *num_glyphs,
1710
+ cairo_text_cluster_t **clusters,
1711
+ int *num_clusters,
1712
+ cairo_text_cluster_flags_t *cluster_flags);
1713
+
1714
+ cairo_public cairo_font_face_t *
1715
+ cairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font);
1716
+
1717
+ cairo_public void
1718
+ cairo_scaled_font_get_font_matrix (cairo_scaled_font_t *scaled_font,
1719
+ cairo_matrix_t *font_matrix);
1720
+
1721
+ cairo_public void
1722
+ cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font,
1723
+ cairo_matrix_t *ctm);
1724
+
1725
+ cairo_public void
1726
+ cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font,
1727
+ cairo_matrix_t *scale_matrix);
1728
+
1729
+ cairo_public void
1730
+ cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font,
1731
+ cairo_font_options_t *options);
1732
+
1733
+
1734
+ /* Toy fonts */
1735
+
1736
+ cairo_public cairo_font_face_t *
1737
+ cairo_toy_font_face_create (const char *family,
1738
+ cairo_font_slant_t slant,
1739
+ cairo_font_weight_t weight);
1740
+
1741
+ cairo_public const char *
1742
+ cairo_toy_font_face_get_family (cairo_font_face_t *font_face);
1743
+
1744
+ cairo_public cairo_font_slant_t
1745
+ cairo_toy_font_face_get_slant (cairo_font_face_t *font_face);
1746
+
1747
+ cairo_public cairo_font_weight_t
1748
+ cairo_toy_font_face_get_weight (cairo_font_face_t *font_face);
1749
+
1750
+
1751
+ /* User fonts */
1752
+
1753
+ cairo_public cairo_font_face_t *
1754
+ cairo_user_font_face_create (void);
1755
+
1756
+ /* User-font method signatures */
1757
+
1758
+ /**
1759
+ * cairo_user_scaled_font_init_func_t:
1760
+ * @scaled_font: the scaled-font being created
1761
+ * @cr: a cairo context, in font space
1762
+ * @extents: font extents to fill in, in font space
1763
+ *
1764
+ * #cairo_user_scaled_font_init_func_t is the type of function which is
1765
+ * called when a scaled-font needs to be created for a user font-face.
1766
+ *
1767
+ * The cairo context @cr is not used by the caller, but is prepared in font
1768
+ * space, similar to what the cairo contexts passed to the render_glyph
1769
+ * method will look like. The callback can use this context for extents
1770
+ * computation for example. After the callback is called, @cr is checked
1771
+ * for any error status.
1772
+ *
1773
+ * The @extents argument is where the user font sets the font extents for
1774
+ * @scaled_font. It is in font space, which means that for most cases its
1775
+ * ascent and descent members should add to 1.0. @extents is preset to
1776
+ * hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
1777
+ * descent and max_y_advance members.
1778
+ *
1779
+ * The callback is optional. If not set, default font extents as described
1780
+ * in the previous paragraph will be used.
1781
+ *
1782
+ * Note that @scaled_font is not fully initialized at this
1783
+ * point and trying to use it for text operations in the callback will result
1784
+ * in deadlock.
1785
+ *
1786
+ * Returns: %CAIRO_STATUS_SUCCESS upon success, or an error status on error.
1787
+ *
1788
+ * Since: 1.8
1789
+ **/
1790
+ typedef cairo_status_t (*cairo_user_scaled_font_init_func_t) (cairo_scaled_font_t *scaled_font,
1791
+ cairo_t *cr,
1792
+ cairo_font_extents_t *extents);
1793
+
1794
+ /**
1795
+ * cairo_user_scaled_font_render_glyph_func_t:
1796
+ * @scaled_font: user scaled-font
1797
+ * @glyph: glyph code to render
1798
+ * @cr: cairo context to draw to, in font space
1799
+ * @extents: glyph extents to fill in, in font space
1800
+ *
1801
+ * #cairo_user_scaled_font_render_glyph_func_t is the type of function which
1802
+ * is called when a user scaled-font needs to render a glyph.
1803
+ *
1804
+ * The callback is mandatory, and expected to draw the glyph with code @glyph to
1805
+ * the cairo context @cr. @cr is prepared such that the glyph drawing is done in
1806
+ * font space. That is, the matrix set on @cr is the scale matrix of @scaled_font.
1807
+ * The @extents argument is where the user font sets the font extents for
1808
+ * @scaled_font. However, if user prefers to draw in user space, they can
1809
+ * achieve that by changing the matrix on @cr.
1810
+ *
1811
+ * All cairo rendering operations to @cr are permitted. However, when
1812
+ * this callback is set with
1813
+ * cairo_user_font_face_set_render_glyph_func(), the result is
1814
+ * undefined if any source other than the default source on @cr is
1815
+ * used. That means, glyph bitmaps should be rendered using
1816
+ * cairo_mask() instead of cairo_paint().
1817
+ *
1818
+ * When this callback is set with
1819
+ * cairo_user_font_face_set_render_color_glyph_func(), the default
1820
+ * source is black. Setting the source is a valid
1821
+ * operation. cairo_user_scaled_font_get_foreground_marker() or
1822
+ * cairo_user_scaled_font_get_foreground_source() may be called to
1823
+ * obtain the current source at the time the glyph is rendered.
1824
+ *
1825
+ * Other non-default settings on @cr include a font size of 1.0 (given that
1826
+ * it is set up to be in font space), and font options corresponding to
1827
+ * @scaled_font.
1828
+ *
1829
+ * The @extents argument is preset to have <literal>x_bearing</literal>,
1830
+ * <literal>width</literal>, and <literal>y_advance</literal> of zero,
1831
+ * <literal>y_bearing</literal> set to <literal>-font_extents.ascent</literal>,
1832
+ * <literal>height</literal> to <literal>font_extents.ascent+font_extents.descent</literal>,
1833
+ * and <literal>x_advance</literal> to <literal>font_extents.max_x_advance</literal>.
1834
+ * The only field user needs to set in majority of cases is
1835
+ * <literal>x_advance</literal>.
1836
+ * If the <literal>width</literal> field is zero upon the callback returning
1837
+ * (which is its preset value), the glyph extents are automatically computed
1838
+ * based on the drawings done to @cr. This is in most cases exactly what the
1839
+ * desired behavior is. However, if for any reason the callback sets the
1840
+ * extents, it must be ink extents, and include the extents of all drawing
1841
+ * done to @cr in the callback.
1842
+ *
1843
+ * Where both color and non-color callbacks has been set using
1844
+ * cairo_user_font_face_set_render_color_glyph_func(), and
1845
+ * cairo_user_font_face_set_render_glyph_func(), the color glyph
1846
+ * callback will be called first. If the color glyph callback returns
1847
+ * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, any drawing operations are
1848
+ * discarded and the non-color callback will be called. This is the
1849
+ * only case in which the %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED may
1850
+ * be returned from a render callback. This fallback sequence allows a
1851
+ * user font face to contain a combination of both color and non-color
1852
+ * glyphs.
1853
+ *
1854
+ * Returns: %CAIRO_STATUS_SUCCESS upon success,
1855
+ * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1856
+ * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1857
+ *
1858
+ * Since: 1.8
1859
+ **/
1860
+ typedef cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scaled_font_t *scaled_font,
1861
+ unsigned long glyph,
1862
+ cairo_t *cr,
1863
+ cairo_text_extents_t *extents);
1864
+
1865
+ /**
1866
+ * cairo_user_scaled_font_text_to_glyphs_func_t:
1867
+ * @scaled_font: the scaled-font being created
1868
+ * @utf8: a string of text encoded in UTF-8
1869
+ * @utf8_len: length of @utf8 in bytes
1870
+ * @glyphs: pointer to array of glyphs to fill, in font space
1871
+ * @num_glyphs: pointer to number of glyphs
1872
+ * @clusters: pointer to array of cluster mapping information to fill, or %NULL
1873
+ * @num_clusters: pointer to number of clusters
1874
+ * @cluster_flags: pointer to location to store cluster flags corresponding to the
1875
+ * output @clusters
1876
+ *
1877
+ * #cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which
1878
+ * is called to convert input text to an array of glyphs. This is used by the
1879
+ * cairo_show_text() operation.
1880
+ *
1881
+ * Using this callback the user-font has full control on glyphs and their
1882
+ * positions. That means, it allows for features like ligatures and kerning,
1883
+ * as well as complex <firstterm>shaping</firstterm> required for scripts like
1884
+ * Arabic and Indic.
1885
+ *
1886
+ * The @num_glyphs argument is preset to the number of glyph entries available
1887
+ * in the @glyphs buffer. If the @glyphs buffer is %NULL, the value of
1888
+ * @num_glyphs will be zero. If the provided glyph array is too short for
1889
+ * the conversion (or for convenience), a new glyph array may be allocated
1890
+ * using cairo_glyph_allocate() and placed in @glyphs. Upon return,
1891
+ * @num_glyphs should contain the number of generated glyphs. If the value
1892
+ * @glyphs points at has changed after the call, the caller will free the
1893
+ * allocated glyph array using cairo_glyph_free(). The caller will also free
1894
+ * the original value of @glyphs, so the callback shouldn't do so.
1895
+ * The callback should populate the glyph indices and positions (in font space)
1896
+ * assuming that the text is to be shown at the origin.
1897
+ *
1898
+ * If @clusters is not %NULL, @num_clusters and @cluster_flags are also
1899
+ * non-%NULL, and cluster mapping should be computed. The semantics of how
1900
+ * cluster array allocation works is similar to the glyph array. That is,
1901
+ * if @clusters initially points to a non-%NULL value, that array may be used
1902
+ * as a cluster buffer, and @num_clusters points to the number of cluster
1903
+ * entries available there. If the provided cluster array is too short for
1904
+ * the conversion (or for convenience), a new cluster array may be allocated
1905
+ * using cairo_text_cluster_allocate() and placed in @clusters. In this case,
1906
+ * the original value of @clusters will still be freed by the caller. Upon
1907
+ * return, @num_clusters should contain the number of generated clusters.
1908
+ * If the value @clusters points at has changed after the call, the caller
1909
+ * will free the allocated cluster array using cairo_text_cluster_free().
1910
+ *
1911
+ * The callback is optional. If @num_glyphs is negative upon
1912
+ * the callback returning or if the return value
1913
+ * is %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback
1914
+ * is tried. See #cairo_user_scaled_font_unicode_to_glyph_func_t.
1915
+ *
1916
+ * Note: While cairo does not impose any limitation on glyph indices,
1917
+ * some applications may assume that a glyph index fits in a 16-bit
1918
+ * unsigned integer. As such, it is advised that user-fonts keep their
1919
+ * glyphs in the 0 to 65535 range. Furthermore, some applications may
1920
+ * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
1921
+ * are advised to use glyph 0 for such purposes and do not use that
1922
+ * glyph value for other purposes.
1923
+ *
1924
+ * Returns: %CAIRO_STATUS_SUCCESS upon success,
1925
+ * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1926
+ * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1927
+ *
1928
+ * Since: 1.8
1929
+ **/
1930
+ typedef cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font,
1931
+ const char *utf8,
1932
+ int utf8_len,
1933
+ cairo_glyph_t **glyphs,
1934
+ int *num_glyphs,
1935
+ cairo_text_cluster_t **clusters,
1936
+ int *num_clusters,
1937
+ cairo_text_cluster_flags_t *cluster_flags);
1938
+
1939
+ /**
1940
+ * cairo_user_scaled_font_unicode_to_glyph_func_t:
1941
+ * @scaled_font: the scaled-font being created
1942
+ * @unicode: input unicode character code-point
1943
+ * @glyph_index: output glyph index
1944
+ *
1945
+ * #cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which
1946
+ * is called to convert an input Unicode character to a single glyph.
1947
+ * This is used by the cairo_show_text() operation.
1948
+ *
1949
+ * This callback is used to provide the same functionality as the
1950
+ * text_to_glyphs callback does (see #cairo_user_scaled_font_text_to_glyphs_func_t)
1951
+ * but has much less control on the output,
1952
+ * in exchange for increased ease of use. The inherent assumption to using
1953
+ * this callback is that each character maps to one glyph, and that the
1954
+ * mapping is context independent. It also assumes that glyphs are positioned
1955
+ * according to their advance width. These mean no ligatures, kerning, or
1956
+ * complex scripts can be implemented using this callback.
1957
+ *
1958
+ * The callback is optional, and only used if text_to_glyphs callback is not
1959
+ * set or fails to return glyphs. If this callback is not set or if it returns
1960
+ * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode
1961
+ * code-points to glyph indices is assumed.
1962
+ *
1963
+ * Note: While cairo does not impose any limitation on glyph indices,
1964
+ * some applications may assume that a glyph index fits in a 16-bit
1965
+ * unsigned integer. As such, it is advised that user-fonts keep their
1966
+ * glyphs in the 0 to 65535 range. Furthermore, some applications may
1967
+ * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
1968
+ * are advised to use glyph 0 for such purposes and do not use that
1969
+ * glyph value for other purposes.
1970
+ *
1971
+ * Returns: %CAIRO_STATUS_SUCCESS upon success,
1972
+ * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1973
+ * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1974
+ *
1975
+ * Since: 1.8
1976
+ **/
1977
+ typedef cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font,
1978
+ unsigned long unicode,
1979
+ unsigned long *glyph_index);
1980
+
1981
+ /* User-font method setters */
1982
+
1983
+ cairo_public void
1984
+ cairo_user_font_face_set_init_func (cairo_font_face_t *font_face,
1985
+ cairo_user_scaled_font_init_func_t init_func);
1986
+
1987
+ cairo_public void
1988
+ cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face,
1989
+ cairo_user_scaled_font_render_glyph_func_t render_glyph_func);
1990
+
1991
+ cairo_public void
1992
+ cairo_user_font_face_set_render_color_glyph_func (cairo_font_face_t *font_face,
1993
+ cairo_user_scaled_font_render_glyph_func_t render_glyph_func);
1994
+
1995
+ cairo_public void
1996
+ cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face,
1997
+ cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func);
1998
+
1999
+ cairo_public void
2000
+ cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face,
2001
+ cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func);
2002
+
2003
+ /* User-font method getters */
2004
+
2005
+ cairo_public cairo_user_scaled_font_init_func_t
2006
+ cairo_user_font_face_get_init_func (cairo_font_face_t *font_face);
2007
+
2008
+ cairo_public cairo_user_scaled_font_render_glyph_func_t
2009
+ cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face);
2010
+
2011
+ cairo_public cairo_user_scaled_font_render_glyph_func_t
2012
+ cairo_user_font_face_get_render_color_glyph_func (cairo_font_face_t *font_face);
2013
+
2014
+ cairo_public cairo_user_scaled_font_text_to_glyphs_func_t
2015
+ cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face);
2016
+
2017
+ cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t
2018
+ cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face);
2019
+
2020
+ cairo_public cairo_pattern_t *
2021
+ cairo_user_scaled_font_get_foreground_marker (cairo_scaled_font_t *scaled_font);
2022
+
2023
+ cairo_public cairo_pattern_t *
2024
+ cairo_user_scaled_font_get_foreground_source (cairo_scaled_font_t *scaled_font);
2025
+
2026
+ /* Query functions */
2027
+
2028
+ cairo_public cairo_operator_t
2029
+ cairo_get_operator (cairo_t *cr);
2030
+
2031
+ cairo_public cairo_pattern_t *
2032
+ cairo_get_source (cairo_t *cr);
2033
+
2034
+ cairo_public double
2035
+ cairo_get_tolerance (cairo_t *cr);
2036
+
2037
+ cairo_public cairo_antialias_t
2038
+ cairo_get_antialias (cairo_t *cr);
2039
+
2040
+ cairo_public cairo_bool_t
2041
+ cairo_has_current_point (cairo_t *cr);
2042
+
2043
+ cairo_public void
2044
+ cairo_get_current_point (cairo_t *cr, double *x, double *y);
2045
+
2046
+ cairo_public cairo_fill_rule_t
2047
+ cairo_get_fill_rule (cairo_t *cr);
2048
+
2049
+ cairo_public double
2050
+ cairo_get_line_width (cairo_t *cr);
2051
+
2052
+ cairo_public cairo_bool_t
2053
+ cairo_get_hairline (cairo_t *cr);
2054
+
2055
+ cairo_public cairo_line_cap_t
2056
+ cairo_get_line_cap (cairo_t *cr);
2057
+
2058
+ cairo_public cairo_line_join_t
2059
+ cairo_get_line_join (cairo_t *cr);
2060
+
2061
+ cairo_public double
2062
+ cairo_get_miter_limit (cairo_t *cr);
2063
+
2064
+ cairo_public int
2065
+ cairo_get_dash_count (cairo_t *cr);
2066
+
2067
+ cairo_public void
2068
+ cairo_get_dash (cairo_t *cr, double *dashes, double *offset);
2069
+
2070
+ cairo_public void
2071
+ cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix);
2072
+
2073
+ cairo_public cairo_surface_t *
2074
+ cairo_get_target (cairo_t *cr);
2075
+
2076
+ cairo_public cairo_surface_t *
2077
+ cairo_get_group_target (cairo_t *cr);
2078
+
2079
+ /**
2080
+ * cairo_path_data_type_t:
2081
+ * @CAIRO_PATH_MOVE_TO: A move-to operation, since 1.0
2082
+ * @CAIRO_PATH_LINE_TO: A line-to operation, since 1.0
2083
+ * @CAIRO_PATH_CURVE_TO: A curve-to operation, since 1.0
2084
+ * @CAIRO_PATH_CLOSE_PATH: A close-path operation, since 1.0
2085
+ *
2086
+ * #cairo_path_data_t is used to describe the type of one portion
2087
+ * of a path when represented as a #cairo_path_t.
2088
+ * See #cairo_path_data_t for details.
2089
+ *
2090
+ * Since: 1.0
2091
+ **/
2092
+ typedef enum _cairo_path_data_type {
2093
+ CAIRO_PATH_MOVE_TO,
2094
+ CAIRO_PATH_LINE_TO,
2095
+ CAIRO_PATH_CURVE_TO,
2096
+ CAIRO_PATH_CLOSE_PATH
2097
+ } cairo_path_data_type_t;
2098
+
2099
+ /**
2100
+ * cairo_path_data_t:
2101
+ *
2102
+ * #cairo_path_data_t is used to represent the path data inside a
2103
+ * #cairo_path_t.
2104
+ *
2105
+ * The data structure is designed to try to balance the demands of
2106
+ * efficiency and ease-of-use. A path is represented as an array of
2107
+ * #cairo_path_data_t, which is a union of headers and points.
2108
+ *
2109
+ * Each portion of the path is represented by one or more elements in
2110
+ * the array, (one header followed by 0 or more points). The length
2111
+ * value of the header is the number of array elements for the current
2112
+ * portion including the header, (ie. length == 1 + # of points), and
2113
+ * where the number of points for each element type is as follows:
2114
+ *
2115
+ * <programlisting>
2116
+ * %CAIRO_PATH_MOVE_TO: 1 point
2117
+ * %CAIRO_PATH_LINE_TO: 1 point
2118
+ * %CAIRO_PATH_CURVE_TO: 3 points
2119
+ * %CAIRO_PATH_CLOSE_PATH: 0 points
2120
+ * </programlisting>
2121
+ *
2122
+ * The semantics and ordering of the coordinate values are consistent
2123
+ * with cairo_move_to(), cairo_line_to(), cairo_curve_to(), and
2124
+ * cairo_close_path().
2125
+ *
2126
+ * Here is sample code for iterating through a #cairo_path_t:
2127
+ *
2128
+ * <informalexample><programlisting>
2129
+ * int i;
2130
+ * cairo_path_t *path;
2131
+ * cairo_path_data_t *data;
2132
+ * &nbsp;
2133
+ * path = cairo_copy_path (cr);
2134
+ * &nbsp;
2135
+ * for (i=0; i < path->num_data; i += path->data[i].header.length) {
2136
+ * data = &amp;path->data[i];
2137
+ * switch (data->header.type) {
2138
+ * case CAIRO_PATH_MOVE_TO:
2139
+ * do_move_to_things (data[1].point.x, data[1].point.y);
2140
+ * break;
2141
+ * case CAIRO_PATH_LINE_TO:
2142
+ * do_line_to_things (data[1].point.x, data[1].point.y);
2143
+ * break;
2144
+ * case CAIRO_PATH_CURVE_TO:
2145
+ * do_curve_to_things (data[1].point.x, data[1].point.y,
2146
+ * data[2].point.x, data[2].point.y,
2147
+ * data[3].point.x, data[3].point.y);
2148
+ * break;
2149
+ * case CAIRO_PATH_CLOSE_PATH:
2150
+ * do_close_path_things ();
2151
+ * break;
2152
+ * }
2153
+ * }
2154
+ * cairo_path_destroy (path);
2155
+ * </programlisting></informalexample>
2156
+ *
2157
+ * As of cairo 1.4, cairo does not mind if there are more elements in
2158
+ * a portion of the path than needed. Such elements can be used by
2159
+ * users of the cairo API to hold extra values in the path data
2160
+ * structure. For this reason, it is recommended that applications
2161
+ * always use <literal>data->header.length</literal> to
2162
+ * iterate over the path data, instead of hardcoding the number of
2163
+ * elements for each element type.
2164
+ *
2165
+ * Since: 1.0
2166
+ **/
2167
+ typedef union _cairo_path_data_t cairo_path_data_t;
2168
+ union _cairo_path_data_t {
2169
+ struct {
2170
+ cairo_path_data_type_t type;
2171
+ int length;
2172
+ } header;
2173
+ struct {
2174
+ double x, y;
2175
+ } point;
2176
+ };
2177
+
2178
+ /**
2179
+ * cairo_path_t:
2180
+ * @status: the current error status
2181
+ * @data: the elements in the path
2182
+ * @num_data: the number of elements in the data array
2183
+ *
2184
+ * A data structure for holding a path. This data structure serves as
2185
+ * the return value for cairo_copy_path() and
2186
+ * cairo_copy_path_flat() as well the input value for
2187
+ * cairo_append_path().
2188
+ *
2189
+ * See #cairo_path_data_t for hints on how to iterate over the
2190
+ * actual data within the path.
2191
+ *
2192
+ * The num_data member gives the number of elements in the data
2193
+ * array. This number is larger than the number of independent path
2194
+ * portions (defined in #cairo_path_data_type_t), since the data
2195
+ * includes both headers and coordinates for each portion.
2196
+ *
2197
+ * Since: 1.0
2198
+ **/
2199
+ typedef struct cairo_path {
2200
+ cairo_status_t status;
2201
+ cairo_path_data_t *data;
2202
+ int num_data;
2203
+ } cairo_path_t;
2204
+
2205
+ cairo_public cairo_path_t *
2206
+ cairo_copy_path (cairo_t *cr);
2207
+
2208
+ cairo_public cairo_path_t *
2209
+ cairo_copy_path_flat (cairo_t *cr);
2210
+
2211
+ cairo_public void
2212
+ cairo_append_path (cairo_t *cr,
2213
+ const cairo_path_t *path);
2214
+
2215
+ cairo_public void
2216
+ cairo_path_destroy (cairo_path_t *path);
2217
+
2218
+ /* Error status queries */
2219
+
2220
+ cairo_public cairo_status_t
2221
+ cairo_status (cairo_t *cr);
2222
+
2223
+ cairo_public const char *
2224
+ cairo_status_to_string (cairo_status_t status);
2225
+
2226
+ /* Backend device manipulation */
2227
+
2228
+ cairo_public cairo_device_t *
2229
+ cairo_device_reference (cairo_device_t *device);
2230
+
2231
+ /**
2232
+ * cairo_device_type_t:
2233
+ * @CAIRO_DEVICE_TYPE_DRM: The device is of type Direct Render Manager, since 1.10
2234
+ * @CAIRO_DEVICE_TYPE_GL: The device is of type OpenGL, since 1.10
2235
+ * @CAIRO_DEVICE_TYPE_SCRIPT: The device is of type script, since 1.10
2236
+ * @CAIRO_DEVICE_TYPE_XCB: The device is of type xcb, since 1.10
2237
+ * @CAIRO_DEVICE_TYPE_XLIB: The device is of type xlib, since 1.10
2238
+ * @CAIRO_DEVICE_TYPE_XML: The device is of type XML, since 1.10
2239
+ * @CAIRO_DEVICE_TYPE_COGL: The device is of type cogl, since 1.12
2240
+ * @CAIRO_DEVICE_TYPE_WIN32: The device is of type win32, since 1.12
2241
+ * @CAIRO_DEVICE_TYPE_INVALID: The device is invalid, since 1.10
2242
+ *
2243
+ * #cairo_device_type_t is used to describe the type of a given
2244
+ * device. The devices types are also known as "backends" within cairo.
2245
+ *
2246
+ * The device type can be queried with cairo_device_get_type()
2247
+ *
2248
+ * The various #cairo_device_t functions can be used with devices of
2249
+ * any type, but some backends also provide type-specific functions
2250
+ * that must only be called with a device of the appropriate
2251
+ * type. These functions have names that begin with
2252
+ * <literal>cairo_<emphasis>type</emphasis>_device</literal> such as
2253
+ * cairo_xcb_device_debug_cap_xrender_version().
2254
+ *
2255
+ * The behavior of calling a type-specific function with a device of
2256
+ * the wrong type is undefined.
2257
+ *
2258
+ * New entries may be added in future versions.
2259
+ *
2260
+ * Since: 1.10
2261
+ **/
2262
+ typedef enum _cairo_device_type {
2263
+ CAIRO_DEVICE_TYPE_DRM,
2264
+ CAIRO_DEVICE_TYPE_GL,
2265
+ CAIRO_DEVICE_TYPE_SCRIPT,
2266
+ CAIRO_DEVICE_TYPE_XCB,
2267
+ CAIRO_DEVICE_TYPE_XLIB,
2268
+ CAIRO_DEVICE_TYPE_XML,
2269
+ CAIRO_DEVICE_TYPE_COGL,
2270
+ CAIRO_DEVICE_TYPE_WIN32,
2271
+
2272
+ CAIRO_DEVICE_TYPE_INVALID = -1
2273
+ } cairo_device_type_t;
2274
+
2275
+ cairo_public cairo_device_type_t
2276
+ cairo_device_get_type (cairo_device_t *device);
2277
+
2278
+ cairo_public cairo_status_t
2279
+ cairo_device_status (cairo_device_t *device);
2280
+
2281
+ cairo_public cairo_status_t
2282
+ cairo_device_acquire (cairo_device_t *device);
2283
+
2284
+ cairo_public void
2285
+ cairo_device_release (cairo_device_t *device);
2286
+
2287
+ cairo_public void
2288
+ cairo_device_flush (cairo_device_t *device);
2289
+
2290
+ cairo_public void
2291
+ cairo_device_finish (cairo_device_t *device);
2292
+
2293
+ cairo_public void
2294
+ cairo_device_destroy (cairo_device_t *device);
2295
+
2296
+ cairo_public unsigned int
2297
+ cairo_device_get_reference_count (cairo_device_t *device);
2298
+
2299
+ cairo_public void *
2300
+ cairo_device_get_user_data (cairo_device_t *device,
2301
+ const cairo_user_data_key_t *key);
2302
+
2303
+ cairo_public cairo_status_t
2304
+ cairo_device_set_user_data (cairo_device_t *device,
2305
+ const cairo_user_data_key_t *key,
2306
+ void *user_data,
2307
+ cairo_destroy_func_t destroy);
2308
+
2309
+
2310
+ /* Surface manipulation */
2311
+
2312
+ cairo_public cairo_surface_t *
2313
+ cairo_surface_create_similar (cairo_surface_t *other,
2314
+ cairo_content_t content,
2315
+ int width,
2316
+ int height);
2317
+
2318
+ cairo_public cairo_surface_t *
2319
+ cairo_surface_create_similar_image (cairo_surface_t *other,
2320
+ cairo_format_t format,
2321
+ int width,
2322
+ int height);
2323
+
2324
+ cairo_public cairo_surface_t *
2325
+ cairo_surface_map_to_image (cairo_surface_t *surface,
2326
+ const cairo_rectangle_int_t *extents);
2327
+
2328
+ cairo_public void
2329
+ cairo_surface_unmap_image (cairo_surface_t *surface,
2330
+ cairo_surface_t *image);
2331
+
2332
+ cairo_public cairo_surface_t *
2333
+ cairo_surface_create_for_rectangle (cairo_surface_t *target,
2334
+ double x,
2335
+ double y,
2336
+ double width,
2337
+ double height);
2338
+
2339
+ /**
2340
+ * cairo_surface_observer_mode_t:
2341
+ * @CAIRO_SURFACE_OBSERVER_NORMAL: no recording is done
2342
+ * @CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS: operations are recorded
2343
+ *
2344
+ * Whether operations should be recorded.
2345
+ *
2346
+ * Since: 1.12
2347
+ **/
2348
+ typedef enum {
2349
+ CAIRO_SURFACE_OBSERVER_NORMAL = 0,
2350
+ CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS = 0x1
2351
+ } cairo_surface_observer_mode_t;
2352
+
2353
+ cairo_public cairo_surface_t *
2354
+ cairo_surface_create_observer (cairo_surface_t *target,
2355
+ cairo_surface_observer_mode_t mode);
2356
+
2357
+ typedef void (*cairo_surface_observer_callback_t) (cairo_surface_t *observer,
2358
+ cairo_surface_t *target,
2359
+ void *data);
2360
+
2361
+ cairo_public cairo_status_t
2362
+ cairo_surface_observer_add_paint_callback (cairo_surface_t *abstract_surface,
2363
+ cairo_surface_observer_callback_t func,
2364
+ void *data);
2365
+
2366
+ cairo_public cairo_status_t
2367
+ cairo_surface_observer_add_mask_callback (cairo_surface_t *abstract_surface,
2368
+ cairo_surface_observer_callback_t func,
2369
+ void *data);
2370
+
2371
+ cairo_public cairo_status_t
2372
+ cairo_surface_observer_add_fill_callback (cairo_surface_t *abstract_surface,
2373
+ cairo_surface_observer_callback_t func,
2374
+ void *data);
2375
+
2376
+ cairo_public cairo_status_t
2377
+ cairo_surface_observer_add_stroke_callback (cairo_surface_t *abstract_surface,
2378
+ cairo_surface_observer_callback_t func,
2379
+ void *data);
2380
+
2381
+ cairo_public cairo_status_t
2382
+ cairo_surface_observer_add_glyphs_callback (cairo_surface_t *abstract_surface,
2383
+ cairo_surface_observer_callback_t func,
2384
+ void *data);
2385
+
2386
+ cairo_public cairo_status_t
2387
+ cairo_surface_observer_add_flush_callback (cairo_surface_t *abstract_surface,
2388
+ cairo_surface_observer_callback_t func,
2389
+ void *data);
2390
+
2391
+ cairo_public cairo_status_t
2392
+ cairo_surface_observer_add_finish_callback (cairo_surface_t *abstract_surface,
2393
+ cairo_surface_observer_callback_t func,
2394
+ void *data);
2395
+
2396
+ cairo_public cairo_status_t
2397
+ cairo_surface_observer_print (cairo_surface_t *surface,
2398
+ cairo_write_func_t write_func,
2399
+ void *closure);
2400
+ cairo_public double
2401
+ cairo_surface_observer_elapsed (cairo_surface_t *surface);
2402
+
2403
+ cairo_public cairo_status_t
2404
+ cairo_device_observer_print (cairo_device_t *device,
2405
+ cairo_write_func_t write_func,
2406
+ void *closure);
2407
+
2408
+ cairo_public double
2409
+ cairo_device_observer_elapsed (cairo_device_t *device);
2410
+
2411
+ cairo_public double
2412
+ cairo_device_observer_paint_elapsed (cairo_device_t *device);
2413
+
2414
+ cairo_public double
2415
+ cairo_device_observer_mask_elapsed (cairo_device_t *device);
2416
+
2417
+ cairo_public double
2418
+ cairo_device_observer_fill_elapsed (cairo_device_t *device);
2419
+
2420
+ cairo_public double
2421
+ cairo_device_observer_stroke_elapsed (cairo_device_t *device);
2422
+
2423
+ cairo_public double
2424
+ cairo_device_observer_glyphs_elapsed (cairo_device_t *device);
2425
+
2426
+ cairo_public cairo_surface_t *
2427
+ cairo_surface_reference (cairo_surface_t *surface);
2428
+
2429
+ cairo_public void
2430
+ cairo_surface_finish (cairo_surface_t *surface);
2431
+
2432
+ cairo_public void
2433
+ cairo_surface_destroy (cairo_surface_t *surface);
2434
+
2435
+ cairo_public cairo_device_t *
2436
+ cairo_surface_get_device (cairo_surface_t *surface);
2437
+
2438
+ cairo_public unsigned int
2439
+ cairo_surface_get_reference_count (cairo_surface_t *surface);
2440
+
2441
+ cairo_public cairo_status_t
2442
+ cairo_surface_status (cairo_surface_t *surface);
2443
+
2444
+ /**
2445
+ * cairo_surface_type_t:
2446
+ * @CAIRO_SURFACE_TYPE_IMAGE: The surface is of type image, since 1.2
2447
+ * @CAIRO_SURFACE_TYPE_PDF: The surface is of type pdf, since 1.2
2448
+ * @CAIRO_SURFACE_TYPE_PS: The surface is of type ps, since 1.2
2449
+ * @CAIRO_SURFACE_TYPE_XLIB: The surface is of type xlib, since 1.2
2450
+ * @CAIRO_SURFACE_TYPE_XCB: The surface is of type xcb, since 1.2
2451
+ * @CAIRO_SURFACE_TYPE_GLITZ: The surface is of type glitz, since 1.2
2452
+ * @CAIRO_SURFACE_TYPE_QUARTZ: The surface is of type quartz, since 1.2
2453
+ * @CAIRO_SURFACE_TYPE_WIN32: The surface is of type win32, since 1.2
2454
+ * @CAIRO_SURFACE_TYPE_BEOS: The surface is of type beos, since 1.2
2455
+ * @CAIRO_SURFACE_TYPE_DIRECTFB: The surface is of type directfb, since 1.2
2456
+ * @CAIRO_SURFACE_TYPE_SVG: The surface is of type svg, since 1.2
2457
+ * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2, since 1.4
2458
+ * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface, since 1.6
2459
+ * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image, since 1.6
2460
+ * @CAIRO_SURFACE_TYPE_SCRIPT: The surface is of type script, since 1.10
2461
+ * @CAIRO_SURFACE_TYPE_QT: The surface is of type Qt, since 1.10
2462
+ * @CAIRO_SURFACE_TYPE_RECORDING: The surface is of type recording, since 1.10
2463
+ * @CAIRO_SURFACE_TYPE_VG: The surface is a OpenVG surface, since 1.10
2464
+ * @CAIRO_SURFACE_TYPE_GL: The surface is of type OpenGL, since 1.10
2465
+ * @CAIRO_SURFACE_TYPE_DRM: The surface is of type Direct Render Manager, since 1.10
2466
+ * @CAIRO_SURFACE_TYPE_TEE: The surface is of type 'tee' (a multiplexing surface), since 1.10
2467
+ * @CAIRO_SURFACE_TYPE_XML: The surface is of type XML (for debugging), since 1.10
2468
+ * @CAIRO_SURFACE_TYPE_SUBSURFACE: The surface is a subsurface created with
2469
+ * cairo_surface_create_for_rectangle(), since 1.10
2470
+ * @CAIRO_SURFACE_TYPE_COGL: This surface is of type Cogl, since 1.12
2471
+ *
2472
+ * #cairo_surface_type_t is used to describe the type of a given
2473
+ * surface. The surface types are also known as "backends" or "surface
2474
+ * backends" within cairo.
2475
+ *
2476
+ * The type of a surface is determined by the function used to create
2477
+ * it, which will generally be of the form
2478
+ * <function>cairo_<emphasis>type</emphasis>_surface_create(<!-- -->)</function>,
2479
+ * (though see cairo_surface_create_similar() as well).
2480
+ *
2481
+ * The surface type can be queried with cairo_surface_get_type()
2482
+ *
2483
+ * The various #cairo_surface_t functions can be used with surfaces of
2484
+ * any type, but some backends also provide type-specific functions
2485
+ * that must only be called with a surface of the appropriate
2486
+ * type. These functions have names that begin with
2487
+ * <literal>cairo_<emphasis>type</emphasis>_surface</literal> such as cairo_image_surface_get_width().
2488
+ *
2489
+ * The behavior of calling a type-specific function with a surface of
2490
+ * the wrong type is undefined.
2491
+ *
2492
+ * New entries may be added in future versions.
2493
+ *
2494
+ * Since: 1.2
2495
+ **/
2496
+ typedef enum _cairo_surface_type {
2497
+ CAIRO_SURFACE_TYPE_IMAGE,
2498
+ CAIRO_SURFACE_TYPE_PDF,
2499
+ CAIRO_SURFACE_TYPE_PS,
2500
+ CAIRO_SURFACE_TYPE_XLIB,
2501
+ CAIRO_SURFACE_TYPE_XCB,
2502
+ CAIRO_SURFACE_TYPE_GLITZ,
2503
+ CAIRO_SURFACE_TYPE_QUARTZ,
2504
+ CAIRO_SURFACE_TYPE_WIN32,
2505
+ CAIRO_SURFACE_TYPE_BEOS,
2506
+ CAIRO_SURFACE_TYPE_DIRECTFB,
2507
+ CAIRO_SURFACE_TYPE_SVG,
2508
+ CAIRO_SURFACE_TYPE_OS2,
2509
+ CAIRO_SURFACE_TYPE_WIN32_PRINTING,
2510
+ CAIRO_SURFACE_TYPE_QUARTZ_IMAGE,
2511
+ CAIRO_SURFACE_TYPE_SCRIPT,
2512
+ CAIRO_SURFACE_TYPE_QT,
2513
+ CAIRO_SURFACE_TYPE_RECORDING,
2514
+ CAIRO_SURFACE_TYPE_VG,
2515
+ CAIRO_SURFACE_TYPE_GL,
2516
+ CAIRO_SURFACE_TYPE_DRM,
2517
+ CAIRO_SURFACE_TYPE_TEE,
2518
+ CAIRO_SURFACE_TYPE_XML,
2519
+ CAIRO_SURFACE_TYPE_SKIA,
2520
+ CAIRO_SURFACE_TYPE_SUBSURFACE,
2521
+ CAIRO_SURFACE_TYPE_COGL
2522
+ } cairo_surface_type_t;
2523
+
2524
+ cairo_public cairo_surface_type_t
2525
+ cairo_surface_get_type (cairo_surface_t *surface);
2526
+
2527
+ cairo_public cairo_content_t
2528
+ cairo_surface_get_content (cairo_surface_t *surface);
2529
+
2530
+ #if CAIRO_HAS_PNG_FUNCTIONS
2531
+
2532
+ cairo_public cairo_status_t
2533
+ cairo_surface_write_to_png (cairo_surface_t *surface,
2534
+ const char *filename);
2535
+
2536
+ cairo_public cairo_status_t
2537
+ cairo_surface_write_to_png_stream (cairo_surface_t *surface,
2538
+ cairo_write_func_t write_func,
2539
+ void *closure);
2540
+
2541
+ #endif
2542
+
2543
+ cairo_public void *
2544
+ cairo_surface_get_user_data (cairo_surface_t *surface,
2545
+ const cairo_user_data_key_t *key);
2546
+
2547
+ cairo_public cairo_status_t
2548
+ cairo_surface_set_user_data (cairo_surface_t *surface,
2549
+ const cairo_user_data_key_t *key,
2550
+ void *user_data,
2551
+ cairo_destroy_func_t destroy);
2552
+
2553
+ #define CAIRO_MIME_TYPE_JPEG "image/jpeg"
2554
+ #define CAIRO_MIME_TYPE_PNG "image/png"
2555
+ #define CAIRO_MIME_TYPE_JP2 "image/jp2"
2556
+ #define CAIRO_MIME_TYPE_URI "text/x-uri"
2557
+ #define CAIRO_MIME_TYPE_UNIQUE_ID "application/x-cairo.uuid"
2558
+ #define CAIRO_MIME_TYPE_JBIG2 "application/x-cairo.jbig2"
2559
+ #define CAIRO_MIME_TYPE_JBIG2_GLOBAL "application/x-cairo.jbig2-global"
2560
+ #define CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID "application/x-cairo.jbig2-global-id"
2561
+ #define CAIRO_MIME_TYPE_CCITT_FAX "image/g3fax"
2562
+ #define CAIRO_MIME_TYPE_CCITT_FAX_PARAMS "application/x-cairo.ccitt.params"
2563
+ #define CAIRO_MIME_TYPE_EPS "application/postscript"
2564
+ #define CAIRO_MIME_TYPE_EPS_PARAMS "application/x-cairo.eps.params"
2565
+
2566
+ cairo_public void
2567
+ cairo_surface_get_mime_data (cairo_surface_t *surface,
2568
+ const char *mime_type,
2569
+ const unsigned char **data,
2570
+ unsigned long *length);
2571
+
2572
+ cairo_public cairo_status_t
2573
+ cairo_surface_set_mime_data (cairo_surface_t *surface,
2574
+ const char *mime_type,
2575
+ const unsigned char *data,
2576
+ unsigned long length,
2577
+ cairo_destroy_func_t destroy,
2578
+ void *closure);
2579
+
2580
+ cairo_public cairo_bool_t
2581
+ cairo_surface_supports_mime_type (cairo_surface_t *surface,
2582
+ const char *mime_type);
2583
+
2584
+ cairo_public void
2585
+ cairo_surface_get_font_options (cairo_surface_t *surface,
2586
+ cairo_font_options_t *options);
2587
+
2588
+ cairo_public void
2589
+ cairo_surface_flush (cairo_surface_t *surface);
2590
+
2591
+ cairo_public void
2592
+ cairo_surface_mark_dirty (cairo_surface_t *surface);
2593
+
2594
+ cairo_public void
2595
+ cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface,
2596
+ int x,
2597
+ int y,
2598
+ int width,
2599
+ int height);
2600
+
2601
+ cairo_public void
2602
+ cairo_surface_set_device_scale (cairo_surface_t *surface,
2603
+ double x_scale,
2604
+ double y_scale);
2605
+
2606
+ cairo_public void
2607
+ cairo_surface_get_device_scale (cairo_surface_t *surface,
2608
+ double *x_scale,
2609
+ double *y_scale);
2610
+
2611
+ cairo_public void
2612
+ cairo_surface_set_device_offset (cairo_surface_t *surface,
2613
+ double x_offset,
2614
+ double y_offset);
2615
+
2616
+ cairo_public void
2617
+ cairo_surface_get_device_offset (cairo_surface_t *surface,
2618
+ double *x_offset,
2619
+ double *y_offset);
2620
+
2621
+ cairo_public void
2622
+ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
2623
+ double x_pixels_per_inch,
2624
+ double y_pixels_per_inch);
2625
+
2626
+ cairo_public void
2627
+ cairo_surface_get_fallback_resolution (cairo_surface_t *surface,
2628
+ double *x_pixels_per_inch,
2629
+ double *y_pixels_per_inch);
2630
+
2631
+ cairo_public void
2632
+ cairo_surface_copy_page (cairo_surface_t *surface);
2633
+
2634
+ cairo_public void
2635
+ cairo_surface_show_page (cairo_surface_t *surface);
2636
+
2637
+ cairo_public cairo_bool_t
2638
+ cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
2639
+
2640
+ /* Image-surface functions */
2641
+
2642
+ cairo_public cairo_surface_t *
2643
+ cairo_image_surface_create (cairo_format_t format,
2644
+ int width,
2645
+ int height);
2646
+
2647
+ cairo_public int
2648
+ cairo_format_stride_for_width (cairo_format_t format,
2649
+ int width);
2650
+
2651
+ cairo_public cairo_surface_t *
2652
+ cairo_image_surface_create_for_data (unsigned char *data,
2653
+ cairo_format_t format,
2654
+ int width,
2655
+ int height,
2656
+ int stride);
2657
+
2658
+ cairo_public unsigned char *
2659
+ cairo_image_surface_get_data (cairo_surface_t *surface);
2660
+
2661
+ cairo_public cairo_format_t
2662
+ cairo_image_surface_get_format (cairo_surface_t *surface);
2663
+
2664
+ cairo_public int
2665
+ cairo_image_surface_get_width (cairo_surface_t *surface);
2666
+
2667
+ cairo_public int
2668
+ cairo_image_surface_get_height (cairo_surface_t *surface);
2669
+
2670
+ cairo_public int
2671
+ cairo_image_surface_get_stride (cairo_surface_t *surface);
2672
+
2673
+ #if CAIRO_HAS_PNG_FUNCTIONS
2674
+
2675
+ cairo_public cairo_surface_t *
2676
+ cairo_image_surface_create_from_png (const char *filename);
2677
+
2678
+ cairo_public cairo_surface_t *
2679
+ cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func,
2680
+ void *closure);
2681
+
2682
+ #endif
2683
+
2684
+ /* Recording-surface functions */
2685
+
2686
+ cairo_public cairo_surface_t *
2687
+ cairo_recording_surface_create (cairo_content_t content,
2688
+ const cairo_rectangle_t *extents);
2689
+
2690
+ cairo_public void
2691
+ cairo_recording_surface_ink_extents (cairo_surface_t *surface,
2692
+ double *x0,
2693
+ double *y0,
2694
+ double *width,
2695
+ double *height);
2696
+
2697
+ cairo_public cairo_bool_t
2698
+ cairo_recording_surface_get_extents (cairo_surface_t *surface,
2699
+ cairo_rectangle_t *extents);
2700
+
2701
+ /* raster-source pattern (callback) functions */
2702
+
2703
+ /**
2704
+ * cairo_raster_source_acquire_func_t:
2705
+ * @pattern: the pattern being rendered from
2706
+ * @callback_data: the user data supplied during creation
2707
+ * @target: the rendering target surface
2708
+ * @extents: rectangular region of interest in pixels in sample space
2709
+ *
2710
+ * #cairo_raster_source_acquire_func_t is the type of function which is
2711
+ * called when a pattern is being rendered from. It should create a surface
2712
+ * that provides the pixel data for the region of interest as defined by
2713
+ * extents, though the surface itself does not have to be limited to that
2714
+ * area. For convenience the surface should probably be of image type,
2715
+ * created with cairo_surface_create_similar_image() for the target (which
2716
+ * enables the number of copies to be reduced during transfer to the
2717
+ * device). Another option, might be to return a similar surface to the
2718
+ * target for explicit handling by the application of a set of cached sources
2719
+ * on the device. The region of sample data provided should be defined using
2720
+ * cairo_surface_set_device_offset() to specify the top-left corner of the
2721
+ * sample data (along with width and height of the surface).
2722
+ *
2723
+ * Returns: a #cairo_surface_t
2724
+ *
2725
+ * Since: 1.12
2726
+ **/
2727
+ typedef cairo_surface_t *
2728
+ (*cairo_raster_source_acquire_func_t) (cairo_pattern_t *pattern,
2729
+ void *callback_data,
2730
+ cairo_surface_t *target,
2731
+ const cairo_rectangle_int_t *extents);
2732
+
2733
+ /**
2734
+ * cairo_raster_source_release_func_t:
2735
+ * @pattern: the pattern being rendered from
2736
+ * @callback_data: the user data supplied during creation
2737
+ * @surface: the surface created during acquire
2738
+ *
2739
+ * #cairo_raster_source_release_func_t is the type of function which is
2740
+ * called when the pixel data is no longer being access by the pattern
2741
+ * for the rendering operation. Typically this function will simply
2742
+ * destroy the surface created during acquire.
2743
+ *
2744
+ * Since: 1.12
2745
+ **/
2746
+ typedef void
2747
+ (*cairo_raster_source_release_func_t) (cairo_pattern_t *pattern,
2748
+ void *callback_data,
2749
+ cairo_surface_t *surface);
2750
+
2751
+ /**
2752
+ * cairo_raster_source_snapshot_func_t:
2753
+ * @pattern: the pattern being rendered from
2754
+ * @callback_data: the user data supplied during creation
2755
+ *
2756
+ * #cairo_raster_source_snapshot_func_t is the type of function which is
2757
+ * called when the pixel data needs to be preserved for later use
2758
+ * during printing. This pattern will be accessed again later, and it
2759
+ * is expected to provide the pixel data that was current at the time
2760
+ * of snapshotting.
2761
+ *
2762
+ * Return value: CAIRO_STATUS_SUCCESS on success, or one of the
2763
+ * #cairo_status_t error codes for failure.
2764
+ *
2765
+ * Since: 1.12
2766
+ **/
2767
+ typedef cairo_status_t
2768
+ (*cairo_raster_source_snapshot_func_t) (cairo_pattern_t *pattern,
2769
+ void *callback_data);
2770
+
2771
+ /**
2772
+ * cairo_raster_source_copy_func_t:
2773
+ * @pattern: the #cairo_pattern_t that was copied to
2774
+ * @callback_data: the user data supplied during creation
2775
+ * @other: the #cairo_pattern_t being used as the source for the copy
2776
+ *
2777
+ * #cairo_raster_source_copy_func_t is the type of function which is
2778
+ * called when the pattern gets copied as a normal part of rendering.
2779
+ *
2780
+ * Return value: CAIRO_STATUS_SUCCESS on success, or one of the
2781
+ * #cairo_status_t error codes for failure.
2782
+ *
2783
+ * Since: 1.12
2784
+ **/
2785
+ typedef cairo_status_t
2786
+ (*cairo_raster_source_copy_func_t) (cairo_pattern_t *pattern,
2787
+ void *callback_data,
2788
+ const cairo_pattern_t *other);
2789
+
2790
+ /**
2791
+ * cairo_raster_source_finish_func_t:
2792
+ * @pattern: the pattern being rendered from
2793
+ * @callback_data: the user data supplied during creation
2794
+ *
2795
+ * #cairo_raster_source_finish_func_t is the type of function which is
2796
+ * called when the pattern (or a copy thereof) is no longer required.
2797
+ *
2798
+ * Since: 1.12
2799
+ **/
2800
+ typedef void
2801
+ (*cairo_raster_source_finish_func_t) (cairo_pattern_t *pattern,
2802
+ void *callback_data);
2803
+
2804
+ cairo_public cairo_pattern_t *
2805
+ cairo_pattern_create_raster_source (void *user_data,
2806
+ cairo_content_t content,
2807
+ int width, int height);
2808
+
2809
+ cairo_public void
2810
+ cairo_raster_source_pattern_set_callback_data (cairo_pattern_t *pattern,
2811
+ void *data);
2812
+
2813
+ cairo_public void *
2814
+ cairo_raster_source_pattern_get_callback_data (cairo_pattern_t *pattern);
2815
+
2816
+ cairo_public void
2817
+ cairo_raster_source_pattern_set_acquire (cairo_pattern_t *pattern,
2818
+ cairo_raster_source_acquire_func_t acquire,
2819
+ cairo_raster_source_release_func_t release);
2820
+
2821
+ cairo_public void
2822
+ cairo_raster_source_pattern_get_acquire (cairo_pattern_t *pattern,
2823
+ cairo_raster_source_acquire_func_t *acquire,
2824
+ cairo_raster_source_release_func_t *release);
2825
+ cairo_public void
2826
+ cairo_raster_source_pattern_set_snapshot (cairo_pattern_t *pattern,
2827
+ cairo_raster_source_snapshot_func_t snapshot);
2828
+
2829
+ cairo_public cairo_raster_source_snapshot_func_t
2830
+ cairo_raster_source_pattern_get_snapshot (cairo_pattern_t *pattern);
2831
+
2832
+ cairo_public void
2833
+ cairo_raster_source_pattern_set_copy (cairo_pattern_t *pattern,
2834
+ cairo_raster_source_copy_func_t copy);
2835
+
2836
+ cairo_public cairo_raster_source_copy_func_t
2837
+ cairo_raster_source_pattern_get_copy (cairo_pattern_t *pattern);
2838
+
2839
+ cairo_public void
2840
+ cairo_raster_source_pattern_set_finish (cairo_pattern_t *pattern,
2841
+ cairo_raster_source_finish_func_t finish);
2842
+
2843
+ cairo_public cairo_raster_source_finish_func_t
2844
+ cairo_raster_source_pattern_get_finish (cairo_pattern_t *pattern);
2845
+
2846
+ /* Pattern creation functions */
2847
+
2848
+ cairo_public cairo_pattern_t *
2849
+ cairo_pattern_create_rgb (double red, double green, double blue);
2850
+
2851
+ cairo_public cairo_pattern_t *
2852
+ cairo_pattern_create_rgba (double red, double green, double blue,
2853
+ double alpha);
2854
+
2855
+ cairo_public cairo_pattern_t *
2856
+ cairo_pattern_create_for_surface (cairo_surface_t *surface);
2857
+
2858
+ cairo_public cairo_pattern_t *
2859
+ cairo_pattern_create_linear (double x0, double y0,
2860
+ double x1, double y1);
2861
+
2862
+ cairo_public cairo_pattern_t *
2863
+ cairo_pattern_create_radial (double cx0, double cy0, double radius0,
2864
+ double cx1, double cy1, double radius1);
2865
+
2866
+ cairo_public cairo_pattern_t *
2867
+ cairo_pattern_create_mesh (void);
2868
+
2869
+ cairo_public cairo_pattern_t *
2870
+ cairo_pattern_reference (cairo_pattern_t *pattern);
2871
+
2872
+ cairo_public void
2873
+ cairo_pattern_destroy (cairo_pattern_t *pattern);
2874
+
2875
+ cairo_public unsigned int
2876
+ cairo_pattern_get_reference_count (cairo_pattern_t *pattern);
2877
+
2878
+ cairo_public cairo_status_t
2879
+ cairo_pattern_status (cairo_pattern_t *pattern);
2880
+
2881
+ cairo_public void *
2882
+ cairo_pattern_get_user_data (cairo_pattern_t *pattern,
2883
+ const cairo_user_data_key_t *key);
2884
+
2885
+ cairo_public cairo_status_t
2886
+ cairo_pattern_set_user_data (cairo_pattern_t *pattern,
2887
+ const cairo_user_data_key_t *key,
2888
+ void *user_data,
2889
+ cairo_destroy_func_t destroy);
2890
+
2891
+ /**
2892
+ * cairo_pattern_type_t:
2893
+ * @CAIRO_PATTERN_TYPE_SOLID: The pattern is a solid (uniform)
2894
+ * color. It may be opaque or translucent, since 1.2.
2895
+ * @CAIRO_PATTERN_TYPE_SURFACE: The pattern is a based on a surface (an image), since 1.2.
2896
+ * @CAIRO_PATTERN_TYPE_LINEAR: The pattern is a linear gradient, since 1.2.
2897
+ * @CAIRO_PATTERN_TYPE_RADIAL: The pattern is a radial gradient, since 1.2.
2898
+ * @CAIRO_PATTERN_TYPE_MESH: The pattern is a mesh, since 1.12.
2899
+ * @CAIRO_PATTERN_TYPE_RASTER_SOURCE: The pattern is a user pattern providing raster data, since 1.12.
2900
+ *
2901
+ * #cairo_pattern_type_t is used to describe the type of a given pattern.
2902
+ *
2903
+ * The type of a pattern is determined by the function used to create
2904
+ * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
2905
+ * functions create SOLID patterns. The remaining
2906
+ * cairo_pattern_create<!-- --> functions map to pattern types in obvious
2907
+ * ways.
2908
+ *
2909
+ * The pattern type can be queried with cairo_pattern_get_type()
2910
+ *
2911
+ * Most #cairo_pattern_t functions can be called with a pattern of any
2912
+ * type, (though trying to change the extend or filter for a solid
2913
+ * pattern will have no effect). A notable exception is
2914
+ * cairo_pattern_add_color_stop_rgb() and
2915
+ * cairo_pattern_add_color_stop_rgba() which must only be called with
2916
+ * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
2917
+ * will be shutdown and put into an error state.
2918
+ *
2919
+ * New entries may be added in future versions.
2920
+ *
2921
+ * Since: 1.2
2922
+ **/
2923
+ typedef enum _cairo_pattern_type {
2924
+ CAIRO_PATTERN_TYPE_SOLID,
2925
+ CAIRO_PATTERN_TYPE_SURFACE,
2926
+ CAIRO_PATTERN_TYPE_LINEAR,
2927
+ CAIRO_PATTERN_TYPE_RADIAL,
2928
+ CAIRO_PATTERN_TYPE_MESH,
2929
+ CAIRO_PATTERN_TYPE_RASTER_SOURCE
2930
+ } cairo_pattern_type_t;
2931
+
2932
+ cairo_public cairo_pattern_type_t
2933
+ cairo_pattern_get_type (cairo_pattern_t *pattern);
2934
+
2935
+ cairo_public void
2936
+ cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern,
2937
+ double offset,
2938
+ double red, double green, double blue);
2939
+
2940
+ cairo_public void
2941
+ cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern,
2942
+ double offset,
2943
+ double red, double green, double blue,
2944
+ double alpha);
2945
+
2946
+ cairo_public void
2947
+ cairo_mesh_pattern_begin_patch (cairo_pattern_t *pattern);
2948
+
2949
+ cairo_public void
2950
+ cairo_mesh_pattern_end_patch (cairo_pattern_t *pattern);
2951
+
2952
+ cairo_public void
2953
+ cairo_mesh_pattern_curve_to (cairo_pattern_t *pattern,
2954
+ double x1, double y1,
2955
+ double x2, double y2,
2956
+ double x3, double y3);
2957
+
2958
+ cairo_public void
2959
+ cairo_mesh_pattern_line_to (cairo_pattern_t *pattern,
2960
+ double x, double y);
2961
+
2962
+ cairo_public void
2963
+ cairo_mesh_pattern_move_to (cairo_pattern_t *pattern,
2964
+ double x, double y);
2965
+
2966
+ cairo_public void
2967
+ cairo_mesh_pattern_set_control_point (cairo_pattern_t *pattern,
2968
+ unsigned int point_num,
2969
+ double x, double y);
2970
+
2971
+ cairo_public void
2972
+ cairo_mesh_pattern_set_corner_color_rgb (cairo_pattern_t *pattern,
2973
+ unsigned int corner_num,
2974
+ double red, double green, double blue);
2975
+
2976
+ cairo_public void
2977
+ cairo_mesh_pattern_set_corner_color_rgba (cairo_pattern_t *pattern,
2978
+ unsigned int corner_num,
2979
+ double red, double green, double blue,
2980
+ double alpha);
2981
+
2982
+ cairo_public void
2983
+ cairo_pattern_set_matrix (cairo_pattern_t *pattern,
2984
+ const cairo_matrix_t *matrix);
2985
+
2986
+ cairo_public void
2987
+ cairo_pattern_get_matrix (cairo_pattern_t *pattern,
2988
+ cairo_matrix_t *matrix);
2989
+
2990
+ /**
2991
+ * cairo_extend_t:
2992
+ * @CAIRO_EXTEND_NONE: pixels outside of the source pattern
2993
+ * are fully transparent (Since 1.0)
2994
+ * @CAIRO_EXTEND_REPEAT: the pattern is tiled by repeating (Since 1.0)
2995
+ * @CAIRO_EXTEND_REFLECT: the pattern is tiled by reflecting
2996
+ * at the edges (Since 1.0; but only implemented for surface patterns since 1.6)
2997
+ * @CAIRO_EXTEND_PAD: pixels outside of the pattern copy
2998
+ * the closest pixel from the source (Since 1.2; but only
2999
+ * implemented for surface patterns since 1.6)
3000
+ *
3001
+ * #cairo_extend_t is used to describe how pattern color/alpha will be
3002
+ * determined for areas "outside" the pattern's natural area, (for
3003
+ * example, outside the surface bounds or outside the gradient
3004
+ * geometry).
3005
+ *
3006
+ * Mesh patterns are not affected by the extend mode.
3007
+ *
3008
+ * The default extend mode is %CAIRO_EXTEND_NONE for surface patterns
3009
+ * and %CAIRO_EXTEND_PAD for gradient patterns.
3010
+ *
3011
+ * New entries may be added in future versions.
3012
+ *
3013
+ * Since: 1.0
3014
+ **/
3015
+ typedef enum _cairo_extend {
3016
+ CAIRO_EXTEND_NONE,
3017
+ CAIRO_EXTEND_REPEAT,
3018
+ CAIRO_EXTEND_REFLECT,
3019
+ CAIRO_EXTEND_PAD
3020
+ } cairo_extend_t;
3021
+
3022
+ cairo_public void
3023
+ cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend);
3024
+
3025
+ cairo_public cairo_extend_t
3026
+ cairo_pattern_get_extend (cairo_pattern_t *pattern);
3027
+
3028
+ /**
3029
+ * cairo_filter_t:
3030
+ * @CAIRO_FILTER_FAST: A high-performance filter, with quality similar
3031
+ * to %CAIRO_FILTER_NEAREST (Since 1.0)
3032
+ * @CAIRO_FILTER_GOOD: A reasonable-performance filter, with quality
3033
+ * similar to %CAIRO_FILTER_BILINEAR (Since 1.0)
3034
+ * @CAIRO_FILTER_BEST: The highest-quality available, performance may
3035
+ * not be suitable for interactive use. (Since 1.0)
3036
+ * @CAIRO_FILTER_NEAREST: Nearest-neighbor filtering (Since 1.0)
3037
+ * @CAIRO_FILTER_BILINEAR: Linear interpolation in two dimensions (Since 1.0)
3038
+ * @CAIRO_FILTER_GAUSSIAN: This filter value is currently
3039
+ * unimplemented, and should not be used in current code. (Since 1.0)
3040
+ *
3041
+ * #cairo_filter_t is used to indicate what filtering should be
3042
+ * applied when reading pixel values from patterns. See
3043
+ * cairo_pattern_set_filter() for indicating the desired filter to be
3044
+ * used with a particular pattern.
3045
+ *
3046
+ * Since: 1.0
3047
+ **/
3048
+ typedef enum _cairo_filter {
3049
+ CAIRO_FILTER_FAST,
3050
+ CAIRO_FILTER_GOOD,
3051
+ CAIRO_FILTER_BEST,
3052
+ CAIRO_FILTER_NEAREST,
3053
+ CAIRO_FILTER_BILINEAR,
3054
+ CAIRO_FILTER_GAUSSIAN
3055
+ } cairo_filter_t;
3056
+
3057
+ cairo_public void
3058
+ cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
3059
+
3060
+ cairo_public cairo_filter_t
3061
+ cairo_pattern_get_filter (cairo_pattern_t *pattern);
3062
+
3063
+ cairo_public cairo_status_t
3064
+ cairo_pattern_get_rgba (cairo_pattern_t *pattern,
3065
+ double *red, double *green,
3066
+ double *blue, double *alpha);
3067
+
3068
+ cairo_public cairo_status_t
3069
+ cairo_pattern_get_surface (cairo_pattern_t *pattern,
3070
+ cairo_surface_t **surface);
3071
+
3072
+
3073
+ cairo_public cairo_status_t
3074
+ cairo_pattern_get_color_stop_rgba (cairo_pattern_t *pattern,
3075
+ int index, double *offset,
3076
+ double *red, double *green,
3077
+ double *blue, double *alpha);
3078
+
3079
+ cairo_public cairo_status_t
3080
+ cairo_pattern_get_color_stop_count (cairo_pattern_t *pattern,
3081
+ int *count);
3082
+
3083
+ cairo_public cairo_status_t
3084
+ cairo_pattern_get_linear_points (cairo_pattern_t *pattern,
3085
+ double *x0, double *y0,
3086
+ double *x1, double *y1);
3087
+
3088
+ cairo_public cairo_status_t
3089
+ cairo_pattern_get_radial_circles (cairo_pattern_t *pattern,
3090
+ double *x0, double *y0, double *r0,
3091
+ double *x1, double *y1, double *r1);
3092
+
3093
+ cairo_public cairo_status_t
3094
+ cairo_mesh_pattern_get_patch_count (cairo_pattern_t *pattern,
3095
+ unsigned int *count);
3096
+
3097
+ cairo_public cairo_path_t *
3098
+ cairo_mesh_pattern_get_path (cairo_pattern_t *pattern,
3099
+ unsigned int patch_num);
3100
+
3101
+ cairo_public cairo_status_t
3102
+ cairo_mesh_pattern_get_corner_color_rgba (cairo_pattern_t *pattern,
3103
+ unsigned int patch_num,
3104
+ unsigned int corner_num,
3105
+ double *red, double *green,
3106
+ double *blue, double *alpha);
3107
+
3108
+ cairo_public cairo_status_t
3109
+ cairo_mesh_pattern_get_control_point (cairo_pattern_t *pattern,
3110
+ unsigned int patch_num,
3111
+ unsigned int point_num,
3112
+ double *x, double *y);
3113
+
3114
+ /* Matrix functions */
3115
+
3116
+ cairo_public void
3117
+ cairo_matrix_init (cairo_matrix_t *matrix,
3118
+ double xx, double yx,
3119
+ double xy, double yy,
3120
+ double x0, double y0);
3121
+
3122
+ cairo_public void
3123
+ cairo_matrix_init_identity (cairo_matrix_t *matrix);
3124
+
3125
+ cairo_public void
3126
+ cairo_matrix_init_translate (cairo_matrix_t *matrix,
3127
+ double tx, double ty);
3128
+
3129
+ cairo_public void
3130
+ cairo_matrix_init_scale (cairo_matrix_t *matrix,
3131
+ double sx, double sy);
3132
+
3133
+ cairo_public void
3134
+ cairo_matrix_init_rotate (cairo_matrix_t *matrix,
3135
+ double radians);
3136
+
3137
+ cairo_public void
3138
+ cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty);
3139
+
3140
+ cairo_public void
3141
+ cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy);
3142
+
3143
+ cairo_public void
3144
+ cairo_matrix_rotate (cairo_matrix_t *matrix, double radians);
3145
+
3146
+ cairo_public cairo_status_t
3147
+ cairo_matrix_invert (cairo_matrix_t *matrix);
3148
+
3149
+ cairo_public void
3150
+ cairo_matrix_multiply (cairo_matrix_t *result,
3151
+ const cairo_matrix_t *a,
3152
+ const cairo_matrix_t *b);
3153
+
3154
+ cairo_public void
3155
+ cairo_matrix_transform_distance (const cairo_matrix_t *matrix,
3156
+ double *dx, double *dy);
3157
+
3158
+ cairo_public void
3159
+ cairo_matrix_transform_point (const cairo_matrix_t *matrix,
3160
+ double *x, double *y);
3161
+
3162
+ /* Region functions */
3163
+
3164
+ /**
3165
+ * cairo_region_t:
3166
+ *
3167
+ * A #cairo_region_t represents a set of integer-aligned rectangles.
3168
+ *
3169
+ * It allows set-theoretical operations like cairo_region_union() and
3170
+ * cairo_region_intersect() to be performed on them.
3171
+ *
3172
+ * Memory management of #cairo_region_t is done with
3173
+ * cairo_region_reference() and cairo_region_destroy().
3174
+ *
3175
+ * Since: 1.10
3176
+ **/
3177
+ typedef struct _cairo_region cairo_region_t;
3178
+
3179
+ /**
3180
+ * cairo_region_overlap_t:
3181
+ * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
3182
+ * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
3183
+ * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
3184
+ * partially outside the region. (Since 1.10)
3185
+ *
3186
+ * Used as the return value for cairo_region_contains_rectangle().
3187
+ *
3188
+ * Since: 1.10
3189
+ **/
3190
+ typedef enum _cairo_region_overlap {
3191
+ CAIRO_REGION_OVERLAP_IN, /* completely inside region */
3192
+ CAIRO_REGION_OVERLAP_OUT, /* completely outside region */
3193
+ CAIRO_REGION_OVERLAP_PART /* partly inside region */
3194
+ } cairo_region_overlap_t;
3195
+
3196
+ cairo_public cairo_region_t *
3197
+ cairo_region_create (void);
3198
+
3199
+ cairo_public cairo_region_t *
3200
+ cairo_region_create_rectangle (const cairo_rectangle_int_t *rectangle);
3201
+
3202
+ cairo_public cairo_region_t *
3203
+ cairo_region_create_rectangles (const cairo_rectangle_int_t *rects,
3204
+ int count);
3205
+
3206
+ cairo_public cairo_region_t *
3207
+ cairo_region_copy (const cairo_region_t *original);
3208
+
3209
+ cairo_public cairo_region_t *
3210
+ cairo_region_reference (cairo_region_t *region);
3211
+
3212
+ cairo_public void
3213
+ cairo_region_destroy (cairo_region_t *region);
3214
+
3215
+ cairo_public cairo_bool_t
3216
+ cairo_region_equal (const cairo_region_t *a, const cairo_region_t *b);
3217
+
3218
+ cairo_public cairo_status_t
3219
+ cairo_region_status (const cairo_region_t *region);
3220
+
3221
+ cairo_public void
3222
+ cairo_region_get_extents (const cairo_region_t *region,
3223
+ cairo_rectangle_int_t *extents);
3224
+
3225
+ cairo_public int
3226
+ cairo_region_num_rectangles (const cairo_region_t *region);
3227
+
3228
+ cairo_public void
3229
+ cairo_region_get_rectangle (const cairo_region_t *region,
3230
+ int nth,
3231
+ cairo_rectangle_int_t *rectangle);
3232
+
3233
+ cairo_public cairo_bool_t
3234
+ cairo_region_is_empty (const cairo_region_t *region);
3235
+
3236
+ cairo_public cairo_region_overlap_t
3237
+ cairo_region_contains_rectangle (const cairo_region_t *region,
3238
+ const cairo_rectangle_int_t *rectangle);
3239
+
3240
+ cairo_public cairo_bool_t
3241
+ cairo_region_contains_point (const cairo_region_t *region, int x, int y);
3242
+
3243
+ cairo_public void
3244
+ cairo_region_translate (cairo_region_t *region, int dx, int dy);
3245
+
3246
+ cairo_public cairo_status_t
3247
+ cairo_region_subtract (cairo_region_t *dst, const cairo_region_t *other);
3248
+
3249
+ cairo_public cairo_status_t
3250
+ cairo_region_subtract_rectangle (cairo_region_t *dst,
3251
+ const cairo_rectangle_int_t *rectangle);
3252
+
3253
+ cairo_public cairo_status_t
3254
+ cairo_region_intersect (cairo_region_t *dst, const cairo_region_t *other);
3255
+
3256
+ cairo_public cairo_status_t
3257
+ cairo_region_intersect_rectangle (cairo_region_t *dst,
3258
+ const cairo_rectangle_int_t *rectangle);
3259
+
3260
+ cairo_public cairo_status_t
3261
+ cairo_region_union (cairo_region_t *dst, const cairo_region_t *other);
3262
+
3263
+ cairo_public cairo_status_t
3264
+ cairo_region_union_rectangle (cairo_region_t *dst,
3265
+ const cairo_rectangle_int_t *rectangle);
3266
+
3267
+ cairo_public cairo_status_t
3268
+ cairo_region_xor (cairo_region_t *dst, const cairo_region_t *other);
3269
+
3270
+ cairo_public cairo_status_t
3271
+ cairo_region_xor_rectangle (cairo_region_t *dst,
3272
+ const cairo_rectangle_int_t *rectangle);
3273
+
3274
+ /* Functions to be used while debugging (not intended for use in production code) */
3275
+ cairo_public void
3276
+ cairo_debug_reset_static_data (void);
3277
+
3278
+
3279
+ CAIRO_END_DECLS
3280
+
3281
+ #endif /* CAIRO_H */