@gtkx/cairo 1.2.2

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 (86) hide show
  1. package/dist/context.d.ts +229 -0
  2. package/dist/context.d.ts.map +1 -0
  3. package/dist/context.js +646 -0
  4. package/dist/context.js.map +1 -0
  5. package/dist/device.d.ts +21 -0
  6. package/dist/device.d.ts.map +1 -0
  7. package/dist/device.js +39 -0
  8. package/dist/device.js.map +1 -0
  9. package/dist/enums.d.ts +526 -0
  10. package/dist/enums.d.ts.map +1 -0
  11. package/dist/enums.js +482 -0
  12. package/dist/enums.js.map +1 -0
  13. package/dist/font-face.d.ts +55 -0
  14. package/dist/font-face.d.ts.map +1 -0
  15. package/dist/font-face.js +103 -0
  16. package/dist/font-face.js.map +1 -0
  17. package/dist/font-options.d.ts +43 -0
  18. package/dist/font-options.d.ts.map +1 -0
  19. package/dist/font-options.js +95 -0
  20. package/dist/font-options.js.map +1 -0
  21. package/dist/index.d.ts +29 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +27 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/lib.d.ts +36 -0
  26. package/dist/lib.d.ts.map +1 -0
  27. package/dist/lib.js +120 -0
  28. package/dist/lib.js.map +1 -0
  29. package/dist/matrix.d.ts +40 -0
  30. package/dist/matrix.d.ts.map +1 -0
  31. package/dist/matrix.js +93 -0
  32. package/dist/matrix.js.map +1 -0
  33. package/dist/path.d.ts +14 -0
  34. package/dist/path.d.ts.map +1 -0
  35. package/dist/path.js +67 -0
  36. package/dist/path.js.map +1 -0
  37. package/dist/pattern.d.ts +95 -0
  38. package/dist/pattern.d.ts.map +1 -0
  39. package/dist/pattern.js +250 -0
  40. package/dist/pattern.js.map +1 -0
  41. package/dist/region.d.ts +59 -0
  42. package/dist/region.d.ts.map +1 -0
  43. package/dist/region.js +154 -0
  44. package/dist/region.js.map +1 -0
  45. package/dist/scaled-font.d.ts +43 -0
  46. package/dist/scaled-font.d.ts.map +1 -0
  47. package/dist/scaled-font.js +156 -0
  48. package/dist/scaled-font.js.map +1 -0
  49. package/dist/structs.d.ts +120 -0
  50. package/dist/structs.d.ts.map +1 -0
  51. package/dist/structs.js +185 -0
  52. package/dist/structs.js.map +1 -0
  53. package/dist/surface.d.ts +98 -0
  54. package/dist/surface.d.ts.map +1 -0
  55. package/dist/surface.js +274 -0
  56. package/dist/surface.js.map +1 -0
  57. package/dist/text.d.ts +10 -0
  58. package/dist/text.d.ts.map +1 -0
  59. package/dist/text.js +45 -0
  60. package/dist/text.js.map +1 -0
  61. package/dist/types.d.ts +245 -0
  62. package/dist/types.d.ts.map +1 -0
  63. package/dist/types.js +2 -0
  64. package/dist/types.js.map +1 -0
  65. package/dist/version.d.ts +9 -0
  66. package/dist/version.d.ts.map +1 -0
  67. package/dist/version.js +13 -0
  68. package/dist/version.js.map +1 -0
  69. package/package.json +64 -0
  70. package/src/context.ts +899 -0
  71. package/src/device.ts +50 -0
  72. package/src/enums.ts +571 -0
  73. package/src/font-face.ts +157 -0
  74. package/src/font-options.ts +142 -0
  75. package/src/index.ts +28 -0
  76. package/src/lib.ts +186 -0
  77. package/src/matrix.ts +135 -0
  78. package/src/path.ts +87 -0
  79. package/src/pattern.ts +423 -0
  80. package/src/region.ts +216 -0
  81. package/src/scaled-font.ts +268 -0
  82. package/src/structs.ts +306 -0
  83. package/src/surface.ts +411 -0
  84. package/src/text.ts +56 -0
  85. package/src/types.ts +290 -0
  86. package/src/version.ts +16 -0
package/dist/enums.js ADDED
@@ -0,0 +1,482 @@
1
+ /**
2
+ * The result a cairo object or operation reports; anything but `SUCCESS` marks the object as errored.
3
+ * @enum
4
+ */
5
+ const Status = {
6
+ /** No error has occurred. */
7
+ SUCCESS: 0,
8
+ /** Out of memory. */
9
+ NO_MEMORY: 1,
10
+ /** `restore` was called without a matching `save`. */
11
+ INVALID_RESTORE: 2,
12
+ /** `popGroup` was called without a matching `pushGroup`. */
13
+ INVALID_POP_GROUP: 3,
14
+ /** No current point is defined. */
15
+ NO_CURRENT_POINT: 4,
16
+ /** The matrix is invalid, such as one that is not invertible. */
17
+ INVALID_MATRIX: 5,
18
+ /** The status value is invalid. */
19
+ INVALID_STATUS: 6,
20
+ /** A null pointer was passed. */
21
+ NULL_POINTER: 7,
22
+ /** The string is invalid, such as malformed UTF-8. */
23
+ INVALID_STRING: 8,
24
+ /** The path data is not valid. */
25
+ INVALID_PATH_DATA: 9,
26
+ /** An error occurred while reading from an input stream. */
27
+ READ_ERROR: 10,
28
+ /** An error occurred while writing to an output stream. */
29
+ WRITE_ERROR: 11,
30
+ /** The target surface has been finished. */
31
+ SURFACE_FINISHED: 12,
32
+ /** The surface type is not appropriate for the operation. */
33
+ SURFACE_TYPE_MISMATCH: 13,
34
+ /** The pattern type is not appropriate for the operation. */
35
+ PATTERN_TYPE_MISMATCH: 14,
36
+ /** The content value is invalid. */
37
+ INVALID_CONTENT: 15,
38
+ /** The format value is invalid. */
39
+ INVALID_FORMAT: 16,
40
+ /** The visual value is invalid. */
41
+ INVALID_VISUAL: 17,
42
+ /** The file was not found. */
43
+ FILE_NOT_FOUND: 18,
44
+ /** The dash setting is invalid. */
45
+ INVALID_DASH: 19,
46
+ /** The DSC comment is invalid. */
47
+ INVALID_DSC_COMMENT: 20,
48
+ /** The index passed to a getter is out of range. */
49
+ INVALID_INDEX: 21,
50
+ /** The clip region is not representable in the desired format. */
51
+ CLIP_NOT_REPRESENTABLE: 22,
52
+ /** An error occurred while creating a temporary file. */
53
+ TEMP_FILE_ERROR: 23,
54
+ /** The stride value is invalid. */
55
+ INVALID_STRIDE: 24,
56
+ /** The font type is not appropriate for the operation. */
57
+ FONT_TYPE_MISMATCH: 25,
58
+ /** The user font is immutable. */
59
+ USER_FONT_IMMUTABLE: 26,
60
+ /** An error occurred in a user font callback. */
61
+ USER_FONT_ERROR: 27,
62
+ /** A negative number was used where it is not allowed. */
63
+ NEGATIVE_COUNT: 28,
64
+ /** The input clusters do not represent the accompanying text and glyph arrays. */
65
+ INVALID_CLUSTERS: 29,
66
+ /** The font slant value is invalid. */
67
+ INVALID_SLANT: 30,
68
+ /** The font weight value is invalid. */
69
+ INVALID_WEIGHT: 31,
70
+ /** The size value, such as a negative width, is invalid. */
71
+ INVALID_SIZE: 32,
72
+ /** The user font method is not implemented. */
73
+ USER_FONT_NOT_IMPLEMENTED: 33,
74
+ /** The device type is not appropriate for the operation. */
75
+ DEVICE_TYPE_MISMATCH: 34,
76
+ /** An operation on the device caused an unspecified error. */
77
+ DEVICE_ERROR: 35,
78
+ /** A mesh pattern construction operation was used outside a `beginPatch`/`endPatch` pair. */
79
+ INVALID_MESH_CONSTRUCTION: 36,
80
+ /** The target device has been finished. */
81
+ DEVICE_FINISHED: 37,
82
+ /** A JBIG2 global data stream was attached without its global identifier. */
83
+ JBIG2_GLOBAL_MISSING: 38,
84
+ };
85
+ /**
86
+ * What a surface holds: color, alpha coverage, or both.
87
+ * @enum
88
+ */
89
+ const Content = {
90
+ /** The surface holds color content only. */
91
+ COLOR: 4096,
92
+ /** The surface holds alpha content only. */
93
+ ALPHA: 8192,
94
+ /** The surface holds color and alpha content. */
95
+ COLOR_ALPHA: 12_288,
96
+ };
97
+ /**
98
+ * How a drawing operation composites its source onto the destination.
99
+ * @enum
100
+ */
101
+ const Operator = {
102
+ /** Clears the destination where the source is drawn. */
103
+ CLEAR: 0,
104
+ /** Replaces the destination with the source. */
105
+ SOURCE: 1,
106
+ /** Draws the source over the destination. */
107
+ OVER: 2,
108
+ /** Draws the source where there was destination content. */
109
+ IN: 3,
110
+ /** Draws the source where there was no destination content. */
111
+ OUT: 4,
112
+ /** Draws the source on top of the destination, limited to the destination's extents. */
113
+ ATOP: 5,
114
+ /** Ignores the source. */
115
+ DEST: 6,
116
+ /** Draws the destination on top of the source. */
117
+ DEST_OVER: 7,
118
+ /** Leaves the destination only where there was source content. */
119
+ DEST_IN: 8,
120
+ /** Leaves the destination only where there was no source content. */
121
+ DEST_OUT: 9,
122
+ /** Leaves the destination on top of the source, limited to the source's extents. */
123
+ DEST_ATOP: 10,
124
+ /** Shows the source and destination where there is only one of them. */
125
+ XOR: 11,
126
+ /** Accumulates the source and destination layers. */
127
+ ADD: 12,
128
+ /** Like `OVER`, but assumes the source and destination are disjoint geometries. */
129
+ SATURATE: 13,
130
+ /** Multiplies the source and destination colors, always darkening. */
131
+ MULTIPLY: 14,
132
+ /** Complements and multiplies the source and destination, always lightening. */
133
+ SCREEN: 15,
134
+ /** Multiplies or screens depending on the destination lightness. */
135
+ OVERLAY: 16,
136
+ /** Keeps the darker of the source and destination. */
137
+ DARKEN: 17,
138
+ /** Keeps the lighter of the source and destination. */
139
+ LIGHTEN: 18,
140
+ /** Brightens the destination to reflect the source. */
141
+ COLOR_DODGE: 19,
142
+ /** Darkens the destination to reflect the source. */
143
+ COLOR_BURN: 20,
144
+ /** Multiplies or screens depending on the source lightness. */
145
+ HARD_LIGHT: 21,
146
+ /** Darkens or lightens depending on the source lightness. */
147
+ SOFT_LIGHT: 22,
148
+ /** Takes the difference of the source and destination. */
149
+ DIFFERENCE: 23,
150
+ /** Like `DIFFERENCE` but with lower contrast. */
151
+ EXCLUSION: 24,
152
+ /** Takes the hue of the source and the saturation and luminosity of the destination. */
153
+ HSL_HUE: 25,
154
+ /** Takes the saturation of the source and the hue and luminosity of the destination. */
155
+ HSL_SATURATION: 26,
156
+ /** Takes the hue and saturation of the source and the luminosity of the destination. */
157
+ HSL_COLOR: 27,
158
+ /** Takes the luminosity of the source and the hue and saturation of the destination. */
159
+ HSL_LUMINOSITY: 28,
160
+ };
161
+ /**
162
+ * How shapes and text are antialiased.
163
+ * @enum
164
+ */
165
+ const Antialias = {
166
+ /** Uses the default antialiasing of the subsystem and target device. */
167
+ DEFAULT: 0,
168
+ /** Uses a bilevel alpha mask. */
169
+ NONE: 1,
170
+ /** Uses a single color for antialiasing. */
171
+ GRAY: 2,
172
+ /** Uses the subpixels of an LCD panel. */
173
+ SUBPIXEL: 3,
174
+ /** Prefers speed over quality. */
175
+ FAST: 4,
176
+ /** Balances quality against performance. */
177
+ GOOD: 5,
178
+ /** Renders at the highest quality, sacrificing speed. */
179
+ BEST: 6,
180
+ };
181
+ /**
182
+ * Which areas inside a path a fill covers.
183
+ * @enum
184
+ */
185
+ const FillRule = {
186
+ /** Fills where the winding number is non-zero. */
187
+ WINDING: 0,
188
+ /** Fills where a ray crosses the path an odd number of times. */
189
+ EVEN_ODD: 1,
190
+ };
191
+ /**
192
+ * How the ends of a stroked line are rendered.
193
+ * @enum
194
+ */
195
+ const LineCap = {
196
+ /** Starts and stops the line exactly at the start and end points. */
197
+ BUTT: 0,
198
+ /** Uses a round ending centered on the end point. */
199
+ ROUND: 1,
200
+ /** Uses a squared ending extending past the end point. */
201
+ SQUARE: 2,
202
+ };
203
+ /**
204
+ * How the corners of a stroked path are rendered.
205
+ * @enum
206
+ */
207
+ const LineJoin = {
208
+ /** Uses a sharp corner cut off at the miter limit. */
209
+ MITER: 0,
210
+ /** Uses a rounded join centered on the joint point. */
211
+ ROUND: 1,
212
+ /** Uses a cut-off join at half the line width from the joint point. */
213
+ BEVEL: 2,
214
+ };
215
+ /**
216
+ * Properties of a text cluster mapping.
217
+ * @enum
218
+ */
219
+ const TextClusterFlags = {
220
+ /** The clusters map to glyphs from the end of the glyph array backwards. */
221
+ BACKWARD: 1,
222
+ };
223
+ /**
224
+ * The slant of a toy font face.
225
+ * @enum
226
+ */
227
+ const FontSlant = {
228
+ /** Upright font style. */
229
+ NORMAL: 0,
230
+ /** Italic font style. */
231
+ ITALIC: 1,
232
+ /** Oblique font style. */
233
+ OBLIQUE: 2,
234
+ };
235
+ /**
236
+ * The weight of a toy font face.
237
+ * @enum
238
+ */
239
+ const FontWeight = {
240
+ /** Normal font weight. */
241
+ NORMAL: 0,
242
+ /** Bold font weight. */
243
+ BOLD: 1,
244
+ };
245
+ /**
246
+ * The order of color elements within each pixel on a display, for subpixel antialiasing.
247
+ * @enum
248
+ */
249
+ const SubpixelOrder = {
250
+ /** Uses the default subpixel order for the target device. */
251
+ DEFAULT: 0,
252
+ /** Subpixels are ordered red, green, blue horizontally. */
253
+ RGB: 1,
254
+ /** Subpixels are ordered blue, green, red horizontally. */
255
+ BGR: 2,
256
+ /** Subpixels are ordered red, green, blue vertically. */
257
+ VRGB: 3,
258
+ /** Subpixels are ordered blue, green, red vertically. */
259
+ VBGR: 4,
260
+ };
261
+ /**
262
+ * How much font outlines are fitted to the pixel grid.
263
+ * @enum
264
+ */
265
+ const HintStyle = {
266
+ /** Uses the default hint style of the font backend and target device. */
267
+ DEFAULT: 0,
268
+ /** Does not hint outlines. */
269
+ NONE: 1,
270
+ /** Hints outlines slightly, keeping contrast while preserving shape. */
271
+ SLIGHT: 2,
272
+ /** Hints outlines with medium strength. */
273
+ MEDIUM: 3,
274
+ /** Hints outlines to maximize contrast. */
275
+ FULL: 4,
276
+ };
277
+ /**
278
+ * Whether font metrics are quantized to integer device units.
279
+ * @enum
280
+ */
281
+ const HintMetrics = {
282
+ /** Uses the default metric hinting of the font backend and target device. */
283
+ DEFAULT: 0,
284
+ /** Does not hint metrics. */
285
+ OFF: 1,
286
+ /** Hints metrics to integer device units. */
287
+ ON: 2,
288
+ };
289
+ /**
290
+ * The backend behind a font face or scaled font.
291
+ * @enum
292
+ */
293
+ const FontType = {
294
+ /** A font created with the toy font API (`selectFontFace`). */
295
+ TOY: 0,
296
+ /** A font of type FreeType. */
297
+ FT: 1,
298
+ /** A font of type Win32. */
299
+ WIN32: 2,
300
+ /** A font of type Quartz. */
301
+ QUARTZ: 3,
302
+ /** A font created with the user font API. */
303
+ USER: 4,
304
+ };
305
+ /**
306
+ * The kind of a segment in a copied path.
307
+ * @enum
308
+ */
309
+ const PathDataType = {
310
+ /** Starts a new sub-path. */
311
+ MOVE_TO: 0,
312
+ /** Adds a straight line. */
313
+ LINE_TO: 1,
314
+ /** Adds a cubic Bézier curve. */
315
+ CURVE_TO: 2,
316
+ /** Closes the current sub-path. */
317
+ CLOSE_PATH: 3,
318
+ };
319
+ /**
320
+ * The backend behind a device.
321
+ * @enum
322
+ */
323
+ const DeviceType = {
324
+ /** A Direct Render Manager device. */
325
+ DRM: 0,
326
+ /** An OpenGL device. */
327
+ GL: 1,
328
+ /** A script recording device. */
329
+ SCRIPT: 2,
330
+ /** An XCB device. */
331
+ XCB: 3,
332
+ /** An Xlib device. */
333
+ XLIB: 4,
334
+ /** An XML recording device. */
335
+ XML: 5,
336
+ /** A Cogl device. */
337
+ COGL: 6,
338
+ /** A Win32 device. */
339
+ WIN32: 7,
340
+ /** An invalid device. */
341
+ INVALID: -1,
342
+ };
343
+ /**
344
+ * The backend behind a surface.
345
+ * @enum
346
+ */
347
+ const SurfaceType = {
348
+ /** An image surface backed by memory. */
349
+ IMAGE: 0,
350
+ /** A PDF surface. */
351
+ PDF: 1,
352
+ /** A PostScript surface. */
353
+ PS: 2,
354
+ /** An Xlib surface. */
355
+ XLIB: 3,
356
+ /** An XCB surface. */
357
+ XCB: 4,
358
+ /** A Glitz surface. */
359
+ GLITZ: 5,
360
+ /** A Quartz surface. */
361
+ QUARTZ: 6,
362
+ /** A Win32 surface. */
363
+ WIN32: 7,
364
+ /** A BeOS surface. */
365
+ BEOS: 8,
366
+ /** A DirectFB surface. */
367
+ DIRECTFB: 9,
368
+ /** An SVG surface. */
369
+ SVG: 10,
370
+ /** An OS/2 surface. */
371
+ OS2: 11,
372
+ /** A Win32 printing surface. */
373
+ WIN32_PRINTING: 12,
374
+ /** A Quartz image surface. */
375
+ QUARTZ_IMAGE: 13,
376
+ /** A script recording surface. */
377
+ SCRIPT: 14,
378
+ /** A Qt surface. */
379
+ QT: 15,
380
+ /** A recording surface that replays its drawing. */
381
+ RECORDING: 16,
382
+ /** An OpenVG surface. */
383
+ VG: 17,
384
+ /** An OpenGL surface. */
385
+ GL: 18,
386
+ /** A Direct Render Manager surface. */
387
+ DRM: 19,
388
+ /** A tee surface that forwards to several others. */
389
+ TEE: 20,
390
+ /** An XML recording surface. */
391
+ XML: 21,
392
+ /** A Skia surface. */
393
+ SKIA: 22,
394
+ /** A subsurface created with `Surface.createForRectangle`. */
395
+ SUBSURFACE: 23,
396
+ /** A Cogl surface. */
397
+ COGL: 24,
398
+ };
399
+ /**
400
+ * The memory layout of the pixels of an image surface.
401
+ * @enum
402
+ */
403
+ const Format = {
404
+ /** No such format exists or is supported. */
405
+ INVALID: -1,
406
+ /** 32 bits per pixel with premultiplied alpha in the upper 8 bits, then red, green, blue. */
407
+ ARGB32: 0,
408
+ /** 32 bits per pixel with the upper 8 bits unused, then red, green, blue. */
409
+ RGB24: 1,
410
+ /** 8 bits per pixel holding an alpha value. */
411
+ A8: 2,
412
+ /** 1 bit per pixel holding an alpha value. */
413
+ A1: 3,
414
+ /** 16 bits per pixel with 5 bits red, 6 bits green and 5 bits blue. */
415
+ RGB16_565: 4,
416
+ /** 30 bits per pixel with 10 bits per color channel. */
417
+ RGB30: 5,
418
+ };
419
+ /**
420
+ * The kind of a pattern.
421
+ * @enum
422
+ */
423
+ const PatternType = {
424
+ /** A single color. */
425
+ SOLID: 0,
426
+ /** A surface used as a source. */
427
+ SURFACE: 1,
428
+ /** A linear gradient. */
429
+ LINEAR: 2,
430
+ /** A radial gradient. */
431
+ RADIAL: 3,
432
+ /** A mesh gradient. */
433
+ MESH: 4,
434
+ /** A raster source pattern driven by callbacks. */
435
+ RASTER_SOURCE: 5,
436
+ };
437
+ /**
438
+ * What a pattern draws outside its natural area.
439
+ * @enum
440
+ */
441
+ const Extend = {
442
+ /** Draws transparent outside the pattern. */
443
+ NONE: 0,
444
+ /** Tiles the pattern by repeating it. */
445
+ REPEAT: 1,
446
+ /** Tiles the pattern by reflecting it at its edges. */
447
+ REFLECT: 2,
448
+ /** Extends the pattern's closest edge color outward. */
449
+ PAD: 3,
450
+ };
451
+ /**
452
+ * How a pattern is sampled when it is scaled.
453
+ * @enum
454
+ */
455
+ const Filter = {
456
+ /** A high-performance filter with a quality similar to `NEAREST`. */
457
+ FAST: 0,
458
+ /** A reasonable-performance filter with a quality similar to `BILINEAR`. */
459
+ GOOD: 1,
460
+ /** The highest-quality filter available. */
461
+ BEST: 2,
462
+ /** Nearest-neighbor filtering. */
463
+ NEAREST: 3,
464
+ /** Linear interpolation in two dimensions. */
465
+ BILINEAR: 4,
466
+ /** Gaussian interpolation in two dimensions. */
467
+ GAUSSIAN: 5,
468
+ };
469
+ /**
470
+ * How a rectangle relates to a region.
471
+ * @enum
472
+ */
473
+ const RegionOverlap = {
474
+ /** The rectangle is entirely inside the region. */
475
+ IN: 0,
476
+ /** The rectangle is entirely outside the region. */
477
+ OUT: 1,
478
+ /** The rectangle is partially inside and partially outside the region. */
479
+ PART: 2,
480
+ };
481
+ export { Antialias, Content, DeviceType, Extend, FillRule, Filter, FontSlant, FontType, FontWeight, Format, HintMetrics, HintStyle, LineCap, LineJoin, Operator, PathDataType, PatternType, RegionOverlap, Status, SubpixelOrder, SurfaceType, TextClusterFlags, };
482
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AA6CA;;;GAGG;AACH,MAAM,MAAM,GAAG;IACX,6BAA6B;IAC7B,OAAO,EAAE,CAAC;IACV,qBAAqB;IACrB,SAAS,EAAE,CAAC;IACZ,sDAAsD;IACtD,eAAe,EAAE,CAAC;IAClB,4DAA4D;IAC5D,iBAAiB,EAAE,CAAC;IACpB,mCAAmC;IACnC,gBAAgB,EAAE,CAAC;IACnB,iEAAiE;IACjE,cAAc,EAAE,CAAC;IACjB,mCAAmC;IACnC,cAAc,EAAE,CAAC;IACjB,iCAAiC;IACjC,YAAY,EAAE,CAAC;IACf,sDAAsD;IACtD,cAAc,EAAE,CAAC;IACjB,kCAAkC;IAClC,iBAAiB,EAAE,CAAC;IACpB,4DAA4D;IAC5D,UAAU,EAAE,EAAE;IACd,2DAA2D;IAC3D,WAAW,EAAE,EAAE;IACf,4CAA4C;IAC5C,gBAAgB,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,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,EACX,gBAAgB,GACnB,CAAC","sourcesContent":["/** One of the `Status` codes a cairo object or operation reports. */\ntype Status = (typeof Status)[keyof typeof Status];\n/** One of the `Content` kinds a surface holds. */\ntype Content = (typeof Content)[keyof typeof Content];\n/** One of the `Operator` compositing modes. */\ntype Operator = (typeof Operator)[keyof typeof Operator];\n/** One of the `Antialias` modes for rendering shapes and text. */\ntype Antialias = (typeof Antialias)[keyof typeof Antialias];\n/** One of the `FillRule` modes deciding which areas a path fills. */\ntype FillRule = (typeof FillRule)[keyof typeof FillRule];\n/** One of the `LineCap` styles for the ends of a stroked line. */\ntype LineCap = (typeof LineCap)[keyof typeof LineCap];\n/** One of the `LineJoin` styles for the corners of a stroked path. */\ntype LineJoin = (typeof LineJoin)[keyof typeof LineJoin];\n/** One of the `TextClusterFlags` values describing a cluster mapping. */\ntype TextClusterFlags = (typeof TextClusterFlags)[keyof typeof TextClusterFlags];\n/** One of the `FontSlant` values for a toy font face. */\ntype FontSlant = (typeof FontSlant)[keyof typeof FontSlant];\n/** One of the `FontWeight` values for a toy font face. */\ntype FontWeight = (typeof FontWeight)[keyof typeof FontWeight];\n/** One of the `SubpixelOrder` values for subpixel antialiasing. */\ntype SubpixelOrder = (typeof SubpixelOrder)[keyof typeof SubpixelOrder];\n/** One of the `HintStyle` values for font outline hinting. */\ntype HintStyle = (typeof HintStyle)[keyof typeof HintStyle];\n/** One of the `HintMetrics` values for font metric quantization. */\ntype HintMetrics = (typeof HintMetrics)[keyof typeof HintMetrics];\n/** One of the `FontType` backends a font face or scaled font uses. */\ntype FontType = (typeof FontType)[keyof typeof FontType];\n/** One of the `PathDataType` segment kinds in a copied path. */\ntype PathDataType = (typeof PathDataType)[keyof typeof PathDataType];\n/** One of the `DeviceType` backends a device belongs to. */\ntype DeviceType = (typeof DeviceType)[keyof typeof DeviceType];\n/** One of the `SurfaceType` backends a surface belongs to. */\ntype SurfaceType = (typeof SurfaceType)[keyof typeof SurfaceType];\n/** One of the `Format` pixel layouts of an image surface. */\ntype Format = (typeof Format)[keyof typeof Format];\n/** One of the `PatternType` kinds a pattern can be. */\ntype PatternType = (typeof PatternType)[keyof typeof PatternType];\n/** One of the `Extend` modes for drawing outside a pattern's natural area. */\ntype Extend = (typeof Extend)[keyof typeof Extend];\n/** One of the `Filter` modes for resizing a pattern. */\ntype Filter = (typeof Filter)[keyof typeof Filter];\n/** One of the `RegionOverlap` results of a region containment test. */\ntype RegionOverlap = (typeof RegionOverlap)[keyof typeof RegionOverlap];\n\n/**\n * The result a cairo object or operation reports; anything but `SUCCESS` marks the object as errored.\n * @enum\n */\nconst Status = {\n /** No error has occurred. */\n SUCCESS: 0,\n /** Out of memory. */\n NO_MEMORY: 1,\n /** `restore` was called without a matching `save`. */\n INVALID_RESTORE: 2,\n /** `popGroup` was called without a matching `pushGroup`. */\n INVALID_POP_GROUP: 3,\n /** No current point is defined. */\n NO_CURRENT_POINT: 4,\n /** The matrix is invalid, such as one that is not invertible. */\n INVALID_MATRIX: 5,\n /** The status value is invalid. */\n INVALID_STATUS: 6,\n /** A null pointer was passed. */\n NULL_POINTER: 7,\n /** The string is invalid, such as malformed UTF-8. */\n INVALID_STRING: 8,\n /** The path data is not valid. */\n INVALID_PATH_DATA: 9,\n /** An error occurred while reading from an input stream. */\n READ_ERROR: 10,\n /** An error occurred while writing to an output stream. */\n WRITE_ERROR: 11,\n /** The target surface has been finished. */\n SURFACE_FINISHED: 12,\n /** The surface type is not appropriate for the operation. */\n SURFACE_TYPE_MISMATCH: 13,\n /** The pattern type is not appropriate for the operation. */\n PATTERN_TYPE_MISMATCH: 14,\n /** The content value is invalid. */\n INVALID_CONTENT: 15,\n /** The format value is invalid. */\n INVALID_FORMAT: 16,\n /** The visual value is invalid. */\n INVALID_VISUAL: 17,\n /** The file was not found. */\n FILE_NOT_FOUND: 18,\n /** The dash setting is invalid. */\n INVALID_DASH: 19,\n /** The DSC comment is invalid. */\n INVALID_DSC_COMMENT: 20,\n /** The index passed to a getter is out of range. */\n INVALID_INDEX: 21,\n /** The clip region is not representable in the desired format. */\n CLIP_NOT_REPRESENTABLE: 22,\n /** An error occurred while creating a temporary file. */\n TEMP_FILE_ERROR: 23,\n /** The stride value is invalid. */\n INVALID_STRIDE: 24,\n /** The font type is not appropriate for the operation. */\n FONT_TYPE_MISMATCH: 25,\n /** The user font is immutable. */\n USER_FONT_IMMUTABLE: 26,\n /** An error occurred in a user font callback. */\n USER_FONT_ERROR: 27,\n /** A negative number was used where it is not allowed. */\n NEGATIVE_COUNT: 28,\n /** The input clusters do not represent the accompanying text and glyph arrays. */\n INVALID_CLUSTERS: 29,\n /** The font slant value is invalid. */\n INVALID_SLANT: 30,\n /** The font weight value is invalid. */\n INVALID_WEIGHT: 31,\n /** The size value, such as a negative width, is invalid. */\n INVALID_SIZE: 32,\n /** The user font method is not implemented. */\n USER_FONT_NOT_IMPLEMENTED: 33,\n /** The device type is not appropriate for the operation. */\n DEVICE_TYPE_MISMATCH: 34,\n /** An operation on the device caused an unspecified error. */\n DEVICE_ERROR: 35,\n /** A mesh pattern construction operation was used outside a `beginPatch`/`endPatch` pair. */\n INVALID_MESH_CONSTRUCTION: 36,\n /** The target device has been finished. */\n DEVICE_FINISHED: 37,\n /** A JBIG2 global data stream was attached without its global identifier. */\n JBIG2_GLOBAL_MISSING: 38,\n} as const;\n\n/**\n * What a surface holds: color, alpha coverage, or both.\n * @enum\n */\nconst Content = {\n /** The surface holds color content only. */\n COLOR: 4096,\n /** The surface holds alpha content only. */\n ALPHA: 8192,\n /** The surface holds color and alpha content. */\n COLOR_ALPHA: 12_288,\n} as const;\n\n/**\n * How a drawing operation composites its source onto the destination.\n * @enum\n */\nconst Operator = {\n /** Clears the destination where the source is drawn. */\n CLEAR: 0,\n /** Replaces the destination with the source. */\n SOURCE: 1,\n /** Draws the source over the destination. */\n OVER: 2,\n /** Draws the source where there was destination content. */\n IN: 3,\n /** Draws the source where there was no destination content. */\n OUT: 4,\n /** Draws the source on top of the destination, limited to the destination's extents. */\n ATOP: 5,\n /** Ignores the source. */\n DEST: 6,\n /** Draws the destination on top of the source. */\n DEST_OVER: 7,\n /** Leaves the destination only where there was source content. */\n DEST_IN: 8,\n /** Leaves the destination only where there was no source content. */\n DEST_OUT: 9,\n /** Leaves the destination on top of the source, limited to the source's extents. */\n DEST_ATOP: 10,\n /** Shows the source and destination where there is only one of them. */\n XOR: 11,\n /** Accumulates the source and destination layers. */\n ADD: 12,\n /** Like `OVER`, but assumes the source and destination are disjoint geometries. */\n SATURATE: 13,\n /** Multiplies the source and destination colors, always darkening. */\n MULTIPLY: 14,\n /** Complements and multiplies the source and destination, always lightening. */\n SCREEN: 15,\n /** Multiplies or screens depending on the destination lightness. */\n OVERLAY: 16,\n /** Keeps the darker of the source and destination. */\n DARKEN: 17,\n /** Keeps the lighter of the source and destination. */\n LIGHTEN: 18,\n /** Brightens the destination to reflect the source. */\n COLOR_DODGE: 19,\n /** Darkens the destination to reflect the source. */\n COLOR_BURN: 20,\n /** Multiplies or screens depending on the source lightness. */\n HARD_LIGHT: 21,\n /** Darkens or lightens depending on the source lightness. */\n SOFT_LIGHT: 22,\n /** Takes the difference of the source and destination. */\n DIFFERENCE: 23,\n /** Like `DIFFERENCE` but with lower contrast. */\n EXCLUSION: 24,\n /** Takes the hue of the source and the saturation and luminosity of the destination. */\n HSL_HUE: 25,\n /** Takes the saturation of the source and the hue and luminosity of the destination. */\n HSL_SATURATION: 26,\n /** Takes the hue and saturation of the source and the luminosity of the destination. */\n HSL_COLOR: 27,\n /** Takes the luminosity of the source and the hue and saturation of the destination. */\n HSL_LUMINOSITY: 28,\n} as const;\n\n/**\n * How shapes and text are antialiased.\n * @enum\n */\nconst Antialias = {\n /** Uses the default antialiasing of the subsystem and target device. */\n DEFAULT: 0,\n /** Uses a bilevel alpha mask. */\n NONE: 1,\n /** Uses a single color for antialiasing. */\n GRAY: 2,\n /** Uses the subpixels of an LCD panel. */\n SUBPIXEL: 3,\n /** Prefers speed over quality. */\n FAST: 4,\n /** Balances quality against performance. */\n GOOD: 5,\n /** Renders at the highest quality, sacrificing speed. */\n BEST: 6,\n} as const;\n\n/**\n * Which areas inside a path a fill covers.\n * @enum\n */\nconst FillRule = {\n /** Fills where the winding number is non-zero. */\n WINDING: 0,\n /** Fills where a ray crosses the path an odd number of times. */\n EVEN_ODD: 1,\n} as const;\n\n/**\n * How the ends of a stroked line are rendered.\n * @enum\n */\nconst LineCap = {\n /** Starts and stops the line exactly at the start and end points. */\n BUTT: 0,\n /** Uses a round ending centered on the end point. */\n ROUND: 1,\n /** Uses a squared ending extending past the end point. */\n SQUARE: 2,\n} as const;\n\n/**\n * How the corners of a stroked path are rendered.\n * @enum\n */\nconst LineJoin = {\n /** Uses a sharp corner cut off at the miter limit. */\n MITER: 0,\n /** Uses a rounded join centered on the joint point. */\n ROUND: 1,\n /** Uses a cut-off join at half the line width from the joint point. */\n BEVEL: 2,\n} as const;\n\n/**\n * Properties of a text cluster mapping.\n * @enum\n */\nconst TextClusterFlags = {\n /** The clusters map to glyphs from the end of the glyph array backwards. */\n BACKWARD: 1,\n} as const;\n\n/**\n * The slant of a toy font face.\n * @enum\n */\nconst FontSlant = {\n /** Upright font style. */\n NORMAL: 0,\n /** Italic font style. */\n ITALIC: 1,\n /** Oblique font style. */\n OBLIQUE: 2,\n} as const;\n\n/**\n * The weight of a toy font face.\n * @enum\n */\nconst FontWeight = {\n /** Normal font weight. */\n NORMAL: 0,\n /** Bold font weight. */\n BOLD: 1,\n} as const;\n\n/**\n * The order of color elements within each pixel on a display, for subpixel antialiasing.\n * @enum\n */\nconst SubpixelOrder = {\n /** Uses the default subpixel order for the target device. */\n DEFAULT: 0,\n /** Subpixels are ordered red, green, blue horizontally. */\n RGB: 1,\n /** Subpixels are ordered blue, green, red horizontally. */\n BGR: 2,\n /** Subpixels are ordered red, green, blue vertically. */\n VRGB: 3,\n /** Subpixels are ordered blue, green, red vertically. */\n VBGR: 4,\n} as const;\n\n/**\n * How much font outlines are fitted to the pixel grid.\n * @enum\n */\nconst HintStyle = {\n /** Uses the default hint style of the font backend and target device. */\n DEFAULT: 0,\n /** Does not hint outlines. */\n NONE: 1,\n /** Hints outlines slightly, keeping contrast while preserving shape. */\n SLIGHT: 2,\n /** Hints outlines with medium strength. */\n MEDIUM: 3,\n /** Hints outlines to maximize contrast. */\n FULL: 4,\n} as const;\n\n/**\n * Whether font metrics are quantized to integer device units.\n * @enum\n */\nconst HintMetrics = {\n /** Uses the default metric hinting of the font backend and target device. */\n DEFAULT: 0,\n /** Does not hint metrics. */\n OFF: 1,\n /** Hints metrics to integer device units. */\n ON: 2,\n} as const;\n\n/**\n * The backend behind a font face or scaled font.\n * @enum\n */\nconst FontType = {\n /** A font created with the toy font API (`selectFontFace`). */\n TOY: 0,\n /** A font of type FreeType. */\n FT: 1,\n /** A font of type Win32. */\n WIN32: 2,\n /** A font of type Quartz. */\n QUARTZ: 3,\n /** A font created with the user font API. */\n USER: 4,\n} as const;\n\n/**\n * The kind of a segment in a copied path.\n * @enum\n */\nconst PathDataType = {\n /** Starts a new sub-path. */\n MOVE_TO: 0,\n /** Adds a straight line. */\n LINE_TO: 1,\n /** Adds a cubic Bézier curve. */\n CURVE_TO: 2,\n /** Closes the current sub-path. */\n CLOSE_PATH: 3,\n} as const;\n\n/**\n * The backend behind a device.\n * @enum\n */\nconst DeviceType = {\n /** A Direct Render Manager device. */\n DRM: 0,\n /** An OpenGL device. */\n GL: 1,\n /** A script recording device. */\n SCRIPT: 2,\n /** An XCB device. */\n XCB: 3,\n /** An Xlib device. */\n XLIB: 4,\n /** An XML recording device. */\n XML: 5,\n /** A Cogl device. */\n COGL: 6,\n /** A Win32 device. */\n WIN32: 7,\n /** An invalid device. */\n INVALID: -1,\n} as const;\n\n/**\n * The backend behind a surface.\n * @enum\n */\nconst SurfaceType = {\n /** An image surface backed by memory. */\n IMAGE: 0,\n /** A PDF surface. */\n PDF: 1,\n /** A PostScript surface. */\n PS: 2,\n /** An Xlib surface. */\n XLIB: 3,\n /** An XCB surface. */\n XCB: 4,\n /** A Glitz surface. */\n GLITZ: 5,\n /** A Quartz surface. */\n QUARTZ: 6,\n /** A Win32 surface. */\n WIN32: 7,\n /** A BeOS surface. */\n BEOS: 8,\n /** A DirectFB surface. */\n DIRECTFB: 9,\n /** An SVG surface. */\n SVG: 10,\n /** An OS/2 surface. */\n OS2: 11,\n /** A Win32 printing surface. */\n WIN32_PRINTING: 12,\n /** A Quartz image surface. */\n QUARTZ_IMAGE: 13,\n /** A script recording surface. */\n SCRIPT: 14,\n /** A Qt surface. */\n QT: 15,\n /** A recording surface that replays its drawing. */\n RECORDING: 16,\n /** An OpenVG surface. */\n VG: 17,\n /** An OpenGL surface. */\n GL: 18,\n /** A Direct Render Manager surface. */\n DRM: 19,\n /** A tee surface that forwards to several others. */\n TEE: 20,\n /** An XML recording surface. */\n XML: 21,\n /** A Skia surface. */\n SKIA: 22,\n /** A subsurface created with `Surface.createForRectangle`. */\n SUBSURFACE: 23,\n /** A Cogl surface. */\n COGL: 24,\n} as const;\n\n/**\n * The memory layout of the pixels of an image surface.\n * @enum\n */\nconst Format = {\n /** No such format exists or is supported. */\n INVALID: -1,\n /** 32 bits per pixel with premultiplied alpha in the upper 8 bits, then red, green, blue. */\n ARGB32: 0,\n /** 32 bits per pixel with the upper 8 bits unused, then red, green, blue. */\n RGB24: 1,\n /** 8 bits per pixel holding an alpha value. */\n A8: 2,\n /** 1 bit per pixel holding an alpha value. */\n A1: 3,\n /** 16 bits per pixel with 5 bits red, 6 bits green and 5 bits blue. */\n RGB16_565: 4,\n /** 30 bits per pixel with 10 bits per color channel. */\n RGB30: 5,\n} as const;\n\n/**\n * The kind of a pattern.\n * @enum\n */\nconst PatternType = {\n /** A single color. */\n SOLID: 0,\n /** A surface used as a source. */\n SURFACE: 1,\n /** A linear gradient. */\n LINEAR: 2,\n /** A radial gradient. */\n RADIAL: 3,\n /** A mesh gradient. */\n MESH: 4,\n /** A raster source pattern driven by callbacks. */\n RASTER_SOURCE: 5,\n} as const;\n\n/**\n * What a pattern draws outside its natural area.\n * @enum\n */\nconst Extend = {\n /** Draws transparent outside the pattern. */\n NONE: 0,\n /** Tiles the pattern by repeating it. */\n REPEAT: 1,\n /** Tiles the pattern by reflecting it at its edges. */\n REFLECT: 2,\n /** Extends the pattern's closest edge color outward. */\n PAD: 3,\n} as const;\n\n/**\n * How a pattern is sampled when it is scaled.\n * @enum\n */\nconst Filter = {\n /** A high-performance filter with a quality similar to `NEAREST`. */\n FAST: 0,\n /** A reasonable-performance filter with a quality similar to `BILINEAR`. */\n GOOD: 1,\n /** The highest-quality filter available. */\n BEST: 2,\n /** Nearest-neighbor filtering. */\n NEAREST: 3,\n /** Linear interpolation in two dimensions. */\n BILINEAR: 4,\n /** Gaussian interpolation in two dimensions. */\n GAUSSIAN: 5,\n} as const;\n\n/**\n * How a rectangle relates to a region.\n * @enum\n */\nconst RegionOverlap = {\n /** The rectangle is entirely inside the region. */\n IN: 0,\n /** The rectangle is entirely outside the region. */\n OUT: 1,\n /** The rectangle is partially inside and partially outside the region. */\n PART: 2,\n} as const;\n\nexport {\n Antialias,\n Content,\n DeviceType,\n Extend,\n FillRule,\n Filter,\n FontSlant,\n FontType,\n FontWeight,\n Format,\n HintMetrics,\n HintStyle,\n LineCap,\n LineJoin,\n Operator,\n PathDataType,\n PatternType,\n RegionOverlap,\n Status,\n SubpixelOrder,\n SurfaceType,\n TextClusterFlags,\n};\n"]}
@@ -0,0 +1,55 @@
1
+ import { type ExternalObject, type Handle } from "@gtkx/runtime";
2
+ import { type FontSlant, FontType, type FontWeight, type Status } from "./enums.js";
3
+ /** One of the `FtSynthesize` styles a FreeType font face synthesizes. */
4
+ type FtSynthesize = (typeof FtSynthesize)[keyof typeof FtSynthesize];
5
+ /**
6
+ * Styles a FreeType font face synthesizes when the font itself lacks them.
7
+ * @enum
8
+ */
9
+ declare const FtSynthesize: {
10
+ /** Embolden the glyphs. */
11
+ readonly BOLD: 1;
12
+ /** Slant the glyphs. */
13
+ readonly OBLIQUE: 2;
14
+ };
15
+ /**
16
+ * A cairo font face (`cairo_font_face_t`): a typeface independent of size and transformation. Font faces come
17
+ * from the `create*` statics or from a context, and wrap as the concrete class their type reports
18
+ * (`instanceof ToyFontFace` after `selectFontFace`).
19
+ */
20
+ declare abstract class FontFace {
21
+ /** Creates a toy font face from a family name, slant and weight. */
22
+ static create(family: string, slant: FontSlant, weight: FontWeight): ToyFontFace;
23
+ /** Creates a font face for a FreeType `FT_Face` handle, with the given `FT_LOAD_*` flags. */
24
+ static createForFtFace(face: ExternalObject<Handle>, loadFlags: number): FtFontFace;
25
+ /** Creates a font face for a fontconfig `FcPattern` handle. */
26
+ static createForPattern(pattern: ExternalObject<Handle>): FtFontFace;
27
+ /** GType of `CairoFontFace`, the boxed type this class is registered under. */
28
+ __type__: bigint;
29
+ /** Returns the error status of the font face, `Status.SUCCESS` when it is usable. */
30
+ status(): Status;
31
+ /** Returns the backend the font face belongs to. */
32
+ getType(): FontType;
33
+ /** Returns the reference count of the font face. */
34
+ getReferenceCount(): number;
35
+ }
36
+ /** A toy font face, created with `FontFace.create` or a context's `selectFontFace`. */
37
+ declare class ToyFontFace extends FontFace {
38
+ /** Returns the family name the font face was created with. */
39
+ getFamily(): string;
40
+ /** Returns the slant the font face was created with. */
41
+ getSlant(): FontSlant;
42
+ /** Returns the weight the font face was created with. */
43
+ getWeight(): FontWeight;
44
+ }
45
+ /** A FreeType font face, created with `FontFace.createForFtFace` or `FontFace.createForPattern`. */
46
+ declare class FtFontFace extends FontFace {
47
+ /** Returns the styles currently synthesized for the font face. */
48
+ getSynthesize(): FtSynthesize;
49
+ /** Enables synthesizing of the given styles. */
50
+ setSynthesize(synthFlags: FtSynthesize): void;
51
+ /** Disables synthesizing of the given styles. */
52
+ unsetSynthesize(synthFlags: FtSynthesize): void;
53
+ }
54
+ export { FontFace, FtFontFace, FtSynthesize, ToyFontFace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