@shopify/react-native-skia 0.1.230 → 0.1.231

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 (99) hide show
  1. package/android/CMakeLists.txt +1 -0
  2. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +2 -2
  3. package/cpp/api/JsiSkAnimatedImage.h +1 -1
  4. package/cpp/api/JsiSkDataFactory.h +6 -6
  5. package/cpp/api/JsiSkImage.h +4 -4
  6. package/cpp/api/JsiSkPath.h +1 -1
  7. package/cpp/api/JsiSkRRect.h +30 -3
  8. package/cpp/api/third_party/base64.cpp +153 -0
  9. package/cpp/api/third_party/base64.h +50 -0
  10. package/cpp/jsi/JsiPromises.h +1 -1
  11. package/cpp/rnskia/dom/props/FontProp.h +4 -1
  12. package/cpp/rnskia/dom/props/RRectProp.h +50 -0
  13. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
  14. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +2 -1
  15. package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +1 -1
  16. package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +3 -3
  17. package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
  18. package/lib/commonjs/dom/types/Common.d.ts +2 -2
  19. package/lib/commonjs/dom/types/Common.js.map +1 -1
  20. package/lib/commonjs/headless/index.d.ts +3 -1
  21. package/lib/commonjs/headless/index.js +12 -6
  22. package/lib/commonjs/headless/index.js.map +1 -1
  23. package/lib/commonjs/skia/types/Canvas.d.ts +4 -4
  24. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  25. package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
  26. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  27. package/lib/commonjs/skia/types/RRect.d.ts +9 -0
  28. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  29. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +4 -4
  30. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  31. package/lib/commonjs/skia/web/JsiSkPath.d.ts +2 -2
  32. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  33. package/lib/commonjs/skia/web/JsiSkRRect.d.ts +2 -2
  34. package/lib/commonjs/skia/web/JsiSkRRect.js +4 -0
  35. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  36. package/lib/module/dom/nodes/JsiSkDOM.d.ts +2 -1
  37. package/lib/module/dom/nodes/datatypes/Rect.d.ts +1 -1
  38. package/lib/module/dom/nodes/drawings/RRectNode.d.ts +3 -3
  39. package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
  40. package/lib/module/dom/types/Common.d.ts +2 -2
  41. package/lib/module/dom/types/Common.js.map +1 -1
  42. package/lib/module/headless/index.d.ts +3 -1
  43. package/lib/module/headless/index.js +5 -3
  44. package/lib/module/headless/index.js.map +1 -1
  45. package/lib/module/skia/types/Canvas.d.ts +4 -4
  46. package/lib/module/skia/types/Canvas.js.map +1 -1
  47. package/lib/module/skia/types/Path/Path.d.ts +2 -2
  48. package/lib/module/skia/types/Path/Path.js.map +1 -1
  49. package/lib/module/skia/types/RRect.d.ts +9 -0
  50. package/lib/module/skia/types/RRect.js.map +1 -1
  51. package/lib/module/skia/web/JsiSkCanvas.d.ts +4 -4
  52. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  53. package/lib/module/skia/web/JsiSkPath.d.ts +2 -2
  54. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  55. package/lib/module/skia/web/JsiSkRRect.d.ts +2 -2
  56. package/lib/module/skia/web/JsiSkRRect.js +4 -0
  57. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  58. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +2 -1
  59. package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +1 -1
  60. package/lib/typescript/src/dom/nodes/drawings/RRectNode.d.ts +3 -3
  61. package/lib/typescript/src/dom/types/Common.d.ts +2 -2
  62. package/lib/typescript/src/headless/index.d.ts +3 -1
  63. package/lib/typescript/src/skia/types/Canvas.d.ts +4 -4
  64. package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
  65. package/lib/typescript/src/skia/types/RRect.d.ts +9 -0
  66. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +4 -4
  67. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +2 -2
  68. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +2 -2
  69. package/libs/android/arm64-v8a/libskia.a +0 -0
  70. package/libs/android/armeabi-v7a/libskia.a +0 -0
  71. package/libs/android/x86/libskia.a +0 -0
  72. package/libs/android/x86_64/libskia.a +0 -0
  73. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  74. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  75. package/libs/ios/libskottie.xcframework/Info.plist +5 -5
  76. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  77. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  78. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  79. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  80. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  81. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  82. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  83. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  84. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  85. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  86. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  87. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  88. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  89. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  90. package/package.json +1 -1
  91. package/src/dom/nodes/drawings/RRectNode.ts +2 -2
  92. package/src/dom/types/Common.ts +2 -1
  93. package/src/headless/index.ts +7 -3
  94. package/src/skia/types/Canvas.ts +4 -4
  95. package/src/skia/types/Path/Path.ts +2 -2
  96. package/src/skia/types/RRect.ts +11 -0
  97. package/src/skia/web/JsiSkCanvas.ts +4 -4
  98. package/src/skia/web/JsiSkPath.ts +2 -2
  99. package/src/skia/web/JsiSkRRect.ts +23 -2
@@ -1 +1 @@
1
- {"version":3,"names":["BaseHostObject","JsiSkRect","JsiSkRRect","fromValue","CanvasKit","rect","ref","RRectXY","rx","ry","constructor","Infinity","width","height","scale","Math","min","Float32Array","of"],"sources":["JsiSkRRect.ts"],"sourcesContent":["import type { CanvasKit, RRect } from \"canvaskit-wasm\";\n\nimport type { SkRect, SkRRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkRRect\n extends BaseHostObject<RRect, \"RRect\">\n implements SkRRect\n{\n dispose = () => {\n // Float32Array\n };\n\n static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.RRectXY(\n JsiSkRect.fromValue(CanvasKit, rect.rect),\n rect.rx,\n rect.ry\n );\n }\n\n constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number) {\n // based on https://github.com/google/skia/blob/main/src/core/SkRRect.cpp#L51\n if (rx === Infinity || ry === Infinity) {\n rx = ry = 0;\n }\n if (rect.width < rx + rx || rect.height < ry + ry) {\n // At most one of these two divides will be by zero, and neither numerator is zero.\n const scale = Math.min(rect.width / (rx + rx), rect.height / (ry + ry));\n rx *= scale;\n ry *= scale;\n }\n const ref = CanvasKit.RRectXY(JsiSkRect.fromValue(CanvasKit, rect), rx, ry);\n super(CanvasKit, ref, \"RRect\");\n }\n\n get rx() {\n return this.ref[4];\n }\n\n get ry() {\n return this.ref[5];\n }\n\n get rect() {\n return new JsiSkRect(\n this.CanvasKit,\n Float32Array.of(this.ref[0], this.ref[1], this.ref[2], this.ref[3])\n );\n }\n}\n"],"mappings":";;AAIA,SAASA,cAAT,QAA+B,QAA/B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,UAAN,SACGF,cADH,CAGP;EAKkB,OAATG,SAAS,CAACC,SAAD,EAAuBC,IAAvB,EAAsC;IACpD,IAAIA,IAAI,YAAYJ,SAApB,EAA+B;MAC7B,OAAOI,IAAI,CAACC,GAAZ;IACD;;IACD,OAAOF,SAAS,CAACG,OAAV,CACLN,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAAI,CAACA,IAApC,CADK,EAELA,IAAI,CAACG,EAFA,EAGLH,IAAI,CAACI,EAHA,CAAP;EAKD;;EAEDC,WAAW,CAACN,SAAD,EAAuBC,IAAvB,EAAqCG,EAArC,EAAiDC,EAAjD,EAA6D;IACtE;IACA,IAAID,EAAE,KAAKG,QAAP,IAAmBF,EAAE,KAAKE,QAA9B,EAAwC;MACtCH,EAAE,GAAGC,EAAE,GAAG,CAAV;IACD;;IACD,IAAIJ,IAAI,CAACO,KAAL,GAAaJ,EAAE,GAAGA,EAAlB,IAAwBH,IAAI,CAACQ,MAAL,GAAcJ,EAAE,GAAGA,EAA/C,EAAmD;MACjD;MACA,MAAMK,KAAK,GAAGC,IAAI,CAACC,GAAL,CAASX,IAAI,CAACO,KAAL,IAAcJ,EAAE,GAAGA,EAAnB,CAAT,EAAiCH,IAAI,CAACQ,MAAL,IAAeJ,EAAE,GAAGA,EAApB,CAAjC,CAAd;MACAD,EAAE,IAAIM,KAAN;MACAL,EAAE,IAAIK,KAAN;IACD;;IACD,MAAMR,GAAG,GAAGF,SAAS,CAACG,OAAV,CAAkBN,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAA/B,CAAlB,EAAwDG,EAAxD,EAA4DC,EAA5D,CAAZ;IACA,MAAML,SAAN,EAAiBE,GAAjB,EAAsB,OAAtB;;IAZsE,iCAf9D,MAAM,CACd;IACD,CAauE;EAavE;;EAEK,IAAFE,EAAE,GAAG;IACP,OAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;EACD;;EAEK,IAAFG,EAAE,GAAG;IACP,OAAO,KAAKH,GAAL,CAAS,CAAT,CAAP;EACD;;EAEO,IAAJD,IAAI,GAAG;IACT,OAAO,IAAIJ,SAAJ,CACL,KAAKG,SADA,EAELa,YAAY,CAACC,EAAb,CAAgB,KAAKZ,GAAL,CAAS,CAAT,CAAhB,EAA6B,KAAKA,GAAL,CAAS,CAAT,CAA7B,EAA0C,KAAKA,GAAL,CAAS,CAAT,CAA1C,EAAuD,KAAKA,GAAL,CAAS,CAAT,CAAvD,CAFK,CAAP;EAID;;AA5CH"}
1
+ {"version":3,"names":["BaseHostObject","JsiSkRect","JsiSkRRect","fromValue","CanvasKit","rect","ref","Float32Array","of","x","y","width","height","topLeft","topRight","bottomRight","bottomLeft","RRectXY","rx","ry","constructor","Infinity","scale","Math","min"],"sources":["JsiSkRRect.ts"],"sourcesContent":["import type { CanvasKit, RRect } from \"canvaskit-wasm\";\n\nimport type { InputRRect, SkRect, SkRRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkRRect\n extends BaseHostObject<RRect, \"RRect\">\n implements SkRRect\n{\n dispose = () => {\n // Float32Array\n };\n\n static fromValue(CanvasKit: CanvasKit, rect: InputRRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n if (\n \"topLeft\" in rect &&\n \"topRight\" in rect &&\n \"bottomRight\" in rect &&\n \"bottomLeft\" in rect\n ) {\n return Float32Array.of(\n rect.rect.x,\n rect.rect.y,\n rect.rect.x + rect.rect.width,\n rect.rect.y + rect.rect.height,\n rect.topLeft.x,\n rect.topLeft.y,\n rect.topRight.x,\n rect.topRight.y,\n rect.bottomRight.x,\n rect.bottomRight.y,\n rect.bottomLeft.x,\n rect.bottomLeft.y\n );\n }\n return CanvasKit.RRectXY(\n JsiSkRect.fromValue(CanvasKit, rect.rect),\n rect.rx,\n rect.ry\n );\n }\n\n constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number) {\n // based on https://github.com/google/skia/blob/main/src/core/SkRRect.cpp#L51\n if (rx === Infinity || ry === Infinity) {\n rx = ry = 0;\n }\n if (rect.width < rx + rx || rect.height < ry + ry) {\n // At most one of these two divides will be by zero, and neither numerator is zero.\n const scale = Math.min(rect.width / (rx + rx), rect.height / (ry + ry));\n rx *= scale;\n ry *= scale;\n }\n const ref = CanvasKit.RRectXY(JsiSkRect.fromValue(CanvasKit, rect), rx, ry);\n super(CanvasKit, ref, \"RRect\");\n }\n\n get rx() {\n return this.ref[4];\n }\n\n get ry() {\n return this.ref[5];\n }\n\n get rect() {\n return new JsiSkRect(\n this.CanvasKit,\n Float32Array.of(this.ref[0], this.ref[1], this.ref[2], this.ref[3])\n );\n }\n}\n"],"mappings":";;AAIA,SAASA,cAAT,QAA+B,QAA/B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,UAAN,SACGF,cADH,CAGP;EAKkB,OAATG,SAAS,CAACC,SAAD,EAAuBC,IAAvB,EAAyC;IACvD,IAAIA,IAAI,YAAYJ,SAApB,EAA+B;MAC7B,OAAOI,IAAI,CAACC,GAAZ;IACD;;IACD,IACE,aAAaD,IAAb,IACA,cAAcA,IADd,IAEA,iBAAiBA,IAFjB,IAGA,gBAAgBA,IAJlB,EAKE;MACA,OAAOE,YAAY,CAACC,EAAb,CACLH,IAAI,CAACA,IAAL,CAAUI,CADL,EAELJ,IAAI,CAACA,IAAL,CAAUK,CAFL,EAGLL,IAAI,CAACA,IAAL,CAAUI,CAAV,GAAcJ,IAAI,CAACA,IAAL,CAAUM,KAHnB,EAILN,IAAI,CAACA,IAAL,CAAUK,CAAV,GAAcL,IAAI,CAACA,IAAL,CAAUO,MAJnB,EAKLP,IAAI,CAACQ,OAAL,CAAaJ,CALR,EAMLJ,IAAI,CAACQ,OAAL,CAAaH,CANR,EAOLL,IAAI,CAACS,QAAL,CAAcL,CAPT,EAQLJ,IAAI,CAACS,QAAL,CAAcJ,CART,EASLL,IAAI,CAACU,WAAL,CAAiBN,CATZ,EAULJ,IAAI,CAACU,WAAL,CAAiBL,CAVZ,EAWLL,IAAI,CAACW,UAAL,CAAgBP,CAXX,EAYLJ,IAAI,CAACW,UAAL,CAAgBN,CAZX,CAAP;IAcD;;IACD,OAAON,SAAS,CAACa,OAAV,CACLhB,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAAI,CAACA,IAApC,CADK,EAELA,IAAI,CAACa,EAFA,EAGLb,IAAI,CAACc,EAHA,CAAP;EAKD;;EAEDC,WAAW,CAAChB,SAAD,EAAuBC,IAAvB,EAAqCa,EAArC,EAAiDC,EAAjD,EAA6D;IACtE;IACA,IAAID,EAAE,KAAKG,QAAP,IAAmBF,EAAE,KAAKE,QAA9B,EAAwC;MACtCH,EAAE,GAAGC,EAAE,GAAG,CAAV;IACD;;IACD,IAAId,IAAI,CAACM,KAAL,GAAaO,EAAE,GAAGA,EAAlB,IAAwBb,IAAI,CAACO,MAAL,GAAcO,EAAE,GAAGA,EAA/C,EAAmD;MACjD;MACA,MAAMG,KAAK,GAAGC,IAAI,CAACC,GAAL,CAASnB,IAAI,CAACM,KAAL,IAAcO,EAAE,GAAGA,EAAnB,CAAT,EAAiCb,IAAI,CAACO,MAAL,IAAeO,EAAE,GAAGA,EAApB,CAAjC,CAAd;MACAD,EAAE,IAAII,KAAN;MACAH,EAAE,IAAIG,KAAN;IACD;;IACD,MAAMhB,GAAG,GAAGF,SAAS,CAACa,OAAV,CAAkBhB,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAA/B,CAAlB,EAAwDa,EAAxD,EAA4DC,EAA5D,CAAZ;IACA,MAAMf,SAAN,EAAiBE,GAAjB,EAAsB,OAAtB;;IAZsE,iCApC9D,MAAM,CACd;IACD,CAkCuE;EAavE;;EAEK,IAAFY,EAAE,GAAG;IACP,OAAO,KAAKZ,GAAL,CAAS,CAAT,CAAP;EACD;;EAEK,IAAFa,EAAE,GAAG;IACP,OAAO,KAAKb,GAAL,CAAS,CAAT,CAAP;EACD;;EAEO,IAAJD,IAAI,GAAG;IACT,OAAO,IAAIJ,SAAJ,CACL,KAAKG,SADA,EAELG,YAAY,CAACC,EAAb,CAAgB,KAAKF,GAAL,CAAS,CAAT,CAAhB,EAA6B,KAAKA,GAAL,CAAS,CAAT,CAA7B,EAA0C,KAAKA,GAAL,CAAS,CAAT,CAA1C,EAAuD,KAAKA,GAAL,CAAS,CAAT,CAAvD,CAFK,CAAP;EAID;;AAjEH"}
@@ -2,6 +2,7 @@ import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, Ma
2
2
  import type { BlendImageFilterProps, BlendProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, MorphologyImageFilterProps, RuntimeShaderImageFilterProps } from "../types/ImageFilters";
3
3
  import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "../types/PathEffects";
4
4
  import type { ParagraphProps } from "../types/Paragraph";
5
+ import { RRectNode } from "./drawings";
5
6
  import type { NodeContext } from "./Node";
6
7
  export declare class JsiSkDOM implements SkDOM {
7
8
  private ctx;
@@ -18,7 +19,7 @@ export declare class JsiSkDOM implements SkDOM {
18
19
  Patch(props: PatchProps): import("../types").RenderNode<PatchProps>;
19
20
  Points(props: PointsProps): import("../types").RenderNode<PointsProps>;
20
21
  Rect(props: RectProps): import("./DrawingNode").JsiDrawingNode<RectProps, import("../..").SkRect>;
21
- RRect(props: RoundedRectProps): import("./DrawingNode").JsiDrawingNode<RoundedRectProps, import("../..").SkRRect>;
22
+ RRect(props: RoundedRectProps): import("./DrawingNode").JsiDrawingNode<RoundedRectProps, import("../..").SkRRect> | RRectNode;
22
23
  Vertices(props: VerticesProps): import("../types").RenderNode<VerticesProps>;
23
24
  Text(props: TextProps): import("../types").RenderNode<TextProps>;
24
25
  TextPath(props: TextPathProps): import("../types").RenderNode<TextPathProps>;
@@ -2,4 +2,4 @@ import type { Skia, SkRect, Vector } from "../../../skia/types";
2
2
  import type { RectDef, RRectDef } from "../../types";
3
3
  export declare const isEdge: (pos: Vector, b: SkRect) => boolean;
4
4
  export declare const processRect: (Skia: Skia, def: RectDef) => SkRect;
5
- export declare const processRRect: (Skia: Skia, def: RRectDef) => import("../../../skia/types").SkRRect;
5
+ export declare const processRRect: (Skia: Skia, def: RRectDef) => import("../../../skia/types").InputRRect;
@@ -1,10 +1,10 @@
1
- import type { SkRRect } from "../../../skia/types";
1
+ import type { InputRRect, SkRRect } from "../../../skia/types";
2
2
  import type { DrawingContext, RoundedRectProps } from "../../types";
3
3
  import { JsiDrawingNode } from "../DrawingNode";
4
4
  import type { NodeContext } from "../Node";
5
- export declare class RRectNode extends JsiDrawingNode<RoundedRectProps, SkRRect> {
5
+ export declare class RRectNode extends JsiDrawingNode<RoundedRectProps, InputRRect> {
6
6
  rect?: SkRRect;
7
7
  constructor(ctx: NodeContext, props: RoundedRectProps);
8
- protected deriveProps(): SkRRect;
8
+ protected deriveProps(): InputRRect;
9
9
  draw({ canvas, paint }: DrawingContext): void;
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { BlendMode, Color, InputMatrix, PaintStyle, SkPaint, SkPath, SkRect, SkRRect, StrokeCap, StrokeJoin, Transforms3d, Vector } from "../../skia/types";
2
+ import type { BlendMode, Color, InputMatrix, InputRRect, PaintStyle, SkPaint, SkPath, SkRect, SkRRect, StrokeCap, StrokeJoin, Transforms3d, Vector } from "../../skia/types";
3
3
  export type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;
4
4
  export type PathDef = string | SkPath;
5
5
  export type ClipDef = SkRRect | SkRect | PathDef;
@@ -21,7 +21,7 @@ export type RectDef = RectCtor | {
21
21
  rect: SkRect;
22
22
  };
23
23
  export type RRectDef = RRectCtor | {
24
- rect: SkRRect;
24
+ rect: InputRRect;
25
25
  };
26
26
  export interface PointCircleDef {
27
27
  c?: Vector;
@@ -1,3 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
+ import type { SkSurface } from "../skia";
2
3
  export * from "../renderer/components";
3
- export declare const draw: (element: ReactNode, width: number, height: number) => any;
4
+ export declare const makeOffscreenSurface: (width: number, height: number) => any;
5
+ export declare const drawOffscreen: (surface: SkSurface, element: ReactNode) => import("../skia").SkImage;
@@ -5,7 +5,7 @@ import type { SkPath } from "./Path";
5
5
  import type { SkImage, MipmapMode, FilterMode, ImageInfo } from "./Image";
6
6
  import type { SkSVG } from "./SVG";
7
7
  import type { SkColor } from "./Color";
8
- import type { SkRRect } from "./RRect";
8
+ import type { InputRRect } from "./RRect";
9
9
  import type { BlendMode } from "./Paint/BlendMode";
10
10
  import type { SkPoint, PointMode } from "./Point";
11
11
  import type { InputMatrix } from "./Matrix";
@@ -202,7 +202,7 @@ export interface SkCanvas {
202
202
  * @param rrect
203
203
  * @param paint
204
204
  */
205
- drawRRect(rrect: SkRRect, paint: SkPaint): void;
205
+ drawRRect(rrect: InputRRect, paint: SkPaint): void;
206
206
  /**
207
207
  * Draws RRect outer and inner using clip, Matrix, and Paint paint.
208
208
  * outer must contain inner or the drawing is undefined.
@@ -210,7 +210,7 @@ export interface SkCanvas {
210
210
  * @param inner
211
211
  * @param paint
212
212
  */
213
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;
213
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint): void;
214
214
  /**
215
215
  * Draws an oval bounded by the given rectangle using the current clip, current matrix,
216
216
  * and the provided paint.
@@ -367,7 +367,7 @@ export interface SkCanvas {
367
367
  * @param op
368
368
  * @param doAntiAlias
369
369
  */
370
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;
370
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean): void;
371
371
  /**
372
372
  * Replaces current matrix with m premultiplied with the existing matrix.
373
373
  * @param m
@@ -1,6 +1,6 @@
1
1
  import type { SkRect } from "../Rect";
2
2
  import type { SkPoint } from "../Point";
3
- import type { SkRRect } from "../RRect";
3
+ import type { InputRRect } from "../RRect";
4
4
  import type { StrokeJoin, StrokeCap } from "../Paint";
5
5
  import type { InputMatrix, SkMatrix } from "../Matrix";
6
6
  import type { SkJSIInstance } from "../JsiInstance";
@@ -347,7 +347,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
347
347
  * @param rrect
348
348
  * @param isCCW
349
349
  */
350
- addRRect(rrect: SkRRect, isCCW?: boolean): SkPath;
350
+ addRRect(rrect: InputRRect, isCCW?: boolean): SkPath;
351
351
  /** Appends src to SkPath, transformed by matrix. Transformed curves may have
352
352
  different verbs, SkPoint, and conic weights.
353
353
 
@@ -1,7 +1,16 @@
1
+ import type { SkPoint } from "./Point";
1
2
  import type { SkRect } from "./Rect";
2
3
  export interface SkRRect {
3
4
  readonly rect: SkRect;
4
5
  readonly rx: number;
5
6
  readonly ry: number;
6
7
  }
8
+ export interface NonUniformRRect {
9
+ readonly rect: SkRect;
10
+ readonly topLeft: SkPoint;
11
+ readonly topRight: SkPoint;
12
+ readonly bottomRight: SkPoint;
13
+ readonly bottomLeft: SkPoint;
14
+ }
15
+ export type InputRRect = SkRRect | NonUniformRRect;
7
16
  export declare const isRRect: (def: SkRect | SkRRect) => def is SkRRect;
@@ -1,5 +1,5 @@
1
1
  import type { Canvas, CanvasKit } from "canvaskit-wasm";
2
- import type { BlendMode, ClipOp, FilterMode, MipmapMode, PointMode, SaveLayerFlag, ImageInfo, SkCanvas, SkColor, SkFont, SkImage, SkImageFilter, SkMatrix, SkPaint, SkPath, SkPicture, SkPoint, SkRect, SkRRect, SkSVG, SkTextBlob, SkVertices } from "../types";
2
+ import type { BlendMode, ClipOp, FilterMode, MipmapMode, PointMode, SaveLayerFlag, ImageInfo, SkCanvas, SkColor, SkFont, SkImage, SkImageFilter, SkMatrix, SkPaint, SkPath, SkPicture, SkPoint, SkRect, InputRRect, SkSVG, SkTextBlob, SkVertices } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkCanvas extends HostObject<Canvas, "Canvas"> implements SkCanvas {
5
5
  constructor(CanvasKit: CanvasKit, ref: Canvas);
@@ -20,8 +20,8 @@ export declare class JsiSkCanvas extends HostObject<Canvas, "Canvas"> implements
20
20
  restoreToCount(saveCount: number): void;
21
21
  drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint): void;
22
22
  drawArc(oval: SkRect, startAngle: number, sweepAngle: number, useCenter: boolean, paint: SkPaint): void;
23
- drawRRect(rrect: SkRRect, paint: SkPaint): void;
24
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;
23
+ drawRRect(rrect: InputRRect, paint: SkPaint): void;
24
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint): void;
25
25
  drawOval(oval: SkRect, paint: SkPaint): void;
26
26
  drawPath(path: SkPath, paint: SkPaint): void;
27
27
  drawText(str: string, x: number, y: number, paint: SkPaint, font: SkFont): void;
@@ -39,7 +39,7 @@ export declare class JsiSkCanvas extends HostObject<Canvas, "Canvas"> implements
39
39
  clear(color: SkColor): void;
40
40
  clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean): void;
41
41
  clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean): void;
42
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;
42
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean): void;
43
43
  concat(m: SkMatrix | number[]): void;
44
44
  drawPicture(skp: SkPicture): void;
45
45
  readPixels(srcX: number, srcY: number, imageInfo: ImageInfo): Float32Array | Uint8Array | null;
@@ -1,5 +1,5 @@
1
1
  import type { CanvasKit, Path } from "canvaskit-wasm";
2
- import type { FillType, PathCommand, PathOp, SkMatrix, SkPath, SkPoint, SkRect, SkRRect, StrokeOpts } from "../types";
2
+ import type { FillType, PathCommand, PathOp, SkMatrix, SkPath, SkPoint, SkRect, InputRRect, StrokeOpts } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  import { JsiSkPoint } from "./JsiSkPoint";
5
5
  import { JsiSkRect } from "./JsiSkRect";
@@ -41,7 +41,7 @@ export declare class JsiSkPath extends HostObject<Path, "Path"> implements SkPat
41
41
  getFillType(): number;
42
42
  quadTo(x1: number, y1: number, x2: number, y2: number): this;
43
43
  addRect(rect: SkRect, isCCW?: boolean): this;
44
- addRRect(rrect: SkRRect, isCCW?: boolean): this;
44
+ addRRect(rrect: InputRRect, isCCW?: boolean): this;
45
45
  getPoint(index: number): JsiSkPoint;
46
46
  isEmpty(): boolean;
47
47
  isVolatile(): boolean;
@@ -1,10 +1,10 @@
1
1
  import type { CanvasKit, RRect } from "canvaskit-wasm";
2
- import type { SkRect, SkRRect } from "../types";
2
+ import type { InputRRect, SkRect, SkRRect } from "../types";
3
3
  import { BaseHostObject } from "./Host";
4
4
  import { JsiSkRect } from "./JsiSkRect";
5
5
  export declare class JsiSkRRect extends BaseHostObject<RRect, "RRect"> implements SkRRect {
6
6
  dispose: () => void;
7
- static fromValue(CanvasKit: CanvasKit, rect: SkRRect): Float32Array;
7
+ static fromValue(CanvasKit: CanvasKit, rect: InputRRect): Float32Array;
8
8
  constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number);
9
9
  get rx(): number;
10
10
  get ry(): number;
Binary file
Binary file
Binary file
Binary file
@@ -6,32 +6,32 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_arm64e_x86_64-simulator</string>
9
+ <string>ios-arm64_arm64e</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>libskottie.a</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
15
  <string>arm64e</string>
16
- <string>x86_64</string>
17
16
  </array>
18
17
  <key>SupportedPlatform</key>
19
18
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
19
  </dict>
23
20
  <dict>
24
21
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_arm64e</string>
22
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
26
23
  <key>LibraryPath</key>
27
24
  <string>libskottie.a</string>
28
25
  <key>SupportedArchitectures</key>
29
26
  <array>
30
27
  <string>arm64</string>
31
28
  <string>arm64e</string>
29
+ <string>x86_64</string>
32
30
  </array>
33
31
  <key>SupportedPlatform</key>
34
32
  <string>ios</string>
33
+ <key>SupportedPlatformVariant</key>
34
+ <string>simulator</string>
35
35
  </dict>
36
36
  </array>
37
37
  <key>CFBundlePackageType</key>
@@ -6,32 +6,32 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_arm64e_x86_64-simulator</string>
9
+ <string>ios-arm64_arm64e</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>libskshaper.a</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
15
  <string>arm64e</string>
16
- <string>x86_64</string>
17
16
  </array>
18
17
  <key>SupportedPlatform</key>
19
18
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
19
  </dict>
23
20
  <dict>
24
21
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_arm64e</string>
22
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
26
23
  <key>LibraryPath</key>
27
24
  <string>libskshaper.a</string>
28
25
  <key>SupportedArchitectures</key>
29
26
  <array>
30
27
  <string>arm64</string>
31
28
  <string>arm64e</string>
29
+ <string>x86_64</string>
32
30
  </array>
33
31
  <key>SupportedPlatform</key>
34
32
  <string>ios</string>
33
+ <key>SupportedPlatformVariant</key>
34
+ <string>simulator</string>
35
35
  </dict>
36
36
  </array>
37
37
  <key>CFBundlePackageType</key>
@@ -6,32 +6,32 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_arm64e_x86_64-simulator</string>
9
+ <string>ios-arm64_arm64e</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>libsvg.a</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
15
  <string>arm64e</string>
16
- <string>x86_64</string>
17
16
  </array>
18
17
  <key>SupportedPlatform</key>
19
18
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
19
  </dict>
23
20
  <dict>
24
21
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_arm64e</string>
22
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
26
23
  <key>LibraryPath</key>
27
24
  <string>libsvg.a</string>
28
25
  <key>SupportedArchitectures</key>
29
26
  <array>
30
27
  <string>arm64</string>
31
28
  <string>arm64e</string>
29
+ <string>x86_64</string>
32
30
  </array>
33
31
  <key>SupportedPlatform</key>
34
32
  <string>ios</string>
33
+ <key>SupportedPlatformVariant</key>
34
+ <string>simulator</string>
35
35
  </dict>
36
36
  </array>
37
37
  <key>CFBundlePackageType</key>
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "setup-skia-web": "./scripts/setup-canvaskit.js"
8
8
  },
9
9
  "title": "React Native Skia",
10
- "version": "0.1.230",
10
+ "version": "0.1.231",
11
11
  "description": "High-performance React Native Graphics using Skia",
12
12
  "main": "lib/module/index.js",
13
13
  "files": [
@@ -1,11 +1,11 @@
1
- import type { SkRRect } from "../../../skia/types";
1
+ import type { InputRRect, SkRRect } from "../../../skia/types";
2
2
  import type { DrawingContext, RoundedRectProps } from "../../types";
3
3
  import { NodeType } from "../../types";
4
4
  import { processRRect } from "../datatypes";
5
5
  import { JsiDrawingNode } from "../DrawingNode";
6
6
  import type { NodeContext } from "../Node";
7
7
 
8
- export class RRectNode extends JsiDrawingNode<RoundedRectProps, SkRRect> {
8
+ export class RRectNode extends JsiDrawingNode<RoundedRectProps, InputRRect> {
9
9
  rect?: SkRRect;
10
10
 
11
11
  constructor(ctx: NodeContext, props: RoundedRectProps) {
@@ -4,6 +4,7 @@ import type {
4
4
  BlendMode,
5
5
  Color,
6
6
  InputMatrix,
7
+ InputRRect,
7
8
  PaintStyle,
8
9
  SkPaint,
9
10
  SkPath,
@@ -48,7 +49,7 @@ export interface RRectCtor extends RectCtor {
48
49
  }
49
50
 
50
51
  export type RectDef = RectCtor | { rect: SkRect };
51
- export type RRectDef = RRectCtor | { rect: SkRRect };
52
+ export type RRectDef = RRectCtor | { rect: InputRRect };
52
53
 
53
54
  export interface PointCircleDef {
54
55
  c?: Vector;
@@ -6,13 +6,14 @@ import type { ReactNode } from "react";
6
6
  import { JsiSkApi } from "../skia/web";
7
7
  import { SkiaRoot } from "../renderer/Reconciler";
8
8
  import { JsiDrawingContext } from "../dom/types";
9
+ import type { SkSurface } from "../skia";
9
10
 
10
11
  export * from "../renderer/components";
11
12
 
12
13
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
14
  let Skia: any;
14
15
 
15
- export const draw = (element: ReactNode, width: number, height: number) => {
16
+ export const makeOffscreenSurface = (width: number, height: number) => {
16
17
  if (!Skia) {
17
18
  Skia = JsiSkApi(CanvasKit);
18
19
  }
@@ -20,12 +21,15 @@ export const draw = (element: ReactNode, width: number, height: number) => {
20
21
  if (surface === null) {
21
22
  throw new Error("Couldn't create surface!");
22
23
  }
24
+ return surface;
25
+ };
26
+
27
+ export const drawOffscreen = (surface: SkSurface, element: ReactNode) => {
23
28
  const root = new SkiaRoot(Skia);
24
29
  root.render(element);
25
30
  const canvas = surface.getCanvas();
26
31
  const ctx = new JsiDrawingContext(Skia, canvas);
27
32
  root.dom.render(ctx);
28
33
  surface.flush();
29
- const image = surface.makeImageSnapshot();
30
- return image;
34
+ return surface.makeImageSnapshot();
31
35
  };
@@ -5,7 +5,7 @@ import type { SkPath } from "./Path";
5
5
  import type { SkImage, MipmapMode, FilterMode, ImageInfo } from "./Image";
6
6
  import type { SkSVG } from "./SVG";
7
7
  import type { SkColor } from "./Color";
8
- import type { SkRRect } from "./RRect";
8
+ import type { InputRRect } from "./RRect";
9
9
  import type { BlendMode } from "./Paint/BlendMode";
10
10
  import type { SkPoint, PointMode } from "./Point";
11
11
  import type { InputMatrix } from "./Matrix";
@@ -278,7 +278,7 @@ export interface SkCanvas {
278
278
  * @param rrect
279
279
  * @param paint
280
280
  */
281
- drawRRect(rrect: SkRRect, paint: SkPaint): void;
281
+ drawRRect(rrect: InputRRect, paint: SkPaint): void;
282
282
 
283
283
  /**
284
284
  * Draws RRect outer and inner using clip, Matrix, and Paint paint.
@@ -287,7 +287,7 @@ export interface SkCanvas {
287
287
  * @param inner
288
288
  * @param paint
289
289
  */
290
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;
290
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint): void;
291
291
 
292
292
  /**
293
293
  * Draws an oval bounded by the given rectangle using the current clip, current matrix,
@@ -479,7 +479,7 @@ export interface SkCanvas {
479
479
  * @param op
480
480
  * @param doAntiAlias
481
481
  */
482
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;
482
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean): void;
483
483
 
484
484
  /**
485
485
  * Replaces current matrix with m premultiplied with the existing matrix.
@@ -1,6 +1,6 @@
1
1
  import type { SkRect } from "../Rect";
2
2
  import type { SkPoint } from "../Point";
3
- import type { SkRRect } from "../RRect";
3
+ import type { InputRRect } from "../RRect";
4
4
  import type { StrokeJoin, StrokeCap } from "../Paint";
5
5
  import type { InputMatrix, SkMatrix } from "../Matrix";
6
6
  import type { SkJSIInstance } from "../JsiInstance";
@@ -439,7 +439,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
439
439
  * @param rrect
440
440
  * @param isCCW
441
441
  */
442
- addRRect(rrect: SkRRect, isCCW?: boolean): SkPath;
442
+ addRRect(rrect: InputRRect, isCCW?: boolean): SkPath;
443
443
 
444
444
  /** Appends src to SkPath, transformed by matrix. Transformed curves may have
445
445
  different verbs, SkPoint, and conic weights.
@@ -1,3 +1,4 @@
1
+ import type { SkPoint } from "./Point";
1
2
  import type { SkRect } from "./Rect";
2
3
 
3
4
  export interface SkRRect {
@@ -6,6 +7,16 @@ export interface SkRRect {
6
7
  readonly ry: number;
7
8
  }
8
9
 
10
+ export interface NonUniformRRect {
11
+ readonly rect: SkRect;
12
+ readonly topLeft: SkPoint;
13
+ readonly topRight: SkPoint;
14
+ readonly bottomRight: SkPoint;
15
+ readonly bottomLeft: SkPoint;
16
+ }
17
+
18
+ export type InputRRect = SkRRect | NonUniformRRect;
19
+
9
20
  // We have an issue to check property existence on JSI backed instances
10
21
  export const isRRect = (def: SkRect | SkRRect): def is SkRRect =>
11
22
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19,7 +19,7 @@ import type {
19
19
  SkPicture,
20
20
  SkPoint,
21
21
  SkRect,
22
- SkRRect,
22
+ InputRRect,
23
23
  SkSVG,
24
24
  SkTextBlob,
25
25
  SkVertices,
@@ -235,14 +235,14 @@ export class JsiSkCanvas
235
235
  );
236
236
  }
237
237
 
238
- drawRRect(rrect: SkRRect, paint: SkPaint) {
238
+ drawRRect(rrect: InputRRect, paint: SkPaint) {
239
239
  this.ref.drawRRect(
240
240
  JsiSkRRect.fromValue(this.CanvasKit, rrect),
241
241
  JsiSkPaint.fromValue(paint)
242
242
  );
243
243
  }
244
244
 
245
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint) {
245
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint) {
246
246
  this.ref.drawDRRect(
247
247
  JsiSkRRect.fromValue(this.CanvasKit, outer),
248
248
  JsiSkRRect.fromValue(this.CanvasKit, inner),
@@ -367,7 +367,7 @@ export class JsiSkCanvas
367
367
  );
368
368
  }
369
369
 
370
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean) {
370
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean) {
371
371
  this.ref.clipRRect(
372
372
  JsiSkRRect.fromValue(this.CanvasKit, rrect),
373
373
  getEnum(this.CanvasKit.PathOp, op),
@@ -9,7 +9,7 @@ import type {
9
9
  SkPath,
10
10
  SkPoint,
11
11
  SkRect,
12
- SkRRect,
12
+ InputRRect,
13
13
  StrokeOpts,
14
14
  } from "../types";
15
15
 
@@ -285,7 +285,7 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
285
285
  return this;
286
286
  }
287
287
 
288
- addRRect(rrect: SkRRect, isCCW?: boolean) {
288
+ addRRect(rrect: InputRRect, isCCW?: boolean) {
289
289
  this.ref.addRRect(JsiSkRRect.fromValue(this.CanvasKit, rrect), isCCW);
290
290
  return this;
291
291
  }
@@ -1,6 +1,6 @@
1
1
  import type { CanvasKit, RRect } from "canvaskit-wasm";
2
2
 
3
- import type { SkRect, SkRRect } from "../types";
3
+ import type { InputRRect, SkRect, SkRRect } from "../types";
4
4
 
5
5
  import { BaseHostObject } from "./Host";
6
6
  import { JsiSkRect } from "./JsiSkRect";
@@ -13,10 +13,31 @@ export class JsiSkRRect
13
13
  // Float32Array
14
14
  };
15
15
 
16
- static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {
16
+ static fromValue(CanvasKit: CanvasKit, rect: InputRRect) {
17
17
  if (rect instanceof JsiSkRect) {
18
18
  return rect.ref;
19
19
  }
20
+ if (
21
+ "topLeft" in rect &&
22
+ "topRight" in rect &&
23
+ "bottomRight" in rect &&
24
+ "bottomLeft" in rect
25
+ ) {
26
+ return Float32Array.of(
27
+ rect.rect.x,
28
+ rect.rect.y,
29
+ rect.rect.x + rect.rect.width,
30
+ rect.rect.y + rect.rect.height,
31
+ rect.topLeft.x,
32
+ rect.topLeft.y,
33
+ rect.topRight.x,
34
+ rect.topRight.y,
35
+ rect.bottomRight.x,
36
+ rect.bottomRight.y,
37
+ rect.bottomLeft.x,
38
+ rect.bottomLeft.y
39
+ );
40
+ }
20
41
  return CanvasKit.RRectXY(
21
42
  JsiSkRect.fromValue(CanvasKit, rect.rect),
22
43
  rect.rx,