@gtkx/cairo 2.0.0-beta.10 → 2.0.0-beta.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,KAAK,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AACnD,kDAAkD;AAClD,KAAK,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AACtD,+CAA+C;AAC/C,KAAK,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AACzD,kEAAkE;AAClE,KAAK,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAC5D,qEAAqE;AACrE,KAAK,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AACzD,kEAAkE;AAClE,KAAK,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AACtD,sEAAsE;AACtE,KAAK,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AACzD,yEAAyE;AACzE,KAAK,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AACjF,yDAAyD;AACzD,KAAK,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAC5D,0DAA0D;AAC1D,KAAK,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAC/D,mEAAmE;AAC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EX;;;GAGG;AACH,QAAA,MAAM,WAAW;IACb,sBAAsB;;IAEtB,kCAAkC;;IAElC,yBAAyB;;IAEzB,yBAAyB;;IAEzB,uBAAuB;;IAEvB,mDAAmD;;CAE7C,CAAC;AAEX;;;GAGG;AACH,QAAA,MAAM,MAAM;IACR,6CAA6C;;IAE7C,yCAAyC;;IAEzC,uDAAuD;;IAEvD,wDAAwD;;CAElD,CAAC;AAEX;;;GAGG;AACH,QAAA,MAAM,MAAM;IACR,qEAAqE;;IAErE,4EAA4E;;IAE5E,4CAA4C;;IAE5C,kCAAkC;;IAElC,8CAA8C;;IAE9C,gDAAgD;;CAE1C,CAAC;AAEX;;;GAGG;AACH,QAAA,MAAM,aAAa;IACf,mDAAmD;;IAEnD,oDAAoD;;IAEpD,0EAA0E;;CAEpE,CAAC;AAEX,OAAO,EACH,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,EACX,gBAAgB,GACnB,CAAC"}
package/dist/enums.js CHANGED
@@ -81,6 +81,12 @@ const Status = {
81
81
  DEVICE_FINISHED: 37,
82
82
  /** A JBIG2 global data stream was attached without its global identifier. */
83
83
  JBIG2_GLOBAL_MISSING: 38,
84
+ PNG_ERROR: 39,
85
+ FREETYPE_ERROR: 40,
86
+ WIN32_GDI_ERROR: 41,
87
+ TAG_ERROR: 42,
88
+ DWRITE_ERROR: 43,
89
+ SVG_FONT_ERROR: 44,
84
90
  };
85
91
  /**
86
92
  * What a surface holds: color, alpha coverage, or both.
@@ -301,6 +307,7 @@ const FontType = {
301
307
  QUARTZ: 3,
302
308
  /** A font created with the user font API. */
303
309
  USER: 4,
310
+ DWRITE: 5,
304
311
  };
305
312
  /**
306
313
  * The kind of a segment in a copied path.
@@ -415,6 +422,8 @@ const Format = {
415
422
  RGB16_565: 4,
416
423
  /** 30 bits per pixel with 10 bits per color channel. */
417
424
  RGB30: 5,
425
+ RGB96F: 6,
426
+ RGBA128F: 7,
418
427
  };
419
428
  /**
420
429
  * The kind of a pattern.
package/dist/enums.js.map CHANGED
@@ -1 +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,EAAE,EAAE;IACpB,6DAA6D;IAC7D,qBAAqB,EAAE,EAAE;IACzB,6DAA6D;IAC7D,qBAAqB,EAAE,EAAE;IACzB,oCAAoC;IACpC,eAAe,EAAE,EAAE;IACnB,mCAAmC;IACnC,cAAc,EAAE,EAAE;IAClB,mCAAmC;IACnC,cAAc,EAAE,EAAE;IAClB,8BAA8B;IAC9B,cAAc,EAAE,EAAE;IAClB,mCAAmC;IACnC,YAAY,EAAE,EAAE;IAChB,kCAAkC;IAClC,mBAAmB,EAAE,EAAE;IACvB,oDAAoD;IACpD,aAAa,EAAE,EAAE;IACjB,kEAAkE;IAClE,sBAAsB,EAAE,EAAE;IA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AC;CACV,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,GAAG;IACX,6CAA6C;IAC7C,IAAI,EAAE,CAAC;IACP,yCAAyC;IACzC,MAAM,EAAE,CAAC;IACT,uDAAuD;IACvD,OAAO,EAAE,CAAC;IACV,wDAAwD;IACxD,GAAG,EAAE,CAAC;CACA,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,GAAG;IACX,qEAAqE;IACrE,IAAI,EAAE,CAAC;IACP,4EAA4E;IAC5E,IAAI,EAAE,CAAC;IACP,4CAA4C;IAC5C,IAAI,EAAE,CAAC;IACP,kCAAkC;IAClC,OAAO,EAAE,CAAC;IACV,8CAA8C;IAC9C,QAAQ,EAAE,CAAC;IACX,gDAAgD;IAChD,QAAQ,EAAE,CAAC;CACL,CAAC;AAEX;;;GAGG;AACH,MAAM,aAAa,GAAG;IAClB,mDAAmD;IACnD,EAAE,EAAE,CAAC;IACL,oDAAoD;IACpD,GAAG,EAAE,CAAC;IACN,0EAA0E;IAC1E,IAAI,EAAE,CAAC;CACD,CAAC;AAEX,OAAO,EACH,SAAS,EACT,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,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"]}
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,EAAE,EAAE;IACpB,6DAA6D;IAC7D,qBAAqB,EAAE,EAAE;IACzB,6DAA6D;IAC7D,qBAAqB,EAAE,EAAE;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AAM,EACN,QAAQ,EACR,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,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 = number;\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 PNG_ERROR: 39,\n FREETYPE_ERROR: 40,\n WIN32_GDI_ERROR: 41,\n TAG_ERROR: 42,\n DWRITE_ERROR: 43,\n SVG_FONT_ERROR: 44,\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 DWRITE: 5,\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 RGB96F: 6,\n RGBA128F: 7,\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"]}
@@ -1,6 +1,6 @@
1
1
  import { type FontSlant, FontType, type FontWeight, type Status } from "./enums.js";
2
2
  /** One of the `FtSynthesize` styles a FreeType font face synthesizes. */
3
- type FtSynthesize = (typeof FtSynthesize)[keyof typeof FtSynthesize];
3
+ type FtSynthesize = number;
4
4
  /**
5
5
  * Styles a FreeType font face synthesizes when the font itself lacks them.
6
6
  * @enum
@@ -1 +1 @@
1
- {"version":3,"file":"font-face.d.ts","sourceRoot":"","sources":["../src/font-face.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,SAAS,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpF,yEAAyE;AACzE,KAAK,YAAY,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAwBrE;;;GAGG;AACH,QAAA,MAAM,YAAY;IACd,2BAA2B;;IAE3B,wBAAwB;;CAElB,CAAC;AAgBX;;;;GAIG;AACH,uBAAe,QAAQ;IAMnB,oEAAoE;IACpE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,WAAW;IAIhF,+EAA+E;IACvE,QAAQ,EAAE,MAAM,CAAC;IAEzB,qFAAqF;IACrF,MAAM,IAAI,MAAM;IAIhB,oDAAoD;IACpD,OAAO,IAAI,QAAQ;IAInB,oDAAoD;IACpD,iBAAiB,IAAI,MAAM;CAG9B;AAED,uFAAuF;AACvF,cAAM,WAAY,SAAQ,QAAQ;IAC9B,8DAA8D;IAC9D,SAAS,IAAI,MAAM;IAInB,wDAAwD;IACxD,QAAQ,IAAI,SAAS;IAIrB,yDAAyD;IACzD,SAAS,IAAI,UAAU;CAG1B;AAED,wEAAwE;AACxE,cAAM,UAAW,SAAQ,QAAQ;IAC7B,kEAAkE;IAClE,aAAa,IAAI,YAAY;IAI7B,gDAAgD;IAChD,aAAa,CAAC,UAAU,EAAE,YAAY,GAAG,IAAI;IAI7C,iDA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EAAE,CAAC"}
package/dist/font-face.js CHANGED
@@ -10,7 +10,7 @@ const cairoToyFontFaceGetWeight = bindCairo("cairo_toy_font_face_get_weight", [F
10
10
  const cairoFtFontFaceGetSynthesize = bindCairo("cairo_ft_font_face_get_synthesize", [FONT_FACE_T], t.int32);
11
11
  const cairoFtFontFaceSetSynthesize = bindCairo("cairo_ft_font_face_set_synthesize", [FONT_FACE_T, t.int32], t.void);
12
12
  const cairoToyFontFaceGetFamily = bindCairo("cairo_toy_font_face_get_family", [FONT_FACE_T], t.string("borrowed"));
13
- const cairoToyFontFaceCreate = bindCairo("cairo_toy_font_face_create", [t.string("full"), t.int32, t.int32], FONT_FACE_FULL_T);
13
+ const cairoToyFontFaceCreate = bindCairo("cairo_toy_font_face_create", [t.string("borrowed"), t.int32, t.int32], FONT_FACE_FULL_T);
14
14
  const cairoFtFontFaceUnsetSynthesize = bindCairo("cairo_ft_font_face_unset_synthesize", [FONT_FACE_T, t.int32], t.void);
15
15
  /**
16
16
  * Styles a FreeType font face synthesizes when the font itself lacks them.
@@ -1 +1 @@
1
- {"version":3,"file":"font-face.js","sourceRoot":"","sources":["../src/font-face.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EAET,oBAAoB,EACpB,4BAA4B,EAC5B,CAAC,EACD,UAAU,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAkB,QAAQ,EAAgC,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKhF,MAAM,cAAc,GAAG,UAAU,CAAC,kCAAkC,CAAC,CAAC;AACtE,MAAM,mBAAmB,GAAG,SAAS,CAAC,wBAAwB,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;AACxF,MAAM,oBAAoB,GAAG,SAAS,CAAC,0BAA0B,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,CAA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;CACJ;AAED,wEAAwE;AACxE,MAAM,UAAW,SAAQ,QAAQ;IAC7B,kEAAkE;IAClE,aAAa;QACT,OAAO,4BAA4B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAiB,CAAC;IACzE,CAAC;IAED,gDAAgD;IAChD,aAAa,CAAC,UAAwB;QAClC,4BAA4B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,iDAAiD;IACjD,eAAe,CAAC,UAAwB;QACpC,8BAA8B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;CACJ;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import {\n type ExternalObject,\n getHandle,\n type Handle,\n registerWrapperClass,\n registerWrapperClassResolver,\n t,\n wrapHandle,\n type WrapperClassResolver,\n} from \"@gtkx/runtime\";\nimport { type FontSlant, FontType, type FontWeight, type Status } from \"./enums.js\";\nimport { bindCairo, cairoGType, FONT_FACE_FULL_T, FONT_FACE_T } from \"./lib.js\";\n\n/** One of the `FtSynthesize` styles a FreeType font face synthesizes. */\ntype FtSynthesize = (typeof FtSynthesize)[keyof typeof FtSynthesize];\n\nconst FONT_FACE_TYPE = cairoGType(\"cairo_gobject_font_face_get_type\");\nconst cairoFontFaceStatus = bindCairo(\"cairo_font_face_status\", [FONT_FACE_T], t.int32);\nconst cairoFontFaceGetType = bindCairo(\"cairo_font_face_get_type\", [FONT_FACE_T], t.int32);\nconst cairoFontFaceGetReferenceCount = bindCairo(\"cairo_font_face_get_reference_count\", [FONT_FACE_T], t.int32);\nconst cairoToyFontFaceGetSlant = bindCairo(\"cairo_toy_font_face_get_slant\", [FONT_FACE_T], t.int32);\nconst cairoToyFontFaceGetWeight = bindCairo(\"cairo_toy_font_face_get_weight\", [FONT_FACE_T], t.int32);\nconst cairoFtFontFaceGetSynthesize = bindCairo(\"cairo_ft_font_face_get_synthesize\", [FONT_FACE_T], t.int32);\nconst cairoFtFontFaceSetSynthesize = bindCairo(\"cairo_ft_font_face_set_synthesize\", [FONT_FACE_T, t.int32], t.void);\nconst cairoToyFontFaceGetFamily = bindCairo(\"cairo_toy_font_face_get_family\", [FONT_FACE_T], t.string(\"borrowed\"));\n\nconst cairoToyFontFaceCreate = bindCairo(\n \"cairo_toy_font_face_create\",\n [t.string(\"full\"), t.int32, t.int32],\n FONT_FACE_FULL_T,\n);\n\nconst cairoFtFontFaceUnsetSynthesize = bindCairo(\n \"cairo_ft_font_face_unset_synthesize\",\n [FONT_FACE_T, t.int32],\n t.void,\n);\n\n/**\n * Styles a FreeType font face synthesizes when the font itself lacks them.\n * @enum\n */\nconst FtSynthesize = {\n /** Embolden the glyphs. */\n BOLD: 1,\n /** Slant the glyphs. */\n OBLIQUE: 2,\n} as const;\n\nconst fontFaceClassFor: WrapperClassResolver = (handle) => {\n const type = cairoFontFaceGetType(handle) as FontType;\n\n if (type === FontType.TOY) {\n return ToyFontFace;\n }\n\n if (type === FontType.FT) {\n return FtFontFace;\n }\n\n return FontFace;\n};\n\n/**\n * A cairo font face (`cairo_font_face_t`): a typeface independent of size and transformation. Font faces come\n * from `create` or a context, and wrap as the concrete class their type reports\n * (`instanceof ToyFontFace` after `selectFontFace`).\n */\nabstract class FontFace {\n static {\n registerWrapperClass(this, FONT_FACE_TYPE);\n registerWrapperClassResolver(this, fontFaceClassFor);\n }\n\n /** Creates a toy font face from a family name, slant and weight. */\n static create(family: string, slant: FontSlant, weight: FontWeight): ToyFontFace {\n return wrapHandle(cairoToyFontFaceCreate(family, slant, weight) as ExternalObject<Handle>, ToyFontFace);\n }\n\n /** GType of `CairoFontFace`, the boxed type this class is registered under. */\n declare __type__: bigint;\n\n /** Returns the error status of the font face, `Status.SUCCESS` when it is usable. */\n status(): Status {\n return cairoFontFaceStatus(getHandle(this)) as Status;\n }\n\n /** Returns the backend the font face belongs to. */\n getType(): FontType {\n return cairoFontFaceGetType(getHandle(this)) as FontType;\n }\n\n /** Returns the reference count of the font face. */\n getReferenceCount(): number {\n return cairoFontFaceGetReferenceCount(getHandle(this)) as number;\n }\n}\n\n/** A toy font face, created with `FontFace.create` or a context's `selectFontFace`. */\nclass ToyFontFace extends FontFace {\n /** Returns the family name the font face was created with. */\n getFamily(): string {\n return cairoToyFontFaceGetFamily(getHandle(this)) as string;\n }\n\n /** Returns the slant the font face was created with. */\n getSlant(): FontSlant {\n return cairoToyFontFaceGetSlant(getHandle(this)) as FontSlant;\n }\n\n /** Returns the weight the font face was created with. */\n getWeight(): FontWeight {\n return cairoToyFontFaceGetWeight(getHandle(this)) as FontWeight;\n }\n}\n\n/** A FreeType font face returned by Cairo or another native library. */\nclass FtFontFace extends FontFace {\n /** Returns the styles currently synthesized for the font face. */\n getSynthesize(): FtSynthesize {\n return cairoFtFontFaceGetSynthesize(getHandle(this)) as FtSynthesize;\n }\n\n /** Enables synthesizing of the given styles. */\n setSynthesize(synthFlags: FtSynthesize): void {\n cairoFtFontFaceSetSynthesize(getHandle(this), synthFlags);\n }\n\n /** Disables synthesizing of the given styles. */\n unsetSynthesize(synthFlags: FtSynthesize): void {\n cairoFtFontFaceUnsetSynthesize(getHandle(this), synthFlags);\n }\n}\n\nexport { FontFace, FtFontFace, FtSynthesize, ToyFontFace };\n"]}
1
+ {"version":3,"file":"font-face.js","sourceRoot":"","sources":["../src/font-face.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EAET,oBAAoB,EACpB,4BAA4B,EAC5B,CAAC,EACD,UAAU,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAkB,QAAQ,EAAgC,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAKhF,MAAM,cAAc,GAAG,UAAU,CAAC,kCAAkC,CAAC,CAAC;AACtE,MAAM,mBAAmB,GAAG,SAAS,CAAC,wBAAw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,wBAAwB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAc,CAAC;IAClE,CAAC;IAED,yDAAyD;IACzD,SAAS;QACL,OAAO,yBAAyB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAe,CAAC;IACpE,CAAC;CACJ;AAED,wEAAwE;AACxE,MAAM,UAAW,SAAQ,QAAQ;IAC7B,kEAAkE;IAClE,aAAa;QACT,OAAO,4BAA4B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAiB,CAAC;IACzE,CAAC;IAED,gDAAgD;IAChD,aAAa,CAAC,UAAwB;QAClC,4BAA4B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,iDAAiD;IACjD,eAAe,CAAC,UAAwB;QACpC,8BAA8B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;CACJ;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import {\n type ExternalObject,\n getHandle,\n type Handle,\n registerWrapperClass,\n registerWrapperClassResolver,\n t,\n wrapHandle,\n type WrapperClassResolver,\n} from \"@gtkx/runtime\";\nimport { type FontSlant, FontType, type FontWeight, type Status } from \"./enums.js\";\nimport { bindCairo, cairoGType, FONT_FACE_FULL_T, FONT_FACE_T } from \"./lib.js\";\n\n/** One of the `FtSynthesize` styles a FreeType font face synthesizes. */\ntype FtSynthesize = number;\n\nconst FONT_FACE_TYPE = cairoGType(\"cairo_gobject_font_face_get_type\");\nconst cairoFontFaceStatus = bindCairo(\"cairo_font_face_status\", [FONT_FACE_T], t.int32);\nconst cairoFontFaceGetType = bindCairo(\"cairo_font_face_get_type\", [FONT_FACE_T], t.int32);\nconst cairoFontFaceGetReferenceCount = bindCairo(\"cairo_font_face_get_reference_count\", [FONT_FACE_T], t.int32);\nconst cairoToyFontFaceGetSlant = bindCairo(\"cairo_toy_font_face_get_slant\", [FONT_FACE_T], t.int32);\nconst cairoToyFontFaceGetWeight = bindCairo(\"cairo_toy_font_face_get_weight\", [FONT_FACE_T], t.int32);\nconst cairoFtFontFaceGetSynthesize = bindCairo(\"cairo_ft_font_face_get_synthesize\", [FONT_FACE_T], t.int32);\nconst cairoFtFontFaceSetSynthesize = bindCairo(\"cairo_ft_font_face_set_synthesize\", [FONT_FACE_T, t.int32], t.void);\nconst cairoToyFontFaceGetFamily = bindCairo(\"cairo_toy_font_face_get_family\", [FONT_FACE_T], t.string(\"borrowed\"));\n\nconst cairoToyFontFaceCreate = bindCairo(\n \"cairo_toy_font_face_create\",\n [t.string(\"borrowed\"), t.int32, t.int32],\n FONT_FACE_FULL_T,\n);\n\nconst cairoFtFontFaceUnsetSynthesize = bindCairo(\n \"cairo_ft_font_face_unset_synthesize\",\n [FONT_FACE_T, t.int32],\n t.void,\n);\n\n/**\n * Styles a FreeType font face synthesizes when the font itself lacks them.\n * @enum\n */\nconst FtSynthesize = {\n /** Embolden the glyphs. */\n BOLD: 1,\n /** Slant the glyphs. */\n OBLIQUE: 2,\n} as const;\n\nconst fontFaceClassFor: WrapperClassResolver = (handle) => {\n const type = cairoFontFaceGetType(handle) as FontType;\n\n if (type === FontType.TOY) {\n return ToyFontFace;\n }\n\n if (type === FontType.FT) {\n return FtFontFace;\n }\n\n return FontFace;\n};\n\n/**\n * A cairo font face (`cairo_font_face_t`): a typeface independent of size and transformation. Font faces come\n * from `create` or a context, and wrap as the concrete class their type reports\n * (`instanceof ToyFontFace` after `selectFontFace`).\n */\nabstract class FontFace {\n static {\n registerWrapperClass(this, FONT_FACE_TYPE);\n registerWrapperClassResolver(this, fontFaceClassFor);\n }\n\n /** Creates a toy font face from a family name, slant and weight. */\n static create(family: string, slant: FontSlant, weight: FontWeight): ToyFontFace {\n return wrapHandle(cairoToyFontFaceCreate(family, slant, weight) as ExternalObject<Handle>, ToyFontFace);\n }\n\n /** GType of `CairoFontFace`, the boxed type this class is registered under. */\n declare __type__: bigint;\n\n /** Returns the error status of the font face, `Status.SUCCESS` when it is usable. */\n status(): Status {\n return cairoFontFaceStatus(getHandle(this)) as Status;\n }\n\n /** Returns the backend the font face belongs to. */\n getType(): FontType {\n return cairoFontFaceGetType(getHandle(this)) as FontType;\n }\n\n /** Returns the reference count of the font face. */\n getReferenceCount(): number {\n return cairoFontFaceGetReferenceCount(getHandle(this)) as number;\n }\n}\n\n/** A toy font face, created with `FontFace.create` or a context's `selectFontFace`. */\nclass ToyFontFace extends FontFace {\n /** Returns the family name the font face was created with. */\n getFamily(): string {\n return cairoToyFontFaceGetFamily(getHandle(this)) as string;\n }\n\n /** Returns the slant the font face was created with. */\n getSlant(): FontSlant {\n return cairoToyFontFaceGetSlant(getHandle(this)) as FontSlant;\n }\n\n /** Returns the weight the font face was created with. */\n getWeight(): FontWeight {\n return cairoToyFontFaceGetWeight(getHandle(this)) as FontWeight;\n }\n}\n\n/** A FreeType font face returned by Cairo or another native library. */\nclass FtFontFace extends FontFace {\n /** Returns the styles currently synthesized for the font face. */\n getSynthesize(): FtSynthesize {\n return cairoFtFontFaceGetSynthesize(getHandle(this)) as FtSynthesize;\n }\n\n /** Enables synthesizing of the given styles. */\n setSynthesize(synthFlags: FtSynthesize): void {\n cairoFtFontFaceSetSynthesize(getHandle(this), synthFlags);\n }\n\n /** Disables synthesizing of the given styles. */\n unsetSynthesize(synthFlags: FtSynthesize): void {\n cairoFtFontFaceUnsetSynthesize(getHandle(this), synthFlags);\n }\n}\n\nexport { FontFace, FtFontFace, FtSynthesize, ToyFontFace };\n"]}
@@ -35,9 +35,9 @@ declare class FontOptions {
35
35
  /** Returns a hash of the settings, equal for options that compare `equal`. */
36
36
  hash(): number;
37
37
  /** Sets the OpenType font variations to apply, as a comma-separated `axis=value` string. */
38
- setVariations(variations: string): void;
38
+ setVariations(variations: string | null): void;
39
39
  /** Returns the OpenType font variations to apply. */
40
- getVariations(): string;
40
+ getVariations(): string | null;
41
41
  }
42
42
  export { FontOptions };
43
43
  //# sourceMappingURL=font-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"font-options.d.ts","sourceRoot":"","sources":["../src/font-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA8C3F;;;GAGG;AACH,cAAM,WAAW;IAKb,0GAA0G;IAC1G,MAAM,CAAC,MAAM,IAAI,WAAW;IAI5B,kFAAkF;IAC1E,QAAQ,EAAE,MAAM,CAAC;IAEzB,6GAA6G;gBACjG,KAAK,CAAC,EAAE,WAAW;IAK/B,sDAAsD;IACtD,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIxC,yDAAyD;IACzD,YAAY,IAAI,SAAS;IAIzB,gDAAgD;IAChD,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIxC,mDAAmD;IACnD,YAAY,IAAI,SAAS;IAIzB,iEAAiE;IACjE,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAI9C,oEAAoE;IACpE,cAAc,IAAI,WAAW;IAI7B,iFAAiF;IACjF,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAIpD,qDAAqD;IACrD,gBAAgB,IAAI,aAAa;IAIjC,uDAAuD;IACvD,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAIlC,iEAAiE;IACjE,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAI/B,2FAA2F;IAC3F,MAAM,IAAI,MAAM;IAIhB,8EAA8E;IAC9E,IAAI,IAAI,MAAM;IAId,4FAA4F;IAC5F,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIvC,qDAAqD;IACrD,aAAa,IAAI,MAAM;CAG1B;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"font-options.d.ts","sourceRoot":"","sources":["../src/font-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA8C3F;;;GAGG;AACH,cAAM,WAAW;IAKb,0GAA0G;IAC1G,MAAM,CAAC,MAAM,IAAI,WAAW;IAI5B,kFAAkF;IAC1E,QAAQ,EAAE,MAAM,CAAC;IAEzB,6GAA6G;gBACjG,KAAK,CAAC,EAAE,WAAW;IAK/B,sDAAsD;IACtD,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIxC,yDAAyD;IACzD,YAAY,IAAI,SAAS;IAIzB,gDAAgD;IAChD,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAIxC,mDAAmD;IACnD,YAAY,IAAI,SAAS;IAIzB,iEAAiE;IACjE,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI;IAI9C,oEAAoE;IACpE,cAAc,IAAI,WAAW;IAI7B,iFAAiF;IACjF,gBAAgB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI;IAIpD,qDAAqD;IACrD,gBAAgB,IAAI,aAAa;IAIjC,uDAAuD;IACvD,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO;IAIlC,iEAAiE;IACjE,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAI/B,2FAA2F;IAC3F,MAAM,IAAI,MAAM;IAIhB,8EAA8E;IAC9E,IAAI,IAAI,MAAM;IAId,4FAA4F;IAC5F,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAI9C,qDAAqD;IACrD,aAAa,IAAI,MAAM,GAAG,IAAI;CAGjC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -13,7 +13,7 @@ const cairoFontOptionsMerge = bindCairo("cairo_font_options_merge", [FONT_OPTION
13
13
  const cairoFontOptionsStatus = bindCairo("cairo_font_options_status", [FONT_OPTIONS_T], t.int32);
14
14
  const cairoFontOptionsHash = bindCairo("cairo_font_options_hash", [FONT_OPTIONS_T], t.uint64);
15
15
  const cairoFontOptionsGetVariations = bindCairo("cairo_font_options_get_variations", [FONT_OPTIONS_T], t.string("borrowed"));
16
- const cairoFontOptionsSetVariations = bindCairo("cairo_font_options_set_variations", [FONT_OPTIONS_T, t.string("full")], t.void);
16
+ const cairoFontOptionsSetVariations = bindCairo("cairo_font_options_set_variations", [FONT_OPTIONS_T, t.string("borrowed")], t.void);
17
17
  const cairoFontOptionsSetHintMetrics = bindCairo("cairo_font_options_set_hint_metrics", [FONT_OPTIONS_T, t.int32], t.void);
18
18
  const cairoFontOptionsSetSubpixelOrder = bindCairo("cairo_font_options_set_subpixel_order", [FONT_OPTIONS_T, t.int32], t.void);
19
19
  const cairoFontOptionsGetSubpixelOrder = bindCairo("cairo_font_options_get_subpixel_order", [FONT_OPTIONS_T], t.int32);
@@ -1 +1 @@
1
- {"version":3,"file":"font-options.js","sourceRoot":"","sources":["../src/font-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAe,oBAAoB,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEhH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEtF,MAAM,iBAAiB,GAAG,UAAU,CAAC,qCAAqC,CAAC,CAAC;AAC5E,MAAM,sBAAsB,GAAG,SAAS,CAAC,2BAA2B,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAC/F,MAAM,oBAAoB,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC,CAAC;AACzG,MAAM,4BAA4B,GAAG,SAAS,CAAC,mCAAmC,EAAE,CAAC,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AACvH,MAAM,4BAA4B,GAAG,SAAS,CAAC,mCAAmC,EAAE,CAAC,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CAAC;IACjE,CAAC;IAED,oEAAoE;IACpE,cAAc;QACV,OAAO,8BAA8B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAgB,CAAC;IAC1E,CAAC;IAED,iFAAiF;IACjF,gBAAgB,CAAC,aAA4B;QACzC,gCAAgC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC;IACrE,CAAC;IAED,qDAAqD;IACrD,gBAAgB;QACZ,OAAO,gCAAgC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAkB,CAAC;IAC9E,CAAC;IAED,uDAAuD;IACvD,KAAK,CAAC,KAAkB;QACpB,OAAO,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAY,CAAC;IAC/E,CAAC;IAED,iEAAiE;IACjE,KAAK,CAAC,KAAkB;QACpB,qBAAqB,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7D,CAAC;IAED,2FAA2F;IAC3F,MAAM;QACF,OAAO,sBAAsB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAW,CAAC;IAC7D,CAAC;IAED,8EAA8E;IAC9E,IAAI;QACA,OAAO,oBAAoB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAW,CAAC;IAC3D,CAAC;IAED,4FAA4F;IAC5F,aAAa,CAAC,UAAkB;QAC5B,6BAA6B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;IAED,qDAAqD;IACrD,aAAa;QACT,OAAO,6BAA6B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAW,CAAC;IACpE,CAAC;CACJ;AAED,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { type ExternalObject, getHandle, type Handle, registerWrapperClass, setHandle, t } from \"@gtkx/runtime\";\nimport type { Antialias, HintMetrics, HintStyle, Status, SubpixelOrder } from \"./enums.js\";\nimport { bindCairo, cairoGType, FONT_OPTIONS_FULL_T, FONT_OPTIONS_T } from \"./lib.js\";\n\nconst FONT_OPTIONS_TYPE = cairoGType(\"cairo_gobject_font_options_get_type\");\nconst cairoFontOptionsCreate = bindCairo(\"cairo_font_options_create\", [], FONT_OPTIONS_FULL_T);\nconst cairoFontOptionsCopy = bindCairo(\"cairo_font_options_copy\", [FONT_OPTIONS_T], FONT_OPTIONS_FULL_T);\nconst cairoFontOptionsSetHintStyle = bindCairo(\"cairo_font_options_set_hint_style\", [FONT_OPTIONS_T, t.int32], t.void);\nconst cairoFontOptionsGetHintStyle = bindCairo(\"cairo_font_options_get_hint_style\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsSetAntialias = bindCairo(\"cairo_font_options_set_antialias\", [FONT_OPTIONS_T, t.int32], t.void);\nconst cairoFontOptionsGetAntialias = bindCairo(\"cairo_font_options_get_antialias\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsGetHintMetrics = bindCairo(\"cairo_font_options_get_hint_metrics\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsEqual = bindCairo(\"cairo_font_options_equal\", [FONT_OPTIONS_T, FONT_OPTIONS_T], t.boolean);\nconst cairoFontOptionsMerge = bindCairo(\"cairo_font_options_merge\", [FONT_OPTIONS_T, FONT_OPTIONS_T], t.void);\nconst cairoFontOptionsStatus = bindCairo(\"cairo_font_options_status\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsHash = bindCairo(\"cairo_font_options_hash\", [FONT_OPTIONS_T], t.uint64);\n\nconst cairoFontOptionsGetVariations = bindCairo(\n \"cairo_font_options_get_variations\",\n [FONT_OPTIONS_T],\n t.string(\"borrowed\"),\n);\n\nconst cairoFontOptionsSetVariations = bindCairo(\n \"cairo_font_options_set_variations\",\n [FONT_OPTIONS_T, t.string(\"full\")],\n t.void,\n);\n\nconst cairoFontOptionsSetHintMetrics = bindCairo(\n \"cairo_font_options_set_hint_metrics\",\n [FONT_OPTIONS_T, t.int32],\n t.void,\n);\n\nconst cairoFontOptionsSetSubpixelOrder = bindCairo(\n \"cairo_font_options_set_subpixel_order\",\n [FONT_OPTIONS_T, t.int32],\n t.void,\n);\n\nconst cairoFontOptionsGetSubpixelOrder = bindCairo(\n \"cairo_font_options_get_subpixel_order\",\n [FONT_OPTIONS_T],\n t.int32,\n);\n\n/**\n * Cairo font options (`cairo_font_options_t`): the rendering settings applied to text, such as antialiasing,\n * hinting and font variations.\n */\nclass FontOptions {\n static {\n registerWrapperClass(this, FONT_OPTIONS_TYPE);\n }\n\n /** Creates a set of font options with all settings at their defaults, the same as `new FontOptions()`. */\n static create(): FontOptions {\n return new FontOptions();\n }\n\n /** GType of `CairoFontOptions`, the boxed type this class is registered under. */\n declare __type__: bigint;\n\n /** Creates a set of font options: a copy of `other` when given, otherwise all settings at their defaults. */\n constructor(other?: FontOptions) {\n const handle = other === undefined ? cairoFontOptionsCreate() : cairoFontOptionsCopy(getHandle(other));\n setHandle(this, handle as ExternalObject<Handle>);\n }\n\n /** Sets how outlines are fitted to the pixel grid. */\n setHintStyle(hintStyle: HintStyle): void {\n cairoFontOptionsSetHintStyle(getHandle(this), hintStyle);\n }\n\n /** Returns how outlines are fitted to the pixel grid. */\n getHintStyle(): HintStyle {\n return cairoFontOptionsGetHintStyle(getHandle(this)) as HintStyle;\n }\n\n /** Sets the antialiasing mode used for text. */\n setAntialias(antialias: Antialias): void {\n cairoFontOptionsSetAntialias(getHandle(this), antialias);\n }\n\n /** Returns the antialiasing mode used for text. */\n getAntialias(): Antialias {\n return cairoFontOptionsGetAntialias(getHandle(this)) as Antialias;\n }\n\n /** Sets whether font metrics are quantized to integer pixels. */\n setHintMetrics(hintMetrics: HintMetrics): void {\n cairoFontOptionsSetHintMetrics(getHandle(this), hintMetrics);\n }\n\n /** Returns whether font metrics are quantized to integer pixels. */\n getHintMetrics(): HintMetrics {\n return cairoFontOptionsGetHintMetrics(getHandle(this)) as HintMetrics;\n }\n\n /** Sets the order of subpixels on the display, used by subpixel antialiasing. */\n setSubpixelOrder(subpixelOrder: SubpixelOrder): void {\n cairoFontOptionsSetSubpixelOrder(getHandle(this), subpixelOrder);\n }\n\n /** Returns the order of subpixels on the display. */\n getSubpixelOrder(): SubpixelOrder {\n return cairoFontOptionsGetSubpixelOrder(getHandle(this)) as SubpixelOrder;\n }\n\n /** Returns whether `other` holds the same settings. */\n equal(other: FontOptions): boolean {\n return cairoFontOptionsEqual(getHandle(this), getHandle(other)) as boolean;\n }\n\n /** Copies every non-default setting of `other` over this one. */\n merge(other: FontOptions): void {\n cairoFontOptionsMerge(getHandle(this), getHandle(other));\n }\n\n /** Returns the error status of the font options, `Status.SUCCESS` when they are usable. */\n status(): Status {\n return cairoFontOptionsStatus(getHandle(this)) as Status;\n }\n\n /** Returns a hash of the settings, equal for options that compare `equal`. */\n hash(): number {\n return cairoFontOptionsHash(getHandle(this)) as number;\n }\n\n /** Sets the OpenType font variations to apply, as a comma-separated `axis=value` string. */\n setVariations(variations: string): void {\n cairoFontOptionsSetVariations(getHandle(this), variations);\n }\n\n /** Returns the OpenType font variations to apply. */\n getVariations(): string {\n return cairoFontOptionsGetVariations(getHandle(this)) as string;\n }\n}\n\nexport { FontOptions };\n"]}
1
+ {"version":3,"file":"font-options.js","sourceRoot":"","sources":["../src/font-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAe,oBAAoB,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEhH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEtF,MAAM,iBAAiB,GAAG,UAAU,CAAC,qCAAqC,CAAC,CAAC;AAC5E,MAAM,sBAAsB,GAAG,SAAS,CAAC,2BAA2B,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAC;AAC/F,MAAM,oBAAoB,GAAG,SAAS,CAAC,yBAAyB,EAAE,CAAC,cAAc,CAAC,EAAE,mBAAmB,CAAC,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AC;IAC3E,CAAC;CACJ;AAED,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { type ExternalObject, getHandle, type Handle, registerWrapperClass, setHandle, t } from \"@gtkx/runtime\";\nimport type { Antialias, HintMetrics, HintStyle, Status, SubpixelOrder } from \"./enums.js\";\nimport { bindCairo, cairoGType, FONT_OPTIONS_FULL_T, FONT_OPTIONS_T } from \"./lib.js\";\n\nconst FONT_OPTIONS_TYPE = cairoGType(\"cairo_gobject_font_options_get_type\");\nconst cairoFontOptionsCreate = bindCairo(\"cairo_font_options_create\", [], FONT_OPTIONS_FULL_T);\nconst cairoFontOptionsCopy = bindCairo(\"cairo_font_options_copy\", [FONT_OPTIONS_T], FONT_OPTIONS_FULL_T);\nconst cairoFontOptionsSetHintStyle = bindCairo(\"cairo_font_options_set_hint_style\", [FONT_OPTIONS_T, t.int32], t.void);\nconst cairoFontOptionsGetHintStyle = bindCairo(\"cairo_font_options_get_hint_style\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsSetAntialias = bindCairo(\"cairo_font_options_set_antialias\", [FONT_OPTIONS_T, t.int32], t.void);\nconst cairoFontOptionsGetAntialias = bindCairo(\"cairo_font_options_get_antialias\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsGetHintMetrics = bindCairo(\"cairo_font_options_get_hint_metrics\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsEqual = bindCairo(\"cairo_font_options_equal\", [FONT_OPTIONS_T, FONT_OPTIONS_T], t.boolean);\nconst cairoFontOptionsMerge = bindCairo(\"cairo_font_options_merge\", [FONT_OPTIONS_T, FONT_OPTIONS_T], t.void);\nconst cairoFontOptionsStatus = bindCairo(\"cairo_font_options_status\", [FONT_OPTIONS_T], t.int32);\nconst cairoFontOptionsHash = bindCairo(\"cairo_font_options_hash\", [FONT_OPTIONS_T], t.uint64);\n\nconst cairoFontOptionsGetVariations = bindCairo(\n \"cairo_font_options_get_variations\",\n [FONT_OPTIONS_T],\n t.string(\"borrowed\"),\n);\n\nconst cairoFontOptionsSetVariations = bindCairo(\n \"cairo_font_options_set_variations\",\n [FONT_OPTIONS_T, t.string(\"borrowed\")],\n t.void,\n);\n\nconst cairoFontOptionsSetHintMetrics = bindCairo(\n \"cairo_font_options_set_hint_metrics\",\n [FONT_OPTIONS_T, t.int32],\n t.void,\n);\n\nconst cairoFontOptionsSetSubpixelOrder = bindCairo(\n \"cairo_font_options_set_subpixel_order\",\n [FONT_OPTIONS_T, t.int32],\n t.void,\n);\n\nconst cairoFontOptionsGetSubpixelOrder = bindCairo(\n \"cairo_font_options_get_subpixel_order\",\n [FONT_OPTIONS_T],\n t.int32,\n);\n\n/**\n * Cairo font options (`cairo_font_options_t`): the rendering settings applied to text, such as antialiasing,\n * hinting and font variations.\n */\nclass FontOptions {\n static {\n registerWrapperClass(this, FONT_OPTIONS_TYPE);\n }\n\n /** Creates a set of font options with all settings at their defaults, the same as `new FontOptions()`. */\n static create(): FontOptions {\n return new FontOptions();\n }\n\n /** GType of `CairoFontOptions`, the boxed type this class is registered under. */\n declare __type__: bigint;\n\n /** Creates a set of font options: a copy of `other` when given, otherwise all settings at their defaults. */\n constructor(other?: FontOptions) {\n const handle = other === undefined ? cairoFontOptionsCreate() : cairoFontOptionsCopy(getHandle(other));\n setHandle(this, handle as ExternalObject<Handle>);\n }\n\n /** Sets how outlines are fitted to the pixel grid. */\n setHintStyle(hintStyle: HintStyle): void {\n cairoFontOptionsSetHintStyle(getHandle(this), hintStyle);\n }\n\n /** Returns how outlines are fitted to the pixel grid. */\n getHintStyle(): HintStyle {\n return cairoFontOptionsGetHintStyle(getHandle(this)) as HintStyle;\n }\n\n /** Sets the antialiasing mode used for text. */\n setAntialias(antialias: Antialias): void {\n cairoFontOptionsSetAntialias(getHandle(this), antialias);\n }\n\n /** Returns the antialiasing mode used for text. */\n getAntialias(): Antialias {\n return cairoFontOptionsGetAntialias(getHandle(this)) as Antialias;\n }\n\n /** Sets whether font metrics are quantized to integer pixels. */\n setHintMetrics(hintMetrics: HintMetrics): void {\n cairoFontOptionsSetHintMetrics(getHandle(this), hintMetrics);\n }\n\n /** Returns whether font metrics are quantized to integer pixels. */\n getHintMetrics(): HintMetrics {\n return cairoFontOptionsGetHintMetrics(getHandle(this)) as HintMetrics;\n }\n\n /** Sets the order of subpixels on the display, used by subpixel antialiasing. */\n setSubpixelOrder(subpixelOrder: SubpixelOrder): void {\n cairoFontOptionsSetSubpixelOrder(getHandle(this), subpixelOrder);\n }\n\n /** Returns the order of subpixels on the display. */\n getSubpixelOrder(): SubpixelOrder {\n return cairoFontOptionsGetSubpixelOrder(getHandle(this)) as SubpixelOrder;\n }\n\n /** Returns whether `other` holds the same settings. */\n equal(other: FontOptions): boolean {\n return cairoFontOptionsEqual(getHandle(this), getHandle(other)) as boolean;\n }\n\n /** Copies every non-default setting of `other` over this one. */\n merge(other: FontOptions): void {\n cairoFontOptionsMerge(getHandle(this), getHandle(other));\n }\n\n /** Returns the error status of the font options, `Status.SUCCESS` when they are usable. */\n status(): Status {\n return cairoFontOptionsStatus(getHandle(this)) as Status;\n }\n\n /** Returns a hash of the settings, equal for options that compare `equal`. */\n hash(): number {\n return cairoFontOptionsHash(getHandle(this)) as number;\n }\n\n /** Sets the OpenType font variations to apply, as a comma-separated `axis=value` string. */\n setVariations(variations: string | null): void {\n cairoFontOptionsSetVariations(getHandle(this), variations);\n }\n\n /** Returns the OpenType font variations to apply. */\n getVariations(): string | null {\n return cairoFontOptionsGetVariations(getHandle(this)) as string | null;\n }\n}\n\nexport { FontOptions };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAa,KAAK,MAAM,EAAW,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAiDzC,QAAA,MAAM,SAAS,GAAI,YAAY,UAAU,KAAG,QAAQ,EAuBnD,CAAC;AAEF;;;GAGG;AACH,uBAAe,IAAI;IACf,uDAAuD;IACvD,MAAM,IAAI,QAAQ,EAAE;CAGvB;AAED,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAa,KAAK,MAAM,EAAW,MAAM,eAAe,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAS,MAAM,YAAY,CAAC;AAIlD,KAAK,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAmCzC,QAAA,MAAM,SAAS,GAAI,YAAY,UAAU,KAAG,QAAQ,EAoBnD,CAAC;AAEF;;;GAGG;AACH,uBAAe,IAAI;IACf,uDAAuD;IACvD,MAAM,IAAI,QAAQ,EAAE;CAGvB;AAED,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC"}
package/dist/path.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { getHandle, read, t } from "@gtkx/runtime";
2
2
  import { PathDataType } from "./enums.js";
3
+ import { checkStatus } from "./status.js";
3
4
  const ELEMENT_SIZE = 16;
4
5
  const DATA_OFFSET = 8;
5
6
  const NUM_DATA_OFFSET = 16;
@@ -19,26 +20,14 @@ const readCurveTo = (data, base) => {
19
20
  return { type: "curveTo", x1: first.x, y1: first.y, x2: second.x, y2: second.y, x3: third.x, y3: third.y };
20
21
  };
21
22
  const readClosePath = () => ({ type: "closePath" });
22
- const segmentReaderFor = (headerType) => {
23
- switch (headerType) {
24
- case PathDataType.MOVE_TO: {
25
- return readMoveTo;
26
- }
27
- case PathDataType.LINE_TO: {
28
- return readLineTo;
29
- }
30
- case PathDataType.CURVE_TO: {
31
- return readCurveTo;
32
- }
33
- case PathDataType.CLOSE_PATH: {
34
- return readClosePath;
35
- }
36
- default: {
37
- return null;
38
- }
39
- }
23
+ const segmentReaders = {
24
+ [PathDataType.MOVE_TO]: readMoveTo,
25
+ [PathDataType.LINE_TO]: readLineTo,
26
+ [PathDataType.CURVE_TO]: readCurveTo,
27
+ [PathDataType.CLOSE_PATH]: readClosePath,
40
28
  };
41
29
  const parsePath = (pathHandle) => {
30
+ checkStatus(INT.read(pathHandle, 0), "path");
42
31
  const numData = NUM_DATA.read(pathHandle);
43
32
  if (numData === 0) {
44
33
  return [];
@@ -48,10 +37,8 @@ const parsePath = (pathHandle) => {
48
37
  let index = 0;
49
38
  while (index < numData) {
50
39
  const base = index * ELEMENT_SIZE;
51
- const reader = segmentReaderFor(INT.read(data, base));
52
- if (reader !== null) {
53
- segments.push(reader(data, base));
54
- }
40
+ const reader = segmentReaders[INT.read(data, base)];
41
+ segments.push(reader(data, base));
55
42
  index += INT.read(data, base + 4);
56
43
  }
57
44
  return segments;
package/dist/path.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAe,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM1C,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACpC,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC/B,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;AAEnD,MAAM,SAAS,GAAG,CAAC,IAAgB,EAAE,IAAY,EAAS,EAAE,CAAC,CAAC;IAC1D,CAAC,EAAE,MAAM,CAA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I,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAW,CAAC;IAChD,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAe,IAAI;IACf,uDAAuD;IACvD,MAAM;QACF,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;CACJ;AAED,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { type ExternalObject, getHandle, type Handle, read, t } from \"@gtkx/runtime\";\nimport type { PathData } from \"./types.js\";\nimport { PathDataType } from \"./enums.js\";\n\ntype PathBuffer = ExternalObject<Handle>;\ntype Point = { x: number; y: number };\ntype SegmentReader = (data: PathBuffer, base: number) => PathData;\n\nconst ELEMENT_SIZE = 16;\nconst DATA_OFFSET = 8;\nconst NUM_DATA_OFFSET = 16;\nconst DOUBLE = t.fieldAt(t.float64);\nconst INT = t.fieldAt(t.int32);\nconst NUM_DATA = t.field(t.int32, NUM_DATA_OFFSET);\n\nconst readPoint = (data: PathBuffer, base: number): Point => ({\n x: DOUBLE.read(data, base) as number,\n y: DOUBLE.read(data, base + 8) as number,\n});\n\nconst readMoveTo: SegmentReader = (data, base) => ({ type: \"moveTo\", ...readPoint(data, base + ELEMENT_SIZE) });\nconst readLineTo: SegmentReader = (data, base) => ({ type: \"lineTo\", ...readPoint(data, base + ELEMENT_SIZE) });\n\nconst readCurveTo: SegmentReader = (data, base) => {\n const first = readPoint(data, base + ELEMENT_SIZE);\n const second = readPoint(data, base + ELEMENT_SIZE * 2);\n const third = readPoint(data, base + ELEMENT_SIZE * 3);\n\n return { type: \"curveTo\", x1: first.x, y1: first.y, x2: second.x, y2: second.y, x3: third.x, y3: third.y };\n};\n\nconst readClosePath: SegmentReader = () => ({ type: \"closePath\" });\n\nconst segmentReaderFor = (headerType: PathDataType): SegmentReader | null => {\n switch (headerType) {\n case PathDataType.MOVE_TO: {\n return readMoveTo;\n }\n case PathDataType.LINE_TO: {\n return readLineTo;\n }\n case PathDataType.CURVE_TO: {\n return readCurveTo;\n }\n case PathDataType.CLOSE_PATH: {\n return readClosePath;\n }\n default: {\n return null;\n }\n }\n};\n\nconst parsePath = (pathHandle: PathBuffer): PathData[] => {\n const numData = NUM_DATA.read(pathHandle) as number;\n\n if (numData === 0) {\n return [];\n }\n\n const data = read(pathHandle, t.struct(\"borrowed\", { size: numData * ELEMENT_SIZE }), DATA_OFFSET) as PathBuffer;\n const segments: PathData[] = [];\n let index = 0;\n\n while (index < numData) {\n const base = index * ELEMENT_SIZE;\n const reader = segmentReaderFor(INT.read(data, base) as PathDataType);\n\n if (reader !== null) {\n segments.push(reader(data, base));\n }\n\n index += INT.read(data, base + 4) as number;\n }\n\n return segments;\n};\n\n/**\n * A cairo path (`cairo_path_t`). Instances come from the bindings that hand one back, and the bindings that take\n * one, such as `Gsk.PathBuilder.addCairoPath`, accept it as is.\n */\nabstract class Path {\n /** Reads the segments of the path in drawing order. */\n toData(): PathData[] {\n return parsePath(getHandle(this));\n }\n}\n\nexport { parsePath, Path };\n"]}
1
+ {"version":3,"file":"path.js","sourceRoot":"","sources":["../src/path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,SAAS,EAAe,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAErF,OAAO,EAAE,YAAY,EAAe,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACpC,MAAM,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC/B,MAAM,QAAQ,GAAG,CAAC,CAAC,KAA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QAAQ,CAAC;AACpB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAe,IAAI;IACf,uDAAuD;IACvD,MAAM;QACF,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACtC,CAAC;CACJ;AAED,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { type ExternalObject, getHandle, type Handle, read, t } from \"@gtkx/runtime\";\nimport type { PathData, Point } from \"./types.js\";\nimport { PathDataType, type Status } from \"./enums.js\";\nimport { checkStatus } from \"./status.js\";\n\ntype PathBuffer = ExternalObject<Handle>;\ntype SegmentReader = (data: PathBuffer, base: number) => PathData;\n\nconst ELEMENT_SIZE = 16;\nconst DATA_OFFSET = 8;\nconst NUM_DATA_OFFSET = 16;\nconst DOUBLE = t.fieldAt(t.float64);\nconst INT = t.fieldAt(t.int32);\nconst NUM_DATA = t.field(t.int32, NUM_DATA_OFFSET);\n\nconst readPoint = (data: PathBuffer, base: number): Point => ({\n x: DOUBLE.read(data, base) as number,\n y: DOUBLE.read(data, base + 8) as number,\n});\n\nconst readMoveTo: SegmentReader = (data, base) => ({ type: \"moveTo\", ...readPoint(data, base + ELEMENT_SIZE) });\nconst readLineTo: SegmentReader = (data, base) => ({ type: \"lineTo\", ...readPoint(data, base + ELEMENT_SIZE) });\n\nconst readCurveTo: SegmentReader = (data, base) => {\n const first = readPoint(data, base + ELEMENT_SIZE);\n const second = readPoint(data, base + ELEMENT_SIZE * 2);\n const third = readPoint(data, base + ELEMENT_SIZE * 3);\n\n return { type: \"curveTo\", x1: first.x, y1: first.y, x2: second.x, y2: second.y, x3: third.x, y3: third.y };\n};\n\nconst readClosePath: SegmentReader = () => ({ type: \"closePath\" });\n\nconst segmentReaders: Record<PathDataType, SegmentReader> = {\n [PathDataType.MOVE_TO]: readMoveTo,\n [PathDataType.LINE_TO]: readLineTo,\n [PathDataType.CURVE_TO]: readCurveTo,\n [PathDataType.CLOSE_PATH]: readClosePath,\n};\n\nconst parsePath = (pathHandle: PathBuffer): PathData[] => {\n checkStatus(INT.read(pathHandle, 0) as Status, \"path\");\n const numData = NUM_DATA.read(pathHandle) as number;\n\n if (numData === 0) {\n return [];\n }\n\n const data = read(pathHandle, t.struct(\"borrowed\", { size: numData * ELEMENT_SIZE }), DATA_OFFSET) as PathBuffer;\n const segments: PathData[] = [];\n let index = 0;\n\n while (index < numData) {\n const base = index * ELEMENT_SIZE;\n const reader = segmentReaders[INT.read(data, base) as PathDataType];\n segments.push(reader(data, base));\n index += INT.read(data, base + 4) as number;\n }\n\n return segments;\n};\n\n/**\n * A cairo path (`cairo_path_t`). Instances come from the bindings that hand one back, and the bindings that take\n * one, such as `Gsk.PathBuilder.addCairoPath`, accept it as is.\n */\nabstract class Path {\n /** Reads the segments of the path in drawing order. */\n toData(): PathData[] {\n return parsePath(getHandle(this));\n }\n}\n\nexport { parsePath, Path };\n"]}
package/dist/pattern.js CHANGED
@@ -53,12 +53,12 @@ const readRgba = (fill) => {
53
53
  const green = { value: 0 };
54
54
  const blue = { value: 0 };
55
55
  const alpha = { value: 0 };
56
- fill(red, green, blue, alpha);
56
+ checkStatus(fill(red, green, blue, alpha), "pattern");
57
57
  return { red: red.value, green: green.value, blue: blue.value, alpha: alpha.value };
58
58
  };
59
59
  const readCount = (boundFn, self) => {
60
60
  const count = { value: 0 };
61
- boundFn(getHandle(self), count);
61
+ checkStatus(boundFn(getHandle(self), count), "pattern");
62
62
  return count.value;
63
63
  };
64
64
  const patternClassFor = (handle) => {
@@ -189,7 +189,7 @@ class LinearPattern extends Pattern {
189
189
  const y0 = { value: 0 };
190
190
  const x1 = { value: 0 };
191
191
  const y1 = { value: 0 };
192
- cairoPatternGetLinearPoints(getHandle(this), x0, y0, x1, y1);
192
+ checkStatus(cairoPatternGetLinearPoints(getHandle(this), x0, y0, x1, y1), "pattern");
193
193
  return { x0: x0.value, y0: y0.value, x1: x1.value, y1: y1.value };
194
194
  }
195
195
  }
@@ -203,7 +203,7 @@ class RadialPattern extends Pattern {
203
203
  const x1 = { value: 0 };
204
204
  const y1 = { value: 0 };
205
205
  const r1 = { value: 0 };
206
- cairoPatternGetRadialCircles(getHandle(this), x0, y0, r0, x1, y1, r1);
206
+ checkStatus(cairoPatternGetRadialCircles(getHandle(this), x0, y0, r0, x1, y1, r1), "pattern");
207
207
  return { x0: x0.value, y0: y0.value, r0: r0.value, x1: x1.value, y1: y1.value, r1: r1.value };
208
208
  }
209
209
  }
@@ -256,7 +256,7 @@ class MeshPattern extends Pattern {
256
256
  getControlPoint(patchNum, pointNum) {
257
257
  const x = { value: 0 };
258
258
  const y = { value: 0 };
259
- cairoMeshPatternGetControlPoint(getHandle(this), patchNum, pointNum, x, y);
259
+ checkStatus(cairoMeshPatternGetControlPoint(getHandle(this), patchNum, pointNum, x, y), "pattern");
260
260
  return { x: x.value, y: y.value };
261
261
  }
262
262
  /** Returns the color of corner `cornerNum` of patch `patchNum`. */