@shopify/react-native-skia 0.1.129 → 0.1.132

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1104) hide show
  1. package/README.md +8 -0
  2. package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
  3. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
  5. package/cpp/api/JsiSkCanvas.h +2 -2
  6. package/cpp/api/JsiSkFont.h +6 -2
  7. package/cpp/api/JsiSkMatrix.h +40 -27
  8. package/cpp/api/JsiSkPaint.h +3 -1
  9. package/cpp/api/JsiSkPath.h +67 -61
  10. package/cpp/api/JsiSkPathFactory.h +14 -1
  11. package/cpp/api/JsiSkRuntimeEffect.h +7 -9
  12. package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
  13. package/cpp/api/JsiSkTypeface.h +11 -2
  14. package/cpp/api/JsiSkTypefaceFactory.h +5 -1
  15. package/cpp/api/JsiSkVertices.h +0 -2
  16. package/cpp/rnskia/RNSkInfoParameter.h +2 -0
  17. package/cpp/rnskia/values/RNSkValue.h +1 -1
  18. package/cpp/skia/include/codec/SkCodec.h +7 -1
  19. package/cpp/skia/include/core/SkAlphaType.h +45 -0
  20. package/cpp/skia/include/core/SkBitmap.h +4 -2
  21. package/cpp/skia/include/core/SkCanvas.h +31 -20
  22. package/cpp/skia/include/core/SkColor.h +1 -1
  23. package/cpp/skia/include/core/SkColorFilter.h +1 -0
  24. package/cpp/skia/include/core/SkColorType.h +66 -0
  25. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
  26. package/cpp/skia/include/core/SkDrawable.h +7 -0
  27. package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
  28. package/cpp/skia/include/core/SkFont.h +4 -3
  29. package/cpp/skia/include/core/SkFontArguments.h +33 -1
  30. package/cpp/skia/include/core/SkGraphics.h +13 -0
  31. package/cpp/skia/include/core/SkImage.h +67 -22
  32. package/cpp/skia/include/core/SkImageEncoder.h +0 -3
  33. package/cpp/skia/include/core/SkImageGenerator.h +4 -3
  34. package/cpp/skia/include/core/SkImageInfo.h +35 -142
  35. package/cpp/skia/include/core/SkMesh.h +303 -0
  36. package/cpp/skia/include/core/SkMilestone.h +1 -1
  37. package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
  38. package/cpp/skia/include/core/SkPaint.h +4 -19
  39. package/cpp/skia/include/core/SkPath.h +20 -33
  40. package/cpp/skia/include/core/SkPathBuilder.h +1 -6
  41. package/cpp/skia/include/core/SkPixelRef.h +1 -1
  42. package/cpp/skia/include/core/SkPixmap.h +3 -2
  43. package/cpp/skia/include/core/SkRSXform.h +1 -1
  44. package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
  45. package/cpp/skia/include/core/SkSpan.h +5 -5
  46. package/cpp/skia/include/core/SkString.h +5 -8
  47. package/cpp/skia/include/core/SkSurface.h +21 -0
  48. package/cpp/skia/include/core/SkTypeface.h +20 -4
  49. package/cpp/skia/include/core/SkTypes.h +9 -5
  50. package/cpp/skia/include/effects/SkGradientShader.h +9 -18
  51. package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
  52. package/cpp/skia/include/gpu/GpuTypes.h +32 -0
  53. package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
  54. package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
  55. package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
  56. package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
  57. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
  58. package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
  59. package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
  60. package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
  61. package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
  62. package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
  63. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
  64. package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
  65. package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
  66. package/cpp/skia/include/gpu/graphite/Context.h +124 -0
  67. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
  68. package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
  69. package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
  70. package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
  71. package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
  72. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
  73. package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
  74. package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
  75. package/cpp/skia/include/ports/SkCFObject.h +0 -4
  76. package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
  77. package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
  78. package/cpp/skia/include/private/SkChecksum.h +11 -0
  79. package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
  80. package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
  81. package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
  82. package/cpp/skia/include/private/SkMacros.h +13 -18
  83. package/cpp/skia/include/private/SkMutex.h +8 -0
  84. package/cpp/skia/include/private/SkPathRef.h +2 -16
  85. package/cpp/skia/include/private/SkSLDefines.h +9 -1
  86. package/cpp/skia/include/private/SkSLIRNode.h +6 -5
  87. package/cpp/skia/include/private/SkSLLayout.h +11 -10
  88. package/cpp/skia/include/private/SkSLModifiers.h +4 -3
  89. package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
  90. package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
  91. package/cpp/skia/include/private/SkSLStatement.h +2 -3
  92. package/cpp/skia/include/private/SkSLString.h +17 -56
  93. package/cpp/skia/include/private/SkSLSymbol.h +4 -4
  94. package/cpp/skia/include/private/SkShadowFlags.h +3 -1
  95. package/cpp/skia/include/private/SkStringView.h +47 -0
  96. package/cpp/skia/include/private/SkTArray.h +4 -3
  97. package/cpp/skia/include/private/SkTHash.h +66 -24
  98. package/cpp/skia/include/private/SkTLogic.h +2 -32
  99. package/cpp/skia/include/private/SkTemplates.h +2 -2
  100. package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
  101. package/cpp/skia/include/private/SkVx.h +28 -28
  102. package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
  103. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
  104. package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
  105. package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
  106. package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
  107. package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
  108. package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
  109. package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
  110. package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
  111. package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
  112. package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
  113. package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
  114. package/cpp/skia/include/sksl/DSL.h +4 -0
  115. package/cpp/skia/include/sksl/DSLBlock.h +8 -3
  116. package/cpp/skia/include/sksl/DSLCase.h +6 -6
  117. package/cpp/skia/include/sksl/DSLCore.h +89 -78
  118. package/cpp/skia/include/sksl/DSLExpression.h +78 -45
  119. package/cpp/skia/include/sksl/DSLFunction.h +23 -18
  120. package/cpp/skia/include/sksl/DSLLayout.h +14 -16
  121. package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
  122. package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
  123. package/cpp/skia/include/sksl/DSLStatement.h +16 -10
  124. package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
  125. package/cpp/skia/include/sksl/DSLType.h +27 -23
  126. package/cpp/skia/include/sksl/DSLVar.h +72 -61
  127. package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
  128. package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
  129. package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
  130. package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
  131. package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
  132. package/cpp/skia/include/utils/SkCamera.h +2 -0
  133. package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
  134. package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
  135. package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
  136. package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
  137. package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
  138. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
  139. package/cpp/skia/include/utils/SkParse.h +2 -0
  140. package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
  141. package/cpp/skia/include/utils/SkTextUtils.h +8 -4
  142. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
  143. package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
  144. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
  145. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  146. package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
  147. package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
  148. package/cpp/utils/RNSkLog.h +27 -0
  149. package/ios/RNSkia-iOS/PlatformContext.h +1 -1
  150. package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
  151. package/ios/RNSkia-iOS/SkiaDrawView.mm +3 -2
  152. package/lib/commonjs/animation/functions/index.js +47 -17
  153. package/lib/commonjs/animation/functions/index.js.map +1 -1
  154. package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
  155. package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
  156. package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
  157. package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
  158. package/lib/commonjs/index.js +13 -0
  159. package/lib/commonjs/index.js.map +1 -1
  160. package/lib/commonjs/renderer/Canvas.js +19 -35
  161. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  162. package/lib/commonjs/renderer/HostConfig.js +2 -2
  163. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  164. package/lib/commonjs/renderer/components/Blend.js +10 -7
  165. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  166. package/lib/commonjs/renderer/components/Compose.js +9 -6
  167. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  168. package/lib/commonjs/renderer/components/Group.js +7 -6
  169. package/lib/commonjs/renderer/components/Group.js.map +1 -1
  170. package/lib/commonjs/renderer/components/Mask.js +13 -10
  171. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  172. package/lib/commonjs/renderer/components/Paint.js +7 -4
  173. package/lib/commonjs/renderer/components/Paint.js.map +1 -1
  174. package/lib/commonjs/renderer/components/Picture.js.map +1 -1
  175. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
  176. package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  177. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
  178. package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
  179. package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
  180. package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
  181. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
  182. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  183. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
  184. package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  185. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
  186. package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  187. package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
  188. package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
  189. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
  190. package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  191. package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
  192. package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
  193. package/lib/commonjs/renderer/components/image/Image.js +3 -2
  194. package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
  195. package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
  196. package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
  197. package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
  198. package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
  199. package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
  200. package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
  201. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
  202. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  203. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
  204. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  205. package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
  206. package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
  207. package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
  208. package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
  209. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
  210. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  211. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
  212. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  213. package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
  214. package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
  215. package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
  216. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  217. package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
  218. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  219. package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
  220. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  221. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
  222. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  223. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
  224. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  225. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
  226. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  227. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
  228. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  229. package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
  230. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  231. package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
  232. package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
  233. package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
  234. package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
  235. package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
  236. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  237. package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
  238. package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
  239. package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
  240. package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
  241. package/lib/commonjs/renderer/components/shaders/Shader.js +6 -44
  242. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  243. package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
  244. package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
  245. package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
  246. package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
  247. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
  248. package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  249. package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
  250. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  251. package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
  252. package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
  253. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  254. package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
  255. package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
  256. package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
  257. package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
  258. package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
  259. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  260. package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
  261. package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
  262. package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
  263. package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
  264. package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
  265. package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
  266. package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
  267. package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
  268. package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
  269. package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
  270. package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
  271. package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
  272. package/lib/commonjs/renderer/components/text/Text.js +3 -2
  273. package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
  274. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  275. package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
  276. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  277. package/lib/commonjs/renderer/index.js +13 -13
  278. package/lib/commonjs/renderer/index.js.map +1 -1
  279. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  280. package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
  281. package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
  282. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  283. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  284. package/lib/commonjs/renderer/processors/Circles.js +2 -4
  285. package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
  286. package/lib/commonjs/renderer/processors/Clips.js +5 -5
  287. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  288. package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
  289. package/lib/commonjs/renderer/processors/Color.js.map +1 -0
  290. package/lib/commonjs/renderer/processors/Font.js +4 -4
  291. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  292. package/lib/commonjs/renderer/processors/Paint.js +18 -14
  293. package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
  294. package/lib/commonjs/renderer/processors/Paths.js +4 -4
  295. package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
  296. package/lib/commonjs/renderer/processors/Radius.js +2 -4
  297. package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
  298. package/lib/commonjs/renderer/processors/Rects.js +8 -59
  299. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  300. package/lib/commonjs/renderer/processors/Transform.js +26 -17
  301. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  302. package/lib/commonjs/renderer/processors/index.js +26 -13
  303. package/lib/commonjs/renderer/processors/index.js.map +1 -1
  304. package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
  305. package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
  306. package/lib/commonjs/renderer/processors/math/index.js +0 -26
  307. package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
  308. package/lib/commonjs/renderer/useCanvas.js +30 -0
  309. package/lib/commonjs/renderer/useCanvas.js.map +1 -0
  310. package/lib/commonjs/skia/NativeSetup.js +1 -1
  311. package/lib/commonjs/skia/NativeSetup.js.map +1 -1
  312. package/lib/commonjs/skia/Skia.web.js +12 -0
  313. package/lib/commonjs/skia/Skia.web.js.map +1 -0
  314. package/lib/commonjs/skia/core/Data.js +9 -4
  315. package/lib/commonjs/skia/core/Data.js.map +1 -1
  316. package/lib/commonjs/skia/core/Font.js +2 -4
  317. package/lib/commonjs/skia/core/Font.js.map +1 -1
  318. package/lib/commonjs/skia/core/Matrix.js +15 -0
  319. package/lib/commonjs/skia/core/Matrix.js.map +1 -0
  320. package/lib/commonjs/skia/core/Paint.js +4 -12
  321. package/lib/commonjs/skia/core/Paint.js.map +1 -1
  322. package/lib/commonjs/skia/core/Path.js +14 -2
  323. package/lib/commonjs/skia/core/Path.js.map +1 -1
  324. package/lib/commonjs/skia/core/RRect.js +13 -0
  325. package/lib/commonjs/skia/core/RRect.js.map +1 -0
  326. package/lib/commonjs/skia/core/Rect.js +47 -0
  327. package/lib/commonjs/skia/core/Rect.js.map +1 -0
  328. package/lib/commonjs/skia/core/Vector.js +49 -0
  329. package/lib/commonjs/skia/core/Vector.js.map +1 -0
  330. package/lib/commonjs/skia/core/index.js +51 -25
  331. package/lib/commonjs/skia/core/index.js.map +1 -1
  332. package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
  333. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  334. package/lib/commonjs/skia/types/Matrix.js +58 -1
  335. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  336. package/lib/commonjs/skia/types/Path/Path.js +1 -0
  337. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  338. package/lib/commonjs/skia/types/Point.js.map +1 -1
  339. package/lib/commonjs/skia/types/RRect.js +7 -0
  340. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  341. package/lib/commonjs/skia/types/Shader/Shader.js +51 -1
  342. package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
  343. package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
  344. package/lib/commonjs/skia/web/Host.js.map +1 -0
  345. package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
  346. package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
  347. package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -6
  348. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
  349. package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
  350. package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
  351. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  352. package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  353. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
  354. package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  355. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
  356. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
  357. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
  358. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  359. package/lib/commonjs/skia/web/JsiSkData.js +18 -0
  360. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
  361. package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
  362. package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
  363. package/lib/commonjs/skia/web/JsiSkFont.js +113 -0
  364. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
  365. package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
  366. package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
  367. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
  368. package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  369. package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  370. package/lib/commonjs/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  371. package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
  372. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
  373. package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
  374. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
  375. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
  376. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
  377. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
  378. package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  379. package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
  380. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
  381. package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
  382. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
  383. package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
  384. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
  385. package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
  386. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
  387. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
  388. package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  389. package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
  390. package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
  391. package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
  392. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
  393. package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
  394. package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
  395. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
  396. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
  397. package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
  398. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
  399. package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
  400. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
  401. package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
  402. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
  403. package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  404. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
  405. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
  406. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  407. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
  408. package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  409. package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
  410. package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
  411. package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
  412. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
  413. package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
  414. package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
  415. package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  416. package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  417. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  418. package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  419. package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
  420. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
  421. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
  422. package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  423. package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
  424. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
  425. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
  426. package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  427. package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
  428. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
  429. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
  430. package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
  431. package/lib/commonjs/skia/web/JsiSkia.js +97 -0
  432. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
  433. package/lib/commonjs/skia/web/index.js +4 -4
  434. package/lib/commonjs/skia/web/index.js.map +1 -1
  435. package/lib/commonjs/values/web/api.js +2 -2
  436. package/lib/commonjs/values/web/api.js.map +1 -1
  437. package/lib/commonjs/views/SkiaView.web.js +216 -0
  438. package/lib/commonjs/views/SkiaView.web.js.map +1 -0
  439. package/lib/commonjs/views/types.js.map +1 -1
  440. package/lib/commonjs/views/useTouchHandler.js +70 -46
  441. package/lib/commonjs/views/useTouchHandler.js.map +1 -1
  442. package/lib/commonjs/web/index.js +20 -0
  443. package/lib/commonjs/web/index.js.map +1 -0
  444. package/lib/module/animation/functions/index.js +4 -2
  445. package/lib/module/animation/functions/index.js.map +1 -1
  446. package/lib/module/animation/functions/interpolatePaths.js +36 -0
  447. package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
  448. package/lib/module/animation/functions/interpolateVector.js +7 -0
  449. package/lib/module/animation/functions/interpolateVector.js.map +1 -0
  450. package/lib/module/index.js +1 -0
  451. package/lib/module/index.js.map +1 -1
  452. package/lib/module/renderer/Canvas.js +15 -26
  453. package/lib/module/renderer/Canvas.js.map +1 -1
  454. package/lib/module/renderer/HostConfig.js +2 -2
  455. package/lib/module/renderer/HostConfig.js.map +1 -1
  456. package/lib/module/renderer/components/Blend.js +5 -2
  457. package/lib/module/renderer/components/Blend.js.map +1 -1
  458. package/lib/module/renderer/components/Compose.js +5 -2
  459. package/lib/module/renderer/components/Compose.js.map +1 -1
  460. package/lib/module/renderer/components/Group.js +7 -6
  461. package/lib/module/renderer/components/Group.js.map +1 -1
  462. package/lib/module/renderer/components/Mask.js +7 -3
  463. package/lib/module/renderer/components/Mask.js.map +1 -1
  464. package/lib/module/renderer/components/Paint.js +6 -3
  465. package/lib/module/renderer/components/Paint.js.map +1 -1
  466. package/lib/module/renderer/components/Picture.js.map +1 -1
  467. package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
  468. package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
  469. package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
  470. package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
  471. package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
  472. package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
  473. package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
  474. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  475. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
  476. package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
  477. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
  478. package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
  479. package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
  480. package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
  481. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
  482. package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
  483. package/lib/module/renderer/components/image/BoxFit.js +7 -8
  484. package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
  485. package/lib/module/renderer/components/image/Image.js +3 -2
  486. package/lib/module/renderer/components/image/Image.js.map +1 -1
  487. package/lib/module/renderer/components/image/ImageSVG.js +3 -2
  488. package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
  489. package/lib/module/renderer/components/image/ImageShader.js +10 -7
  490. package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
  491. package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
  492. package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
  493. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
  494. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  495. package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
  496. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  497. package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
  498. package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
  499. package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
  500. package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
  501. package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
  502. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  503. package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
  504. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  505. package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
  506. package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
  507. package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
  508. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  509. package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
  510. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  511. package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
  512. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  513. package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
  514. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  515. package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
  516. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  517. package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
  518. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  519. package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
  520. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  521. package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
  522. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  523. package/lib/module/renderer/components/shaders/Color.js +6 -3
  524. package/lib/module/renderer/components/shaders/Color.js.map +1 -1
  525. package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
  526. package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
  527. package/lib/module/renderer/components/shaders/Gradient.js +3 -3
  528. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  529. package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
  530. package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
  531. package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
  532. package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
  533. package/lib/module/renderer/components/shaders/Shader.js +6 -45
  534. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  535. package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
  536. package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
  537. package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
  538. package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
  539. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
  540. package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
  541. package/lib/module/renderer/components/shapes/Box.js +20 -19
  542. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  543. package/lib/module/renderer/components/shapes/Circle.js +7 -4
  544. package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
  545. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  546. package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
  547. package/lib/module/renderer/components/shapes/Line.js.map +1 -1
  548. package/lib/module/renderer/components/shapes/Oval.js +3 -2
  549. package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
  550. package/lib/module/renderer/components/shapes/Patch.js +5 -3
  551. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  552. package/lib/module/renderer/components/shapes/Path.js +4 -3
  553. package/lib/module/renderer/components/shapes/Path.js.map +1 -1
  554. package/lib/module/renderer/components/shapes/Points.js +1 -1
  555. package/lib/module/renderer/components/shapes/Points.js.map +1 -1
  556. package/lib/module/renderer/components/shapes/Rect.js +3 -2
  557. package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
  558. package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
  559. package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
  560. package/lib/module/renderer/components/shapes/Vertices.js +5 -3
  561. package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
  562. package/lib/module/renderer/components/text/Glyphs.js +3 -2
  563. package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
  564. package/lib/module/renderer/components/text/Text.js +3 -2
  565. package/lib/module/renderer/components/text/Text.js.map +1 -1
  566. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  567. package/lib/module/renderer/components/text/TextPath.js +3 -3
  568. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  569. package/lib/module/renderer/index.js +1 -1
  570. package/lib/module/renderer/index.js.map +1 -1
  571. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  572. package/lib/module/renderer/nodes/Drawing.js +3 -3
  573. package/lib/module/renderer/nodes/Drawing.js.map +1 -1
  574. package/lib/module/renderer/nodes/Node.js.map +1 -1
  575. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  576. package/lib/module/renderer/processors/Circles.js +2 -4
  577. package/lib/module/renderer/processors/Circles.js.map +1 -1
  578. package/lib/module/renderer/processors/Clips.js +3 -3
  579. package/lib/module/renderer/processors/Clips.js.map +1 -1
  580. package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
  581. package/lib/module/renderer/processors/Color.js.map +1 -0
  582. package/lib/module/renderer/processors/Font.js +3 -2
  583. package/lib/module/renderer/processors/Font.js.map +1 -1
  584. package/lib/module/renderer/processors/Paint.js +8 -5
  585. package/lib/module/renderer/processors/Paint.js.map +1 -1
  586. package/lib/module/renderer/processors/Paths.js +2 -2
  587. package/lib/module/renderer/processors/Paths.js.map +1 -1
  588. package/lib/module/renderer/processors/Radius.js +2 -3
  589. package/lib/module/renderer/processors/Radius.js.map +1 -1
  590. package/lib/module/renderer/processors/Rects.js +7 -26
  591. package/lib/module/renderer/processors/Rects.js.map +1 -1
  592. package/lib/module/renderer/processors/Transform.js +24 -16
  593. package/lib/module/renderer/processors/Transform.js.map +1 -1
  594. package/lib/module/renderer/processors/index.js +2 -1
  595. package/lib/module/renderer/processors/index.js.map +1 -1
  596. package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
  597. package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
  598. package/lib/module/renderer/processors/math/index.js +0 -2
  599. package/lib/module/renderer/processors/math/index.js.map +1 -1
  600. package/lib/module/renderer/useCanvas.js +13 -0
  601. package/lib/module/renderer/useCanvas.js.map +1 -0
  602. package/lib/module/skia/NativeSetup.js +2 -2
  603. package/lib/module/skia/NativeSetup.js.map +1 -1
  604. package/lib/module/skia/Skia.web.js +3 -0
  605. package/lib/module/skia/Skia.web.js.map +1 -0
  606. package/lib/module/skia/core/Data.js +11 -5
  607. package/lib/module/skia/core/Data.js.map +1 -1
  608. package/lib/module/skia/core/Font.js +2 -4
  609. package/lib/module/skia/core/Font.js.map +1 -1
  610. package/lib/module/skia/core/Matrix.js +4 -0
  611. package/lib/module/skia/core/Matrix.js.map +1 -0
  612. package/lib/module/skia/core/Paint.js +3 -7
  613. package/lib/module/skia/core/Paint.js.map +1 -1
  614. package/lib/module/skia/core/Path.js +11 -2
  615. package/lib/module/skia/core/Path.js.map +1 -1
  616. package/lib/module/skia/core/RRect.js +3 -0
  617. package/lib/module/skia/core/RRect.js.map +1 -0
  618. package/lib/module/skia/core/Rect.js +17 -0
  619. package/lib/module/skia/core/Rect.js.map +1 -0
  620. package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
  621. package/lib/module/skia/core/Vector.js.map +1 -0
  622. package/lib/module/skia/core/index.js +5 -3
  623. package/lib/module/skia/core/index.js.map +1 -1
  624. package/lib/module/skia/types/Font/Font.js.map +1 -1
  625. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  626. package/lib/module/skia/types/Matrix.js +55 -0
  627. package/lib/module/skia/types/Matrix.js.map +1 -1
  628. package/lib/module/skia/types/Path/Path.js +1 -0
  629. package/lib/module/skia/types/Path/Path.js.map +1 -1
  630. package/lib/module/skia/types/Point.js.map +1 -1
  631. package/lib/module/skia/types/RRect.js +3 -1
  632. package/lib/module/skia/types/RRect.js.map +1 -1
  633. package/lib/module/skia/types/Shader/Shader.js +48 -0
  634. package/lib/module/skia/types/Shader/Shader.js.map +1 -1
  635. package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
  636. package/lib/module/skia/web/Host.js.map +1 -0
  637. package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
  638. package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
  639. package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +19 -6
  640. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
  641. package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
  642. package/lib/module/skia/web/JsiSkColor.js.map +1 -0
  643. package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
  644. package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
  645. package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
  646. package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
  647. package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
  648. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
  649. package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
  650. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
  651. package/lib/module/skia/web/JsiSkData.js +8 -0
  652. package/lib/module/skia/web/JsiSkData.js.map +1 -0
  653. package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
  654. package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
  655. package/lib/module/skia/web/JsiSkFont.js +101 -0
  656. package/lib/module/skia/web/JsiSkFont.js.map +1 -0
  657. package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
  658. package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
  659. package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
  660. package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
  661. package/lib/module/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
  662. package/lib/module/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
  663. package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
  664. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
  665. package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
  666. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
  667. package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
  668. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
  669. package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
  670. package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
  671. package/lib/module/skia/web/JsiSkMatrix.js +28 -0
  672. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
  673. package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
  674. package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
  675. package/lib/module/skia/web/JsiSkPath.js +311 -0
  676. package/lib/module/skia/web/JsiSkPath.js.map +1 -0
  677. package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
  678. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
  679. package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
  680. package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
  681. package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
  682. package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
  683. package/lib/module/skia/web/JsiSkPicture.js +18 -0
  684. package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
  685. package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
  686. package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
  687. package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
  688. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
  689. package/lib/module/skia/web/JsiSkPoint.js +16 -0
  690. package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
  691. package/lib/module/skia/web/JsiSkRRect.js +21 -0
  692. package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
  693. package/lib/module/skia/web/JsiSkRSXform.js +8 -0
  694. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
  695. package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
  696. package/lib/module/skia/web/JsiSkRect.js.map +1 -0
  697. package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
  698. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
  699. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
  700. package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
  701. package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
  702. package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
  703. package/lib/module/skia/web/JsiSkShader.js +8 -0
  704. package/lib/module/skia/web/JsiSkShader.js.map +1 -0
  705. package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
  706. package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
  707. package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
  708. package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
  709. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
  710. package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
  711. package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
  712. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
  713. package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
  714. package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
  715. package/lib/module/skia/web/JsiSkTypeface.js +18 -0
  716. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
  717. package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
  718. package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
  719. package/lib/module/skia/web/JsiSkVertices.js +17 -0
  720. package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
  721. package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
  722. package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
  723. package/lib/module/skia/web/JsiSkia.js +61 -0
  724. package/lib/module/skia/web/JsiSkia.js.map +1 -0
  725. package/lib/module/skia/web/index.js +1 -1
  726. package/lib/module/skia/web/index.js.map +1 -1
  727. package/lib/module/values/web/api.js +2 -2
  728. package/lib/module/values/web/api.js.map +1 -1
  729. package/lib/module/views/SkiaView.web.js +202 -0
  730. package/lib/module/views/SkiaView.web.js.map +1 -0
  731. package/lib/module/views/types.js.map +1 -1
  732. package/lib/module/views/useTouchHandler.js +64 -43
  733. package/lib/module/views/useTouchHandler.js.map +1 -1
  734. package/lib/module/web/index.js +8 -0
  735. package/lib/module/web/index.js.map +1 -0
  736. package/lib/typescript/src/animation/functions/index.d.ts +4 -2
  737. package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
  738. package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
  739. package/lib/typescript/src/index.d.ts +1 -0
  740. package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
  741. package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
  742. package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
  743. package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
  744. package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
  745. package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
  746. package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
  747. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
  748. package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
  749. package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
  750. package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
  751. package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
  752. package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
  753. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  754. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
  755. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
  756. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  757. package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
  758. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  759. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  760. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  761. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  762. package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
  763. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
  764. package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
  765. package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
  766. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -9
  767. package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
  768. package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
  769. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
  770. package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
  771. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  772. package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
  773. package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
  774. package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
  775. package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
  776. package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
  777. package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
  778. package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
  779. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  780. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  781. package/lib/typescript/src/renderer/index.d.ts +1 -1
  782. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  783. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  784. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
  785. package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
  786. package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
  787. package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
  788. package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
  789. package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
  790. package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
  791. package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
  792. package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
  793. package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
  794. package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
  795. package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
  796. package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
  797. package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
  798. package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
  799. package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
  800. package/lib/typescript/src/skia/core/Data.d.ts +4 -4
  801. package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
  802. package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
  803. package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
  804. package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
  805. package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
  806. package/lib/typescript/src/skia/core/index.d.ts +5 -3
  807. package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
  808. package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
  809. package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
  810. package/lib/typescript/src/skia/types/Font/Font.d.ts +8 -9
  811. package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
  812. package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
  813. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
  814. package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
  815. package/lib/typescript/src/skia/types/Path/Path.d.ts +29 -23
  816. package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
  817. package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
  818. package/lib/typescript/src/skia/types/Point.d.ts +1 -0
  819. package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
  820. package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +5 -6
  821. package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
  822. package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
  823. package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
  824. package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
  825. package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
  826. package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
  827. package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
  828. package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
  829. package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
  830. package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
  831. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
  832. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
  833. package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
  834. package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
  835. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
  836. package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
  837. package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
  838. package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +1 -1
  839. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
  840. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
  841. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
  842. package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
  843. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
  844. package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
  845. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
  846. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
  847. package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
  848. package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
  849. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
  850. package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
  851. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
  852. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
  853. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
  854. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
  855. package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
  856. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
  857. package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
  858. package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
  859. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
  860. package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
  861. package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
  862. package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
  863. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
  864. package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
  865. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
  866. package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
  867. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
  868. package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
  869. package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
  870. package/lib/typescript/src/skia/web/index.d.ts +1 -1
  871. package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
  872. package/lib/typescript/src/views/types.d.ts +1 -0
  873. package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
  874. package/lib/typescript/src/web/index.d.ts +5 -0
  875. package/libs/android/arm64-v8a/libskia.a +0 -0
  876. package/libs/android/arm64-v8a/libsvg.a +0 -0
  877. package/libs/android/armeabi-v7a/libskia.a +0 -0
  878. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  879. package/libs/android/x86/libskia.a +0 -0
  880. package/libs/android/x86/libsvg.a +0 -0
  881. package/libs/android/x86_64/libskia.a +0 -0
  882. package/libs/android/x86_64/libsvg.a +0 -0
  883. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  884. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  885. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  886. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  887. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  888. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  889. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  890. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  891. package/package.json +5 -6
  892. package/src/animation/functions/index.ts +4 -2
  893. package/src/animation/functions/interpolatePaths.ts +38 -0
  894. package/src/animation/functions/interpolateVector.ts +26 -0
  895. package/src/index.ts +1 -0
  896. package/src/renderer/Canvas.tsx +13 -35
  897. package/src/renderer/DrawingContext.ts +3 -4
  898. package/src/renderer/HostConfig.ts +2 -2
  899. package/src/renderer/components/Blend.tsx +12 -10
  900. package/src/renderer/components/Compose.tsx +2 -2
  901. package/src/renderer/components/Group.tsx +11 -6
  902. package/src/renderer/components/Mask.tsx +5 -3
  903. package/src/renderer/components/Paint.tsx +5 -4
  904. package/src/renderer/components/Picture.tsx +1 -1
  905. package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
  906. package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
  907. package/src/renderer/components/colorFilters/Compose.ts +3 -2
  908. package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
  909. package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
  910. package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
  911. package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
  912. package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
  913. package/src/renderer/components/image/BoxFit.ts +7 -13
  914. package/src/renderer/components/image/Image.tsx +3 -3
  915. package/src/renderer/components/image/ImageSVG.tsx +3 -3
  916. package/src/renderer/components/image/ImageShader.tsx +8 -7
  917. package/src/renderer/components/imageFilters/Blur.tsx +12 -10
  918. package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
  919. package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
  920. package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
  921. package/src/renderer/components/imageFilters/Offset.tsx +5 -4
  922. package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
  923. package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
  924. package/src/renderer/components/imageFilters/getInput.ts +3 -2
  925. package/src/renderer/components/maskFilters/Blur.tsx +2 -2
  926. package/src/renderer/components/pathEffects/Corner.tsx +2 -2
  927. package/src/renderer/components/pathEffects/Dash.tsx +2 -2
  928. package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
  929. package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
  930. package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
  931. package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
  932. package/src/renderer/components/pathEffects/Sum.tsx +7 -5
  933. package/src/renderer/components/shaders/Color.tsx +7 -5
  934. package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
  935. package/src/renderer/components/shaders/Gradient.ts +7 -10
  936. package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
  937. package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
  938. package/src/renderer/components/shaders/Shader.tsx +6 -58
  939. package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
  940. package/src/renderer/components/shaders/Turbulence.tsx +1 -2
  941. package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
  942. package/src/renderer/components/shapes/Box.tsx +36 -17
  943. package/src/renderer/components/shapes/Circle.tsx +3 -4
  944. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  945. package/src/renderer/components/shapes/FitBox.tsx +1 -1
  946. package/src/renderer/components/shapes/Line.tsx +2 -1
  947. package/src/renderer/components/shapes/Oval.tsx +6 -4
  948. package/src/renderer/components/shapes/Patch.tsx +6 -10
  949. package/src/renderer/components/shapes/Path.tsx +3 -3
  950. package/src/renderer/components/shapes/Points.tsx +2 -2
  951. package/src/renderer/components/shapes/Rect.tsx +6 -4
  952. package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
  953. package/src/renderer/components/shapes/Vertices.tsx +5 -4
  954. package/src/renderer/components/text/Glyphs.tsx +6 -3
  955. package/src/renderer/components/text/Text.tsx +2 -2
  956. package/src/renderer/components/text/TextBlob.tsx +1 -1
  957. package/src/renderer/components/text/TextPath.tsx +3 -4
  958. package/src/renderer/index.ts +1 -1
  959. package/src/renderer/nodes/Declaration.tsx +1 -1
  960. package/src/renderer/nodes/Drawing.tsx +3 -2
  961. package/src/renderer/nodes/Node.ts +1 -1
  962. package/src/renderer/processors/Animations/Animations.ts +0 -3
  963. package/src/renderer/processors/Circles.ts +4 -4
  964. package/src/renderer/processors/Clips.ts +9 -4
  965. package/src/{skia/core → renderer/processors}/Color.ts +2 -3
  966. package/src/renderer/processors/Font.ts +10 -3
  967. package/src/renderer/processors/Paint.ts +12 -7
  968. package/src/renderer/processors/Paths.ts +3 -3
  969. package/src/renderer/processors/Radius.ts +3 -4
  970. package/src/renderer/processors/Rects.ts +10 -45
  971. package/src/renderer/processors/Transform.ts +28 -19
  972. package/src/renderer/processors/index.ts +2 -1
  973. package/src/renderer/processors/math/Coordinates.ts +1 -1
  974. package/src/renderer/processors/math/Transforms.ts +2 -1
  975. package/src/renderer/processors/math/index.ts +0 -2
  976. package/src/renderer/useCanvas.ts +21 -0
  977. package/src/skia/NativeSetup.ts +2 -2
  978. package/src/skia/Skia.web.ts +3 -0
  979. package/src/skia/core/Data.ts +17 -14
  980. package/src/skia/core/Font.ts +2 -4
  981. package/src/skia/core/Matrix.ts +6 -0
  982. package/src/skia/core/Paint.ts +2 -6
  983. package/src/skia/core/Path.ts +14 -6
  984. package/src/skia/core/RRect.tsx +5 -0
  985. package/src/skia/core/Rect.ts +33 -0
  986. package/src/skia/core/Vector.ts +11 -0
  987. package/src/skia/core/index.ts +5 -3
  988. package/src/skia/types/ContourMeasure.tsx +2 -4
  989. package/src/skia/types/Data/Data.ts +1 -1
  990. package/src/skia/types/Data/DataFactory.ts +4 -4
  991. package/src/skia/types/Font/Font.ts +9 -14
  992. package/src/skia/types/FontMgr/FontMgr.ts +1 -1
  993. package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
  994. package/src/skia/types/Image/ImageFactory.ts +3 -3
  995. package/src/skia/types/Matrix.ts +79 -14
  996. package/src/skia/types/Path/Path.ts +34 -23
  997. package/src/skia/types/Path/PathFactory.ts +7 -0
  998. package/src/skia/types/Picture/Picture.ts +2 -2
  999. package/src/skia/types/Point.ts +2 -0
  1000. package/src/skia/types/RRect.ts +5 -0
  1001. package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -10
  1002. package/src/skia/types/SVG/SVGFactory.ts +2 -2
  1003. package/src/skia/types/Shader/Shader.ts +61 -0
  1004. package/src/skia/types/Skia.ts +1 -1
  1005. package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
  1006. package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
  1007. package/src/skia/web/JsiImageFilterFactory.ts +144 -0
  1008. package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +19 -11
  1009. package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
  1010. package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
  1011. package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
  1012. package/src/skia/web/JsiSkContourMeasure.ts +35 -0
  1013. package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
  1014. package/src/skia/web/JsiSkData.ts +13 -0
  1015. package/src/skia/web/JsiSkDataFactory.ts +35 -0
  1016. package/src/skia/web/JsiSkFont.ts +128 -0
  1017. package/src/skia/web/JsiSkFontMgr.ts +42 -0
  1018. package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
  1019. package/src/skia/web/{api/JsiSkImage.ts → JsiSkImage.ts} +1 -1
  1020. package/src/skia/web/JsiSkImageFactory.ts +40 -0
  1021. package/src/skia/web/JsiSkImageFilter.ts +14 -0
  1022. package/src/skia/web/JsiSkMaskFilter.ts +14 -0
  1023. package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
  1024. package/src/skia/web/JsiSkMatrix.ts +54 -0
  1025. package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +6 -5
  1026. package/src/skia/web/JsiSkPath.ts +369 -0
  1027. package/src/skia/web/JsiSkPathEffect.ts +14 -0
  1028. package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
  1029. package/src/skia/web/JsiSkPathFactory.ts +54 -0
  1030. package/src/skia/web/JsiSkPicture.ts +45 -0
  1031. package/src/skia/web/JsiSkPictureFactory.ts +20 -0
  1032. package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
  1033. package/src/skia/web/JsiSkPoint.ts +19 -0
  1034. package/src/skia/web/JsiSkRRect.ts +27 -0
  1035. package/src/skia/web/JsiSkRSXform.ts +16 -0
  1036. package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
  1037. package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
  1038. package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
  1039. package/src/skia/web/JsiSkSVGFactory.ts +20 -0
  1040. package/src/skia/web/JsiSkShader.ts +14 -0
  1041. package/src/skia/web/JsiSkShaderFactory.ts +178 -0
  1042. package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
  1043. package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
  1044. package/src/skia/web/JsiSkTextBlob.ts +14 -0
  1045. package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
  1046. package/src/skia/web/JsiSkTypeface.ts +28 -0
  1047. package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
  1048. package/src/skia/web/JsiSkVertices.ts +23 -0
  1049. package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
  1050. package/src/skia/web/JsiSkia.ts +98 -0
  1051. package/src/skia/web/index.ts +1 -1
  1052. package/src/values/web/api.ts +2 -2
  1053. package/src/views/SkiaView.web.tsx +192 -0
  1054. package/src/views/types.ts +1 -0
  1055. package/src/views/useTouchHandler.ts +82 -51
  1056. package/src/web/index.ts +13 -0
  1057. package/cpp/skia/include/core/SkCustomMesh.h +0 -202
  1058. package/cpp/skia/include/core/SkStringView.h +0 -185
  1059. package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
  1060. package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
  1061. package/cpp/skia/include/private/SkTOptional.h +0 -362
  1062. package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
  1063. package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
  1064. package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
  1065. package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
  1066. package/lib/commonjs/skia/core/Color.js.map +0 -1
  1067. package/lib/commonjs/skia/core/Shader.js +0 -18
  1068. package/lib/commonjs/skia/core/Shader.js.map +0 -1
  1069. package/lib/commonjs/skia/web/api/Host.js.map +0 -1
  1070. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
  1071. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
  1072. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
  1073. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
  1074. package/lib/commonjs/skia/web/api/index.js +0 -26
  1075. package/lib/commonjs/skia/web/api/index.js.map +0 -1
  1076. package/lib/module/renderer/processors/math/Matrix3.js +0 -55
  1077. package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
  1078. package/lib/module/renderer/processors/math/Vector.js.map +0 -1
  1079. package/lib/module/skia/core/Color.js.map +0 -1
  1080. package/lib/module/skia/core/Shader.js +0 -7
  1081. package/lib/module/skia/core/Shader.js.map +0 -1
  1082. package/lib/module/skia/web/api/Host.js.map +0 -1
  1083. package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
  1084. package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
  1085. package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
  1086. package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
  1087. package/lib/module/skia/web/api/index.js +0 -13
  1088. package/lib/module/skia/web/api/index.js.map +0 -1
  1089. package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
  1090. package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
  1091. package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
  1092. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
  1093. package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
  1094. package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
  1095. package/src/renderer/processors/math/Matrix3.ts +0 -73
  1096. package/src/renderer/processors/math/Vector.ts +0 -38
  1097. package/src/skia/__tests__/Rects.spec.ts +0 -40
  1098. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  1099. package/src/skia/core/Shader.ts +0 -9
  1100. package/src/skia/web/api/index.ts +0 -15
  1101. package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
  1102. package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
  1103. package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
  1104. package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.processTransform2d = void 0;
7
+
8
+ var _Skia = require("../Skia");
9
+
10
+ var _types = require("../types");
11
+
12
+ const processTransform2d = transforms => (0, _types.processTransform)(_Skia.Skia.Matrix(), transforms);
13
+
14
+ exports.processTransform2d = processTransform2d;
15
+ //# sourceMappingURL=Matrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Matrix.ts"],"names":["processTransform2d","transforms","Skia","Matrix"],"mappings":";;;;;;;AAAA;;AAEA;;AAEO,MAAMA,kBAAkB,GAAIC,UAAD,IAChC,6BAAiBC,WAAKC,MAAL,EAAjB,EAAgCF,UAAhC,CADK","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { Transforms2d } from \"../types\";\nimport { processTransform } from \"../types\";\n\nexport const processTransform2d = (transforms: Transforms2d) =>\n processTransform(Skia.Matrix(), transforms);\n"]}
@@ -3,27 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.usePaint = exports.SkiaPaint = void 0;
6
+ exports.usePaint = void 0;
7
7
 
8
8
  var _react = require("react");
9
9
 
10
10
  var _Skia = require("../Skia");
11
11
 
12
- const SkiaPaint = () => {
13
- const paint = _Skia.Skia.Paint();
14
-
15
- paint.setAntiAlias(true);
16
- return paint;
17
- };
18
12
  /**
19
13
  * Returns a Skia Paint object
20
14
  * */
21
-
22
-
23
- exports.SkiaPaint = SkiaPaint;
24
-
25
15
  const usePaint = (initializer, deps) => (0, _react.useMemo)(() => {
26
- const p = SkiaPaint();
16
+ console.warn("usePaint() is deprecated. Use Skia.Paint() instead.");
17
+
18
+ const p = _Skia.Skia.Paint();
27
19
 
28
20
  if (initializer) {
29
21
  initializer(p);
@@ -1 +1 @@
1
- {"version":3,"sources":["Paint.ts"],"names":["SkiaPaint","paint","Skia","Paint","setAntiAlias","usePaint","initializer","deps","p"],"mappings":";;;;;;;AACA;;AAEA;;AAGO,MAAMA,SAAS,GAAG,MAAM;AAC7B,QAAMC,KAAK,GAAGC,WAAKC,KAAL,EAAd;;AACAF,EAAAA,KAAK,CAACG,YAAN,CAAmB,IAAnB;AACA,SAAOH,KAAP;AACD,CAJM;AAKP;AACA;AACA;;;;;AACO,MAAMI,QAAQ,GAAG,CACtBC,WADsB,EAEtBC,IAFsB,KAItB,oBAAQ,MAAM;AACZ,QAAMC,CAAC,GAAGR,SAAS,EAAnB;;AACA,MAAIM,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACE,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CALY,CAMZ;AACD,CAPD,EAOGD,IAPH,CAJK","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\nimport type { SkPaint } from \"../types\";\n\nexport const SkiaPaint = () => {\n const paint = Skia.Paint();\n paint.setAntiAlias(true);\n return paint;\n};\n/**\n * Returns a Skia Paint object\n * */\nexport const usePaint = (\n initializer?: (paint: SkPaint) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n const p = SkiaPaint();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n"]}
1
+ {"version":3,"sources":["Paint.ts"],"names":["usePaint","initializer","deps","console","warn","p","Skia","Paint"],"mappings":";;;;;;;AACA;;AAEA;;AAGA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG,CACtBC,WADsB,EAEtBC,IAFsB,KAItB,oBAAQ,MAAM;AACZC,EAAAA,OAAO,CAACC,IAAR,CAAa,qDAAb;;AACA,QAAMC,CAAC,GAAGC,WAAKC,KAAL,EAAV;;AACA,MAAIN,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACI,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CANY,CAOZ;AACD,CARD,EAQGH,IARH,CAJK","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\nimport type { SkPaint } from \"../types\";\n\n/**\n * Returns a Skia Paint object\n * */\nexport const usePaint = (\n initializer?: (paint: SkPaint) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n console.warn(\"usePaint() is deprecated. Use Skia.Paint() instead.\");\n const p = Skia.Paint();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n"]}
@@ -16,6 +16,8 @@ var _Skia = require("../Skia");
16
16
  * @returns
17
17
  */
18
18
  const usePath = (initializer, deps) => (0, _react.useMemo)(() => {
19
+ console.warn("usePath() is deprecated. Use Skia.Path.Make() instead.");
20
+
19
21
  const p = _Skia.Skia.Path.Make();
20
22
 
21
23
  if (initializer) {
@@ -35,6 +37,8 @@ const usePath = (initializer, deps) => (0, _react.useMemo)(() => {
35
37
  exports.usePath = usePath;
36
38
 
37
39
  const useSvgPath = svgpath => (0, _react.useMemo)(() => {
40
+ console.warn("useSvgPath() is deprecated. Use Skia.Path.MakeFromSVGString() instead.");
41
+
38
42
  const p = _Skia.Skia.Path.MakeFromSVGString(svgpath);
39
43
 
40
44
  if (p === null) {
@@ -52,8 +56,16 @@ const useSvgPath = svgpath => (0, _react.useMemo)(() => {
52
56
 
53
57
  exports.useSvgPath = useSvgPath;
54
58
 
55
- const useTextPath = (text, x, y, font) => usePath(p => {
56
- p.fromText(text, x, y, font);
59
+ const useTextPath = (text, x, y, font) => (0, _react.useMemo)(() => {
60
+ console.warn("useTextPath() is deprecated. Use Skia.Path.MakeFromText() instead.");
61
+
62
+ const p = _Skia.Skia.Path.MakeFromText(text, x, y, font);
63
+
64
+ if (p === null) {
65
+ throw new Error("Text path creation failed.");
66
+ }
67
+
68
+ return p;
57
69
  }, [text, x, y, font]);
58
70
 
59
71
  exports.useTextPath = useTextPath;
@@ -1 +1 @@
1
- {"version":3,"sources":["Path.ts"],"names":["usePath","initializer","deps","p","Skia","Path","Make","useSvgPath","svgpath","MakeFromSVGString","Error","useTextPath","text","x","y","font","fromText"],"mappings":";;;;;;;AACA;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,OAAO,GAAG,CACrBC,WADqB,EAErBC,IAFqB,KAIrB,oBAAQ,MAAM;AACZ,QAAMC,CAAC,GAAGC,WAAKC,IAAL,CAAUC,IAAV,EAAV;;AACA,MAAIL,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACE,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CALY,CAMZ;AACD,CAPD,EAOG,CAACF,WAAD,EAAcC,IAAd,CAPH,CAJK;AAaP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMK,UAAU,GAAIC,OAAD,IACxB,oBAAQ,MAAM;AACZ,QAAML,CAAC,GAAGC,WAAKC,IAAL,CAAUI,iBAAV,CAA4BD,OAA5B,CAAV;;AACA,MAAIL,CAAC,KAAK,IAAV,EAAgB;AACd,UAAM,IAAIO,KAAJ,CAAW,qBAAoBF,OAAQ,EAAvC,CAAN;AACD;;AACD,SAAOL,CAAP;AACD,CAND,EAMG,CAACK,OAAD,CANH,CADK;AASP;AACA;AACA;AACA;AACA;;;;;AACO,MAAMG,WAAW,GAAG,CAACC,IAAD,EAAeC,CAAf,EAA0BC,CAA1B,EAAqCC,IAArC,KACzBf,OAAO,CACJG,CAAD,IAAO;AACLA,EAAAA,CAAC,CAACa,QAAF,CAAWJ,IAAX,EAAiBC,CAAjB,EAAoBC,CAApB,EAAuBC,IAAvB;AACD,CAHI,EAIL,CAACH,IAAD,EAAOC,CAAP,EAAUC,CAAV,EAAaC,IAAb,CAJK,CADF","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\nimport type { SkFont, SkPath } from \"../types\";\n\n/**\n * Memoizes and returns a Skia Path object with optional initializer\n * @param initializer\n * @param deps\n * @returns\n */\nexport const usePath = (\n initializer?: (path: SkPath) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n const p = Skia.Path.Make();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initializer, deps]);\n\n/**\n * Initializes a Skia Path from an svg path string\n * @param svgpath\n * @returns\n */\n// MakeFromSVGString\nexport const useSvgPath = (svgpath: string) =>\n useMemo(() => {\n const p = Skia.Path.MakeFromSVGString(svgpath);\n if (p === null) {\n throw new Error(`Invalid SVG path: ${svgpath}`);\n }\n return p;\n }, [svgpath]);\n\n/**\n * Initializes a Skia Path from a text string\n * @param svgpath\n * @returns\n */\nexport const useTextPath = (text: string, x: number, y: number, font: SkFont) =>\n usePath(\n (p) => {\n p.fromText(text, x, y, font);\n },\n [text, x, y, font]\n );\n"]}
1
+ {"version":3,"sources":["Path.ts"],"names":["usePath","initializer","deps","console","warn","p","Skia","Path","Make","useSvgPath","svgpath","MakeFromSVGString","Error","useTextPath","text","x","y","font","MakeFromText"],"mappings":";;;;;;;AACA;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,OAAO,GAAG,CACrBC,WADqB,EAErBC,IAFqB,KAIrB,oBAAQ,MAAM;AACZC,EAAAA,OAAO,CAACC,IAAR,CAAa,wDAAb;;AACA,QAAMC,CAAC,GAAGC,WAAKC,IAAL,CAAUC,IAAV,EAAV;;AACA,MAAIP,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACI,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CANY,CAOZ;AACD,CARD,EAQG,CAACJ,WAAD,EAAcC,IAAd,CARH,CAJK;AAcP;AACA;AACA;AACA;AACA;AACA;;;;;AACO,MAAMO,UAAU,GAAIC,OAAD,IACxB,oBAAQ,MAAM;AACZP,EAAAA,OAAO,CAACC,IAAR,CACE,wEADF;;AAGA,QAAMC,CAAC,GAAGC,WAAKC,IAAL,CAAUI,iBAAV,CAA4BD,OAA5B,CAAV;;AACA,MAAIL,CAAC,KAAK,IAAV,EAAgB;AACd,UAAM,IAAIO,KAAJ,CAAW,qBAAoBF,OAAQ,EAAvC,CAAN;AACD;;AACD,SAAOL,CAAP;AACD,CATD,EASG,CAACK,OAAD,CATH,CADK;AAYP;AACA;AACA;AACA;AACA;;;;;AACO,MAAMG,WAAW,GAAG,CAACC,IAAD,EAAeC,CAAf,EAA0BC,CAA1B,EAAqCC,IAArC,KACzB,oBAAQ,MAAM;AACZd,EAAAA,OAAO,CAACC,IAAR,CACE,oEADF;;AAGA,QAAMC,CAAC,GAAGC,WAAKC,IAAL,CAAUW,YAAV,CAAuBJ,IAAvB,EAA6BC,CAA7B,EAAgCC,CAAhC,EAAmCC,IAAnC,CAAV;;AACA,MAAIZ,CAAC,KAAK,IAAV,EAAgB;AACd,UAAM,IAAIO,KAAJ,CAAU,4BAAV,CAAN;AACD;;AACD,SAAOP,CAAP;AACD,CATD,EASG,CAACS,IAAD,EAAOC,CAAP,EAAUC,CAAV,EAAaC,IAAb,CATH,CADK","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\nimport type { SkFont, SkPath } from \"../types\";\n\n/**\n * Memoizes and returns a Skia Path object with optional initializer\n * @param initializer\n * @param deps\n * @returns\n */\nexport const usePath = (\n initializer?: (path: SkPath) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n console.warn(\"usePath() is deprecated. Use Skia.Path.Make() instead.\");\n const p = Skia.Path.Make();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initializer, deps]);\n\n/**\n * Initializes a Skia Path from an svg path string\n * @param svgpath\n * @returns\n */\n// MakeFromSVGString\nexport const useSvgPath = (svgpath: string) =>\n useMemo(() => {\n console.warn(\n \"useSvgPath() is deprecated. Use Skia.Path.MakeFromSVGString() instead.\"\n );\n const p = Skia.Path.MakeFromSVGString(svgpath);\n if (p === null) {\n throw new Error(`Invalid SVG path: ${svgpath}`);\n }\n return p;\n }, [svgpath]);\n\n/**\n * Initializes a Skia Path from a text string\n * @param svgpath\n * @returns\n */\nexport const useTextPath = (text: string, x: number, y: number, font: SkFont) =>\n useMemo(() => {\n console.warn(\n \"useTextPath() is deprecated. Use Skia.Path.MakeFromText() instead.\"\n );\n const p = Skia.Path.MakeFromText(text, x, y, font);\n if (p === null) {\n throw new Error(\"Text path creation failed.\");\n }\n return p;\n }, [text, x, y, font]);\n"]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.rrect = void 0;
7
+
8
+ var _Skia = require("../Skia");
9
+
10
+ const rrect = (r, rx, ry) => _Skia.Skia.RRectXY(r, rx, ry);
11
+
12
+ exports.rrect = rrect;
13
+ //# sourceMappingURL=RRect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["RRect.tsx"],"names":["rrect","r","rx","ry","Skia","RRectXY"],"mappings":";;;;;;;AAAA;;AAGO,MAAMA,KAAK,GAAG,CAACC,CAAD,EAAYC,EAAZ,EAAwBC,EAAxB,KACnBC,WAAKC,OAAL,CAAaJ,CAAb,EAAgBC,EAAhB,EAAoBC,EAApB,CADK","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { SkRect } from \"../types\";\n\nexport const rrect = (r: SkRect, rx: number, ry: number) =>\n Skia.RRectXY(r, rx, ry);\n"]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.topRight = exports.topLeft = exports.rect = exports.center = exports.bounds = exports.bottomRight = exports.bottomLeft = void 0;
7
+
8
+ var _Skia = require("../Skia");
9
+
10
+ var _types = require("../types");
11
+
12
+ var _Vector = require("./Vector");
13
+
14
+ const rect = (x, y, width, height) => _Skia.Skia.XYWHRect(x, y, width, height);
15
+
16
+ exports.rect = rect;
17
+
18
+ const bounds = rects => {
19
+ const x = Math.min(...rects.map(r => r.x));
20
+ const y = Math.min(...rects.map(r => r.y));
21
+ const width = Math.max(...rects.map(r => r.x + r.width));
22
+ const height = Math.max(...rects.map(r => r.y + r.height));
23
+ return rect(x, y, width, height);
24
+ };
25
+
26
+ exports.bounds = bounds;
27
+
28
+ const topLeft = r => (0, _types.isRRect)(r) ? (0, _Vector.vec)(r.rect.x, r.rect.y) : (0, _Vector.vec)(r.x, r.y);
29
+
30
+ exports.topLeft = topLeft;
31
+
32
+ const topRight = r => (0, _types.isRRect)(r) ? (0, _Vector.vec)(r.rect.x + r.rect.width, r.rect.y) : (0, _Vector.vec)(r.x + r.width, r.y);
33
+
34
+ exports.topRight = topRight;
35
+
36
+ const bottomLeft = r => (0, _types.isRRect)(r) ? (0, _Vector.vec)(r.rect.x, r.rect.y + r.rect.height) : (0, _Vector.vec)(r.x, r.y + r.height);
37
+
38
+ exports.bottomLeft = bottomLeft;
39
+
40
+ const bottomRight = r => (0, _types.isRRect)(r) ? (0, _Vector.vec)(r.rect.x + r.rect.width, r.rect.y + r.rect.height) : (0, _Vector.vec)(r.x + r.width, r.y + r.height);
41
+
42
+ exports.bottomRight = bottomRight;
43
+
44
+ const center = r => (0, _types.isRRect)(r) ? (0, _Vector.vec)(r.rect.x + r.rect.width / 2, r.rect.y + r.rect.height / 2) : (0, _Vector.vec)(r.x + r.width / 2, r.y + r.height / 2);
45
+
46
+ exports.center = center;
47
+ //# sourceMappingURL=Rect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Rect.ts"],"names":["rect","x","y","width","height","Skia","XYWHRect","bounds","rects","Math","min","map","r","max","topLeft","topRight","bottomLeft","bottomRight","center"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAEO,MAAMA,IAAI,GAAG,CAACC,CAAD,EAAYC,CAAZ,EAAuBC,KAAvB,EAAsCC,MAAtC,KAClBC,WAAKC,QAAL,CAAcL,CAAd,EAAiBC,CAAjB,EAAoBC,KAApB,EAA2BC,MAA3B,CADK;;;;AAGA,MAAMG,MAAM,GAAIC,KAAD,IAAqB;AACzC,QAAMP,CAAC,GAAGQ,IAAI,CAACC,GAAL,CAAS,GAAGF,KAAK,CAACG,GAAN,CAAWC,CAAD,IAAOA,CAAC,CAACX,CAAnB,CAAZ,CAAV;AACA,QAAMC,CAAC,GAAGO,IAAI,CAACC,GAAL,CAAS,GAAGF,KAAK,CAACG,GAAN,CAAWC,CAAD,IAAOA,CAAC,CAACV,CAAnB,CAAZ,CAAV;AACA,QAAMC,KAAK,GAAGM,IAAI,CAACI,GAAL,CAAS,GAAGL,KAAK,CAACG,GAAN,CAAWC,CAAD,IAAOA,CAAC,CAACX,CAAF,GAAMW,CAAC,CAACT,KAAzB,CAAZ,CAAd;AACA,QAAMC,MAAM,GAAGK,IAAI,CAACI,GAAL,CAAS,GAAGL,KAAK,CAACG,GAAN,CAAWC,CAAD,IAAOA,CAAC,CAACV,CAAF,GAAMU,CAAC,CAACR,MAAzB,CAAZ,CAAf;AACA,SAAOJ,IAAI,CAACC,CAAD,EAAIC,CAAJ,EAAOC,KAAP,EAAcC,MAAd,CAAX;AACD,CANM;;;;AAQA,MAAMU,OAAO,GAAIF,CAAD,IACrB,oBAAQA,CAAR,IAAa,iBAAIA,CAAC,CAACZ,IAAF,CAAOC,CAAX,EAAcW,CAAC,CAACZ,IAAF,CAAOE,CAArB,CAAb,GAAuC,iBAAIU,CAAC,CAACX,CAAN,EAASW,CAAC,CAACV,CAAX,CADlC;;;;AAEA,MAAMa,QAAQ,GAAIH,CAAD,IACtB,oBAAQA,CAAR,IAAa,iBAAIA,CAAC,CAACZ,IAAF,CAAOC,CAAP,GAAWW,CAAC,CAACZ,IAAF,CAAOG,KAAtB,EAA6BS,CAAC,CAACZ,IAAF,CAAOE,CAApC,CAAb,GAAsD,iBAAIU,CAAC,CAACX,CAAF,GAAMW,CAAC,CAACT,KAAZ,EAAmBS,CAAC,CAACV,CAArB,CADjD;;;;AAEA,MAAMc,UAAU,GAAIJ,CAAD,IACxB,oBAAQA,CAAR,IACI,iBAAIA,CAAC,CAACZ,IAAF,CAAOC,CAAX,EAAcW,CAAC,CAACZ,IAAF,CAAOE,CAAP,GAAWU,CAAC,CAACZ,IAAF,CAAOI,MAAhC,CADJ,GAEI,iBAAIQ,CAAC,CAACX,CAAN,EAASW,CAAC,CAACV,CAAF,GAAMU,CAAC,CAACR,MAAjB,CAHC;;;;AAIA,MAAMa,WAAW,GAAIL,CAAD,IACzB,oBAAQA,CAAR,IACI,iBAAIA,CAAC,CAACZ,IAAF,CAAOC,CAAP,GAAWW,CAAC,CAACZ,IAAF,CAAOG,KAAtB,EAA6BS,CAAC,CAACZ,IAAF,CAAOE,CAAP,GAAWU,CAAC,CAACZ,IAAF,CAAOI,MAA/C,CADJ,GAEI,iBAAIQ,CAAC,CAACX,CAAF,GAAMW,CAAC,CAACT,KAAZ,EAAmBS,CAAC,CAACV,CAAF,GAAMU,CAAC,CAACR,MAA3B,CAHC;;;;AAIA,MAAMc,MAAM,GAAIN,CAAD,IACpB,oBAAQA,CAAR,IACI,iBAAIA,CAAC,CAACZ,IAAF,CAAOC,CAAP,GAAWW,CAAC,CAACZ,IAAF,CAAOG,KAAP,GAAe,CAA9B,EAAiCS,CAAC,CAACZ,IAAF,CAAOE,CAAP,GAAWU,CAAC,CAACZ,IAAF,CAAOI,MAAP,GAAgB,CAA5D,CADJ,GAEI,iBAAIQ,CAAC,CAACX,CAAF,GAAMW,CAAC,CAACT,KAAF,GAAU,CAApB,EAAuBS,CAAC,CAACV,CAAF,GAAMU,CAAC,CAACR,MAAF,GAAW,CAAxC,CAHC","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { SkRect, SkRRect } from \"../types\";\nimport { isRRect } from \"../types\";\n\nimport { vec } from \"./Vector\";\n\nexport const rect = (x: number, y: number, width: number, height: number) =>\n Skia.XYWHRect(x, y, width, height);\n\nexport const bounds = (rects: SkRect[]) => {\n const x = Math.min(...rects.map((r) => r.x));\n const y = Math.min(...rects.map((r) => r.y));\n const width = Math.max(...rects.map((r) => r.x + r.width));\n const height = Math.max(...rects.map((r) => r.y + r.height));\n return rect(x, y, width, height);\n};\n\nexport const topLeft = (r: SkRect | SkRRect) =>\n isRRect(r) ? vec(r.rect.x, r.rect.y) : vec(r.x, r.y);\nexport const topRight = (r: SkRect | SkRRect) =>\n isRRect(r) ? vec(r.rect.x + r.rect.width, r.rect.y) : vec(r.x + r.width, r.y);\nexport const bottomLeft = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x, r.rect.y + r.rect.height)\n : vec(r.x, r.y + r.height);\nexport const bottomRight = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x + r.rect.width, r.rect.y + r.rect.height)\n : vec(r.x + r.width, r.y + r.height);\nexport const center = (r: SkRect | SkRRect) =>\n isRRect(r)\n ? vec(r.rect.x + r.rect.width / 2, r.rect.y + r.rect.height / 2)\n : vec(r.x + r.width / 2, r.y + r.height / 2);\n"]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.vec = exports.translate = exports.sub = exports.point = exports.neg = exports.dist = exports.add = void 0;
7
+
8
+ var _Skia = require("../Skia");
9
+
10
+ const vec = function () {
11
+ let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
12
+ let y = arguments.length > 1 ? arguments[1] : undefined;
13
+ return _Skia.Skia.Point(x, y !== null && y !== void 0 ? y : x);
14
+ };
15
+
16
+ exports.vec = vec;
17
+ const point = vec;
18
+ exports.point = point;
19
+
20
+ const neg = a => vec(-a.x, -a.y);
21
+
22
+ exports.neg = neg;
23
+
24
+ const add = (a, b) => vec(a.x + b.x, a.y + b.y);
25
+
26
+ exports.add = add;
27
+
28
+ const sub = (a, b) => vec(a.x - b.x, a.y - b.y);
29
+
30
+ exports.sub = sub;
31
+
32
+ const dist = (a, b) => Math.hypot(a.x - b.x, a.y - b.y);
33
+
34
+ exports.dist = dist;
35
+
36
+ const translate = _ref => {
37
+ let {
38
+ x,
39
+ y
40
+ } = _ref;
41
+ return [{
42
+ translateX: x
43
+ }, {
44
+ translateY: y
45
+ }];
46
+ };
47
+
48
+ exports.translate = translate;
49
+ //# sourceMappingURL=Vector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Vector.ts"],"names":["vec","x","y","Skia","Point","point","neg","a","add","b","sub","dist","Math","hypot","translate","translateX","translateY"],"mappings":";;;;;;;AAAA;;AAGO,MAAMA,GAAG,GAAG;AAAA,MAACC,CAAD,uEAAK,CAAL;AAAA,MAAQC,CAAR;AAAA,SAAuBC,WAAKC,KAAL,CAAWH,CAAX,EAAcC,CAAd,aAAcA,CAAd,cAAcA,CAAd,GAAmBD,CAAnB,CAAvB;AAAA,CAAZ;;;AACA,MAAMI,KAAK,GAAGL,GAAd;;;AACA,MAAMM,GAAG,GAAIC,CAAD,IAAeP,GAAG,CAAC,CAACO,CAAC,CAACN,CAAJ,EAAO,CAACM,CAAC,CAACL,CAAV,CAA9B;;;;AACA,MAAMM,GAAG,GAAG,CAACD,CAAD,EAAYE,CAAZ,KAA0BT,GAAG,CAACO,CAAC,CAACN,CAAF,GAAMQ,CAAC,CAACR,CAAT,EAAYM,CAAC,CAACL,CAAF,GAAMO,CAAC,CAACP,CAApB,CAAzC;;;;AACA,MAAMQ,GAAG,GAAG,CAACH,CAAD,EAAYE,CAAZ,KAA0BT,GAAG,CAACO,CAAC,CAACN,CAAF,GAAMQ,CAAC,CAACR,CAAT,EAAYM,CAAC,CAACL,CAAF,GAAMO,CAAC,CAACP,CAApB,CAAzC;;;;AACA,MAAMS,IAAI,GAAG,CAACJ,CAAD,EAAYE,CAAZ,KAA0BG,IAAI,CAACC,KAAL,CAAWN,CAAC,CAACN,CAAF,GAAMQ,CAAC,CAACR,CAAnB,EAAsBM,CAAC,CAACL,CAAF,GAAMO,CAAC,CAACP,CAA9B,CAAvC;;;;AACA,MAAMY,SAAS,GAAG;AAAA,MAAC;AAAEb,IAAAA,CAAF;AAAKC,IAAAA;AAAL,GAAD;AAAA,SACvB,CAAC;AAAEa,IAAAA,UAAU,EAAEd;AAAd,GAAD,EAAoB;AAAEe,IAAAA,UAAU,EAAEd;AAAd,GAApB,CADuB;AAAA,CAAlB","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { Vector } from \"../types\";\n\nexport const vec = (x = 0, y?: number) => Skia.Point(x, y ?? x);\nexport const point = vec;\nexport const neg = (a: Vector) => vec(-a.x, -a.y);\nexport const add = (a: Vector, b: Vector) => vec(a.x + b.x, a.y + b.y);\nexport const sub = (a: Vector, b: Vector) => vec(a.x - b.x, a.y - b.y);\nexport const dist = (a: Vector, b: Vector) => Math.hypot(a.x - b.x, a.y - b.y);\nexport const translate = ({ x, y }: Vector) =>\n [{ translateX: x }, { translateY: y }] as const;\n"]}
@@ -4,19 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _Color = require("./Color");
8
-
9
- Object.keys(_Color).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _Color[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function () {
15
- return _Color[key];
16
- }
17
- });
18
- });
19
-
20
7
  var _Data = require("./Data");
21
8
 
22
9
  Object.keys(_Data).forEach(function (key) {
@@ -95,41 +82,80 @@ Object.keys(_SVG).forEach(function (key) {
95
82
  });
96
83
  });
97
84
 
98
- var _Shader = require("./Shader");
85
+ var _Path = require("./Path");
99
86
 
100
- Object.keys(_Shader).forEach(function (key) {
87
+ Object.keys(_Path).forEach(function (key) {
101
88
  if (key === "default" || key === "__esModule") return;
102
- if (key in exports && exports[key] === _Shader[key]) return;
89
+ if (key in exports && exports[key] === _Path[key]) return;
103
90
  Object.defineProperty(exports, key, {
104
91
  enumerable: true,
105
92
  get: function () {
106
- return _Shader[key];
93
+ return _Path[key];
107
94
  }
108
95
  });
109
96
  });
110
97
 
111
- var _Paint = require("./Paint");
98
+ var _Vector = require("./Vector");
112
99
 
113
- Object.keys(_Paint).forEach(function (key) {
100
+ Object.keys(_Vector).forEach(function (key) {
114
101
  if (key === "default" || key === "__esModule") return;
115
- if (key in exports && exports[key] === _Paint[key]) return;
102
+ if (key in exports && exports[key] === _Vector[key]) return;
116
103
  Object.defineProperty(exports, key, {
117
104
  enumerable: true,
118
105
  get: function () {
119
- return _Paint[key];
106
+ return _Vector[key];
120
107
  }
121
108
  });
122
109
  });
123
110
 
124
- var _Path = require("./Path");
111
+ var _Rect = require("./Rect");
125
112
 
126
- Object.keys(_Path).forEach(function (key) {
113
+ Object.keys(_Rect).forEach(function (key) {
127
114
  if (key === "default" || key === "__esModule") return;
128
- if (key in exports && exports[key] === _Path[key]) return;
115
+ if (key in exports && exports[key] === _Rect[key]) return;
129
116
  Object.defineProperty(exports, key, {
130
117
  enumerable: true,
131
118
  get: function () {
132
- return _Path[key];
119
+ return _Rect[key];
120
+ }
121
+ });
122
+ });
123
+
124
+ var _RRect = require("./RRect");
125
+
126
+ Object.keys(_RRect).forEach(function (key) {
127
+ if (key === "default" || key === "__esModule") return;
128
+ if (key in exports && exports[key] === _RRect[key]) return;
129
+ Object.defineProperty(exports, key, {
130
+ enumerable: true,
131
+ get: function () {
132
+ return _RRect[key];
133
+ }
134
+ });
135
+ });
136
+
137
+ var _Matrix = require("./Matrix");
138
+
139
+ Object.keys(_Matrix).forEach(function (key) {
140
+ if (key === "default" || key === "__esModule") return;
141
+ if (key in exports && exports[key] === _Matrix[key]) return;
142
+ Object.defineProperty(exports, key, {
143
+ enumerable: true,
144
+ get: function () {
145
+ return _Matrix[key];
146
+ }
147
+ });
148
+ });
149
+
150
+ var _Paint = require("./Paint");
151
+
152
+ Object.keys(_Paint).forEach(function (key) {
153
+ if (key === "default" || key === "__esModule") return;
154
+ if (key in exports && exports[key] === _Paint[key]) return;
155
+ Object.defineProperty(exports, key, {
156
+ enumerable: true,
157
+ get: function () {
158
+ return _Paint[key];
133
159
  }
134
160
  });
135
161
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Color\";\nexport * from \"./Data\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Image\";\nexport * from \"./Picture\";\nexport * from \"./SVG\";\nexport * from \"./Shader\";\nexport * from \"./Paint\";\nexport * from \"./Path\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Data\";\nexport * from \"./Font\";\nexport * from \"./Typeface\";\nexport * from \"./Image\";\nexport * from \"./Picture\";\nexport * from \"./SVG\";\nexport * from \"./Path\";\nexport * from \"./Vector\";\nexport * from \"./Rect\";\nexport * from \"./RRect\";\nexport * from \"./Matrix\";\nexport * from \"./Paint\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Font.ts"],"names":["fontStyle","weight","width","slant","FontWeight","FontWidth","FontSlant","FontEdging","FontHinting","FontStyle","Normal","Upright","Bold","Italic","BoldItalic"],"mappings":";;;;;;;AAuKA,MAAMA,SAAS,GAAG,CAChBC,MADgB,EAEhBC,KAFgB,EAGhBC,KAHgB,MAID;AAAEF,EAAAA,MAAF;AAAUC,EAAAA,KAAV;AAAiBC,EAAAA;AAAjB,CAJC,CAAlB;;IAYYC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAcAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAYAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAMAC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAMAC,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W;;AAOL,MAAMC,SAAS,GAAG;AACvBC,EAAAA,MAAM,EAAEV,SAAS,CAACI,UAAU,CAACM,MAAZ,EAAoBL,SAAS,CAACK,MAA9B,EAAsCJ,SAAS,CAACK,OAAhD,CADM;AAEvBC,EAAAA,IAAI,EAAEZ,SAAS,CAACI,UAAU,CAACQ,IAAZ,EAAkBP,SAAS,CAACK,MAA5B,EAAoCJ,SAAS,CAACK,OAA9C,CAFQ;AAGvBE,EAAAA,MAAM,EAAEb,SAAS,CAACI,UAAU,CAACM,MAAZ,EAAoBL,SAAS,CAACK,MAA9B,EAAsCJ,SAAS,CAACO,MAAhD,CAHM;AAIvBC,EAAAA,UAAU,EAAEd,SAAS,CAACI,UAAU,CAACQ,IAAZ,EAAkBP,SAAS,CAACK,MAA5B,EAAoCJ,SAAS,CAACO,MAA9C;AAJE,CAAlB","sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkPaint } from \"../Paint\";\nimport type { SkRect } from \"../Rect\";\nimport type { SkPoint } from \"../Point\";\nimport type { SkTypeface } from \"../Typeface\";\n\nexport interface FontMetrics {\n ascent: number; // suggested space above the baseline. < 0\n descent: number; // suggested space below the baseline. > 0\n leading: number; // suggested spacing between descent of previous line and ascent of next line.\n bounds?: SkRect; // smallest rect containing all glyphs (relative to 0,0)\n}\n\nexport interface SkFont extends SkJSIInstance<\"Font\"> {\n /** Returns the advance width of text.\n The advance is the normal distance to move before drawing additional text.\n Returns the bounding box of text if bounds is not nullptr. The paint\n stroke settings, mask filter, or path effect may modify the bounds.\n\n @param text character storage encoded with SkTextEncoding\n @param byteLength length of character storage in bytes\n @param bounds returns bounding box relative to (0, 0) if not nullptr\n @param paint optional; may be nullptr\n @return number of glyphs represented by text of length byteLength\n */\n measureText: (text: string, paint?: SkPaint) => SkRect;\n\n /**\n * Returns the FontMetrics for this font.\n */\n getMetrics(): FontMetrics;\n\n /**\n * Retrieves the glyph ids for each code point in the provided string. This call is passed to\n * the typeface of this font. Note that glyph IDs are typeface-dependent; different faces\n * may have different ids for the same code point.\n * @param str\n * @param numCodePoints - the number of code points in the string. Defaults to str.length.\n */\n getGlyphIDs(str: string, numCodePoints?: number): number[];\n\n /**\n * Retrieves the advanceX measurements for each glyph.\n * If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.\n * One width per glyph is returned in the returned array.\n * @param glyphs\n * @param paint\n * @param output - if provided, the results will be copied into this array.\n */\n getGlyphWidths(\n glyphs: number[],\n paint?: SkPaint | null,\n output?: Float32Array\n ): Float32Array;\n\n /**\n * Computes any intersections of a thick \"line\" and a run of positionsed glyphs.\n * The thick line is represented as a top and bottom coordinate (positive for\n * below the baseline, negative for above). If there are no intersections\n * (e.g. if this is intended as an underline, and there are no \"collisions\")\n * then the returned array will be empty. If there are intersections, the array\n * will contain pairs of X coordinates [start, end] for each segment that\n * intersected with a glyph.\n *\n * @param glyphs the glyphs to intersect with\n * @param positions x,y coordinates (2 per glyph) for each glyph\n * @param top top of the thick \"line\" to use for intersection testing\n * @param bottom bottom of the thick \"line\" to use for intersection testing\n * @return array of [start, end] x-coordinate pairs. Maybe be empty.\n */\n getGlyphIntercepts(\n glyphs: number[],\n positions: SkPoint[],\n top: number,\n bottom: number\n ): number[];\n\n /**\n * Returns text scale on x-axis. Default value is 1.\n */\n getScaleX(): number;\n\n /**\n * Returns text size in points.\n */\n getSize(): number;\n\n /**\n * Returns text skew on x-axis. Default value is zero.\n */\n getSkewX(): number;\n\n /**\n * Returns embolden effect for this font. Default value is false.\n */\n isEmbolden(): boolean;\n\n /**\n * Returns the Typeface set for this font.\n */\n getTypeface(): SkTypeface | null;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with partial transparency.\n * @param edging\n */\n setEdging(edging: FontEdging): void;\n\n /**\n * Requests, but does not require, to use bitmaps in fonts instead of outlines.\n * @param embeddedBitmaps\n */\n setEmbeddedBitmaps(embeddedBitmaps: boolean): void;\n\n /**\n * Sets level of glyph outline adjustment.\n * @param hinting\n */\n setHinting(hinting: FontHinting): void;\n\n /**\n * Requests, but does not require, linearly scalable font and glyph metrics.\n *\n * For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding.\n * Note that some bitmap formats may not be able to scale linearly and will ignore this flag.\n * @param linearMetrics\n */\n setLinearMetrics(linearMetrics: boolean): void;\n\n /**\n * Sets the text scale on the x-axis.\n * @param sx\n */\n setScaleX(sx: number): void;\n\n /**\n * Sets the text size in points on this font.\n * @param points\n */\n setSize(points: number): void;\n\n /**\n * Sets the text-skew on the x axis for this font.\n * @param sx\n */\n setSkewX(sx: number): void;\n\n /**\n * Set embolden effect for this font.\n * @param embolden\n */\n setEmbolden(embolden: boolean): void;\n\n /**\n * Requests, but does not require, that glyphs respect sub-pixel positioning.\n * @param subpixel\n */\n setSubpixel(subpixel: boolean): void;\n\n /**\n * Sets the typeface to use with this font. null means to clear the typeface and use the\n * default one.\n * @param face\n */\n setTypeface(face: SkTypeface | null): void;\n}\n\nconst fontStyle = (\n weight: FontWeight,\n width: FontWidth,\n slant: FontSlant\n): FontStyle => ({ weight, width, slant });\n\nexport interface FontStyle {\n weight?: FontWeight;\n width?: FontWidth;\n slant?: FontSlant;\n}\n\nexport enum FontWeight {\n Invisible = 0,\n Thin = 100,\n ExtraLight = 200,\n Light = 300,\n Normal = 400,\n Medium = 500,\n SemiBold = 600,\n Bold = 700,\n ExtraBold = 800,\n Black = 900,\n ExtraBlack = 1000,\n}\n\nexport enum FontWidth {\n UltraCondensed = 1,\n ExtraCondensed = 2,\n Condensed = 3,\n SemiCondensed = 4,\n Normal = 5,\n SemiExpanded = 6,\n Expanded = 7,\n ExtraExpanded = 8,\n UltraExpanded = 9,\n}\n\nexport enum FontSlant {\n Upright,\n Italic,\n Oblique,\n}\n\nexport enum FontEdging {\n Alias,\n AntiAlias,\n SubpixelAntiAlias,\n}\n\nexport enum FontHinting {\n None,\n Slight,\n Normal,\n Full,\n}\n\nexport const FontStyle = {\n Normal: fontStyle(FontWeight.Normal, FontWidth.Normal, FontSlant.Upright),\n Bold: fontStyle(FontWeight.Bold, FontWidth.Normal, FontSlant.Upright),\n Italic: fontStyle(FontWeight.Normal, FontWidth.Normal, FontSlant.Italic),\n BoldItalic: fontStyle(FontWeight.Bold, FontWidth.Normal, FontSlant.Italic),\n};\n"]}
1
+ {"version":3,"sources":["Font.ts"],"names":["fontStyle","weight","width","slant","FontWeight","FontWidth","FontSlant","FontEdging","FontHinting","FontStyle","Normal","Upright","Bold","Italic","BoldItalic"],"mappings":";;;;;;;AAkKA,MAAMA,SAAS,GAAG,CAChBC,MADgB,EAEhBC,KAFgB,EAGhBC,KAHgB,MAID;AAAEF,EAAAA,MAAF;AAAUC,EAAAA,KAAV;AAAiBC,EAAAA;AAAjB,CAJC,CAAlB;;IAYYC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAcAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAYAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAMAC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAMAC,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W;;AAOL,MAAMC,SAAS,GAAG;AACvBC,EAAAA,MAAM,EAAEV,SAAS,CAACI,UAAU,CAACM,MAAZ,EAAoBL,SAAS,CAACK,MAA9B,EAAsCJ,SAAS,CAACK,OAAhD,CADM;AAEvBC,EAAAA,IAAI,EAAEZ,SAAS,CAACI,UAAU,CAACQ,IAAZ,EAAkBP,SAAS,CAACK,MAA5B,EAAoCJ,SAAS,CAACK,OAA9C,CAFQ;AAGvBE,EAAAA,MAAM,EAAEb,SAAS,CAACI,UAAU,CAACM,MAAZ,EAAoBL,SAAS,CAACK,MAA9B,EAAsCJ,SAAS,CAACO,MAAhD,CAHM;AAIvBC,EAAAA,UAAU,EAAEd,SAAS,CAACI,UAAU,CAACQ,IAAZ,EAAkBP,SAAS,CAACK,MAA5B,EAAoCJ,SAAS,CAACO,MAA9C;AAJE,CAAlB","sourcesContent":["import type { SkJSIInstance } from \"../JsiInstance\";\nimport type { SkPaint } from \"../Paint\";\nimport type { SkRect } from \"../Rect\";\nimport type { SkPoint } from \"../Point\";\nimport type { SkTypeface } from \"../Typeface\";\n\nexport interface FontMetrics {\n ascent: number; // suggested space above the baseline. < 0\n descent: number; // suggested space below the baseline. > 0\n leading: number; // suggested spacing between descent of previous line and ascent of next line.\n bounds?: SkRect; // smallest rect containing all glyphs (relative to 0,0)\n}\n\nexport interface SkFont extends SkJSIInstance<\"Font\"> {\n /**\n * Retrieves the advanceX measurements for each glyph.\n * If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.\n * One width per glyph is returned in the returned array.\n * @param glyphs\n * @param paint\n */\n getGlyphWidths(glyphs: number[], paint?: SkPaint): number[];\n\n /** Returns the advance width of text.\n The advance is the normal distance to move before drawing additional text.\n Returns the bounding box of text if bounds is not nullptr. The paint\n stroke settings, mask filter, or path effect may modify the bounds.\n\n @param text character storage encoded with SkTextEncoding\n @param byteLength length of character storage in bytes\n @param bounds returns bounding box relative to (0, 0) if not nullptr\n @param paint optional; may be nullptr\n @return number of glyphs represented by text of length byteLength\n */\n measureText: (text: string, paint?: SkPaint) => SkRect;\n\n /**\n * Returns the FontMetrics for this font.\n */\n getMetrics(): FontMetrics;\n\n /**\n * Retrieves the glyph ids for each code point in the provided string. This call is passed to\n * the typeface of this font. Note that glyph IDs are typeface-dependent; different faces\n * may have different ids for the same code point.\n * @param str\n * @param numCodePoints - the number of code points in the string. Defaults to str.length.\n */\n getGlyphIDs(str: string, numCodePoints?: number): number[];\n\n /**\n * Computes any intersections of a thick \"line\" and a run of positionsed glyphs.\n * The thick line is represented as a top and bottom coordinate (positive for\n * below the baseline, negative for above). If there are no intersections\n * (e.g. if this is intended as an underline, and there are no \"collisions\")\n * then the returned array will be empty. If there are intersections, the array\n * will contain pairs of X coordinates [start, end] for each segment that\n * intersected with a glyph.\n *\n * @param glyphs the glyphs to intersect with\n * @param positions x,y coordinates (2 per glyph) for each glyph\n * @param top top of the thick \"line\" to use for intersection testing\n * @param bottom bottom of the thick \"line\" to use for intersection testing\n * @return array of [start, end] x-coordinate pairs. Maybe be empty.\n */\n getGlyphIntercepts(\n glyphs: number[],\n positions: SkPoint[],\n top: number,\n bottom: number\n ): number[];\n\n /**\n * Returns text scale on x-axis. Default value is 1.\n */\n getScaleX(): number;\n\n /**\n * Returns text size in points.\n */\n getSize(): number;\n\n /**\n * Returns text skew on x-axis. Default value is zero.\n */\n getSkewX(): number;\n\n /**\n * Returns embolden effect for this font. Default value is false.\n */\n isEmbolden(): boolean;\n\n /**\n * Returns the Typeface set for this font.\n */\n getTypeface(): SkTypeface | null;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with partial transparency.\n * @param edging\n */\n setEdging(edging: FontEdging): void;\n\n /**\n * Requests, but does not require, to use bitmaps in fonts instead of outlines.\n * @param embeddedBitmaps\n */\n setEmbeddedBitmaps(embeddedBitmaps: boolean): void;\n\n /**\n * Sets level of glyph outline adjustment.\n * @param hinting\n */\n setHinting(hinting: FontHinting): void;\n\n /**\n * Requests, but does not require, linearly scalable font and glyph metrics.\n *\n * For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding.\n * Note that some bitmap formats may not be able to scale linearly and will ignore this flag.\n * @param linearMetrics\n */\n setLinearMetrics(linearMetrics: boolean): void;\n\n /**\n * Sets the text scale on the x-axis.\n * @param sx\n */\n setScaleX(sx: number): void;\n\n /**\n * Sets the text size in points on this font.\n * @param points\n */\n setSize(points: number): void;\n\n /**\n * Sets the text-skew on the x axis for this font.\n * @param sx\n */\n setSkewX(sx: number): void;\n\n /**\n * Set embolden effect for this font.\n * @param embolden\n */\n setEmbolden(embolden: boolean): void;\n\n /**\n * Requests, but does not require, that glyphs respect sub-pixel positioning.\n * @param subpixel\n */\n setSubpixel(subpixel: boolean): void;\n\n /**\n * Sets the typeface to use with this font. null means to clear the typeface and use the\n * default one.\n * @param face\n */\n setTypeface(face: SkTypeface | null): void;\n}\n\nconst fontStyle = (\n weight: FontWeight,\n width: FontWidth,\n slant: FontSlant\n): FontStyle => ({ weight, width, slant });\n\nexport interface FontStyle {\n weight?: FontWeight;\n width?: FontWidth;\n slant?: FontSlant;\n}\n\nexport enum FontWeight {\n Invisible = 0,\n Thin = 100,\n ExtraLight = 200,\n Light = 300,\n Normal = 400,\n Medium = 500,\n SemiBold = 600,\n Bold = 700,\n ExtraBold = 800,\n Black = 900,\n ExtraBlack = 1000,\n}\n\nexport enum FontWidth {\n UltraCondensed = 1,\n ExtraCondensed = 2,\n Condensed = 3,\n SemiCondensed = 4,\n Normal = 5,\n SemiExpanded = 6,\n Expanded = 7,\n ExtraExpanded = 8,\n UltraExpanded = 9,\n}\n\nexport enum FontSlant {\n Upright,\n Italic,\n Oblique,\n}\n\nexport enum FontEdging {\n Alias,\n AntiAlias,\n SubpixelAntiAlias,\n}\n\nexport enum FontHinting {\n None,\n Slight,\n Normal,\n Full,\n}\n\nexport const FontStyle = {\n Normal: fontStyle(FontWeight.Normal, FontWidth.Normal, FontSlant.Upright),\n Bold: fontStyle(FontWeight.Bold, FontWidth.Normal, FontSlant.Upright),\n Italic: fontStyle(FontWeight.Normal, FontWidth.Normal, FontSlant.Italic),\n BoldItalic: fontStyle(FontWeight.Bold, FontWidth.Normal, FontSlant.Italic),\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["ImageFactory.ts"],"names":["AlphaType","ColorType"],"mappings":";;;;;;;AAAA;IAKYA,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAOAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S","sourcesContent":["/* eslint-disable camelcase */\nimport type { Data } from \"../Data\";\n\nimport type { SkImage } from \"./Image\";\n\nexport enum AlphaType {\n Unknown,\n Opaque,\n Premul,\n Unpremul,\n}\n\nexport enum ColorType {\n Unknown, //!< uninitialized\n Alpha_8, //!< pixel with alpha in 8-bit byte\n RGB_565, //!< pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, //!< pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, //!< pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, //!< pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, //!< pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, //!< 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, //!< 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, //!< pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, //!< pixel with 10 bits each for blue, green, red; in 32-bit word\n Gray_8, //!< pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, //!< pixel with half floats in [0,1] for red, green, blue, alpha;\n // in 64-bit word\n RGBA_F16, //!< pixel with half floats for red, green, blue, alpha;\n // in 64-bit word\n RGBA_F32, //!< pixel using C float for red, green, blue, alpha; in 128-bit word\n\n // The following 6 colortypes are just for reading from - not for rendering to\n R8G8_unorm, //!< pixel with a uint8_t for red and green\n\n A16_float, //!< pixel with a half float for alpha\n R16G16_float, //!< pixel with a half float for red and green\n\n A16_unorm, //!< pixel with a little endian uint16_t for alpha\n R16G16_unorm, //!< pixel with a little endian uint16_t for red and green\n R16G16B16A16_unorm, //!< pixel with a little endian uint16_t for red, green, blue\n // and alpha\n SRGBA_8888,\n}\n\nexport interface ImageInfo {\n alphaType: AlphaType;\n // TODO: add support for color space\n // colorSpace: ColorSpace;\n colorType: ColorType;\n height: number;\n width: number;\n}\n\nexport interface ImageFactory {\n /**\n * Return an Image backed by the encoded data, but attempt to defer decoding until the image\n * is actually used/drawn. This deferral allows the system to cache the result, either on the\n * CPU or on the GPU, depending on where the image is drawn.\n * This decoding uses the codecs that have been compiled into CanvasKit. If the bytes are\n * invalid (or an unrecognized codec), null will be returned. See Image.h for more details.\n * @param data - Data object with bytes of data\n * @returns If the encoded format is not supported, or subset is outside of the bounds of the decoded\n * image, nullptr is returned.\n */\n MakeImageFromEncoded: (encoded: Data) => SkImage | null;\n\n /**\n * Returns an image with the given pixel data and format.\n * Note that we will always make a copy of the pixel data, because of inconsistencies in\n * behavior between GPU and CPU (i.e. the pixel data will be turned into a GPU texture and\n * not modifiable after creation).\n *\n * @param info\n * @param data - bytes representing the pixel data.\n * @param bytesPerRow\n */\n MakeImage(info: ImageInfo, data: Data, bytesPerRow: number): SkImage | null;\n}\n"]}
1
+ {"version":3,"sources":["ImageFactory.ts"],"names":["AlphaType","ColorType"],"mappings":";;;;;;;AAAA;IAKYA,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;;IAOAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S","sourcesContent":["/* eslint-disable camelcase */\nimport type { SkData } from \"../Data\";\n\nimport type { SkImage } from \"./Image\";\n\nexport enum AlphaType {\n Unknown,\n Opaque,\n Premul,\n Unpremul,\n}\n\nexport enum ColorType {\n Unknown, //!< uninitialized\n Alpha_8, //!< pixel with alpha in 8-bit byte\n RGB_565, //!< pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, //!< pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, //!< pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, //!< pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, //!< pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, //!< 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, //!< 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, //!< pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, //!< pixel with 10 bits each for blue, green, red; in 32-bit word\n Gray_8, //!< pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, //!< pixel with half floats in [0,1] for red, green, blue, alpha;\n // in 64-bit word\n RGBA_F16, //!< pixel with half floats for red, green, blue, alpha;\n // in 64-bit word\n RGBA_F32, //!< pixel using C float for red, green, blue, alpha; in 128-bit word\n\n // The following 6 colortypes are just for reading from - not for rendering to\n R8G8_unorm, //!< pixel with a uint8_t for red and green\n\n A16_float, //!< pixel with a half float for alpha\n R16G16_float, //!< pixel with a half float for red and green\n\n A16_unorm, //!< pixel with a little endian uint16_t for alpha\n R16G16_unorm, //!< pixel with a little endian uint16_t for red and green\n R16G16B16A16_unorm, //!< pixel with a little endian uint16_t for red, green, blue\n // and alpha\n SRGBA_8888,\n}\n\nexport interface ImageInfo {\n alphaType: AlphaType;\n // TODO: add support for color space\n // colorSpace: ColorSpace;\n colorType: ColorType;\n height: number;\n width: number;\n}\n\nexport interface ImageFactory {\n /**\n * Return an Image backed by the encoded data, but attempt to defer decoding until the image\n * is actually used/drawn. This deferral allows the system to cache the result, either on the\n * CPU or on the GPU, depending on where the image is drawn.\n * This decoding uses the codecs that have been compiled into CanvasKit. If the bytes are\n * invalid (or an unrecognized codec), null will be returned. See Image.h for more details.\n * @param data - Data object with bytes of data\n * @returns If the encoded format is not supported, or subset is outside of the bounds of the decoded\n * image, nullptr is returned.\n */\n MakeImageFromEncoded: (encoded: SkData) => SkImage | null;\n\n /**\n * Returns an image with the given pixel data and format.\n * Note that we will always make a copy of the pixel data, because of inconsistencies in\n * behavior between GPU and CPU (i.e. the pixel data will be turned into a GPU texture and\n * not modifiable after creation).\n *\n * @param info\n * @param data - bytes representing the pixel data.\n * @param bytesPerRow\n */\n MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): SkImage | null;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.MatrixIndex = void 0;
6
+ exports.processTransform = exports.MatrixIndex = void 0;
7
7
  let MatrixIndex;
8
8
  exports.MatrixIndex = MatrixIndex;
9
9
 
@@ -18,4 +18,61 @@ exports.MatrixIndex = MatrixIndex;
18
18
  MatrixIndex[MatrixIndex["Persp1"] = 7] = "Persp1";
19
19
  MatrixIndex[MatrixIndex["persp2"] = 8] = "persp2";
20
20
  })(MatrixIndex || (exports.MatrixIndex = MatrixIndex = {}));
21
+
22
+ const processTransform = (m, transforms) => {
23
+ for (const transform of transforms) {
24
+ const key = Object.keys(transform)[0];
25
+ const value = transform[key];
26
+
27
+ if (key === "translateX") {
28
+ m.translate(value, 0);
29
+ continue;
30
+ }
31
+
32
+ if (key === "translateY") {
33
+ m.translate(0, value);
34
+ continue;
35
+ }
36
+
37
+ if (key === "scale") {
38
+ m.scale(value, value);
39
+ continue;
40
+ }
41
+
42
+ if (key === "scaleX") {
43
+ m.scale(value, 1);
44
+ continue;
45
+ }
46
+
47
+ if (key === "scaleY") {
48
+ m.scale(1, value);
49
+ continue;
50
+ }
51
+
52
+ if (key === "skewX") {
53
+ m.skew(value, 0);
54
+ continue;
55
+ }
56
+
57
+ if (key === "skewY") {
58
+ m.skew(0, value);
59
+ continue;
60
+ }
61
+
62
+ if (key === "rotate" || key === "rotateZ") {
63
+ m.rotate(value);
64
+ continue;
65
+ }
66
+
67
+ exhaustiveCheck(key);
68
+ }
69
+
70
+ return m;
71
+ };
72
+
73
+ exports.processTransform = processTransform;
74
+
75
+ const exhaustiveCheck = a => {
76
+ throw new Error(`Unknown transformation: ${a}`);
77
+ };
21
78
  //# sourceMappingURL=Matrix.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Matrix.ts"],"names":["MatrixIndex"],"mappings":";;;;;;IACYA,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W","sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\nexport enum MatrixIndex {\n ScaleX = 0,\n SkewX = 1,\n TransX = 2,\n SkewY = 3,\n ScaleY = 4,\n TransY = 5,\n Persp0 = 6,\n Persp1 = 7,\n persp2 = 8,\n}\n\nexport interface SkMatrix extends SkJSIInstance<\"Matrix\"> {\n 0: number;\n 1: number;\n 2: number;\n 3: number;\n 4: number;\n 5: number;\n 6: number;\n 7: number;\n 8: number;\n\n preConcat: (matrix: SkMatrix) => void;\n preTranslate: (x: number, y: number) => void;\n preScale: (x: number, y: number) => void;\n preSkew: (x: number, y: number) => void;\n preRotate: (theta: number) => void;\n}\n"]}
1
+ {"version":3,"sources":["Matrix.ts"],"names":["MatrixIndex","processTransform","m","transforms","transform","key","Object","keys","value","translate","scale","skew","rotate","exhaustiveCheck","a","Error"],"mappings":";;;;;;IACYA,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W;;AAkDL,MAAMC,gBAAgB,GAAG,CAACC,CAAD,EAAcC,UAAd,KAA2C;AACzE,OAAK,MAAMC,SAAX,IAAwBD,UAAxB,EAAoC;AAClC,UAAME,GAAG,GAAGC,MAAM,CAACC,IAAP,CAAYH,SAAZ,EAAuB,CAAvB,CAAZ;AACA,UAAMI,KAAK,GAAIJ,SAAD,CAAiDC,GAAjD,CAAd;;AACA,QAAIA,GAAG,KAAK,YAAZ,EAA0B;AACxBH,MAAAA,CAAC,CAACO,SAAF,CAAYD,KAAZ,EAAmB,CAAnB;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,YAAZ,EAA0B;AACxBH,MAAAA,CAAC,CAACO,SAAF,CAAY,CAAZ,EAAeD,KAAf;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACQ,KAAF,CAAQF,KAAR,EAAeA,KAAf;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAZ,EAAsB;AACpBH,MAAAA,CAAC,CAACQ,KAAF,CAAQF,KAAR,EAAe,CAAf;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAZ,EAAsB;AACpBH,MAAAA,CAAC,CAACQ,KAAF,CAAQ,CAAR,EAAWF,KAAX;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACS,IAAF,CAAOH,KAAP,EAAc,CAAd;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,OAAZ,EAAqB;AACnBH,MAAAA,CAAC,CAACS,IAAF,CAAO,CAAP,EAAUH,KAAV;AACA;AACD;;AACD,QAAIH,GAAG,KAAK,QAAR,IAAoBA,GAAG,KAAK,SAAhC,EAA2C;AACzCH,MAAAA,CAAC,CAACU,MAAF,CAASJ,KAAT;AACA;AACD;;AACDK,IAAAA,eAAe,CAACR,GAAD,CAAf;AACD;;AACD,SAAOH,CAAP;AACD,CAvCM;;;;AAyCP,MAAMW,eAAe,GAAIC,CAAD,IAAqB;AAC3C,QAAM,IAAIC,KAAJ,CAAW,2BAA0BD,CAAE,EAAvC,CAAN;AACD,CAFD","sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\nexport enum MatrixIndex {\n ScaleX = 0,\n SkewX = 1,\n TransX = 2,\n SkewY = 3,\n ScaleY = 4,\n TransY = 5,\n Persp0 = 6,\n Persp1 = 7,\n persp2 = 8,\n}\n\nexport interface SkMatrix extends SkJSIInstance<\"Matrix\"> {\n concat: (matrix: SkMatrix) => void;\n translate: (x: number, y: number) => void;\n scale: (x: number, y?: number) => void;\n skew: (x: number, y: number) => void;\n rotate: (theta: number) => void;\n}\n\ntype Transform2dName =\n | \"translateX\"\n | \"translateY\"\n | \"scale\"\n | \"skewX\"\n | \"skewY\"\n | \"scaleX\"\n | \"scaleY\"\n | \"rotateZ\"\n | \"rotate\";\n\ntype Transformations = {\n readonly [Name in Transform2dName]: number;\n};\n\nexport type Transforms2d = readonly (\n | Pick<Transformations, \"translateX\">\n | Pick<Transformations, \"translateY\">\n | Pick<Transformations, \"scale\">\n | Pick<Transformations, \"scaleX\">\n | Pick<Transformations, \"scaleY\">\n | Pick<Transformations, \"skewX\">\n | Pick<Transformations, \"skewY\">\n | Pick<Transformations, \"rotate\">\n)[];\n\nexport interface TransformProp {\n transform?: Transforms2d;\n}\n\nexport const processTransform = (m: SkMatrix, transforms: Transforms2d) => {\n for (const transform of transforms) {\n const key = Object.keys(transform)[0] as Transform2dName;\n const value = (transform as Pick<Transformations, typeof key>)[key];\n if (key === \"translateX\") {\n m.translate(value, 0);\n continue;\n }\n if (key === \"translateY\") {\n m.translate(0, value);\n continue;\n }\n if (key === \"scale\") {\n m.scale(value, value);\n continue;\n }\n if (key === \"scaleX\") {\n m.scale(value, 1);\n continue;\n }\n if (key === \"scaleY\") {\n m.scale(1, value);\n continue;\n }\n if (key === \"skewX\") {\n m.skew(value, 0);\n continue;\n }\n if (key === \"skewY\") {\n m.skew(0, value);\n continue;\n }\n if (key === \"rotate\" || key === \"rotateZ\") {\n m.rotate(value);\n continue;\n }\n exhaustiveCheck(key);\n }\n return m;\n};\n\nconst exhaustiveCheck = (a: never): never => {\n throw new Error(`Unknown transformation: ${a}`);\n};\n"]}
@@ -39,6 +39,7 @@ exports.PathVerb = PathVerb;
39
39
  PathVerb[PathVerb["Conic"] = 3] = "Conic";
40
40
  PathVerb[PathVerb["Cubic"] = 4] = "Cubic";
41
41
  PathVerb[PathVerb["Close"] = 5] = "Close";
42
+ PathVerb[PathVerb["Done"] = 6] = "Done";
42
43
  })(PathVerb || (exports.PathVerb = PathVerb = {}));
43
44
 
44
45
  const isPath = obj => obj !== null && obj.__typename__ === "Path";
@@ -1 +1 @@
1
- {"version":3,"sources":["Path.ts"],"names":["FillType","PathOp","PathVerb","isPath","obj","__typename__"],"mappings":";;;;;;;AAQA;AACA;AACA;IAeYA,Q;;;WAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;GAAAA,Q,wBAAAA,Q;;IAOAC,M;;;WAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;GAAAA,M,sBAAAA,M;;IAQAC,Q;;;WAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;GAAAA,Q,wBAAAA,Q;;AAWL,MAAMC,MAAM,GAAIC,GAAD,IACpBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,MADhC","sourcesContent":["import type { SkFont } from \"../Font\";\nimport type { SkRect } from \"../Rect\";\nimport type { SkPoint } from \"../Point\";\nimport type { SkRRect } from \"../RRect\";\nimport type { StrokeJoin, StrokeCap } from \"../Paint\";\nimport type { SkMatrix } from \"../Matrix\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\n\n/**\n * Options used for Path.stroke(). If an option is omitted, a sensible default will be used.\n */\nexport interface StrokeOpts {\n /** The width of the stroked lines. */\n width?: number;\n // eslint-disable-next-line camelcase\n miter_limit?: number;\n /**\n * if > 1, increase precision, else if (0 < resScale < 1) reduce precision to\n * favor speed and size\n */\n precision?: number;\n join?: StrokeJoin;\n cap?: StrokeCap;\n}\n\nexport enum FillType {\n Winding,\n EvenOdd,\n InverseWinding,\n InverseEvenOdd,\n}\n\nexport enum PathOp {\n Difference, //!< subtract the op path from the first path\n Intersect, //!< intersect the two paths\n Union, //!< union (inclusive-or) the two paths\n XOR, //!< exclusive-or the two paths\n ReverseDifference,\n}\n\nexport enum PathVerb {\n Move,\n Line,\n Quad,\n Conic,\n Cubic,\n Close,\n}\n\nexport type PathCommand = number[];\n\nexport const isPath = (obj: SkJSIInstance<string> | null): obj is SkPath =>\n obj !== null && obj.__typename__ === \"Path\";\n\nexport interface SkPath extends SkJSIInstance<\"Path\"> {\n /**\n * Appends arc to Path, as the start of new contour. Arc added is part of ellipse\n * bounded by oval, from startAngle through sweepAngle. Both startAngle and\n * sweepAngle are measured in degrees, where zero degrees is aligned with the\n * positive x-axis, and positive sweeps extends arc clockwise.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param startAngle\n * @param sweepAngle\n */\n addArc(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number\n ): SkPath;\n\n /**\n * Adds oval to Path, appending kMove_Verb, four kConic_Verb, and kClose_Verb.\n * Oval is upright ellipse bounded by Rect oval with radii equal to half oval width\n * and half oval height. Oval begins at start and continues clockwise by default.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param isCCW - if the path should be drawn counter-clockwise or not\n * @param startIndex - index of initial point of ellipse\n */\n addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): void;\n\n /**\n * Returns the number of points in this path. Initially zero.\n */\n countPoints(): number;\n\n /**\n * Adds contour created from array of n points, adding (count - 1) line segments.\n * Contour added starts at pts[0], then adds a line for every additional point\n * in pts array. If close is true, appends kClose_Verb to Path, connecting\n * pts[count - 1] and pts[0].\n * Returns the modified path for easier chaining.\n * @param points\n * @param close - if true, will add a line connecting last point to the first point.\n */\n addPoly(points: SkPoint[], close: boolean): void;\n\n /** Adds beginning of contour at SkPoint (x, y).\n\n @param x x-axis value of contour start\n @param y y-axis value of contour start\n @return reference to SkPath\n\n example: https://fiddle.skia.org/c/@Path_moveTo\n */\n moveTo(x: number, y: number): void;\n /** Adds line from last point to (x, y). If SkPath is empty, or last SkPath::Verb is\n kClose_Verb, last point is set to (0, 0) before adding line.\n\n lineTo() appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.\n lineTo() then appends kLine_Verb to verb array and (x, y) to SkPoint array.\n\n @param x end of added line on x-axis\n @param y end of added line on y-axis\n @return reference to SkPath\n\n example: https://fiddle.skia.org/c/@Path_lineTo\n */\n lineTo(x: number, y: number): void;\n\n /**\n * Returns a new path that covers the same area as the original path, but with the\n * Winding FillType. This may re-draw some contours in the path as counter-clockwise\n * instead of clockwise to achieve that effect. If such a transformation cannot\n * be done, null is returned.\n */\n makeAsWinding(): SkPath | null;\n\n /**\n * Translates all the points in the path by dx, dy.\n * @param dx\n * @param dy\n */\n offset(dx: number, dy: number): void;\n\n /**\n * Relative version of arcToRotated.\n * @param rx\n * @param ry\n * @param xAxisRotate\n * @param useSmallArc\n * @param isCCW\n * @param dx\n * @param dy\n */\n rArcTo(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n dx: number,\n dy: number\n ): void;\n\n /**\n * Relative version of conicTo.\n * @param dx1\n * @param dy1\n * @param dx2\n * @param dy2\n * @param w\n */\n rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number): void;\n\n /**\n * Relative version of cubicTo.\n * @param cpx1\n * @param cpy1\n * @param cpx2\n * @param cpy2\n * @param x\n * @param y\n */\n rCubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ): void;\n\n /**\n * Relative version of moveTo.\n * @param x\n * @param y\n */\n rMoveTo(x: number, y: number): SkPath;\n\n /**\n * Relative version of lineTo.\n * @param x\n * @param y\n */\n rLineTo(x: number, y: number): SkPath;\n\n /**\n * Relative version of quadTo.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\n rQuadTo(x1: number, y1: number, x2: number, y2: number): SkPath;\n\n /**\n * Sets FillType, the rule used to fill Path.\n * @param fill\n */\n setFillType(fill: FillType): void;\n\n /**\n * Specifies whether Path is volatile; whether it will be altered or discarded\n * by the caller after it is drawn. Path by default have volatile set false.\n *\n * Mark animating or temporary paths as volatile to improve performance.\n * Mark unchanging Path non-volatile to improve repeated rendering.\n * @param volatile\n */\n setIsVolatile(volatile: boolean): void;\n\n /**\n * Turns this path into the filled equivalent of the stroked path. Returns false if the operation\n * fails (e.g. the path is a hairline).\n * @param opts - describe how stroked path should look.\n */\n stroke(opts?: StrokeOpts): boolean;\n\n /**\n * Appends CLOSE_VERB to Path. A closed contour connects the first and last point\n * with a line, forming a continuous loop.\n */\n close(): void;\n\n /**\n * Sets Path to its initial state.\n * Removes verb array, point array, and weights, and sets FillType to Winding.\n * Internal storage associated with Path is released\n */\n reset(): void;\n\n /**\n * Sets Path to its initial state.\n * Removes verb array, point array, and weights, and sets FillType to Winding.\n * Internal storage associated with Path is *not* released.\n * Use rewind() instead of reset() if Path storage will be reused and performance\n * is critical.\n */\n rewind(): void;\n\n /**\n * Returns minimum and maximum axes values of the lines and curves in Path.\n * Returns (0, 0, 0, 0) if Path contains no points.\n * Returned bounds width and height may be larger or smaller than area affected\n * when Path is drawn.\n *\n * Behaves identically to getBounds() when Path contains\n * only lines. If Path contains curves, computed bounds includes\n * the maximum extent of the quad, conic, or cubic; is slower than getBounds();\n * and unlike getBounds(), does not cache the result.\n * @param outputArray - if provided, the bounding box will be copied into this array instead of\n * allocating a new one.\n */\n computeTightBounds(outputArray?: SkRect): SkRect;\n\n /**\n * Appends arc to Path. Arc added is part of ellipse\n * bounded by oval, from startAngle through sweepAngle. Both startAngle and\n * sweepAngle are measured in degrees, where zero degrees is aligned with the\n * positive x-axis, and positive sweeps extends arc clockwise.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param startAngleInDegrees\n * @param sweepAngleInDegrees\n * @param forceMoveTo\n */\n arcToOval(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number,\n forceMoveTo: boolean\n ): SkPath;\n\n /**\n * Appends arc to Path. Arc is implemented by one or more conics weighted to\n * describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc\n * curves from last Path Point to (x, y), choosing one of four possible routes:\n * clockwise or counterclockwise, and smaller or larger. See SkPath.h for more details.\n * Returns the modified path for easier chaining.\n * @param rx\n * @param ry\n * @param xAxisRotate\n * @param useSmallArc\n * @param isCCW\n * @param x\n * @param y\n */\n arcToRotated(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n x: number,\n y: number\n ): SkPath;\n\n /**\n * Appends arc to Path, after appending line if needed. Arc is implemented by conic\n * weighted to describe part of circle. Arc is contained by tangent from\n * last Path point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc\n * is part of circle sized to radius, positioned so it touches both tangent lines.\n * Returns the modified path for easier chaining.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param radius\n */\n arcToTangent(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n radius: number\n ): SkPath;\n\n /**\n * Adds conic from last point towards (x1, y1), to (x2, y2), weighted by w.\n * If Path is empty, or path is closed, the last point is set to (0, 0)\n * before adding conic.\n * Returns the modified path for easier chaining.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param w\n */\n conicTo(x1: number, y1: number, x2: number, y2: number, w: number): SkPath;\n\n /**\n * Returns true if the point (x, y) is contained by Path, taking into\n * account FillType.\n * @param x\n * @param y\n */\n contains(x: number, y: number): boolean;\n\n /**\n * Returns a copy of this Path.\n */\n copy(): SkPath;\n\n /**\n * Adds cubic from last point towards (x1, y1), then towards (x2, y2), ending at\n * (x3, y3). If Path is empty, or path is closed, the last point is set to\n * (0, 0) before adding cubic.\n * @param cpx1\n * @param cpy1\n * @param cpx2\n * @param cpy2\n * @param x\n * @param y\n */\n cubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ): void;\n\n /**\n * Changes this path to be the dashed version of itself. This is the same effect as creating\n * a DashPathEffect and calling filterPath on this path.\n * @param on\n * @param off\n * @param phase\n */\n dash(on: number, off: number, phase: number): boolean;\n\n /**\n * Returns true if other path is equal to this path.\n * @param other\n */\n equals(other: SkPath): boolean;\n\n /**\n * Returns minimum and maximum axes values of Point array.\n * Returns (0, 0, 0, 0) if Path contains no points. Returned bounds width and height may\n * be larger or smaller than area affected when Path is drawn.\n */\n getBounds(): SkRect;\n\n /**\n * Return the FillType for this path.\n */\n getFillType(): FillType;\n\n /**\n Adds quad from last point towards (x1, y1), to (x2, y2).\n\n If SkPath is empty, or last SkPath::Verb is kClose_Verb, last point is set to (0, 0) before adding quad.\n\n Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed; then appends kQuad_Verb to verb array;\n and (x1, y1), (x2, y2) to SkPoint array.\n\n Parameters\n x1\tcontrol SkPoint of quad on x-axis\n y1\tcontrol SkPoint of quad on y-axis\n x2\tend SkPoint of quad on x-axis\n y2\tend SkPoint of quad on y-axis\n Returns\n reference to SkPath\n example: https://fiddle.skia.org/c/@Path_quadTo\n */\n quadTo(x1: number, y1: number, x2: number, y2: number): void;\n\n /**\n * Adds Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb,\n * starting with top-left corner of Rect; followed by top-right, bottom-right,\n * and bottom-left if isCCW is false; or followed by bottom-left,\n * bottom-right, and top-right if isCCW is true.\n * Returns the modified path for easier chaining.\n * @param rect\n * @param isCCW\n */\n addRect(rect: SkRect, isCCW?: boolean): void;\n\n /**\n * Adds rrect to Path, creating a new closed contour.\n * Returns the modified path for easier chaining.\n * @param rrect\n * @param isCCW\n */\n addRRect(rrect: SkRRect, isCCW?: boolean): SkPath;\n\n /**\n * Returns the Point at index in Point array. Valid range for index is\n * 0 to countPoints() - 1.\n * @param index\n */\n getPoint(index: number): SkPoint;\n\n /**\n * Returns true if there are no verbs in the path.\n */\n isEmpty(): boolean;\n\n /**\n * Returns true if the path is volatile; it will not be altered or discarded\n * by the caller after it is drawn. Path by default have volatile set false, allowing\n * Surface to attach a cache of data which speeds repeated drawing. If true, Surface\n * may not speed repeated drawing.\n */\n isVolatile(): boolean;\n\n addCircle(x: number, y: number, r: number): void;\n\n getLastPt(): { x: number; y: number };\n\n /** Set this path to the result of applying the Op to this path and the\n specified path: this = (this op operand).\n The resulting path will be constructed from non-overlapping contours.\n The curve order is reduced where possible so that cubics may be turned\n into quadratics, and quadratics maybe turned into lines.\n\n Returns true if operation was able to produce a result;\n otherwise, result is unmodified.\n\n @param path The second path (for difference, the subtrahend)\n @param op The operator to apply.\n @param result The product of the operands. The result may be one of the\n inputs.\n @return True if the operation succeeded.\n */\n op(path: SkPath, op: PathOp): boolean;\n\n /** Set this path to a set of non-overlapping contours that describe the\n same area as the original path.\n The curve order is reduced where possible so that cubics may\n be turned into quadratics, and quadratics maybe turned into lines.\n\n Returns true if operation was able to produce a result;\n otherwise, result is unmodified.\n\n @param result The simplified path. The result may be the input.\n @return True if simplification succeeded.\n */\n simplify(): boolean;\n\n /**\n * Returns this path as an SVG string.\n */\n toSVGString(): string;\n\n /**\n * Take start and stop \"t\" values (values between 0...1), and modify this path such that\n * it is a subset of the original path.\n * The trim values apply to the entire path, so if it contains several contours, all of them\n * are including in the calculation.\n * Null is returned if either input value is NaN.\n * @param startT - a value in the range [0.0, 1.0]. 0.0 is the beginning of the path.\n * @param stopT - a value in the range [0.0, 1.0]. 1.0 is the end of the path.\n * @param isComplement\n */\n trim(startT: number, stopT: number, isComplement: boolean): boolean;\n\n /**\n * Transforms the path by the specified matrix.\n */\n transform(m3: SkMatrix): void;\n\n /**\n * Converts the text to a path with the given font at location x / y.\n */\n fromText(text: string, x: number, y: number, font: SkFont): void;\n\n /**\n * Interpolates between Path with point array of equal size.\n * Copy verb array and weights to result, and set result path to a weighted\n * average of this path array and ending path.\n\n * weight is most useful when between zero (ending path) and\n one (this path); will work with values outside of this\n range.\n\n * interpolate() returns undefined if path is not\n * the same size as ending path. Call isInterpolatable() to check Path\n * compatibility prior to calling interpolate().\n\n * @param ending path to interpolate with\n * @param weight contribution of this path, and\n * one minus contribution of ending path\n * @return Path replaced by interpolated averages or undefined if \n * not interpolatable\n * */\n interpolate(end: SkPath, weight: number): SkPath;\n\n /** Returns true if Path contain equal verbs and equal weights.\n * @param compare path to compare\n * @return true if Path can be interpolated equivalent\n *\n * */\n isInterpolatable(compare: SkPath): boolean;\n\n /**\n * Serializes the contents of this path as a series of commands.\n */\n toCmds(): PathCommand[];\n}\n"]}
1
+ {"version":3,"sources":["Path.ts"],"names":["FillType","PathOp","PathVerb","isPath","obj","__typename__"],"mappings":";;;;;;;AAOA;AACA;AACA;IAeYA,Q;;;WAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;GAAAA,Q,wBAAAA,Q;;IAOAC,M;;;WAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;AAAAA,EAAAA,M,CAAAA,M;GAAAA,M,sBAAAA,M;;IAQAC,Q;;;WAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;AAAAA,EAAAA,Q,CAAAA,Q;GAAAA,Q,wBAAAA,Q;;AAYL,MAAMC,MAAM,GAAIC,GAAD,IACpBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,MADhC","sourcesContent":["import type { SkRect } from \"../Rect\";\nimport type { SkPoint } from \"../Point\";\nimport type { SkRRect } from \"../RRect\";\nimport type { StrokeJoin, StrokeCap } from \"../Paint\";\nimport type { SkMatrix } from \"../Matrix\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\n\n/**\n * Options used for Path.stroke(). If an option is omitted, a sensible default will be used.\n */\nexport interface StrokeOpts {\n /** The width of the stroked lines. */\n width?: number;\n // eslint-disable-next-line camelcase\n miter_limit?: number;\n /**\n * if > 1, increase precision, else if (0 < resScale < 1) reduce precision to\n * favor speed and size\n */\n precision?: number;\n join?: StrokeJoin;\n cap?: StrokeCap;\n}\n\nexport enum FillType {\n Winding,\n EvenOdd,\n InverseWinding,\n InverseEvenOdd,\n}\n\nexport enum PathOp {\n Difference, //!< subtract the op path from the first path\n Intersect, //!< intersect the two paths\n Union, //!< union (inclusive-or) the two paths\n XOR, //!< exclusive-or the two paths\n ReverseDifference,\n}\n\nexport enum PathVerb {\n Move,\n Line,\n Quad,\n Conic,\n Cubic,\n Close,\n Done,\n}\n\nexport type PathCommand = number[];\n\nexport const isPath = (obj: SkJSIInstance<string> | null): obj is SkPath =>\n obj !== null && obj.__typename__ === \"Path\";\n\nexport interface SkPath extends SkJSIInstance<\"Path\"> {\n /**\n * Appends arc to Path, as the start of new contour. Arc added is part of ellipse\n * bounded by oval, from startAngle through sweepAngle. Both startAngle and\n * sweepAngle are measured in degrees, where zero degrees is aligned with the\n * positive x-axis, and positive sweeps extends arc clockwise.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param startAngle\n * @param sweepAngle\n */\n addArc(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number\n ): SkPath;\n\n /**\n * Adds oval to Path, appending kMove_Verb, four kConic_Verb, and kClose_Verb.\n * Oval is upright ellipse bounded by Rect oval with radii equal to half oval width\n * and half oval height. Oval begins at start and continues clockwise by default.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param isCCW - if the path should be drawn counter-clockwise or not\n * @param startIndex - index of initial point of ellipse\n */\n addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): SkPath;\n\n /**\n * Returns the number of points in this path. Initially zero.\n */\n countPoints(): number;\n\n /**\n * Adds contour created from array of n points, adding (count - 1) line segments.\n * Contour added starts at pts[0], then adds a line for every additional point\n * in pts array. If close is true, appends kClose_Verb to Path, connecting\n * pts[count - 1] and pts[0].\n * Returns the modified path for easier chaining.\n * @param points\n * @param close - if true, will add a line connecting last point to the first point.\n */\n addPoly(points: SkPoint[], close: boolean): SkPath;\n\n /** Adds beginning of contour at SkPoint (x, y).\n\n @param x x-axis value of contour start\n @param y y-axis value of contour start\n @return reference to SkPath\n\n example: https://fiddle.skia.org/c/@Path_moveTo\n */\n moveTo(x: number, y: number): SkPath;\n /** Adds line from last point to (x, y). If SkPath is empty, or last SkPath::Verb is\n kClose_Verb, last point is set to (0, 0) before adding line.\n\n lineTo() appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed.\n lineTo() then appends kLine_Verb to verb array and (x, y) to SkPoint array.\n\n @param x end of added line on x-axis\n @param y end of added line on y-axis\n @return reference to SkPath\n\n example: https://fiddle.skia.org/c/@Path_lineTo\n */\n lineTo(x: number, y: number): SkPath;\n\n /**\n * Returns a new path that covers the same area as the original path, but with the\n * Winding FillType. This may re-draw some contours in the path as counter-clockwise\n * instead of clockwise to achieve that effect. If such a transformation cannot\n * be done, null is returned.\n */\n makeAsWinding(): SkPath | null;\n\n /**\n * Translates all the points in the path by dx, dy.\n * @param dx\n * @param dy\n */\n offset(dx: number, dy: number): SkPath;\n\n /**\n * Relative version of arcToRotated.\n * @param rx\n * @param ry\n * @param xAxisRotate\n * @param useSmallArc\n * @param isCCW\n * @param dx\n * @param dy\n */\n rArcTo(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n dx: number,\n dy: number\n ): SkPath;\n\n /**\n * Relative version of conicTo.\n * @param dx1\n * @param dy1\n * @param dx2\n * @param dy2\n * @param w\n */\n rConicTo(\n dx1: number,\n dy1: number,\n dx2: number,\n dy2: number,\n w: number\n ): SkPath;\n\n /**\n * Relative version of cubicTo.\n * @param cpx1\n * @param cpy1\n * @param cpx2\n * @param cpy2\n * @param x\n * @param y\n */\n rCubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ): SkPath;\n\n /**\n * Relative version of moveTo.\n * @param x\n * @param y\n */\n rMoveTo(x: number, y: number): SkPath;\n\n /**\n * Relative version of lineTo.\n * @param x\n * @param y\n */\n rLineTo(x: number, y: number): SkPath;\n\n /**\n * Relative version of quadTo.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\n rQuadTo(x1: number, y1: number, x2: number, y2: number): SkPath;\n\n /**\n * Sets FillType, the rule used to fill Path.\n * @param fill\n */\n setFillType(fill: FillType): void;\n\n /**\n * Specifies whether Path is volatile; whether it will be altered or discarded\n * by the caller after it is drawn. Path by default have volatile set false.\n *\n * Mark animating or temporary paths as volatile to improve performance.\n * Mark unchanging Path non-volatile to improve repeated rendering.\n * @param volatile\n */\n setIsVolatile(volatile: boolean): void;\n\n /**\n * Turns this path into the filled equivalent of the stroked path. Returns false if the operation\n * fails (e.g. the path is a hairline).\n * @param opts - describe how stroked path should look.\n * If such a transformation cannot be done, null is returned.\n */\n stroke(opts?: StrokeOpts): null | SkPath;\n\n /**\n * Appends CLOSE_VERB to Path. A closed contour connects the first and last point\n * with a line, forming a continuous loop.\n */\n close(): void;\n\n /**\n * Sets Path to its initial state.\n * Removes verb array, point array, and weights, and sets FillType to Winding.\n * Internal storage associated with Path is released\n */\n reset(): void;\n\n /**\n * Sets Path to its initial state.\n * Removes verb array, point array, and weights, and sets FillType to Winding.\n * Internal storage associated with Path is *not* released.\n * Use rewind() instead of reset() if Path storage will be reused and performance\n * is critical.\n */\n rewind(): void;\n\n /**\n * Returns minimum and maximum axes values of the lines and curves in Path.\n * Returns (0, 0, 0, 0) if Path contains no points.\n * Returned bounds width and height may be larger or smaller than area affected\n * when Path is drawn.\n *\n * Behaves identically to getBounds() when Path contains\n * only lines. If Path contains curves, computed bounds includes\n * the maximum extent of the quad, conic, or cubic; is slower than getBounds();\n * and unlike getBounds(), does not cache the result.\n */\n computeTightBounds(): SkRect;\n\n /**\n * Appends arc to Path. Arc added is part of ellipse\n * bounded by oval, from startAngle through sweepAngle. Both startAngle and\n * sweepAngle are measured in degrees, where zero degrees is aligned with the\n * positive x-axis, and positive sweeps extends arc clockwise.\n * Returns the modified path for easier chaining.\n * @param oval\n * @param startAngleInDegrees\n * @param sweepAngleInDegrees\n * @param forceMoveTo\n */\n arcToOval(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number,\n forceMoveTo: boolean\n ): SkPath;\n\n /**\n * Appends arc to Path. Arc is implemented by one or more conics weighted to\n * describe part of oval with radii (rx, ry) rotated by xAxisRotate degrees. Arc\n * curves from last Path Point to (x, y), choosing one of four possible routes:\n * clockwise or counterclockwise, and smaller or larger. See SkPath.h for more details.\n * Returns the modified path for easier chaining.\n * @param rx\n * @param ry\n * @param xAxisRotate\n * @param useSmallArc\n * @param isCCW\n * @param x\n * @param y\n */\n arcToRotated(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n x: number,\n y: number\n ): SkPath;\n\n /**\n * Appends arc to Path, after appending line if needed. Arc is implemented by conic\n * weighted to describe part of circle. Arc is contained by tangent from\n * last Path point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc\n * is part of circle sized to radius, positioned so it touches both tangent lines.\n * Returns the modified path for easier chaining.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param radius\n */\n arcToTangent(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n radius: number\n ): SkPath;\n\n /**\n * Adds conic from last point towards (x1, y1), to (x2, y2), weighted by w.\n * If Path is empty, or path is closed, the last point is set to (0, 0)\n * before adding conic.\n * Returns the modified path for easier chaining.\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param w\n */\n conicTo(x1: number, y1: number, x2: number, y2: number, w: number): SkPath;\n\n /**\n * Returns true if the point (x, y) is contained by Path, taking into\n * account FillType.\n * @param x\n * @param y\n */\n contains(x: number, y: number): boolean;\n\n /**\n * Returns a copy of this Path.\n */\n copy(): SkPath;\n\n /**\n * Adds cubic from last point towards (x1, y1), then towards (x2, y2), ending at\n * (x3, y3). If Path is empty, or path is closed, the last point is set to\n * (0, 0) before adding cubic.\n * @param cpx1\n * @param cpy1\n * @param cpx2\n * @param cpy2\n * @param x\n * @param y\n */\n cubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ): SkPath;\n\n /**\n * Changes this path to be the dashed version of itself. This is the same effect as creating\n * a DashPathEffect and calling filterPath on this path.\n * @param on\n * @param off\n * @param phase\n */\n dash(on: number, off: number, phase: number): boolean;\n\n /**\n * Returns true if other path is equal to this path.\n * @param other\n */\n equals(other: SkPath): boolean;\n\n /**\n * Returns minimum and maximum axes values of Point array.\n * Returns (0, 0, 0, 0) if Path contains no points. Returned bounds width and height may\n * be larger or smaller than area affected when Path is drawn.\n */\n getBounds(): SkRect;\n\n /**\n * Return the FillType for this path.\n */\n getFillType(): FillType;\n\n /**\n Adds quad from last point towards (x1, y1), to (x2, y2).\n\n If SkPath is empty, or last SkPath::Verb is kClose_Verb, last point is set to (0, 0) before adding quad.\n\n Appends kMove_Verb to verb array and (0, 0) to SkPoint array, if needed; then appends kQuad_Verb to verb array;\n and (x1, y1), (x2, y2) to SkPoint array.\n\n Parameters\n x1\tcontrol SkPoint of quad on x-axis\n y1\tcontrol SkPoint of quad on y-axis\n x2\tend SkPoint of quad on x-axis\n y2\tend SkPoint of quad on y-axis\n Returns\n reference to SkPath\n example: https://fiddle.skia.org/c/@Path_quadTo\n */\n quadTo(x1: number, y1: number, x2: number, y2: number): void;\n\n /**\n * Adds Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb,\n * starting with top-left corner of Rect; followed by top-right, bottom-right,\n * and bottom-left if isCCW is false; or followed by bottom-left,\n * bottom-right, and top-right if isCCW is true.\n * Returns the modified path for easier chaining.\n * @param rect\n * @param isCCW\n */\n addRect(rect: SkRect, isCCW?: boolean): void;\n\n /**\n * Adds rrect to Path, creating a new closed contour.\n * Returns the modified path for easier chaining.\n * @param rrect\n * @param isCCW\n */\n addRRect(rrect: SkRRect, isCCW?: boolean): SkPath;\n\n /**\n * Returns the Point at index in Point array. Valid range for index is\n * 0 to countPoints() - 1.\n * @param index\n */\n getPoint(index: number): SkPoint;\n\n /**\n * Returns true if there are no verbs in the path.\n */\n isEmpty(): boolean;\n\n /**\n * Returns true if the path is volatile; it will not be altered or discarded\n * by the caller after it is drawn. Path by default have volatile set false, allowing\n * Surface to attach a cache of data which speeds repeated drawing. If true, Surface\n * may not speed repeated drawing.\n */\n isVolatile(): boolean;\n\n /** Adds circle centered at (x, y) of size radius to SkPath, appending kMove_Verb,\n four kConic_Verb, and kClose_Verb. Circle begins at: (x + radius, y), continuing\n clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.\n\n Has no effect if radius is zero or negative.\n\n @param x center of circle\n @param y center of circle\n @param radius distance from center to edge \n @return reference to SkPath\n */\n addCircle(x: number, y: number, r: number): SkPath;\n\n getLastPt(): { x: number; y: number };\n\n /** Set this path to the result of applying the Op to this path and the\n specified path: this = (this op operand).\n The resulting path will be constructed from non-overlapping contours.\n The curve order is reduced where possible so that cubics may be turned\n into quadratics, and quadratics maybe turned into lines.\n\n Returns true if operation was able to produce a result;\n otherwise, result is unmodified.\n\n @param path The second path (for difference, the subtrahend)\n @param op The operator to apply.\n @param result The product of the operands. The result may be one of the\n inputs.\n @return True if the operation succeeded.\n */\n op(path: SkPath, op: PathOp): boolean;\n\n /** Set this path to a set of non-overlapping contours that describe the\n same area as the original path.\n The curve order is reduced where possible so that cubics may\n be turned into quadratics, and quadratics maybe turned into lines.\n\n Returns true if operation was able to produce a result;\n otherwise, result is unmodified.\n\n @param result The simplified path. The result may be the input.\n @return True if simplification succeeded.\n */\n simplify(): boolean;\n\n /**\n * Returns this path as an SVG string.\n */\n toSVGString(): string;\n\n /**\n * Take start and stop \"t\" values (values between 0...1), and modify this path such that\n * it is a subset of the original path.\n * The trim values apply to the entire path, so if it contains several contours, all of them\n * are including in the calculation.\n * Null is returned if either input value is NaN.\n * @param startT - a value in the range [0.0, 1.0]. 0.0 is the beginning of the path.\n * @param stopT - a value in the range [0.0, 1.0]. 1.0 is the end of the path.\n * @param isComplement\n */\n trim(startT: number, stopT: number, isComplement: boolean): null | SkPath;\n\n /**\n * Transforms the path by the specified matrix.\n */\n transform(m3: SkMatrix): void;\n\n /**\n * Interpolates between Path with point array of equal size.\n * Copy verb array and weights to result, and set result path to a weighted\n * average of this path array and ending path.\n\n * weight is most useful when between zero (ending path) and\n one (this path); will work with values outside of this\n range.\n\n * interpolate() returns undefined if path is not\n * the same size as ending path. Call isInterpolatable() to check Path\n * compatibility prior to calling interpolate().\n\n * @param ending path to interpolate with\n * @param weight contribution of this path, and\n * one minus contribution of ending path\n * @return Path replaced by interpolated averages or null if \n * not interpolatable\n * */\n interpolate(end: SkPath, weight: number): SkPath | null;\n\n /** Returns true if Path contain equal verbs and equal weights.\n * @param compare path to compare\n * @return true if Path can be interpolated equivalent\n *\n * */\n isInterpolatable(compare: SkPath): boolean;\n\n /**\n * Serializes the contents of this path as a series of commands.\n */\n toCmds(): PathCommand[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["Point.ts"],"names":["PointMode"],"mappings":";;;;;;IAAYA,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S","sourcesContent":["export enum PointMode {\n Points,\n Lines,\n Polygon,\n}\n\nexport interface SkPoint {\n readonly x: number;\n readonly y: number;\n}\n"]}
1
+ {"version":3,"sources":["Point.ts"],"names":["PointMode"],"mappings":";;;;;;IAAYA,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S","sourcesContent":["export enum PointMode {\n Points,\n Lines,\n Polygon,\n}\n\nexport interface SkPoint {\n readonly x: number;\n readonly y: number;\n}\n\nexport type Vector = SkPoint;\n"]}