@shopify/react-native-skia 0.1.236 → 0.1.237

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. package/cpp/api/JsiSkApi.h +2 -0
  2. package/cpp/api/JsiSkCanvas.h +36 -0
  3. package/cpp/api/JsiSkRSXform.h +35 -7
  4. package/cpp/rnskia/dom/JsiDomApi.h +2 -0
  5. package/cpp/rnskia/dom/nodes/JsiAtlasNode.h +60 -0
  6. package/cpp/rnskia/dom/props/RSXformProp.h +52 -0
  7. package/cpp/rnskia/dom/props/RectProp.h +31 -0
  8. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +2 -1
  9. package/lib/commonjs/dom/nodes/JsiSkDOM.js +4 -0
  10. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  11. package/lib/commonjs/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  12. package/lib/commonjs/dom/nodes/drawings/AtlasNode.js +47 -0
  13. package/lib/commonjs/dom/nodes/drawings/AtlasNode.js.map +1 -0
  14. package/lib/commonjs/dom/nodes/drawings/index.d.ts +1 -0
  15. package/lib/commonjs/dom/nodes/drawings/index.js +13 -0
  16. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  17. package/lib/commonjs/dom/types/Drawings.d.ts +7 -1
  18. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  19. package/lib/commonjs/dom/types/NodeType.d.ts +1 -0
  20. package/lib/commonjs/dom/types/NodeType.js +1 -0
  21. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  22. package/lib/commonjs/dom/types/SkDOM.d.ts +2 -1
  23. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  24. package/lib/commonjs/external/reanimated/buffers.d.ts +5 -0
  25. package/lib/commonjs/external/reanimated/buffers.js +48 -0
  26. package/lib/commonjs/external/reanimated/buffers.js.map +1 -0
  27. package/lib/commonjs/external/reanimated/index.d.ts +1 -0
  28. package/lib/commonjs/external/reanimated/index.js +13 -0
  29. package/lib/commonjs/external/reanimated/index.js.map +1 -1
  30. package/lib/commonjs/external/reanimated/textures.js +3 -17
  31. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  32. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +8 -1
  33. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  34. package/lib/commonjs/mock/index.js +5 -0
  35. package/lib/commonjs/mock/index.js.map +1 -1
  36. package/lib/commonjs/renderer/HostComponents.d.ts +3 -1
  37. package/lib/commonjs/renderer/HostComponents.js +3 -0
  38. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  39. package/lib/commonjs/renderer/Offscreen.d.ts +4 -2
  40. package/lib/commonjs/renderer/Offscreen.js +23 -18
  41. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  42. package/lib/commonjs/renderer/components/shapes/Atlas.d.ts +4 -0
  43. package/lib/commonjs/renderer/components/shapes/Atlas.js +17 -0
  44. package/lib/commonjs/renderer/components/shapes/Atlas.js.map +1 -0
  45. package/lib/commonjs/renderer/components/shapes/index.d.ts +1 -0
  46. package/lib/commonjs/renderer/components/shapes/index.js +13 -0
  47. package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
  48. package/lib/commonjs/skia/core/AnimatedImage.d.ts +1 -1
  49. package/lib/commonjs/skia/core/AnimatedImage.js +4 -1
  50. package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
  51. package/lib/commonjs/skia/core/Data.d.ts +1 -1
  52. package/lib/commonjs/skia/core/Data.js +11 -4
  53. package/lib/commonjs/skia/core/Data.js.map +1 -1
  54. package/lib/commonjs/skia/core/Rect.d.ts +2 -2
  55. package/lib/commonjs/skia/types/Canvas.d.ts +16 -1
  56. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  57. package/lib/commonjs/skia/types/Image/Image.d.ts +8 -0
  58. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  59. package/lib/commonjs/skia/types/RSXform.d.ts +7 -1
  60. package/lib/commonjs/skia/types/RSXform.js.map +1 -1
  61. package/lib/commonjs/skia/types/Rect.d.ts +4 -0
  62. package/lib/commonjs/skia/types/Rect.js.map +1 -1
  63. package/lib/commonjs/skia/types/Skia.d.ts +3 -2
  64. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  65. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +2 -1
  66. package/lib/commonjs/skia/web/JsiSkCanvas.js +19 -0
  67. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  68. package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +8 -2
  69. package/lib/commonjs/skia/web/JsiSkRSXform.js +33 -2
  70. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
  71. package/lib/commonjs/skia/web/JsiSkRect.d.ts +3 -2
  72. package/lib/commonjs/skia/web/JsiSkRect.js +7 -0
  73. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
  74. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +2 -1
  75. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  76. package/lib/commonjs/skia/web/JsiSkia.js +5 -0
  77. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  78. package/lib/module/dom/nodes/JsiSkDOM.d.ts +2 -1
  79. package/lib/module/dom/nodes/JsiSkDOM.js +5 -1
  80. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  81. package/lib/module/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  82. package/lib/module/dom/nodes/drawings/AtlasNode.js +34 -0
  83. package/lib/module/dom/nodes/drawings/AtlasNode.js.map +1 -0
  84. package/lib/module/dom/nodes/drawings/index.d.ts +1 -0
  85. package/lib/module/dom/nodes/drawings/index.js +1 -0
  86. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  87. package/lib/module/dom/types/Drawings.d.ts +7 -1
  88. package/lib/module/dom/types/Drawings.js.map +1 -1
  89. package/lib/module/dom/types/NodeType.d.ts +1 -0
  90. package/lib/module/dom/types/NodeType.js +1 -0
  91. package/lib/module/dom/types/NodeType.js.map +1 -1
  92. package/lib/module/dom/types/SkDOM.d.ts +2 -1
  93. package/lib/module/dom/types/SkDOM.js.map +1 -1
  94. package/lib/module/external/reanimated/buffers.d.ts +5 -0
  95. package/lib/module/external/reanimated/buffers.js +27 -0
  96. package/lib/module/external/reanimated/buffers.js.map +1 -0
  97. package/lib/module/external/reanimated/index.d.ts +1 -0
  98. package/lib/module/external/reanimated/index.js +1 -0
  99. package/lib/module/external/reanimated/index.js.map +1 -1
  100. package/lib/module/external/reanimated/textures.js +5 -16
  101. package/lib/module/external/reanimated/textures.js.map +1 -1
  102. package/lib/module/external/reanimated/useAnimatedImageValue.js +7 -1
  103. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  104. package/lib/module/mock/index.js +5 -0
  105. package/lib/module/mock/index.js.map +1 -1
  106. package/lib/module/renderer/HostComponents.d.ts +3 -1
  107. package/lib/module/renderer/HostComponents.js +3 -0
  108. package/lib/module/renderer/HostComponents.js.map +1 -1
  109. package/lib/module/renderer/Offscreen.d.ts +4 -2
  110. package/lib/module/renderer/Offscreen.js +15 -13
  111. package/lib/module/renderer/Offscreen.js.map +1 -1
  112. package/lib/module/renderer/components/shapes/Atlas.d.ts +4 -0
  113. package/lib/module/renderer/components/shapes/Atlas.js +5 -0
  114. package/lib/module/renderer/components/shapes/Atlas.js.map +1 -0
  115. package/lib/module/renderer/components/shapes/index.d.ts +1 -0
  116. package/lib/module/renderer/components/shapes/index.js +1 -0
  117. package/lib/module/renderer/components/shapes/index.js.map +1 -1
  118. package/lib/module/skia/core/AnimatedImage.d.ts +1 -1
  119. package/lib/module/skia/core/AnimatedImage.js +4 -1
  120. package/lib/module/skia/core/AnimatedImage.js.map +1 -1
  121. package/lib/module/skia/core/Data.d.ts +1 -1
  122. package/lib/module/skia/core/Data.js +11 -4
  123. package/lib/module/skia/core/Data.js.map +1 -1
  124. package/lib/module/skia/core/Rect.d.ts +2 -2
  125. package/lib/module/skia/types/Canvas.d.ts +16 -1
  126. package/lib/module/skia/types/Canvas.js.map +1 -1
  127. package/lib/module/skia/types/Image/Image.d.ts +8 -0
  128. package/lib/module/skia/types/Image/Image.js.map +1 -1
  129. package/lib/module/skia/types/RSXform.d.ts +7 -1
  130. package/lib/module/skia/types/RSXform.js.map +1 -1
  131. package/lib/module/skia/types/Rect.d.ts +4 -0
  132. package/lib/module/skia/types/Rect.js.map +1 -1
  133. package/lib/module/skia/types/Skia.d.ts +3 -2
  134. package/lib/module/skia/types/Skia.js.map +1 -1
  135. package/lib/module/skia/web/JsiSkCanvas.d.ts +2 -1
  136. package/lib/module/skia/web/JsiSkCanvas.js +18 -0
  137. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkRSXform.d.ts +8 -2
  139. package/lib/module/skia/web/JsiSkRSXform.js +34 -3
  140. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  141. package/lib/module/skia/web/JsiSkRect.d.ts +3 -2
  142. package/lib/module/skia/web/JsiSkRect.js +7 -0
  143. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  144. package/lib/module/skia/web/JsiSkTextBlobFactory.js +2 -1
  145. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
  146. package/lib/module/skia/web/JsiSkia.js +5 -0
  147. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  148. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +2 -1
  149. package/lib/typescript/src/dom/nodes/drawings/AtlasNode.d.ts +8 -0
  150. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +1 -0
  151. package/lib/typescript/src/dom/types/Drawings.d.ts +7 -1
  152. package/lib/typescript/src/dom/types/NodeType.d.ts +1 -0
  153. package/lib/typescript/src/dom/types/SkDOM.d.ts +2 -1
  154. package/lib/typescript/src/external/reanimated/buffers.d.ts +5 -0
  155. package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
  156. package/lib/typescript/src/renderer/HostComponents.d.ts +3 -1
  157. package/lib/typescript/src/renderer/Offscreen.d.ts +4 -2
  158. package/lib/typescript/src/renderer/components/shapes/Atlas.d.ts +4 -0
  159. package/lib/typescript/src/renderer/components/shapes/index.d.ts +1 -0
  160. package/lib/typescript/src/skia/core/AnimatedImage.d.ts +1 -1
  161. package/lib/typescript/src/skia/core/Data.d.ts +1 -1
  162. package/lib/typescript/src/skia/core/Rect.d.ts +2 -2
  163. package/lib/typescript/src/skia/types/Canvas.d.ts +16 -1
  164. package/lib/typescript/src/skia/types/Image/Image.d.ts +8 -0
  165. package/lib/typescript/src/skia/types/RSXform.d.ts +7 -1
  166. package/lib/typescript/src/skia/types/Rect.d.ts +4 -0
  167. package/lib/typescript/src/skia/types/Skia.d.ts +3 -2
  168. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +2 -1
  169. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -2
  170. package/lib/typescript/src/skia/web/JsiSkRect.d.ts +3 -2
  171. package/package.json +1 -1
  172. package/src/dom/nodes/JsiSkDOM.ts +8 -0
  173. package/src/dom/nodes/drawings/AtlasNode.ts +24 -0
  174. package/src/dom/nodes/drawings/index.ts +1 -0
  175. package/src/dom/types/Drawings.ts +9 -0
  176. package/src/dom/types/NodeType.ts +1 -0
  177. package/src/dom/types/SkDOM.ts +2 -0
  178. package/src/external/reanimated/buffers.ts +53 -0
  179. package/src/external/reanimated/index.ts +1 -0
  180. package/src/external/reanimated/textures.tsx +7 -19
  181. package/src/external/reanimated/useAnimatedImageValue.ts +15 -4
  182. package/src/mock/index.ts +5 -0
  183. package/src/renderer/HostComponents.ts +6 -1
  184. package/src/renderer/Offscreen.tsx +20 -16
  185. package/src/renderer/components/shapes/Atlas.tsx +8 -0
  186. package/src/renderer/components/shapes/index.ts +1 -0
  187. package/src/skia/core/AnimatedImage.ts +3 -2
  188. package/src/skia/core/Data.ts +8 -4
  189. package/src/skia/types/Canvas.ts +32 -1
  190. package/src/skia/types/Image/Image.ts +10 -0
  191. package/src/skia/types/RSXform.ts +7 -1
  192. package/src/skia/types/Rect.ts +6 -0
  193. package/src/skia/types/Skia.ts +10 -2
  194. package/src/skia/web/JsiSkCanvas.ts +60 -23
  195. package/src/skia/web/JsiSkRSXform.ts +28 -4
  196. package/src/skia/web/JsiSkRect.ts +12 -2
  197. package/src/skia/web/JsiSkTextBlobFactory.ts +5 -5
  198. package/src/skia/web/JsiSkia.ts +15 -0
@@ -69,6 +69,8 @@ public:
69
69
  installFunction("Font", JsiSkFont::createCtor(context));
70
70
  installFunction("Paint", JsiSkPaint::createCtor(context));
71
71
  installFunction("RSXform", JsiSkRSXform::createCtor(context));
72
+ installFunction("RSXformFromRadians",
73
+ JsiSkRSXform::createCtorFromRadians(context));
72
74
  installFunction("Matrix", JsiSkMatrix::createCtor(context));
73
75
  installFunction("XYWHRect", JsiSkRect::createCtor(context));
74
76
  installFunction("RRectXY", JsiSkRRect::createCtor(context));
@@ -14,6 +14,7 @@
14
14
  #include "JsiSkPicture.h"
15
15
  #include "JsiSkPoint.h"
16
16
  #include "JsiSkRRect.h"
17
+ #include "JsiSkRSXform.h"
17
18
  #include "JsiSkSVG.h"
18
19
  #include "JsiSkTextBlob.h"
19
20
  #include "JsiSkVertices.h"
@@ -495,6 +496,40 @@ public:
495
496
  return jsi::Value::undefined();
496
497
  }
497
498
 
499
+ JSI_HOST_FUNCTION(drawAtlas) {
500
+ auto atlas = JsiSkImage::fromValue(runtime, arguments[0]);
501
+ auto rects = arguments[1].asObject(runtime).asArray(runtime);
502
+ auto transforms = arguments[2].asObject(runtime).asArray(runtime);
503
+ auto paint = JsiSkPaint::fromValue(runtime, arguments[3]);
504
+ auto blendMode = count > 5 && !arguments[4].isUndefined()
505
+ ? static_cast<SkBlendMode>(arguments[4].asNumber())
506
+ : SkBlendMode::kSrcOver;
507
+
508
+ std::vector<SkRSXform> xforms;
509
+ int xformsSize = static_cast<int>(transforms.size(runtime));
510
+ xforms.reserve(xformsSize);
511
+ for (int i = 0; i < xformsSize; i++) {
512
+ auto xform = JsiSkRSXform::fromValue(
513
+ runtime, transforms.getValueAtIndex(runtime, i).asObject(runtime));
514
+ xforms.push_back(*xform.get());
515
+ }
516
+
517
+ std::vector<SkRect> skRects;
518
+ int rectsSize = static_cast<int>(rects.size(runtime));
519
+ skRects.reserve(rectsSize);
520
+ for (int i = 0; i < rectsSize; i++) {
521
+ auto rect = JsiSkRect::fromValue(
522
+ runtime, rects.getValueAtIndex(runtime, i).asObject(runtime));
523
+ skRects.push_back(*rect.get());
524
+ }
525
+ SkSamplingOptions sampling;
526
+ _canvas->drawAtlas(atlas.get(), xforms.data(), skRects.data(), nullptr,
527
+ skRects.size(), blendMode, sampling, nullptr,
528
+ paint.get());
529
+
530
+ return jsi::Value::undefined();
531
+ }
532
+
498
533
  JSI_HOST_FUNCTION(readPixels) {
499
534
  auto srcX = static_cast<int>(arguments[0].asNumber());
500
535
  auto srcY = static_cast<int>(arguments[1].asNumber());
@@ -567,6 +602,7 @@ public:
567
602
  JSI_EXPORT_FUNC(JsiSkCanvas, clear),
568
603
  JSI_EXPORT_FUNC(JsiSkCanvas, concat),
569
604
  JSI_EXPORT_FUNC(JsiSkCanvas, drawPicture),
605
+ JSI_EXPORT_FUNC(JsiSkCanvas, drawAtlas),
570
606
  JSI_EXPORT_FUNC(JsiSkCanvas, readPixels))
571
607
 
572
608
  explicit JsiSkCanvas(std::shared_ptr<RNSkPlatformContext> context)
@@ -40,13 +40,23 @@ public:
40
40
  return jsi::Value(SkScalarToDouble(getObject()->fTy));
41
41
  }
42
42
 
43
+ JSI_HOST_FUNCTION(set) {
44
+ auto scos = arguments[0].asNumber();
45
+ auto ssin = arguments[1].asNumber();
46
+ auto tx = arguments[2].asNumber();
47
+ auto ty = arguments[3].asNumber();
48
+ getObject()->set(scos, ssin, tx, ty);
49
+ return jsi::Value::undefined();
50
+ }
51
+
43
52
  JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkRSXform, __typename__),
44
53
  JSI_EXPORT_PROP_GET(JsiSkRSXform, scos),
45
54
  JSI_EXPORT_PROP_GET(JsiSkRSXform, ssin),
46
55
  JSI_EXPORT_PROP_GET(JsiSkRSXform, tx),
47
56
  JSI_EXPORT_PROP_GET(JsiSkRSXform, ty))
48
57
 
49
- JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRSXform, dispose))
58
+ JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRSXform, set),
59
+ JSI_EXPORT_FUNC(JsiSkRSXform, dispose))
50
60
 
51
61
  /**
52
62
  Returns the underlying object from a host object of this type
@@ -57,12 +67,10 @@ public:
57
67
  if (object.isHostObject(runtime)) {
58
68
  return object.asHostObject<JsiSkRSXform>(runtime)->getObject();
59
69
  } else {
60
- auto scos =
61
- object.getArray(runtime).getValueAtIndex(runtime, 0).asNumber();
62
- auto ssin =
63
- object.getArray(runtime).getValueAtIndex(runtime, 1).asNumber();
64
- auto tx = object.getArray(runtime).getValueAtIndex(runtime, 2).asNumber();
65
- auto ty = object.getArray(runtime).getValueAtIndex(runtime, 3).asNumber();
70
+ auto scos = object.getProperty(runtime, "scos").asNumber();
71
+ auto ssin = object.getProperty(runtime, "ssin").asNumber();
72
+ auto tx = object.getProperty(runtime, "tx").asNumber();
73
+ auto ty = object.getProperty(runtime, "ty").asNumber();
66
74
  return std::make_shared<SkRSXform>(SkRSXform::Make(scos, ssin, tx, ty));
67
75
  }
68
76
  }
@@ -77,6 +85,26 @@ public:
77
85
  runtime, std::make_shared<JsiSkRSXform>(std::move(context), rsxform));
78
86
  }
79
87
 
88
+ /**
89
+ * Creates the function for construction a new instance of the SkRSXform
90
+ * wrapper
91
+ * @param context platform context
92
+ * @return A function for creating a new host object wrapper for the SkRSXform
93
+ * class
94
+ */
95
+ static const jsi::HostFunctionType
96
+ createCtorFromRadians(std::shared_ptr<RNSkPlatformContext> context) {
97
+ return JSI_HOST_FUNCTION_LAMBDA {
98
+ auto rsxform = SkRSXform::MakeFromRadians(
99
+ arguments[0].asNumber(), arguments[1].asNumber(),
100
+ arguments[2].asNumber(), arguments[3].asNumber(),
101
+ arguments[4].asNumber(), arguments[5].asNumber());
102
+ // Return the newly constructed object
103
+ return jsi::Object::createFromHostObject(
104
+ runtime, std::make_shared<JsiSkRSXform>(std::move(context),
105
+ std::move(rsxform)));
106
+ };
107
+ }
80
108
  /**
81
109
  * Creates the function for construction a new instance of the SkRSXform
82
110
  * wrapper
@@ -8,6 +8,7 @@
8
8
 
9
9
  #include "JsiHostObject.h"
10
10
 
11
+ #include "nodes/JsiAtlasNode.h"
11
12
  #include "nodes/JsiCircleNode.h"
12
13
  #include "nodes/JsiDiffRectNode.h"
13
14
  #include "nodes/JsiFillNode.h"
@@ -66,6 +67,7 @@ public:
66
67
  installFunction("PatchNode", JsiPatchNode::createCtor(context));
67
68
  installFunction("PointsNode", JsiPointsNode::createCtor(context));
68
69
  installFunction("DiffRectNode", JsiDiffRectNode::createCtor(context));
70
+ installFunction("AtlasNode", JsiAtlasNode::createCtor(context));
69
71
 
70
72
  installFunction("FillNode", JsiFillNode::createCtor(context));
71
73
 
@@ -0,0 +1,60 @@
1
+ #pragma once
2
+
3
+ #include "JsiDomDrawingNode.h"
4
+ #include "RSXformProp.h"
5
+ #include "RectProp.h"
6
+ #include "SkImageProps.h"
7
+
8
+ #include <memory>
9
+ #include <tuple>
10
+
11
+ namespace RNSkia {
12
+
13
+ class JsiAtlasNode : public JsiDomDrawingNode,
14
+ public JsiDomNodeCtor<JsiAtlasNode> {
15
+ public:
16
+ explicit JsiAtlasNode(std::shared_ptr<RNSkPlatformContext> context)
17
+ : JsiDomDrawingNode(context, "skAtlas") {}
18
+
19
+ protected:
20
+ void draw(DrawingContext *context) override {
21
+ if (_rectsProp->isSet() && _imageProp->isSet() && _rsxFormsProp->isSet()) {
22
+ const auto image = _imageProp->getDerivedValue();
23
+ const auto sprites = _rectsProp->getDerivedValue();
24
+ const auto transforms = _rsxFormsProp->getDerivedValue();
25
+ const auto colors =
26
+ _colorsProp->isSet() ? _colorsProp->getDerivedValue() : nullptr;
27
+ const auto blendMode = _blendModeProp->isSet()
28
+ ? *_blendModeProp->getDerivedValue()
29
+ : SkBlendMode::kDstOver;
30
+ auto paint = *context->getPaint();
31
+ SkSamplingOptions sampling(SkFilterMode::kLinear, SkMipmapMode::kNone);
32
+ context->getCanvas()->drawAtlas(
33
+ image.get(), transforms->data(), sprites->data(),
34
+ colors == nullptr ? nullptr : colors->data(), sprites->size(),
35
+ blendMode, sampling, nullptr, &paint);
36
+ }
37
+ }
38
+
39
+ void defineProperties(NodePropsContainer *container) override {
40
+ JsiDomDrawingNode::defineProperties(container);
41
+ _rectsProp = container->defineProperty<RectsProp>("sprites");
42
+ _rsxFormsProp = container->defineProperty<RSXFormsProp>("transforms");
43
+ _imageProp = container->defineProperty<ImageProp>("image");
44
+ _colorsProp = container->defineProperty<ColorsProp>("colors");
45
+ _blendModeProp = container->defineProperty<BlendModeProp>("blendMode");
46
+
47
+ _rectsProp->require();
48
+ _rsxFormsProp->require();
49
+ _imageProp->require();
50
+ }
51
+
52
+ private:
53
+ ImageProp *_imageProp;
54
+ RectsProp *_rectsProp;
55
+ RSXFormsProp *_rsxFormsProp;
56
+ ColorsProp *_colorsProp;
57
+ BlendModeProp *_blendModeProp;
58
+ };
59
+
60
+ } // namespace RNSkia
@@ -0,0 +1,52 @@
1
+ #pragma once
2
+
3
+ #include "JsiSkRSXform.h"
4
+ #include "NodeProp.h"
5
+
6
+ #include <memory>
7
+ #include <utility>
8
+ #include <vector>
9
+
10
+ #pragma clang diagnostic push
11
+ #pragma clang diagnostic ignored "-Wdocumentation"
12
+
13
+ #include "SkRSXform.h"
14
+
15
+ #pragma clang diagnostic pop
16
+
17
+ namespace RNSkia {
18
+
19
+ // TODO: Factorize these array classes
20
+ class RSXFormsProp : public DerivedProp<std::vector<SkRSXform>> {
21
+ public:
22
+ explicit RSXFormsProp(PropId name,
23
+ const std::function<void(BaseNodeProp *)> &onChange)
24
+ : DerivedProp<std::vector<SkRSXform>>(onChange) {
25
+ _rsxFormsProp = defineProperty<NodeProp>(name);
26
+ }
27
+
28
+ void updateDerivedValue() override {
29
+ if (_rsxFormsProp->isSet()) {
30
+ auto rsxforms = _rsxFormsProp->value().getAsArray();
31
+ std::vector<SkRSXform> derivedRSXForms;
32
+ derivedRSXForms.reserve(rsxforms.size());
33
+
34
+ for (size_t i = 0; i < rsxforms.size(); ++i) {
35
+ auto val = rsxforms[i];
36
+ if (val.getType() == PropType::HostObject) {
37
+ auto rsx =
38
+ std::dynamic_pointer_cast<JsiSkRSXform>(val.getAsHostObject())
39
+ ->getObject();
40
+ derivedRSXForms.push_back(*rsx);
41
+ }
42
+ }
43
+ setDerivedValue(std::move(derivedRSXForms));
44
+ } else {
45
+ setDerivedValue(nullptr);
46
+ }
47
+ }
48
+
49
+ private:
50
+ NodeProp *_rsxFormsProp;
51
+ };
52
+ } // namespace RNSkia
@@ -1,9 +1,12 @@
1
1
  #pragma once
2
2
 
3
+ #include "JsiSkRSXform.h"
3
4
  #include "NodeProp.h"
4
5
  #include "PointProp.h"
5
6
 
6
7
  #include <memory>
8
+ #include <utility>
9
+ #include <vector>
7
10
 
8
11
  #pragma clang diagnostic push
9
12
  #pragma clang diagnostic ignored "-Wdocumentation"
@@ -130,4 +133,32 @@ private:
130
133
  RectProp *_rectProp;
131
134
  RectPropFromProps *_rectPropFromProps;
132
135
  };
136
+
137
+ class RectsProp : public DerivedProp<std::vector<SkRect>> {
138
+ public:
139
+ explicit RectsProp(PropId name,
140
+ const std::function<void(BaseNodeProp *)> &onChange)
141
+ : DerivedProp<std::vector<SkRect>>(onChange) {
142
+ _rectsProp = defineProperty<NodeProp>(name);
143
+ }
144
+
145
+ void updateDerivedValue() override {
146
+ if (_rectsProp->isSet()) {
147
+ auto rects = _rectsProp->value().getAsArray();
148
+ std::vector<SkRect> derivedRects;
149
+ derivedRects.reserve(rects.size());
150
+
151
+ for (size_t i = 0; i < rects.size(); ++i) {
152
+ derivedRects.push_back(*RectProp::processRect(rects[i]));
153
+ }
154
+ setDerivedValue(std::move(derivedRects));
155
+ } else {
156
+ setDerivedValue(nullptr);
157
+ }
158
+ }
159
+
160
+ private:
161
+ NodeProp *_rectsProp;
162
+ };
163
+
133
164
  } // namespace RNSkia
@@ -1,4 +1,4 @@
1
- import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, MatrixColorFilterProps, CircleProps, BlurMaskFilterProps, LinearGradientProps, PaintProps, ShaderProps, ImageShaderProps, LineProps, OvalProps, PatchProps, PointsProps, RectProps, RoundedRectProps, VerticesProps, TextProps, DiffRectProps, OffsetImageFilterProps, BlendColorFilterProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, FractalNoiseProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, DrawingNodeProps, BoxProps, BoxShadowProps, ChildrenProps } from "../types";
1
+ import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, MatrixColorFilterProps, CircleProps, BlurMaskFilterProps, LinearGradientProps, PaintProps, ShaderProps, ImageShaderProps, LineProps, OvalProps, PatchProps, PointsProps, RectProps, RoundedRectProps, VerticesProps, TextProps, DiffRectProps, OffsetImageFilterProps, BlendColorFilterProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, FractalNoiseProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, DrawingNodeProps, BoxProps, BoxShadowProps, ChildrenProps, AtlasProps } from "../types";
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";
@@ -28,6 +28,7 @@ export declare class JsiSkDOM implements SkDOM {
28
28
  Glyphs(props: GlyphsProps): import("../types").RenderNode<GlyphsProps>;
29
29
  DiffRect(props: DiffRectProps): import("../types").RenderNode<DiffRectProps>;
30
30
  Picture(props: PictureProps): import("../types").RenderNode<PictureProps>;
31
+ Atlas(props: AtlasProps): import("../types").RenderNode<AtlasProps>;
31
32
  ImageSVG(props: ImageSVGProps): import("../types").RenderNode<ImageSVGProps>;
32
33
  BlurMaskFilter(props: BlurMaskFilterProps): import("../types").DeclarationNode<BlurMaskFilterProps>;
33
34
  BlendImageFilter(props: BlendImageFilterProps): import("../types").DeclarationNode<BlendImageFilterProps>;
@@ -110,6 +110,10 @@ class JsiSkDOM {
110
110
  return this.native ? global.SkiaDomApi.PictureNode(props) : new _drawings.PictureNode(this.ctx, props);
111
111
  }
112
112
 
113
+ Atlas(props) {
114
+ return this.native ? global.SkiaDomApi.AtlasNode(props) : new _drawings.AtlasNode(this.ctx, props);
115
+ }
116
+
113
117
  ImageSVG(props) {
114
118
  return this.native ? global.SkiaDomApi.ImageSVGNode(props) : new _drawings.ImageSVGNode(this.ctx, props);
115
119
  } // BlurMaskFilters
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkDOM","constructor","ctx","native","Layer","props","global","SkiaDomApi","LayerNode","Group","GroupNode","Paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorShaderNode","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode","Paragraph","ParagraphNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\nimport type { ParagraphProps } from \"../types/Paragraph\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\nimport { ParagraphNode } from \"./drawings/ParagraphNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext, private native: boolean) {}\n\n Layer(props?: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return this.native\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return this.native\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return this.native\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return this.native\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return this.native\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return this.native\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return this.native\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return this.native\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return this.native\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return this.native\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return this.native\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return this.native\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return this.native\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return this.native\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return this.native\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return this.native\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return this.native\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return this.native\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return this.native\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return this.native\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return this.native\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return this.native\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return this.native\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return this.native\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return this.native\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return this.native\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return this.native\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return this.native\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return this.native\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return this.native\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return this.native\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return this.native\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return this.native\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return this.native\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n\n // Paragraph\n Paragraph(props: ParagraphProps) {\n return this.native\n ? global.SkiaDomApi.ParagraphNode(props)\n : new ParagraphNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA2DA;;AAuBA;;AAiBA;;AAQA;;AAWA;;AACA;;AACA;;AAEA;;AACA;;AAEO,MAAMA,QAAN,CAAgC;EACrCC,WAAW,CAASC,GAAT,EAAmCC,MAAnC,EAAoD;IAAA,KAA3CD,GAA2C,GAA3CA,GAA2C;IAAA,KAAjBC,MAAiB,GAAjBA,MAAiB;EAAE;;EAEjEC,KAAK,CAACC,KAAD,EAAwB;IAC3B,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkBC,SAAlB,CAA4BH,KAAK,IAAI,EAArC,CADG,GAEH,IAAIG,oBAAJ,CAAc,KAAKN,GAAnB,EAAwBG,KAAK,IAAI,EAAjC,CAFJ;EAGD;;EAEDI,KAAK,CAACJ,KAAD,EAAqB;IACxB,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkB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paint","PaintNode","Fill","FillNode","Image","ImageNode","Circle","CircleNode","Path","PathNode","Line","LineNode","Oval","OvalNode","Patch","PatchNode","Points","PointsNode","Rect","RectNode","RRect","RRectNode","Vertices","VerticesNode","Text","TextNode","TextPath","TextPathNode","TextBlob","TextBlobNode","Glyphs","GlyphsNode","DiffRect","DiffRectNode","Picture","PictureNode","Atlas","AtlasNode","ImageSVG","ImageSVGNode","BlurMaskFilter","BlurMaskFilterNode","BlendImageFilter","BlendImageFilterNode","DropShadowImageFilter","DropShadowImageFilterNode","DisplacementMapImageFilter","DisplacementMapImageFilterNode","BlurImageFilter","BlurImageFilterNode","OffsetImageFilter","OffsetImageFilterNode","MorphologyImageFilter","MorphologyImageFilterNode","RuntimeShaderImageFilter","RuntimeShaderImageFilterNode","MatrixColorFilter","MatrixColorFilterNode","BlendColorFilter","BlendColorFilterNode","LumaColorFilter","LumaColorFilterNode","LinearToSRGBGammaColorFilter","LinearToSRGBGammaColorFilterNode","SRGBToLinearGammaColorFilter","SRGBToLinearGammaColorFilterNode","LerpColorFilter","LerpColorFilterNode","Shader","ShaderNode","ImageShader","ImageShaderNode","ColorShader","ColorShaderNode","ColorNode","SweepGradient","SweepGradientNode","Turbulence","TurbulenceNode","FractalNoise","FractalNoiseNode","LinearGradient","LinearGradientNode","RadialGradient","RadialGradientNode","TwoPointConicalGradient","TwoPointConicalGradientNode","CornerPathEffect","CornerPathEffectNode","DiscretePathEffect","DiscretePathEffectNode","DashPathEffect","DashPathEffectNode","Path1DPathEffect","Path1DPathEffectNode","Path2DPathEffect","Path2DPathEffectNode","SumPathEffect","SumPathEffectNode","Line2DPathEffect","Line2DPathEffectNode","Blend","BlendNode","BackdropFilter","BackdropFilterNode","Box","BoxNode","BoxShadow","BoxShadowNode","Paragraph","ParagraphNode"],"sources":["JsiSkDOM.ts"],"sourcesContent":["import type {\n PathProps,\n SkDOM,\n GroupProps,\n ImageProps,\n BlurImageFilterProps,\n MatrixColorFilterProps,\n CircleProps,\n BlurMaskFilterProps,\n LinearGradientProps,\n PaintProps,\n ShaderProps,\n ImageShaderProps,\n LineProps,\n OvalProps,\n PatchProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n VerticesProps,\n TextProps,\n DiffRectProps,\n OffsetImageFilterProps,\n BlendColorFilterProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n FractalNoiseProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n DrawingNodeProps,\n BoxProps,\n BoxShadowProps,\n ChildrenProps,\n AtlasProps,\n} from \"../types\";\nimport type {\n BlendImageFilterProps,\n BlendProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n MorphologyImageFilterProps,\n RuntimeShaderImageFilterProps,\n} from \"../types/ImageFilters\";\nimport type {\n CornerPathEffectProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n} from \"../types/PathEffects\";\nimport type { ParagraphProps } from \"../types/Paragraph\";\n\nimport {\n FillNode,\n ImageNode,\n CircleNode,\n PathNode,\n LineNode,\n PatchNode,\n PointsNode,\n RectNode,\n RRectNode,\n VerticesNode,\n TextNode,\n OvalNode,\n TextPathNode,\n TextBlobNode,\n GlyphsNode,\n DiffRectNode,\n PictureNode,\n ImageSVGNode,\n BackdropFilterNode,\n BoxNode,\n BoxShadowNode,\n AtlasNode,\n} from \"./drawings\";\nimport {\n BlendImageFilterNode,\n BlurImageFilterNode,\n BlurMaskFilterNode,\n DisplacementMapImageFilterNode,\n DropShadowImageFilterNode,\n OffsetImageFilterNode,\n RuntimeShaderImageFilterNode,\n CornerPathEffectNode,\n DiscretePathEffectNode,\n DashPathEffectNode,\n Path1DPathEffectNode,\n Path2DPathEffectNode,\n SumPathEffectNode,\n Line2DPathEffectNode,\n BlendNode,\n} from \"./paint\";\nimport {\n MatrixColorFilterNode,\n LumaColorFilterNode,\n LinearToSRGBGammaColorFilterNode,\n SRGBToLinearGammaColorFilterNode,\n BlendColorFilterNode,\n LerpColorFilterNode,\n} from \"./paint/ColorFilters\";\nimport {\n LinearGradientNode,\n ShaderNode,\n ImageShaderNode,\n TwoPointConicalGradientNode,\n TurbulenceNode,\n SweepGradientNode,\n RadialGradientNode,\n FractalNoiseNode,\n ColorNode,\n} from \"./paint/Shaders\";\nimport { MorphologyImageFilterNode } from \"./paint/ImageFilters\";\nimport { GroupNode } from \"./GroupNode\";\nimport { PaintNode } from \"./PaintNode\";\nimport type { NodeContext } from \"./Node\";\nimport { LayerNode } from \"./LayerNode\";\nimport { ParagraphNode } from \"./drawings/ParagraphNode\";\n\nexport class JsiSkDOM implements SkDOM {\n constructor(private ctx: NodeContext, private native: boolean) {}\n\n Layer(props?: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.LayerNode(props ?? {})\n : new LayerNode(this.ctx, props ?? {});\n }\n\n Group(props?: GroupProps) {\n return this.native\n ? global.SkiaDomApi.GroupNode(props ?? {})\n : new GroupNode(this.ctx, props ?? {});\n }\n\n Paint(props: PaintProps) {\n return this.native\n ? global.SkiaDomApi.PaintNode(props ?? {})\n : new PaintNode(this.ctx, props);\n }\n\n // Drawings\n Fill(props?: DrawingNodeProps) {\n return this.native\n ? global.SkiaDomApi.FillNode(props ?? {})\n : new FillNode(this.ctx, props);\n }\n\n Image(props: ImageProps) {\n return this.native\n ? global.SkiaDomApi.ImageNode(props ?? {})\n : new ImageNode(this.ctx, props);\n }\n\n Circle(props: CircleProps) {\n return this.native\n ? global.SkiaDomApi.CircleNode(props ?? {})\n : new CircleNode(this.ctx, props);\n }\n\n Path(props: PathProps) {\n return this.native\n ? global.SkiaDomApi.PathNode(props ?? {})\n : new PathNode(this.ctx, props);\n }\n\n Line(props: LineProps) {\n return this.native\n ? global.SkiaDomApi.LineNode(props ?? {})\n : new LineNode(this.ctx, props);\n }\n\n Oval(props: OvalProps) {\n return this.native\n ? global.SkiaDomApi.OvalNode(props ?? {})\n : new OvalNode(this.ctx, props);\n }\n\n Patch(props: PatchProps) {\n return this.native\n ? global.SkiaDomApi.PatchNode(props ?? {})\n : new PatchNode(this.ctx, props);\n }\n\n Points(props: PointsProps) {\n return this.native\n ? global.SkiaDomApi.PointsNode(props ?? {})\n : new PointsNode(this.ctx, props);\n }\n\n Rect(props: RectProps) {\n return this.native\n ? global.SkiaDomApi.RectNode(props)\n : new RectNode(this.ctx, props);\n }\n\n RRect(props: RoundedRectProps) {\n return this.native\n ? global.SkiaDomApi.RRectNode(props)\n : new RRectNode(this.ctx, props);\n }\n\n Vertices(props: VerticesProps) {\n return this.native\n ? global.SkiaDomApi.VerticesNode(props)\n : new VerticesNode(this.ctx, props);\n }\n\n Text(props: TextProps) {\n return this.native\n ? global.SkiaDomApi.TextNode(props)\n : new TextNode(this.ctx, props);\n }\n\n TextPath(props: TextPathProps) {\n return this.native\n ? global.SkiaDomApi.TextPathNode(props)\n : new TextPathNode(this.ctx, props);\n }\n\n TextBlob(props: TextBlobProps) {\n return this.native\n ? global.SkiaDomApi.TextBlobNode(props)\n : new TextBlobNode(this.ctx, props);\n }\n\n Glyphs(props: GlyphsProps) {\n return this.native\n ? global.SkiaDomApi.GlyphsNode(props)\n : new GlyphsNode(this.ctx, props);\n }\n\n DiffRect(props: DiffRectProps) {\n return this.native\n ? global.SkiaDomApi.DiffRectNode(props)\n : new DiffRectNode(this.ctx, props);\n }\n\n Picture(props: PictureProps) {\n return this.native\n ? global.SkiaDomApi.PictureNode(props)\n : new PictureNode(this.ctx, props);\n }\n\n Atlas(props: AtlasProps) {\n return this.native\n ? global.SkiaDomApi.AtlasNode(props)\n : new AtlasNode(this.ctx, props);\n }\n\n ImageSVG(props: ImageSVGProps) {\n return this.native\n ? global.SkiaDomApi.ImageSVGNode(props)\n : new ImageSVGNode(this.ctx, props);\n }\n\n // BlurMaskFilters\n BlurMaskFilter(props: BlurMaskFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurMaskFilterNode(props)\n : new BlurMaskFilterNode(this.ctx, props);\n }\n\n // ImageFilters\n BlendImageFilter(props: BlendImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendImageFilterNode(props)\n : new BlendImageFilterNode(this.ctx, props);\n }\n\n DropShadowImageFilter(props: DropShadowImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DropShadowImageFilterNode(props)\n : new DropShadowImageFilterNode(this.ctx, props);\n }\n\n DisplacementMapImageFilter(props: DisplacementMapImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.DisplacementMapImageFilterNode(props)\n : new DisplacementMapImageFilterNode(this.ctx, props);\n }\n\n BlurImageFilter(props: BlurImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlurImageFilterNode(props)\n : new BlurImageFilterNode(this.ctx, props);\n }\n\n OffsetImageFilter(props: OffsetImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.OffsetImageFilterNode(props)\n : new OffsetImageFilterNode(this.ctx, props);\n }\n\n MorphologyImageFilter(props: MorphologyImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.MorphologyImageFilterNode(props)\n : new MorphologyImageFilterNode(this.ctx, props);\n }\n\n RuntimeShaderImageFilter(props: RuntimeShaderImageFilterProps) {\n return this.native\n ? global.SkiaDomApi.RuntimeShaderImageFilterNode(props)\n : new RuntimeShaderImageFilterNode(this.ctx, props);\n }\n\n // Color Filters\n MatrixColorFilter(props: MatrixColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.MatrixColorFilterNode(props)\n : new MatrixColorFilterNode(this.ctx, props);\n }\n\n BlendColorFilter(props: BlendColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.BlendColorFilterNode(props)\n : new BlendColorFilterNode(this.ctx, props);\n }\n\n LumaColorFilter() {\n return this.native\n ? global.SkiaDomApi.LumaColorFilterNode()\n : new LumaColorFilterNode(this.ctx);\n }\n\n LinearToSRGBGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.LinearToSRGBGammaColorFilterNode\n ? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()\n : new LinearToSRGBGammaColorFilterNode(this.ctx);\n }\n\n SRGBToLinearGammaColorFilter() {\n return global.SkiaDomApi &&\n global.SkiaDomApi.SRGBToLinearGammaColorFilterNode\n ? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()\n : new SRGBToLinearGammaColorFilterNode(this.ctx);\n }\n\n LerpColorFilter(props: LerpColorFilterProps) {\n return this.native\n ? global.SkiaDomApi.LerpColorFilterNode(props)\n : new LerpColorFilterNode(this.ctx, props);\n }\n\n // Shaders\n Shader(props: ShaderProps) {\n return this.native\n ? global.SkiaDomApi.ShaderNode(props)\n : new ShaderNode(this.ctx, props);\n }\n\n ImageShader(props: ImageShaderProps) {\n return this.native\n ? global.SkiaDomApi.ImageShaderNode(props)\n : new ImageShaderNode(this.ctx, props);\n }\n\n ColorShader(props: ColorProps) {\n return this.native\n ? global.SkiaDomApi.ColorShaderNode(props)\n : new ColorNode(this.ctx, props);\n }\n\n SweepGradient(props: SweepGradientProps) {\n return this.native\n ? global.SkiaDomApi.SweepGradientNode(props)\n : new SweepGradientNode(this.ctx, props);\n }\n\n Turbulence(props: TurbulenceProps) {\n return this.native\n ? global.SkiaDomApi.TurbulenceNode(props)\n : new TurbulenceNode(this.ctx, props);\n }\n\n FractalNoise(props: FractalNoiseProps) {\n return this.native\n ? global.SkiaDomApi.FractalNoiseNode(props)\n : new FractalNoiseNode(this.ctx, props);\n }\n\n LinearGradient(props: LinearGradientProps) {\n return this.native\n ? global.SkiaDomApi.LinearGradientNode(props)\n : new LinearGradientNode(this.ctx, props);\n }\n\n RadialGradient(props: RadialGradientProps) {\n return this.native\n ? global.SkiaDomApi.RadialGradientNode(props)\n : new RadialGradientNode(this.ctx, props);\n }\n\n TwoPointConicalGradient(props: TwoPointConicalGradientProps) {\n return this.native\n ? global.SkiaDomApi.TwoPointConicalGradientNode(props)\n : new TwoPointConicalGradientNode(this.ctx, props);\n }\n\n // Path Effects\n CornerPathEffect(props: CornerPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.CornerPathEffectNode(props)\n : new CornerPathEffectNode(this.ctx, props);\n }\n\n DiscretePathEffect(props: DiscretePathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DiscretePathEffectNode(props)\n : new DiscretePathEffectNode(this.ctx, props);\n }\n\n DashPathEffect(props: DashPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.DashPathEffectNode(props)\n : new DashPathEffectNode(this.ctx, props);\n }\n\n Path1DPathEffect(props: Path1DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path1DPathEffectNode(props)\n : new Path1DPathEffectNode(this.ctx, props);\n }\n\n Path2DPathEffect(props: Path2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Path2DPathEffectNode(props)\n : new Path2DPathEffectNode(this.ctx, props);\n }\n\n SumPathEffect() {\n return this.native\n ? global.SkiaDomApi.SumPathEffectNode()\n : new SumPathEffectNode(this.ctx);\n }\n\n Line2DPathEffect(props: Line2DPathEffectProps) {\n return this.native\n ? global.SkiaDomApi.Line2DPathEffectNode(props)\n : new Line2DPathEffectNode(this.ctx, props);\n }\n\n Blend(props: BlendProps) {\n return this.native\n ? global.SkiaDomApi.BlendNode(props)\n : new BlendNode(this.ctx, props);\n }\n\n BackdropFilter(props: ChildrenProps) {\n return this.native\n ? global.SkiaDomApi.BackdropFilterNode(props)\n : new BackdropFilterNode(this.ctx, props);\n }\n\n Box(props: BoxProps) {\n return this.native\n ? global.SkiaDomApi.BoxNode(props)\n : new BoxNode(this.ctx, props);\n }\n\n BoxShadow(props: BoxShadowProps) {\n return this.native\n ? global.SkiaDomApi.BoxShadowNode(props)\n : new BoxShadowNode(this.ctx, props);\n }\n\n // Paragraph\n Paragraph(props: ParagraphProps) {\n return this.native\n ? global.SkiaDomApi.ParagraphNode(props)\n : new ParagraphNode(this.ctx, props);\n }\n}\n"],"mappings":";;;;;;;AA4DA;;AAwB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;EAGD;;EAED+G,GAAG,CAAC/G,KAAD,EAAkB;IACnB,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkB8G,OAAlB,CAA0BhH,KAA1B,CADG,GAEH,IAAIgH,iBAAJ,CAAY,KAAKnH,GAAjB,EAAsBG,KAAtB,CAFJ;EAGD;;EAEDiH,SAAS,CAACjH,KAAD,EAAwB;IAC/B,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkBgH,aAAlB,CAAgClH,KAAhC,CADG,GAEH,IAAIkH,uBAAJ,CAAkB,KAAKrH,GAAvB,EAA4BG,KAA5B,CAFJ;EAGD,CAzVoC,CA2VrC;;;EACAmH,SAAS,CAACnH,KAAD,EAAwB;IAC/B,OAAO,KAAKF,MAAL,GACHG,MAAM,CAACC,UAAP,CAAkBkH,aAAlB,CAAgCpH,KAAhC,CADG,GAEH,IAAIoH,4BAAJ,CAAkB,KAAKvH,GAAvB,EAA4BG,KAA5B,CAFJ;EAGD;;AAhWoC"}
@@ -0,0 +1,8 @@
1
+ import type { AtlasProps, DrawingContext } from "../../types";
2
+ import { JsiDrawingNode } from "../DrawingNode";
3
+ import type { NodeContext } from "../Node";
4
+ export declare class AtlasNode extends JsiDrawingNode<AtlasProps, null> {
5
+ protected deriveProps(): null;
6
+ constructor(ctx: NodeContext, props: AtlasProps);
7
+ draw({ canvas, paint }: DrawingContext): void;
8
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AtlasNode = void 0;
7
+
8
+ var _types = require("../../../skia/types");
9
+
10
+ var _types2 = require("../../types");
11
+
12
+ var _DrawingNode = require("../DrawingNode");
13
+
14
+ var _datatypes = require("../datatypes");
15
+
16
+ class AtlasNode extends _DrawingNode.JsiDrawingNode {
17
+ deriveProps() {
18
+ return null;
19
+ }
20
+
21
+ constructor(ctx, props) {
22
+ super(ctx, _types2.NodeType.Atlas, props);
23
+ }
24
+
25
+ draw(_ref) {
26
+ let {
27
+ canvas,
28
+ paint
29
+ } = _ref;
30
+ const {
31
+ image,
32
+ sprites,
33
+ transforms,
34
+ colors,
35
+ blendMode
36
+ } = this.props;
37
+ const blend = blendMode ? _types.BlendMode[(0, _datatypes.enumKey)(blendMode)] : undefined;
38
+
39
+ if (image) {
40
+ canvas.drawAtlas(image, sprites, transforms, paint, blend, colors);
41
+ }
42
+ }
43
+
44
+ }
45
+
46
+ exports.AtlasNode = AtlasNode;
47
+ //# sourceMappingURL=AtlasNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AtlasNode","JsiDrawingNode","deriveProps","constructor","ctx","props","NodeType","Atlas","draw","canvas","paint","image","sprites","transforms","colors","blendMode","blend","BlendMode","enumKey","undefined","drawAtlas"],"sources":["AtlasNode.ts"],"sourcesContent":["import { BlendMode } from \"../../../skia/types\";\nimport type { AtlasProps, DrawingContext } from \"../../types\";\nimport { NodeType } from \"../../types\";\nimport { JsiDrawingNode } from \"../DrawingNode\";\nimport type { NodeContext } from \"../Node\";\nimport { enumKey } from \"../datatypes\";\n\nexport class AtlasNode extends JsiDrawingNode<AtlasProps, null> {\n protected deriveProps() {\n return null;\n }\n\n constructor(ctx: NodeContext, props: AtlasProps) {\n super(ctx, NodeType.Atlas, props);\n }\n\n draw({ canvas, paint }: DrawingContext) {\n const { image, sprites, transforms, colors, blendMode } = this.props;\n const blend = blendMode ? BlendMode[enumKey(blendMode)] : undefined;\n if (image) {\n canvas.drawAtlas(image, sprites, transforms, paint, blend, colors);\n }\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AAEO,MAAMA,SAAN,SAAwBC,2BAAxB,CAAyD;EACpDC,WAAW,GAAG;IACtB,OAAO,IAAP;EACD;;EAEDC,WAAW,CAACC,GAAD,EAAmBC,KAAnB,EAAsC;IAC/C,MAAMD,GAAN,EAAWE,gBAAA,CAASC,KAApB,EAA2BF,KAA3B;EACD;;EAEDG,IAAI,OAAoC;IAAA,IAAnC;MAAEC,MAAF;MAAUC;IAAV,CAAmC;IACtC,MAAM;MAAEC,KAAF;MAASC,OAAT;MAAkBC,UAAlB;MAA8BC,MAA9B;MAAsCC;IAAtC,IAAoD,KAAKV,KAA/D;IACA,MAAMW,KAAK,GAAGD,SAAS,GAAGE,gBAAA,CAAU,IAAAC,kBAAA,EAAQH,SAAR,CAAV,CAAH,GAAmCI,SAA1D;;IACA,IAAIR,KAAJ,EAAW;MACTF,MAAM,CAACW,SAAP,CAAiBT,KAAjB,EAAwBC,OAAxB,EAAiCC,UAAjC,EAA6CH,KAA7C,EAAoDM,KAApD,EAA2DF,MAA3D;IACD;EACF;;AAf6D"}
@@ -1,3 +1,4 @@
1
+ export * from "./AtlasNode";
1
2
  export * from "./CircleNode";
2
3
  export * from "./FillNode";
3
4
  export * from "./ImageNode";
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
+ var _AtlasNode = require("./AtlasNode");
8
+
9
+ Object.keys(_AtlasNode).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _AtlasNode[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _AtlasNode[key];
16
+ }
17
+ });
18
+ });
19
+
7
20
  var _CircleNode = require("./CircleNode");
8
21
 
9
22
  Object.keys(_CircleNode).forEach(function (key) {
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./CircleNode\";\nexport * from \"./FillNode\";\nexport * from \"./ImageNode\";\nexport * from \"./PointsNode\";\nexport * from \"./PathNode\";\nexport * from \"./RectNode\";\nexport * from \"./RRectNode\";\nexport * from \"./OvalNode\";\nexport * from \"./LineNode\";\nexport * from \"./PatchNode\";\nexport * from \"./VerticesNode\";\nexport * from \"./Text\";\nexport * from \"./PictureNode\";\nexport * from \"./DiffRectNode\";\nexport * from \"./Image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ources":["index.ts"],"sourcesContent":["export * from \"./AtlasNode\";\nexport * from \"./CircleNode\";\nexport * from \"./FillNode\";\nexport * from \"./ImageNode\";\nexport * from \"./PointsNode\";\nexport * from \"./PathNode\";\nexport * from \"./RectNode\";\nexport * from \"./RRectNode\";\nexport * from \"./OvalNode\";\nexport * from \"./LineNode\";\nexport * from \"./PatchNode\";\nexport * from \"./VerticesNode\";\nexport * from \"./Text\";\nexport * from \"./PictureNode\";\nexport * from \"./DiffRectNode\";\nexport * from \"./ImageSVG\";\nexport * from \"./BackdropFilterNode\";\nexport * from \"./Box\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import type { FillType, SkImage, StrokeOpts, Vector, Color, SkPoint, BlendMode, PointMode, VertexMode, SkFont, SkRRect, SkTextBlob, SkPicture, SkSVG, SkPaint, SkRect } from "../../skia/types";
1
+ import type { FillType, SkImage, StrokeOpts, Vector, Color, SkPoint, BlendMode, PointMode, VertexMode, SkFont, SkRRect, SkTextBlob, SkPicture, SkSVG, SkPaint, SkRect, SkRSXform, SkColor } from "../../skia/types";
2
2
  import type { CircleDef, Fit, GroupProps, PathDef, RectDef, RRectDef, SkEnum } from "./Common";
3
3
  export interface DrawingNodeProps extends GroupProps {
4
4
  paint?: SkPaint;
@@ -22,6 +22,12 @@ export interface LineProps extends DrawingNodeProps {
22
22
  export type OvalProps = RectDef & DrawingNodeProps;
23
23
  export type RectProps = RectDef & DrawingNodeProps;
24
24
  export type RoundedRectProps = RRectDef & DrawingNodeProps;
25
+ export interface AtlasProps extends DrawingNodeProps {
26
+ image: SkImage | null;
27
+ sprites: SkRect[];
28
+ transforms: SkRSXform[];
29
+ colors?: SkColor[];
30
+ }
25
31
  export interface CubicBezierHandle {
26
32
  pos: Vector;
27
33
  c1: Vector;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit?: Fit;\n image: SkImage | null;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport interface ImageSVGProps extends DrawingNodeProps {\n svg: SkSVG | null;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rect?: SkRect;\n}\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont | null;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["Drawings.ts"],"sourcesContent":["import type {\n FillType,\n SkImage,\n StrokeOpts,\n Vector,\n Color,\n SkPoint,\n BlendMode,\n PointMode,\n VertexMode,\n SkFont,\n SkRRect,\n SkTextBlob,\n SkPicture,\n SkSVG,\n SkPaint,\n SkRect,\n SkRSXform,\n SkColor,\n} from \"../../skia/types\";\n\nimport type {\n CircleDef,\n Fit,\n GroupProps,\n PathDef,\n RectDef,\n RRectDef,\n SkEnum,\n} from \"./Common\";\n\nexport interface DrawingNodeProps extends GroupProps {\n paint?: SkPaint;\n}\n\nexport type ImageProps = DrawingNodeProps &\n RectDef & {\n fit?: Fit;\n image: SkImage | null;\n };\n\nexport type CircleProps = CircleDef & DrawingNodeProps;\n\nexport interface PathProps extends DrawingNodeProps {\n path: PathDef;\n start: number;\n end: number;\n stroke?: StrokeOpts;\n fillType?: SkEnum<typeof FillType>;\n}\n\nexport interface LineProps extends DrawingNodeProps {\n p1: Vector;\n p2: Vector;\n}\n\nexport type OvalProps = RectDef & DrawingNodeProps;\n\nexport type RectProps = RectDef & DrawingNodeProps;\n\nexport type RoundedRectProps = RRectDef & DrawingNodeProps;\n\nexport interface AtlasProps extends DrawingNodeProps {\n image: SkImage | null;\n sprites: SkRect[];\n transforms: SkRSXform[];\n colors?: SkColor[];\n}\n\nexport interface CubicBezierHandle {\n pos: Vector;\n c1: Vector;\n c2: Vector;\n}\n\nexport interface PatchProps extends DrawingNodeProps {\n colors?: Color[];\n patch: [\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle,\n CubicBezierHandle\n ];\n texture?: readonly [SkPoint, SkPoint, SkPoint, SkPoint];\n blendMode?: SkEnum<typeof BlendMode>;\n}\n\nexport interface VerticesProps extends DrawingNodeProps {\n colors?: string[];\n vertices: SkPoint[];\n textures?: SkPoint[];\n mode: SkEnum<typeof VertexMode>;\n blendMode?: SkEnum<typeof BlendMode>;\n indices?: number[];\n}\n\nexport interface ImageSVGProps extends DrawingNodeProps {\n svg: SkSVG | null;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rect?: SkRect;\n}\n\nexport interface PictureProps extends DrawingNodeProps {\n picture: SkPicture;\n}\n\nexport interface PointsProps extends DrawingNodeProps {\n points: SkPoint[];\n mode: SkEnum<typeof PointMode>;\n}\n\nexport interface DiffRectProps extends DrawingNodeProps {\n inner: SkRRect;\n outer: SkRRect;\n}\n\nexport interface TextProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n x: number;\n y: number;\n}\n\nexport interface TextPathProps extends DrawingNodeProps {\n font: SkFont | null;\n text: string;\n path: PathDef;\n initialOffset: number;\n}\n\nexport interface TextBlobProps extends DrawingNodeProps {\n blob: SkTextBlob;\n x: number;\n y: number;\n}\n\nexport interface Glyph {\n id: number;\n pos: SkPoint;\n}\n\nexport interface GlyphsProps extends DrawingNodeProps {\n font: SkFont | null;\n x: number;\n y: number;\n glyphs: Glyph[];\n}\n\nexport interface BoxProps extends DrawingNodeProps {\n box: SkRRect | SkRect;\n}\n\nexport interface BoxShadowProps {\n dx?: number;\n dy?: number;\n spread?: number;\n blur: number;\n color?: Color;\n inner?: boolean;\n}\n"],"mappings":""}
@@ -54,6 +54,7 @@ export declare const enum NodeType {
54
54
  Glyphs = "skGlyphs",
55
55
  Picture = "skPicture",
56
56
  ImageSVG = "skImageSVG",
57
+ Atlas = "skAtlas",
57
58
  Paragraph = "skParagraph"
58
59
  }
59
60
  export declare const enum DeclarationType {
@@ -63,6 +63,7 @@ exports.NodeType = NodeType;
63
63
  NodeType["Glyphs"] = "skGlyphs";
64
64
  NodeType["Picture"] = "skPicture";
65
65
  NodeType["ImageSVG"] = "skImageSVG";
66
+ NodeType["Atlas"] = "skAtlas";
66
67
  NodeType["Paragraph"] = "skParagraph";
67
68
  })(NodeType || (exports.NodeType = NodeType = {}));
68
69