@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.
- package/README.md +8 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
- package/cpp/api/JsiSkCanvas.h +2 -2
- package/cpp/api/JsiSkFont.h +6 -2
- package/cpp/api/JsiSkMatrix.h +40 -27
- package/cpp/api/JsiSkPaint.h +3 -1
- package/cpp/api/JsiSkPath.h +67 -61
- package/cpp/api/JsiSkPathFactory.h +14 -1
- package/cpp/api/JsiSkRuntimeEffect.h +7 -9
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
- package/cpp/api/JsiSkTypeface.h +11 -2
- package/cpp/api/JsiSkTypefaceFactory.h +5 -1
- package/cpp/api/JsiSkVertices.h +0 -2
- package/cpp/rnskia/RNSkInfoParameter.h +2 -0
- package/cpp/rnskia/values/RNSkValue.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +7 -1
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkBitmap.h +4 -2
- package/cpp/skia/include/core/SkCanvas.h +31 -20
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +1 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
- package/cpp/skia/include/core/SkDrawable.h +7 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
- package/cpp/skia/include/core/SkFont.h +4 -3
- package/cpp/skia/include/core/SkFontArguments.h +33 -1
- package/cpp/skia/include/core/SkGraphics.h +13 -0
- package/cpp/skia/include/core/SkImage.h +67 -22
- package/cpp/skia/include/core/SkImageEncoder.h +0 -3
- package/cpp/skia/include/core/SkImageGenerator.h +4 -3
- package/cpp/skia/include/core/SkImageInfo.h +35 -142
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkPaint.h +4 -19
- package/cpp/skia/include/core/SkPath.h +20 -33
- package/cpp/skia/include/core/SkPathBuilder.h +1 -6
- package/cpp/skia/include/core/SkPixelRef.h +1 -1
- package/cpp/skia/include/core/SkPixmap.h +3 -2
- package/cpp/skia/include/core/SkRSXform.h +1 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
- package/cpp/skia/include/core/SkSpan.h +5 -5
- package/cpp/skia/include/core/SkString.h +5 -8
- package/cpp/skia/include/core/SkSurface.h +21 -0
- package/cpp/skia/include/core/SkTypeface.h +20 -4
- package/cpp/skia/include/core/SkTypes.h +9 -5
- package/cpp/skia/include/effects/SkGradientShader.h +9 -18
- package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
- package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
- package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
- package/cpp/skia/include/gpu/graphite/Context.h +124 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
- package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
- package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
- package/cpp/skia/include/ports/SkCFObject.h +0 -4
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
- package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
- package/cpp/skia/include/private/SkChecksum.h +11 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
- package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
- package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
- package/cpp/skia/include/private/SkMacros.h +13 -18
- package/cpp/skia/include/private/SkMutex.h +8 -0
- package/cpp/skia/include/private/SkPathRef.h +2 -16
- package/cpp/skia/include/private/SkSLDefines.h +9 -1
- package/cpp/skia/include/private/SkSLIRNode.h +6 -5
- package/cpp/skia/include/private/SkSLLayout.h +11 -10
- package/cpp/skia/include/private/SkSLModifiers.h +4 -3
- package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
- package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
- package/cpp/skia/include/private/SkSLStatement.h +2 -3
- package/cpp/skia/include/private/SkSLString.h +17 -56
- package/cpp/skia/include/private/SkSLSymbol.h +4 -4
- package/cpp/skia/include/private/SkShadowFlags.h +3 -1
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +4 -3
- package/cpp/skia/include/private/SkTHash.h +66 -24
- package/cpp/skia/include/private/SkTLogic.h +2 -32
- package/cpp/skia/include/private/SkTemplates.h +2 -2
- package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
- package/cpp/skia/include/private/SkVx.h +28 -28
- package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
- package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
- package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
- package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
- package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
- package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
- package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +4 -0
- package/cpp/skia/include/sksl/DSLBlock.h +8 -3
- package/cpp/skia/include/sksl/DSLCase.h +6 -6
- package/cpp/skia/include/sksl/DSLCore.h +89 -78
- package/cpp/skia/include/sksl/DSLExpression.h +78 -45
- package/cpp/skia/include/sksl/DSLFunction.h +23 -18
- package/cpp/skia/include/sksl/DSLLayout.h +14 -16
- package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
- package/cpp/skia/include/sksl/DSLStatement.h +16 -10
- package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
- package/cpp/skia/include/sksl/DSLType.h +27 -23
- package/cpp/skia/include/sksl/DSLVar.h +72 -61
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
- package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
- package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
- package/cpp/skia/include/utils/SkCamera.h +2 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
- package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
- package/cpp/skia/include/utils/SkParse.h +2 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
- package/cpp/skia/include/utils/SkTextUtils.h +8 -4
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
- package/cpp/utils/RNSkLog.h +27 -0
- package/ios/RNSkia-iOS/PlatformContext.h +1 -1
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +3 -2
- package/lib/commonjs/animation/functions/index.js +47 -17
- package/lib/commonjs/animation/functions/index.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +19 -35
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +2 -2
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +10 -7
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Compose.js +9 -6
- package/lib/commonjs/renderer/components/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js +7 -6
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js +13 -10
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +7 -4
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -7
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js +3 -2
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -7
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +8 -7
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -3
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -6
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -4
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js +6 -44
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +8 -5
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js +3 -2
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/index.js +13 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Circles.js +2 -4
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
- package/lib/commonjs/renderer/processors/Clips.js +5 -5
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
- package/lib/commonjs/{skia/core → renderer/processors}/Color.js +2 -6
- package/lib/commonjs/renderer/processors/Color.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +4 -4
- package/lib/commonjs/renderer/processors/Font.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paint.js +18 -14
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paths.js +4 -4
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
- package/lib/commonjs/renderer/processors/Radius.js +2 -4
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
- package/lib/commonjs/renderer/processors/Rects.js +8 -59
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
- package/lib/commonjs/renderer/processors/Transform.js +26 -17
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
- package/lib/commonjs/renderer/processors/index.js +26 -13
- package/lib/commonjs/renderer/processors/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/index.js +0 -26
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js +30 -0
- package/lib/commonjs/renderer/useCanvas.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +1 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/Skia.web.js +12 -0
- package/lib/commonjs/skia/Skia.web.js.map +1 -0
- package/lib/commonjs/skia/core/Data.js +9 -4
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/core/Font.js +2 -4
- package/lib/commonjs/skia/core/Font.js.map +1 -1
- package/lib/commonjs/skia/core/Matrix.js +15 -0
- package/lib/commonjs/skia/core/Matrix.js.map +1 -0
- package/lib/commonjs/skia/core/Paint.js +4 -12
- package/lib/commonjs/skia/core/Paint.js.map +1 -1
- package/lib/commonjs/skia/core/Path.js +14 -2
- package/lib/commonjs/skia/core/Path.js.map +1 -1
- package/lib/commonjs/skia/core/RRect.js +13 -0
- package/lib/commonjs/skia/core/RRect.js.map +1 -0
- package/lib/commonjs/skia/core/Rect.js +47 -0
- package/lib/commonjs/skia/core/Rect.js.map +1 -0
- package/lib/commonjs/skia/core/Vector.js +49 -0
- package/lib/commonjs/skia/core/Vector.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +51 -25
- package/lib/commonjs/skia/core/index.js.map +1 -1
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -1
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.js +58 -1
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.js +1 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/Point.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.js +7 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js +51 -1
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/web/{api/Host.js → Host.js} +10 -1
- package/lib/commonjs/skia/web/Host.js.map +1 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -6
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +163 -4
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +18 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +113 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +4 -9
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
- package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
- package/lib/commonjs/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +97 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +4 -4
- package/lib/commonjs/skia/web/index.js.map +1 -1
- package/lib/commonjs/values/web/api.js +2 -2
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +216 -0
- package/lib/commonjs/views/SkiaView.web.js.map +1 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/views/useTouchHandler.js +70 -46
- package/lib/commonjs/views/useTouchHandler.js.map +1 -1
- package/lib/commonjs/web/index.js +20 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/module/animation/functions/index.js +4 -2
- package/lib/module/animation/functions/index.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +36 -0
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/module/animation/functions/interpolateVector.js +7 -0
- package/lib/module/animation/functions/interpolateVector.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +15 -26
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +2 -2
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +5 -2
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Compose.js +5 -2
- package/lib/module/renderer/components/Compose.js.map +1 -1
- package/lib/module/renderer/components/Group.js +7 -6
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Mask.js +7 -3
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +6 -3
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +6 -3
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/image/BoxFit.js +7 -8
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js +3 -2
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js +3 -2
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js +10 -7
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -4
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +6 -5
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +5 -2
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +5 -2
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +5 -2
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +5 -2
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +5 -2
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +6 -3
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +6 -3
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +5 -2
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js +6 -3
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/Gradient.js +3 -3
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js +6 -45
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js +20 -19
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js +7 -4
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Line.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js +3 -2
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +5 -3
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js +4 -3
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js +1 -1
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js +3 -2
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js +5 -3
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js +3 -2
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js +3 -2
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js +3 -3
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/index.js +1 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.js.map +1 -1
- package/lib/module/renderer/nodes/Drawing.js +3 -3
- package/lib/module/renderer/nodes/Drawing.js.map +1 -1
- package/lib/module/renderer/nodes/Node.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Circles.js +2 -4
- package/lib/module/renderer/processors/Circles.js.map +1 -1
- package/lib/module/renderer/processors/Clips.js +3 -3
- package/lib/module/renderer/processors/Clips.js.map +1 -1
- package/lib/module/{skia/core → renderer/processors}/Color.js +1 -2
- package/lib/module/renderer/processors/Color.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +3 -2
- package/lib/module/renderer/processors/Font.js.map +1 -1
- package/lib/module/renderer/processors/Paint.js +8 -5
- package/lib/module/renderer/processors/Paint.js.map +1 -1
- package/lib/module/renderer/processors/Paths.js +2 -2
- package/lib/module/renderer/processors/Paths.js.map +1 -1
- package/lib/module/renderer/processors/Radius.js +2 -3
- package/lib/module/renderer/processors/Radius.js.map +1 -1
- package/lib/module/renderer/processors/Rects.js +7 -26
- package/lib/module/renderer/processors/Rects.js.map +1 -1
- package/lib/module/renderer/processors/Transform.js +24 -16
- package/lib/module/renderer/processors/Transform.js.map +1 -1
- package/lib/module/renderer/processors/index.js +2 -1
- package/lib/module/renderer/processors/index.js.map +1 -1
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/module/renderer/processors/math/index.js +0 -2
- package/lib/module/renderer/processors/math/index.js.map +1 -1
- package/lib/module/renderer/useCanvas.js +13 -0
- package/lib/module/renderer/useCanvas.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +2 -2
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/Skia.web.js +3 -0
- package/lib/module/skia/Skia.web.js.map +1 -0
- package/lib/module/skia/core/Data.js +11 -5
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/core/Font.js +2 -4
- package/lib/module/skia/core/Font.js.map +1 -1
- package/lib/module/skia/core/Matrix.js +4 -0
- package/lib/module/skia/core/Matrix.js.map +1 -0
- package/lib/module/skia/core/Paint.js +3 -7
- package/lib/module/skia/core/Paint.js.map +1 -1
- package/lib/module/skia/core/Path.js +11 -2
- package/lib/module/skia/core/Path.js.map +1 -1
- package/lib/module/skia/core/RRect.js +3 -0
- package/lib/module/skia/core/RRect.js.map +1 -0
- package/lib/module/skia/core/Rect.js +17 -0
- package/lib/module/skia/core/Rect.js.map +1 -0
- package/lib/module/{renderer/processors/math → skia/core}/Vector.js +2 -7
- package/lib/module/skia/core/Vector.js.map +1 -0
- package/lib/module/skia/core/index.js +5 -3
- package/lib/module/skia/core/index.js.map +1 -1
- package/lib/module/skia/types/Font/Font.js.map +1 -1
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
- package/lib/module/skia/types/Matrix.js +55 -0
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Path/Path.js +1 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/Point.js.map +1 -1
- package/lib/module/skia/types/RRect.js +3 -1
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js +48 -0
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/web/{api/Host.js → Host.js} +6 -0
- package/lib/module/skia/web/Host.js.map +1 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkCanvas.js → JsiSkCanvas.js} +19 -6
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkColor.js → JsiSkColor.js} +164 -4
- package/lib/module/skia/web/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkColorFilter.js → JsiSkColorFilter.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkColorFilter.js.map → JsiSkColorFilter.js.map} +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/module/skia/web/JsiSkData.js +8 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -0
- package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkFont.js +101 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
- package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkImage.js → JsiSkImage.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkImage.js.map → JsiSkImage.js.map} +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +28 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkPaint.js → JsiSkPaint.js} +5 -10
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/JsiSkPath.js +311 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +18 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +16 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +21 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +8 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkRect.js → JsiSkRect.js} +8 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkShader.js +8 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/module/skia/web/{api/JsiSkSurface.js → JsiSkSurface.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkSurface.js.map → JsiSkSurface.js.map} +1 -1
- package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js → JsiSkSurfaceFactory.js} +0 -0
- package/lib/module/skia/web/{api/JsiSkSurfaceFactory.js.map → JsiSkSurfaceFactory.js.map} +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +18 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +17 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +61 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -0
- package/lib/module/skia/web/index.js +1 -1
- package/lib/module/skia/web/index.js.map +1 -1
- package/lib/module/values/web/api.js +2 -2
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +202 -0
- package/lib/module/views/SkiaView.web.js.map +1 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/module/views/useTouchHandler.js +64 -43
- package/lib/module/views/useTouchHandler.js.map +1 -1
- package/lib/module/web/index.js +8 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/typescript/src/animation/functions/index.d.ts +4 -2
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
- package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
- package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -3
- package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
- package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -9
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
- package/lib/typescript/src/renderer/index.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +0 -2
- package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -2
- package/lib/typescript/src/{skia/core → renderer/processors}/Color.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Font.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
- package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Rects.d.ts +3 -14
- package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
- package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
- package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
- package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +4 -4
- package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
- package/lib/typescript/src/skia/core/Paint.d.ts +0 -1
- package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
- package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
- package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
- package/lib/typescript/src/skia/core/index.d.ts +5 -3
- package/lib/typescript/src/skia/types/ContourMeasure.d.ts +2 -4
- package/lib/typescript/src/skia/types/Data/Data.d.ts +1 -1
- package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +4 -4
- package/lib/typescript/src/skia/types/Font/Font.d.ts +8 -9
- package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +1 -1
- package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +2 -2
- package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +3 -3
- package/lib/typescript/src/skia/types/Matrix.d.ts +15 -14
- package/lib/typescript/src/skia/types/Path/Path.d.ts +29 -23
- package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +5 -0
- package/lib/typescript/src/skia/types/Picture/Picture.d.ts +2 -2
- package/lib/typescript/src/skia/types/Point.d.ts +1 -0
- package/lib/typescript/src/skia/types/RRect.d.ts +1 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +5 -6
- package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +2 -2
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +8 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
- package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +2 -2
- package/lib/typescript/src/skia/web/{api/Host.d.ts → Host.d.ts} +4 -1
- package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/{api/JsiSkCanvas.d.ts → JsiSkCanvas.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/typescript/src/skia/web/{api/JsiSkColorFilter.d.ts → JsiSkColorFilter.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/{api/JsiSkImage.d.ts → JsiSkImage.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
- package/lib/typescript/src/skia/web/{api/JsiSkPaint.d.ts → JsiSkPaint.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
- package/lib/typescript/src/skia/web/{api/JsiSkRect.d.ts → JsiSkRect.d.ts} +2 -1
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/typescript/src/skia/web/{api/JsiSkSurface.d.ts → JsiSkSurface.d.ts} +1 -1
- package/lib/typescript/src/skia/web/{api/JsiSkSurfaceFactory.d.ts → JsiSkSurfaceFactory.d.ts} +1 -1
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -1
- package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
- package/lib/typescript/src/views/types.d.ts +1 -0
- package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
- package/lib/typescript/src/web/index.d.ts +5 -0
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +5 -6
- package/src/animation/functions/index.ts +4 -2
- package/src/animation/functions/interpolatePaths.ts +38 -0
- package/src/animation/functions/interpolateVector.ts +26 -0
- package/src/index.ts +1 -0
- package/src/renderer/Canvas.tsx +13 -35
- package/src/renderer/DrawingContext.ts +3 -4
- package/src/renderer/HostConfig.ts +2 -2
- package/src/renderer/components/Blend.tsx +12 -10
- package/src/renderer/components/Compose.tsx +2 -2
- package/src/renderer/components/Group.tsx +11 -6
- package/src/renderer/components/Mask.tsx +5 -3
- package/src/renderer/components/Paint.tsx +5 -4
- package/src/renderer/components/Picture.tsx +1 -1
- package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
- package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
- package/src/renderer/components/colorFilters/Compose.ts +3 -2
- package/src/renderer/components/colorFilters/Lerp.tsx +3 -2
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
- package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
- package/src/renderer/components/image/BoxFit.ts +7 -13
- package/src/renderer/components/image/Image.tsx +3 -3
- package/src/renderer/components/image/ImageSVG.tsx +3 -3
- package/src/renderer/components/image/ImageShader.tsx +8 -7
- package/src/renderer/components/imageFilters/Blur.tsx +12 -10
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -4
- package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -3
- package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
- package/src/renderer/components/imageFilters/Offset.tsx +5 -4
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
- package/src/renderer/components/imageFilters/Shadow.tsx +10 -6
- package/src/renderer/components/imageFilters/getInput.ts +3 -2
- package/src/renderer/components/maskFilters/Blur.tsx +2 -2
- package/src/renderer/components/pathEffects/Corner.tsx +2 -2
- package/src/renderer/components/pathEffects/Dash.tsx +2 -2
- package/src/renderer/components/pathEffects/Discrete.tsx +2 -2
- package/src/renderer/components/pathEffects/Line2D.tsx +3 -3
- package/src/renderer/components/pathEffects/Path1D.tsx +3 -3
- package/src/renderer/components/pathEffects/Path2D.tsx +4 -4
- package/src/renderer/components/pathEffects/Sum.tsx +7 -5
- package/src/renderer/components/shaders/Color.tsx +7 -5
- package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
- package/src/renderer/components/shaders/Gradient.ts +7 -10
- package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
- package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
- package/src/renderer/components/shaders/Shader.tsx +6 -58
- package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
- package/src/renderer/components/shaders/Turbulence.tsx +1 -2
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
- package/src/renderer/components/shapes/Box.tsx +36 -17
- package/src/renderer/components/shapes/Circle.tsx +3 -4
- package/src/renderer/components/shapes/DiffRect.tsx +1 -1
- package/src/renderer/components/shapes/FitBox.tsx +1 -1
- package/src/renderer/components/shapes/Line.tsx +2 -1
- package/src/renderer/components/shapes/Oval.tsx +6 -4
- package/src/renderer/components/shapes/Patch.tsx +6 -10
- package/src/renderer/components/shapes/Path.tsx +3 -3
- package/src/renderer/components/shapes/Points.tsx +2 -2
- package/src/renderer/components/shapes/Rect.tsx +6 -4
- package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
- package/src/renderer/components/shapes/Vertices.tsx +5 -4
- package/src/renderer/components/text/Glyphs.tsx +6 -3
- package/src/renderer/components/text/Text.tsx +2 -2
- package/src/renderer/components/text/TextBlob.tsx +1 -1
- package/src/renderer/components/text/TextPath.tsx +3 -4
- package/src/renderer/index.ts +1 -1
- package/src/renderer/nodes/Declaration.tsx +1 -1
- package/src/renderer/nodes/Drawing.tsx +3 -2
- package/src/renderer/nodes/Node.ts +1 -1
- package/src/renderer/processors/Animations/Animations.ts +0 -3
- package/src/renderer/processors/Circles.ts +4 -4
- package/src/renderer/processors/Clips.ts +9 -4
- package/src/{skia/core → renderer/processors}/Color.ts +2 -3
- package/src/renderer/processors/Font.ts +10 -3
- package/src/renderer/processors/Paint.ts +12 -7
- package/src/renderer/processors/Paths.ts +3 -3
- package/src/renderer/processors/Radius.ts +3 -4
- package/src/renderer/processors/Rects.ts +10 -45
- package/src/renderer/processors/Transform.ts +28 -19
- package/src/renderer/processors/index.ts +2 -1
- package/src/renderer/processors/math/Coordinates.ts +1 -1
- package/src/renderer/processors/math/Transforms.ts +2 -1
- package/src/renderer/processors/math/index.ts +0 -2
- package/src/renderer/useCanvas.ts +21 -0
- package/src/skia/NativeSetup.ts +2 -2
- package/src/skia/Skia.web.ts +3 -0
- package/src/skia/core/Data.ts +17 -14
- package/src/skia/core/Font.ts +2 -4
- package/src/skia/core/Matrix.ts +6 -0
- package/src/skia/core/Paint.ts +2 -6
- package/src/skia/core/Path.ts +14 -6
- package/src/skia/core/RRect.tsx +5 -0
- package/src/skia/core/Rect.ts +33 -0
- package/src/skia/core/Vector.ts +11 -0
- package/src/skia/core/index.ts +5 -3
- package/src/skia/types/ContourMeasure.tsx +2 -4
- package/src/skia/types/Data/Data.ts +1 -1
- package/src/skia/types/Data/DataFactory.ts +4 -4
- package/src/skia/types/Font/Font.ts +9 -14
- package/src/skia/types/FontMgr/FontMgr.ts +1 -1
- package/src/skia/types/FontMgr/FontMgrFactory.ts +2 -2
- package/src/skia/types/Image/ImageFactory.ts +3 -3
- package/src/skia/types/Matrix.ts +79 -14
- package/src/skia/types/Path/Path.ts +34 -23
- package/src/skia/types/Path/PathFactory.ts +7 -0
- package/src/skia/types/Picture/Picture.ts +2 -2
- package/src/skia/types/Point.ts +2 -0
- package/src/skia/types/RRect.ts +5 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -10
- package/src/skia/types/SVG/SVGFactory.ts +2 -2
- package/src/skia/types/Shader/Shader.ts +61 -0
- package/src/skia/types/Skia.ts +1 -1
- package/src/skia/types/Typeface/TypefaceFactory.ts +2 -2
- package/src/skia/web/{api/Host.ts → Host.ts} +7 -1
- package/src/skia/web/JsiImageFilterFactory.ts +144 -0
- package/src/skia/web/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +19 -11
- package/src/skia/web/{api/JsiSkColor.ts → JsiSkColor.ts} +152 -6
- package/src/skia/web/{api/JsiSkColorFilter.ts → JsiSkColorFilter.ts} +1 -1
- package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
- package/src/skia/web/JsiSkContourMeasure.ts +35 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
- package/src/skia/web/JsiSkData.ts +13 -0
- package/src/skia/web/JsiSkDataFactory.ts +35 -0
- package/src/skia/web/JsiSkFont.ts +128 -0
- package/src/skia/web/JsiSkFontMgr.ts +42 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/{api/JsiSkImage.ts → JsiSkImage.ts} +1 -1
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
- package/src/skia/web/JsiSkMatrix.ts +54 -0
- package/src/skia/web/{api/JsiSkPaint.ts → JsiSkPaint.ts} +6 -5
- package/src/skia/web/JsiSkPath.ts +369 -0
- package/src/skia/web/JsiSkPathEffect.ts +14 -0
- package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
- package/src/skia/web/JsiSkPathFactory.ts +54 -0
- package/src/skia/web/JsiSkPicture.ts +45 -0
- package/src/skia/web/JsiSkPictureFactory.ts +20 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
- package/src/skia/web/JsiSkPoint.ts +19 -0
- package/src/skia/web/JsiSkRRect.ts +27 -0
- package/src/skia/web/JsiSkRSXform.ts +16 -0
- package/src/skia/web/{api/JsiSkRect.ts → JsiSkRect.ts} +11 -1
- package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
- package/src/skia/web/JsiSkSVGFactory.ts +20 -0
- package/src/skia/web/JsiSkShader.ts +14 -0
- package/src/skia/web/JsiSkShaderFactory.ts +178 -0
- package/src/skia/web/{api/JsiSkSurface.ts → JsiSkSurface.ts} +1 -1
- package/src/skia/web/{api/JsiSkSurfaceFactory.ts → JsiSkSurfaceFactory.ts} +1 -1
- package/src/skia/web/JsiSkTextBlob.ts +14 -0
- package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
- package/src/skia/web/JsiSkTypeface.ts +28 -0
- package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
- package/src/skia/web/JsiSkVertices.ts +23 -0
- package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
- package/src/skia/web/JsiSkia.ts +98 -0
- package/src/skia/web/index.ts +1 -1
- package/src/values/web/api.ts +2 -2
- package/src/views/SkiaView.web.tsx +192 -0
- package/src/views/types.ts +1 -0
- package/src/views/useTouchHandler.ts +82 -51
- package/src/web/index.ts +13 -0
- package/cpp/skia/include/core/SkCustomMesh.h +0 -202
- package/cpp/skia/include/core/SkStringView.h +0 -185
- package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
- package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
- package/cpp/skia/include/private/SkTOptional.h +0 -362
- package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
- package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
- package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
- package/lib/commonjs/skia/core/Color.js.map +0 -1
- package/lib/commonjs/skia/core/Shader.js +0 -18
- package/lib/commonjs/skia/core/Shader.js.map +0 -1
- package/lib/commonjs/skia/web/api/Host.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkColor.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +0 -1
- package/lib/commonjs/skia/web/api/JsiSkRect.js.map +0 -1
- package/lib/commonjs/skia/web/api/index.js +0 -26
- package/lib/commonjs/skia/web/api/index.js.map +0 -1
- package/lib/module/renderer/processors/math/Matrix3.js +0 -55
- package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/module/renderer/processors/math/Vector.js.map +0 -1
- package/lib/module/skia/core/Color.js.map +0 -1
- package/lib/module/skia/core/Shader.js +0 -7
- package/lib/module/skia/core/Shader.js.map +0 -1
- package/lib/module/skia/web/api/Host.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkCanvas.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkColor.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkPaint.js.map +0 -1
- package/lib/module/skia/web/api/JsiSkRect.js.map +0 -1
- package/lib/module/skia/web/api/index.js +0 -13
- package/lib/module/skia/web/api/index.js.map +0 -1
- package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
- package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
- package/lib/typescript/src/skia/core/Shader.d.ts +0 -1
- package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +0 -3
- package/lib/typescript/src/skia/web/api/index.d.ts +0 -10
- package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
- package/src/renderer/processors/math/Matrix3.ts +0 -73
- package/src/renderer/processors/math/Vector.ts +0 -38
- package/src/skia/__tests__/Rects.spec.ts +0 -40
- package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
- package/src/skia/core/Shader.ts +0 -9
- package/src/skia/web/api/index.ts +0 -15
- package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
- package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
- package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
- package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -0,0 +1,369 @@
|
|
1
|
+
import type { CanvasKit, Path } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import { PathVerb } from "../types";
|
4
|
+
import type {
|
5
|
+
FillType,
|
6
|
+
PathCommand,
|
7
|
+
PathOp,
|
8
|
+
SkMatrix,
|
9
|
+
SkPath,
|
10
|
+
SkPoint,
|
11
|
+
SkRect,
|
12
|
+
SkRRect,
|
13
|
+
StrokeOpts,
|
14
|
+
} from "../types";
|
15
|
+
|
16
|
+
import { ckEnum, HostObject, optEnum, toValue } from "./Host";
|
17
|
+
import { JsiSkPoint } from "./JsiSkPoint";
|
18
|
+
import { JsiSkRect } from "./JsiSkRect";
|
19
|
+
|
20
|
+
export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
21
|
+
constructor(CanvasKit: CanvasKit, ref: Path) {
|
22
|
+
super(CanvasKit, ref, "Path");
|
23
|
+
}
|
24
|
+
|
25
|
+
addArc(
|
26
|
+
oval: SkRect,
|
27
|
+
startAngleInDegrees: number,
|
28
|
+
sweepAngleInDegrees: number
|
29
|
+
) {
|
30
|
+
this.ref.addArc(toValue(oval), startAngleInDegrees, sweepAngleInDegrees);
|
31
|
+
return this;
|
32
|
+
}
|
33
|
+
|
34
|
+
addOval(oval: SkRect, isCCW?: boolean, startIndex?: number) {
|
35
|
+
this.ref.addOval(toValue(oval), isCCW, startIndex);
|
36
|
+
return this;
|
37
|
+
}
|
38
|
+
|
39
|
+
countPoints() {
|
40
|
+
return this.ref.countPoints();
|
41
|
+
}
|
42
|
+
|
43
|
+
addPoly(points: SkPoint[], close: boolean) {
|
44
|
+
this.ref.addPoly(
|
45
|
+
points.map((p) => toValue(p)),
|
46
|
+
close
|
47
|
+
);
|
48
|
+
return this;
|
49
|
+
}
|
50
|
+
|
51
|
+
moveTo(x: number, y: number) {
|
52
|
+
this.ref.moveTo(x, y);
|
53
|
+
return this;
|
54
|
+
}
|
55
|
+
|
56
|
+
lineTo(x: number, y: number) {
|
57
|
+
this.ref.lineTo(x, y);
|
58
|
+
return this;
|
59
|
+
}
|
60
|
+
|
61
|
+
makeAsWinding() {
|
62
|
+
const result = this.ref.makeAsWinding();
|
63
|
+
return result === null ? result : this;
|
64
|
+
}
|
65
|
+
|
66
|
+
offset(dx: number, dy: number) {
|
67
|
+
this.ref.offset(dx, dy);
|
68
|
+
return this;
|
69
|
+
}
|
70
|
+
|
71
|
+
rArcTo(
|
72
|
+
rx: number,
|
73
|
+
ry: number,
|
74
|
+
xAxisRotateInDegrees: number,
|
75
|
+
useSmallArc: boolean,
|
76
|
+
isCCW: boolean,
|
77
|
+
dx: number,
|
78
|
+
dy: number
|
79
|
+
) {
|
80
|
+
this.ref.rArcTo(rx, ry, xAxisRotateInDegrees, useSmallArc, isCCW, dx, dy);
|
81
|
+
return this;
|
82
|
+
}
|
83
|
+
|
84
|
+
rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number) {
|
85
|
+
this.ref.rConicTo(dx1, dy1, dx2, dy2, w);
|
86
|
+
return this;
|
87
|
+
}
|
88
|
+
|
89
|
+
rCubicTo(
|
90
|
+
cpx1: number,
|
91
|
+
cpy1: number,
|
92
|
+
cpx2: number,
|
93
|
+
cpy2: number,
|
94
|
+
x: number,
|
95
|
+
y: number
|
96
|
+
) {
|
97
|
+
this.ref.rCubicTo(cpx1, cpy1, cpx2, cpy2, x, y);
|
98
|
+
return this;
|
99
|
+
}
|
100
|
+
|
101
|
+
rMoveTo(x: number, y: number) {
|
102
|
+
this.ref.rMoveTo(x, y);
|
103
|
+
return this;
|
104
|
+
}
|
105
|
+
|
106
|
+
rLineTo(x: number, y: number) {
|
107
|
+
this.ref.rLineTo(x, y);
|
108
|
+
return this;
|
109
|
+
}
|
110
|
+
|
111
|
+
rQuadTo(x1: number, y1: number, x2: number, y2: number) {
|
112
|
+
this.ref.rQuadTo(x1, y1, x2, y2);
|
113
|
+
return this;
|
114
|
+
}
|
115
|
+
|
116
|
+
setFillType(fill: FillType) {
|
117
|
+
this.ref.setFillType(ckEnum(fill));
|
118
|
+
}
|
119
|
+
|
120
|
+
setIsVolatile(volatile: boolean) {
|
121
|
+
this.ref.setIsVolatile(volatile);
|
122
|
+
}
|
123
|
+
|
124
|
+
stroke(opts?: StrokeOpts) {
|
125
|
+
const result = this.ref.stroke(
|
126
|
+
opts === undefined
|
127
|
+
? undefined
|
128
|
+
: {
|
129
|
+
width: opts.width,
|
130
|
+
// eslint-disable-next-line camelcase
|
131
|
+
miter_limit: opts.width,
|
132
|
+
precision: opts.width,
|
133
|
+
join: optEnum(opts.join),
|
134
|
+
cap: optEnum(opts.cap),
|
135
|
+
}
|
136
|
+
);
|
137
|
+
return result === null ? result : this;
|
138
|
+
}
|
139
|
+
|
140
|
+
close() {
|
141
|
+
this.ref.close();
|
142
|
+
}
|
143
|
+
|
144
|
+
reset() {
|
145
|
+
this.ref.reset();
|
146
|
+
}
|
147
|
+
|
148
|
+
rewind() {
|
149
|
+
this.ref.rewind();
|
150
|
+
}
|
151
|
+
|
152
|
+
computeTightBounds(): SkRect {
|
153
|
+
return new JsiSkRect(this.CanvasKit, this.ref.computeTightBounds());
|
154
|
+
}
|
155
|
+
|
156
|
+
arcToOval(
|
157
|
+
oval: SkRect,
|
158
|
+
startAngleInDegrees: number,
|
159
|
+
sweepAngleInDegrees: number,
|
160
|
+
forceMoveTo: boolean
|
161
|
+
) {
|
162
|
+
this.ref.arcToOval(
|
163
|
+
toValue(oval),
|
164
|
+
startAngleInDegrees,
|
165
|
+
sweepAngleInDegrees,
|
166
|
+
forceMoveTo
|
167
|
+
);
|
168
|
+
return this;
|
169
|
+
}
|
170
|
+
|
171
|
+
arcToRotated(
|
172
|
+
rx: number,
|
173
|
+
ry: number,
|
174
|
+
xAxisRotateInDegrees: number,
|
175
|
+
useSmallArc: boolean,
|
176
|
+
isCCW: boolean,
|
177
|
+
x: number,
|
178
|
+
y: number
|
179
|
+
) {
|
180
|
+
this.ref.arcToRotated(
|
181
|
+
rx,
|
182
|
+
ry,
|
183
|
+
xAxisRotateInDegrees,
|
184
|
+
useSmallArc,
|
185
|
+
isCCW,
|
186
|
+
x,
|
187
|
+
y
|
188
|
+
);
|
189
|
+
return this;
|
190
|
+
}
|
191
|
+
|
192
|
+
arcToTangent(x1: number, y1: number, x2: number, y2: number, radius: number) {
|
193
|
+
this.ref.arcToTangent(x1, y1, x2, y2, radius);
|
194
|
+
return this;
|
195
|
+
}
|
196
|
+
|
197
|
+
conicTo(x1: number, y1: number, x2: number, y2: number, w: number) {
|
198
|
+
this.ref.conicTo(x1, y1, x2, y2, w);
|
199
|
+
return this;
|
200
|
+
}
|
201
|
+
|
202
|
+
contains(x: number, y: number) {
|
203
|
+
return this.ref.contains(x, y);
|
204
|
+
}
|
205
|
+
|
206
|
+
copy() {
|
207
|
+
return new JsiSkPath(this.CanvasKit, this.ref.copy());
|
208
|
+
}
|
209
|
+
|
210
|
+
cubicTo(
|
211
|
+
cpx1: number,
|
212
|
+
cpy1: number,
|
213
|
+
cpx2: number,
|
214
|
+
cpy2: number,
|
215
|
+
x: number,
|
216
|
+
y: number
|
217
|
+
) {
|
218
|
+
this.ref.cubicTo(cpx1, cpy1, cpx2, cpy2, x, y);
|
219
|
+
return this;
|
220
|
+
}
|
221
|
+
|
222
|
+
dash(on: number, off: number, phase: number) {
|
223
|
+
return this.ref.dash(on, off, phase);
|
224
|
+
}
|
225
|
+
|
226
|
+
equals(other: SkPath) {
|
227
|
+
return this.ref.equals(toValue(other));
|
228
|
+
}
|
229
|
+
|
230
|
+
getBounds() {
|
231
|
+
return new JsiSkRect(this.CanvasKit, this.ref.getBounds());
|
232
|
+
}
|
233
|
+
|
234
|
+
getFillType() {
|
235
|
+
return this.ref.getFillType().value;
|
236
|
+
}
|
237
|
+
|
238
|
+
quadTo(x1: number, y1: number, x2: number, y2: number) {
|
239
|
+
this.ref.quadTo(x1, y1, x2, y2);
|
240
|
+
}
|
241
|
+
|
242
|
+
addRect(rect: SkRect, isCCW?: boolean) {
|
243
|
+
this.ref.addRect(toValue(rect), isCCW);
|
244
|
+
}
|
245
|
+
|
246
|
+
addRRect(rrect: SkRRect, isCCW?: boolean) {
|
247
|
+
this.ref.addRRect(toValue(rrect), isCCW);
|
248
|
+
return this;
|
249
|
+
}
|
250
|
+
|
251
|
+
getPoint(index: number) {
|
252
|
+
return new JsiSkPoint(this.CanvasKit, this.ref.getPoint(index));
|
253
|
+
}
|
254
|
+
|
255
|
+
isEmpty() {
|
256
|
+
return this.ref.isEmpty();
|
257
|
+
}
|
258
|
+
|
259
|
+
isVolatile() {
|
260
|
+
return this.ref.isVolatile();
|
261
|
+
}
|
262
|
+
|
263
|
+
addCircle(x: number, y: number, r: number) {
|
264
|
+
// We leave the comment below to remind us that this is not implemented in CanvasKit
|
265
|
+
// throw new NotImplementedOnRNWeb();
|
266
|
+
this.ref.addOval(this.CanvasKit.LTRBRect(x - r, y - r, x + r, y + r));
|
267
|
+
return this;
|
268
|
+
}
|
269
|
+
|
270
|
+
getLastPt() {
|
271
|
+
return new JsiSkPoint(
|
272
|
+
this.CanvasKit,
|
273
|
+
this.ref.getPoint(this.ref.countPoints() - 1)
|
274
|
+
);
|
275
|
+
}
|
276
|
+
|
277
|
+
op(path: SkPath, op: PathOp) {
|
278
|
+
return this.ref.op(toValue(path), ckEnum(op));
|
279
|
+
}
|
280
|
+
|
281
|
+
simplify() {
|
282
|
+
return this.ref.simplify();
|
283
|
+
}
|
284
|
+
|
285
|
+
toSVGString() {
|
286
|
+
return this.ref.toSVGString();
|
287
|
+
}
|
288
|
+
|
289
|
+
trim(startT: number, stopT: number, isComplement: boolean) {
|
290
|
+
const result = this.ref.trim(startT, stopT, isComplement);
|
291
|
+
return result === null ? result : this;
|
292
|
+
}
|
293
|
+
|
294
|
+
transform(m3: SkMatrix) {
|
295
|
+
this.ref.transform(toValue(m3));
|
296
|
+
}
|
297
|
+
|
298
|
+
interpolate(end: SkPath, t: number) {
|
299
|
+
// Do not remove the comment below. We use it to track missing APIs in CanvasKit
|
300
|
+
// throw new NotImplementedOnRNWeb();
|
301
|
+
const cmd1 = this.toCmds();
|
302
|
+
const cmd2 = end.toCmds();
|
303
|
+
if (cmd1.length !== cmd2.length) {
|
304
|
+
return null;
|
305
|
+
}
|
306
|
+
const interpolated: PathCommand[] = [];
|
307
|
+
for (let i = 0; i < cmd1.length; i++) {
|
308
|
+
if (cmd1[i][0] !== cmd2[i][0]) {
|
309
|
+
return null;
|
310
|
+
}
|
311
|
+
const cmd: PathCommand = [cmd1[i][0]];
|
312
|
+
for (let j = 1; j < cmd1[i].length; j++) {
|
313
|
+
cmd.push(cmd2[i][j] + (cmd1[i][j] - cmd2[i][j]) * t);
|
314
|
+
}
|
315
|
+
interpolated.push(cmd);
|
316
|
+
}
|
317
|
+
const path = this.CanvasKit.Path.MakeFromCmds(interpolated.flat());
|
318
|
+
if (path === null) {
|
319
|
+
return null;
|
320
|
+
}
|
321
|
+
return new JsiSkPath(this.CanvasKit, path);
|
322
|
+
}
|
323
|
+
|
324
|
+
isInterpolatable(path2: SkPath): boolean {
|
325
|
+
// Do not remove the comment below. We use it to track missing APIs in CanvasKit
|
326
|
+
// throw new NotImplementedOnRNWeb();
|
327
|
+
const cmd1 = this.toCmds();
|
328
|
+
const cmd2 = path2.toCmds();
|
329
|
+
if (cmd1.length !== cmd2.length) {
|
330
|
+
return false;
|
331
|
+
}
|
332
|
+
for (let i = 0; i < cmd1.length; i++) {
|
333
|
+
if (cmd1[i][0] !== cmd2[i][0]) {
|
334
|
+
return false;
|
335
|
+
}
|
336
|
+
}
|
337
|
+
return true;
|
338
|
+
}
|
339
|
+
|
340
|
+
toCmds(): PathCommand[] {
|
341
|
+
const cmds: PathCommand[] = [];
|
342
|
+
let cmd = [];
|
343
|
+
const flatCmds = this.ref.toCmds();
|
344
|
+
const CmdCount = {
|
345
|
+
[PathVerb.Move]: 3,
|
346
|
+
[PathVerb.Line]: 3,
|
347
|
+
[PathVerb.Quad]: 5,
|
348
|
+
[PathVerb.Conic]: 6,
|
349
|
+
[PathVerb.Cubic]: 7,
|
350
|
+
[PathVerb.Close]: 0,
|
351
|
+
[PathVerb.Done]: 0,
|
352
|
+
};
|
353
|
+
for (let i = 0; i < flatCmds.length; i++) {
|
354
|
+
if (cmd.length === 0 && flatCmds[i] === PathVerb.Done) {
|
355
|
+
break;
|
356
|
+
}
|
357
|
+
const c = flatCmds[i];
|
358
|
+
cmd.push(c);
|
359
|
+
if (cmd.length > 1) {
|
360
|
+
const length = CmdCount[cmd[0] as PathVerb];
|
361
|
+
if (cmd.length === length) {
|
362
|
+
cmds.push(cmd);
|
363
|
+
cmd = [];
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}
|
367
|
+
return cmds.concat(cmd);
|
368
|
+
}
|
369
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { CanvasKit, PathEffect } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkPathEffect } from "../types/PathEffect";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
|
7
|
+
export class JsiSkPathEffect
|
8
|
+
extends HostObject<PathEffect, "PathEffect">
|
9
|
+
implements SkPathEffect
|
10
|
+
{
|
11
|
+
constructor(CanvasKit: CanvasKit, ref: PathEffect) {
|
12
|
+
super(CanvasKit, ref, "PathEffect");
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type {
|
4
|
+
Path1DEffectStyle,
|
5
|
+
PathEffectFactory,
|
6
|
+
SkMatrix,
|
7
|
+
SkPath,
|
8
|
+
SkPathEffect,
|
9
|
+
} from "../types";
|
10
|
+
|
11
|
+
import { ckEnum, Host, NotImplementedOnRNWeb, toValue } from "./Host";
|
12
|
+
import { JsiSkPathEffect } from "./JsiSkPathEffect";
|
13
|
+
|
14
|
+
export class JsiSkPathEffectFactory extends Host implements PathEffectFactory {
|
15
|
+
constructor(CanvasKit: CanvasKit) {
|
16
|
+
super(CanvasKit);
|
17
|
+
}
|
18
|
+
|
19
|
+
MakeCorner(radius: number) {
|
20
|
+
const pe = this.CanvasKit.PathEffect.MakeCorner(radius);
|
21
|
+
if (pe === null) {
|
22
|
+
return null;
|
23
|
+
}
|
24
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
25
|
+
}
|
26
|
+
|
27
|
+
MakeDash(intervals: number[], phase?: number) {
|
28
|
+
const pe = this.CanvasKit.PathEffect.MakeDash(intervals, phase);
|
29
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
30
|
+
}
|
31
|
+
|
32
|
+
MakeDiscrete(segLength: number, dev: number, seedAssist: number) {
|
33
|
+
const pe = this.CanvasKit.PathEffect.MakeDiscrete(
|
34
|
+
segLength,
|
35
|
+
dev,
|
36
|
+
seedAssist
|
37
|
+
);
|
38
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
39
|
+
}
|
40
|
+
|
41
|
+
MakeCompose(_outer: SkPathEffect, _inner: SkPathEffect): SkPathEffect {
|
42
|
+
throw new NotImplementedOnRNWeb();
|
43
|
+
}
|
44
|
+
|
45
|
+
MakeSum(_outer: SkPathEffect, _inner: SkPathEffect): SkPathEffect {
|
46
|
+
throw new NotImplementedOnRNWeb();
|
47
|
+
}
|
48
|
+
|
49
|
+
MakeLine2D(width: number, matrix: SkMatrix) {
|
50
|
+
const pe = this.CanvasKit.PathEffect.MakeLine2D(width, toValue(matrix));
|
51
|
+
if (pe === null) {
|
52
|
+
return null;
|
53
|
+
}
|
54
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
55
|
+
}
|
56
|
+
|
57
|
+
MakePath1D(
|
58
|
+
path: SkPath,
|
59
|
+
advance: number,
|
60
|
+
phase: number,
|
61
|
+
style: Path1DEffectStyle
|
62
|
+
) {
|
63
|
+
const pe = this.CanvasKit.PathEffect.MakePath1D(
|
64
|
+
toValue(path),
|
65
|
+
advance,
|
66
|
+
phase,
|
67
|
+
ckEnum(style)
|
68
|
+
);
|
69
|
+
if (pe === null) {
|
70
|
+
return null;
|
71
|
+
}
|
72
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
73
|
+
}
|
74
|
+
|
75
|
+
MakePath2D(matrix: SkMatrix, path: SkPath) {
|
76
|
+
const pe = this.CanvasKit.PathEffect.MakePath2D(
|
77
|
+
toValue(matrix),
|
78
|
+
toValue(path)
|
79
|
+
);
|
80
|
+
if (pe === null) {
|
81
|
+
return null;
|
82
|
+
}
|
83
|
+
return new JsiSkPathEffect(this.CanvasKit, pe);
|
84
|
+
}
|
85
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { PathCommand, PathOp, SkFont, SkPath } from "../types";
|
4
|
+
import type { PathFactory } from "../types/Path/PathFactory";
|
5
|
+
|
6
|
+
import { Host, ckEnum, toValue, NotImplementedOnRNWeb } from "./Host";
|
7
|
+
import { JsiSkPath } from "./JsiSkPath";
|
8
|
+
|
9
|
+
export class JsiSkPathFactory extends Host implements PathFactory {
|
10
|
+
constructor(CanvasKit: CanvasKit) {
|
11
|
+
super(CanvasKit);
|
12
|
+
}
|
13
|
+
|
14
|
+
Make() {
|
15
|
+
return new JsiSkPath(this.CanvasKit, new this.CanvasKit.Path());
|
16
|
+
}
|
17
|
+
|
18
|
+
MakeFromSVGString(str: string) {
|
19
|
+
const path = this.CanvasKit.Path.MakeFromSVGString(str);
|
20
|
+
if (path === null) {
|
21
|
+
return null;
|
22
|
+
}
|
23
|
+
return new JsiSkPath(this.CanvasKit, path);
|
24
|
+
}
|
25
|
+
|
26
|
+
MakeFromOp(one: SkPath, two: SkPath, op: PathOp) {
|
27
|
+
const path = this.CanvasKit.Path.MakeFromOp(
|
28
|
+
toValue(one),
|
29
|
+
toValue(two),
|
30
|
+
ckEnum(op)
|
31
|
+
);
|
32
|
+
if (path === null) {
|
33
|
+
return null;
|
34
|
+
}
|
35
|
+
return new JsiSkPath(this.CanvasKit, path);
|
36
|
+
}
|
37
|
+
|
38
|
+
MakeFromCmds(cmds: PathCommand[]) {
|
39
|
+
const path = this.CanvasKit.Path.MakeFromCmds(cmds.flat());
|
40
|
+
if (path === null) {
|
41
|
+
return null;
|
42
|
+
}
|
43
|
+
return new JsiSkPath(this.CanvasKit, path);
|
44
|
+
}
|
45
|
+
|
46
|
+
MakeFromText(
|
47
|
+
_text: string,
|
48
|
+
_x: number,
|
49
|
+
_y: number,
|
50
|
+
_font: SkFont
|
51
|
+
): SkPath | null {
|
52
|
+
throw new NotImplementedOnRNWeb();
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// TODO: suggest to rename SkPicture to Picture for consistency
|
2
|
+
import type { CanvasKit, SkPicture as Picture } from "canvaskit-wasm";
|
3
|
+
|
4
|
+
import type {
|
5
|
+
FilterMode,
|
6
|
+
SkRect,
|
7
|
+
TileMode,
|
8
|
+
SkPicture,
|
9
|
+
SkMatrix,
|
10
|
+
} from "../types";
|
11
|
+
|
12
|
+
import { HostObject, toValue, ckEnum } from "./Host";
|
13
|
+
import { JsiSkShader } from "./JsiSkShader";
|
14
|
+
|
15
|
+
export class JsiSkPicture
|
16
|
+
extends HostObject<Picture, "Picture">
|
17
|
+
implements SkPicture
|
18
|
+
{
|
19
|
+
constructor(CanvasKit: CanvasKit, ref: Picture) {
|
20
|
+
super(CanvasKit, ref, "Picture");
|
21
|
+
}
|
22
|
+
|
23
|
+
makeShader(
|
24
|
+
tmx: TileMode,
|
25
|
+
tmy: TileMode,
|
26
|
+
mode: FilterMode,
|
27
|
+
localMatrix?: SkMatrix,
|
28
|
+
tileRect?: SkRect
|
29
|
+
) {
|
30
|
+
return new JsiSkShader(
|
31
|
+
this.CanvasKit,
|
32
|
+
this.ref.makeShader(
|
33
|
+
ckEnum(tmx),
|
34
|
+
ckEnum(tmy),
|
35
|
+
ckEnum(mode),
|
36
|
+
localMatrix ? toValue(localMatrix) : undefined,
|
37
|
+
tileRect ? toValue(tileRect) : undefined
|
38
|
+
)
|
39
|
+
);
|
40
|
+
}
|
41
|
+
|
42
|
+
serialize() {
|
43
|
+
return this.ref.serialize();
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { PictureFactory } from "../types";
|
4
|
+
|
5
|
+
import { Host } from "./Host";
|
6
|
+
import { JsiSkPicture } from "./JsiSkPicture";
|
7
|
+
|
8
|
+
export class JsiSkPictureFactory extends Host implements PictureFactory {
|
9
|
+
constructor(CanvasKit: CanvasKit) {
|
10
|
+
super(CanvasKit);
|
11
|
+
}
|
12
|
+
|
13
|
+
MakePicture(bytes: Uint8Array | ArrayBuffer) {
|
14
|
+
const pic = this.CanvasKit.MakePicture(bytes);
|
15
|
+
if (pic === null) {
|
16
|
+
return null;
|
17
|
+
}
|
18
|
+
return new JsiSkPicture(this.CanvasKit, pic);
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import type { CanvasKit, PictureRecorder } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkRect } from "../types";
|
4
|
+
import type { SkPictureRecorder } from "../types/Picture/PictureRecorder";
|
5
|
+
|
6
|
+
import { HostObject, toValue } from "./Host";
|
7
|
+
import { JsiSkCanvas } from "./JsiSkCanvas";
|
8
|
+
import { JsiSkPicture } from "./JsiSkPicture";
|
9
|
+
|
10
|
+
export class JsiSkPictureRecorder
|
11
|
+
extends HostObject<PictureRecorder, "PictureRecorder">
|
12
|
+
implements SkPictureRecorder
|
13
|
+
{
|
14
|
+
constructor(CanvasKit: CanvasKit, ref: PictureRecorder) {
|
15
|
+
super(CanvasKit, ref, "PictureRecorder");
|
16
|
+
}
|
17
|
+
|
18
|
+
beginRecording(bounds: SkRect) {
|
19
|
+
return new JsiSkCanvas(
|
20
|
+
this.CanvasKit,
|
21
|
+
this.ref.beginRecording(toValue(bounds))
|
22
|
+
);
|
23
|
+
}
|
24
|
+
|
25
|
+
finishRecordingAsPicture() {
|
26
|
+
return new JsiSkPicture(
|
27
|
+
this.CanvasKit,
|
28
|
+
this.ref.finishRecordingAsPicture()
|
29
|
+
);
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { CanvasKit, Point } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkPoint } from "../types";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
|
7
|
+
export class JsiSkPoint extends HostObject<Point, "Point"> implements SkPoint {
|
8
|
+
constructor(CanvasKit: CanvasKit, ref: Point) {
|
9
|
+
super(CanvasKit, ref, "Point");
|
10
|
+
}
|
11
|
+
|
12
|
+
get x() {
|
13
|
+
return this.ref[0];
|
14
|
+
}
|
15
|
+
|
16
|
+
get y() {
|
17
|
+
return this.ref[1];
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { CanvasKit, RRect } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkRRect } from "../types";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
import { JsiSkRect } from "./JsiSkRect";
|
7
|
+
|
8
|
+
export class JsiSkRRect extends HostObject<RRect, "RRect"> implements SkRRect {
|
9
|
+
constructor(CanvasKit: CanvasKit, ref: RRect) {
|
10
|
+
super(CanvasKit, ref, "RRect");
|
11
|
+
}
|
12
|
+
|
13
|
+
get rx() {
|
14
|
+
return this.ref[4];
|
15
|
+
}
|
16
|
+
|
17
|
+
get ry() {
|
18
|
+
return this.ref[5];
|
19
|
+
}
|
20
|
+
|
21
|
+
get rect() {
|
22
|
+
return new JsiSkRect(
|
23
|
+
this.CanvasKit,
|
24
|
+
Float32Array.of(this.ref[0], this.ref[1], this.ref[2], this.ref[3])
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkRSXform } from "../types";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
|
7
|
+
type RSXform = Float32Array;
|
8
|
+
|
9
|
+
export class JsiSkRSXform
|
10
|
+
extends HostObject<RSXform, "RSXform">
|
11
|
+
implements SkRSXform
|
12
|
+
{
|
13
|
+
constructor(CanvasKit: CanvasKit, ref: RSXform) {
|
14
|
+
super(CanvasKit, ref, "RSXform");
|
15
|
+
}
|
16
|
+
}
|
@@ -1,10 +1,20 @@
|
|
1
1
|
import type { CanvasKit, Rect } from "canvaskit-wasm";
|
2
2
|
|
3
|
-
import type { SkRect } from "
|
3
|
+
import type { SkRect } from "../types";
|
4
4
|
|
5
5
|
import { HostObject } from "./Host";
|
6
6
|
|
7
7
|
export class JsiSkRect extends HostObject<Rect, "Rect"> implements SkRect {
|
8
|
+
static fromValue(CanvasKit: CanvasKit, rect: SkRect) {
|
9
|
+
if (rect instanceof JsiSkRect) {
|
10
|
+
return rect;
|
11
|
+
}
|
12
|
+
return new JsiSkRect(
|
13
|
+
CanvasKit,
|
14
|
+
CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height)
|
15
|
+
);
|
16
|
+
}
|
17
|
+
|
8
18
|
constructor(CanvasKit: CanvasKit, ref: Rect) {
|
9
19
|
super(CanvasKit, ref, "Rect");
|
10
20
|
}
|