@shopify/react-native-skia 0.1.130 → 0.1.133
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/RNSkDrawViewImpl.cpp +5 -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/JsiSkImage.h +2 -19
- package/cpp/api/JsiSkMatrix.h +40 -27
- package/cpp/api/JsiSkPaint.h +8 -33
- package/cpp/api/JsiSkPath.h +71 -65
- package/cpp/api/JsiSkPathFactory.h +14 -1
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
- package/cpp/api/JsiSkTypeface.h +11 -2
- package/cpp/api/JsiSkTypefaceFactory.h +5 -1
- package/cpp/rnskia/RNSkInfoParameter.h +2 -0
- package/cpp/utils/RNSkLog.h +27 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +2 -1
- 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 -43
- 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/Image.js +5 -5
- package/lib/commonjs/skia/types/Image/Image.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/Paint/Paint.js +3 -3
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
- 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 +45 -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/{api/JsiSkCanvas.js → JsiSkCanvas.js} +21 -7
- 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 +33 -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} +10 -6
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -0
- 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/JsiSkImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.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 +337 -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 +49 -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 +22 -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 -44
- 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/Image.js +5 -5
- package/lib/module/skia/types/Image/Image.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/Paint/Paint.js +3 -3
- package/lib/module/skia/types/Paint/Paint.js.map +1 -1
- 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 +42 -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/{api/JsiSkCanvas.js → JsiSkCanvas.js} +20 -7
- 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 +23 -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/JsiSkImage.js +49 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -0
- 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/JsiSkImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.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 +324 -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 +39 -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 +10 -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 -8
- 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/Image.d.ts +5 -5
- 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/Paint/Paint.d.ts +3 -3
- package/lib/typescript/src/skia/types/Path/Path.d.ts +27 -22
- 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 +3 -1
- 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/{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} +4 -4
- 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/JsiSkImageFilterFactory.d.ts +19 -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/package.json +4 -5
- 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 -56
- 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/Image.ts +4 -4
- package/src/skia/types/Image/ImageFactory.ts +3 -3
- package/src/skia/types/Matrix.ts +79 -14
- package/src/skia/types/Paint/Paint.ts +1 -1
- package/src/skia/types/Path/Path.ts +33 -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 +4 -1
- package/src/skia/types/SVG/SVGFactory.ts +2 -2
- package/src/skia/types/Shader/Shader.ts +59 -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/{api/JsiSkCanvas.ts → JsiSkCanvas.ts} +20 -12
- 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 +38 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/JsiSkImage.ts +87 -0
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkImageFilterFactory.ts +144 -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} +7 -6
- package/src/skia/web/JsiSkPath.ts +386 -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 +181 -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 +41 -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 +190 -0
- package/src/views/types.ts +1 -0
- package/src/views/useTouchHandler.ts +82 -51
- package/src/web/index.ts +15 -0
- 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/JsiSkImage.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/JsiSkImage.js +0 -46
- package/lib/module/skia/web/api/JsiSkImage.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/JsiSkImage.ts +0 -66
- 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
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Vector } from "
|
1
|
+
import type { Skia, Vector } from "../../skia/types";
|
2
2
|
interface PointCircleDef {
|
3
3
|
c: Vector;
|
4
4
|
r: number;
|
@@ -9,5 +9,5 @@ interface ScalarCircleDef {
|
|
9
9
|
r: number;
|
10
10
|
}
|
11
11
|
export declare type CircleDef = PointCircleDef | ScalarCircleDef;
|
12
|
-
export declare const processCircle: (def: CircleDef) => PointCircleDef;
|
12
|
+
export declare const processCircle: (Skia: Skia, def: CircleDef) => PointCircleDef;
|
13
13
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { SkCanvas, ClipOp, SkRect, SkRRect } from "../../skia";
|
1
|
+
import type { SkCanvas, ClipOp, SkRect, SkRRect, Skia } from "../../skia/types";
|
2
2
|
import type { PathDef } from "./Paths";
|
3
3
|
export declare type ClipDef = SkRRect | SkRect | PathDef;
|
4
|
-
export declare const processClip: (canvas: SkCanvas, def: ClipDef, op: ClipOp) => void;
|
4
|
+
export declare const processClip: (Skia: Skia, canvas: SkCanvas, def: ClipDef, op: ClipOp) => void;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { Color } from "
|
1
|
+
import type { Color, Skia } from "../../skia/types";
|
2
2
|
export declare const RED = 0;
|
3
3
|
export declare const GREEN = 1;
|
4
4
|
export declare const BLUE = 2;
|
5
5
|
export declare const ALPHA = 3;
|
6
6
|
export declare const rgbaColor: (r: number, g: number, b: number, a: number) => Float32Array;
|
7
|
-
export declare const processColor: (cl: Color, currentOpacity: number) => Float32Array;
|
7
|
+
export declare const processColor: (Skia: Skia, cl: Color, currentOpacity: number) => Float32Array;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkFontMgr, SkFont, Skia } from "../../skia/types";
|
2
2
|
export declare type FontDef = {
|
3
3
|
font: SkFont;
|
4
4
|
} | {
|
@@ -8,4 +8,4 @@ export declare type FontDef = {
|
|
8
8
|
export declare const isFont: (fontDef: FontDef) => fontDef is {
|
9
9
|
font: SkFont;
|
10
10
|
};
|
11
|
-
export declare const processFont: (fontMgr:
|
11
|
+
export declare const processFont: (Skia: Skia, fontMgr: SkFontMgr, fontDef: FontDef) => SkFont;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ReactNode, RefObject } from "react";
|
2
|
-
import { BlendMode, PaintStyle, StrokeJoin, StrokeCap } from "../../skia";
|
3
|
-
import type { SkPaint, Color } from "../../skia";
|
2
|
+
import { BlendMode, PaintStyle, StrokeJoin, StrokeCap } from "../../skia/types";
|
3
|
+
import type { SkPaint, Color, Skia } from "../../skia/types";
|
4
4
|
import type { DeclarationResult } from "../nodes";
|
5
5
|
export declare type SkEnum<T> = Uncapitalize<keyof T extends string ? keyof T : never>;
|
6
6
|
export interface ChildrenProps {
|
@@ -19,4 +19,4 @@ export interface CustomPaintProps extends ChildrenProps {
|
|
19
19
|
antiAlias?: boolean;
|
20
20
|
}
|
21
21
|
export declare const enumKey: <K extends string>(k: K) => Capitalize<K>;
|
22
|
-
export declare const processPaint: (paint: SkPaint, currentOpacity: number, { paint: paintRef, color, blendMode, style, strokeWidth, strokeJoin, strokeCap, strokeMiter, opacity, antiAlias, }: CustomPaintProps, children: DeclarationResult[]) => SkPaint;
|
22
|
+
export declare const processPaint: (Skia: Skia, paint: SkPaint, currentOpacity: number, { paint: paintRef, color, blendMode, style, strokeWidth, strokeJoin, strokeCap, strokeMiter, opacity, antiAlias, }: CustomPaintProps, children: DeclarationResult[]) => SkPaint;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { SkPath } from "../../skia";
|
1
|
+
import type { SkPath, Skia } from "../../skia/types";
|
2
2
|
export declare type PathDef = string | SkPath;
|
3
|
-
export declare const processPath: (rawPath: PathDef) => SkPath;
|
3
|
+
export declare const processPath: (Skia: Skia, rawPath: PathDef) => SkPath;
|
4
4
|
export declare const isPathDef: (def: any) => def is PathDef;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { Vector } from "
|
1
|
+
import type { Skia, Vector } from "../../skia/types";
|
2
2
|
export declare type Radius = number | Vector;
|
3
|
-
export declare const processRadius: (radius: Radius) => Vector;
|
3
|
+
export declare const processRadius: (Skia: Skia, radius: Radius) => Vector;
|
@@ -1,17 +1,6 @@
|
|
1
|
-
import type { SkRect, SkRRect } from "../../skia";
|
2
|
-
import type { Vector } from "./math/Vector";
|
1
|
+
import type { Skia, SkRect, SkRRect, Vector } from "../../skia/types";
|
3
2
|
import type { Radius } from "./Radius";
|
4
|
-
export declare const point: (x: number, y: number) => import("../../skia").SkPoint;
|
5
|
-
export declare const rect: (x: number, y: number, width: number, height: number) => SkRect;
|
6
|
-
export declare const rrect: (r: SkRect, rx: number, ry: number) => SkRRect;
|
7
|
-
export declare const bounds: (rects: SkRect[]) => SkRect;
|
8
3
|
export declare const isEdge: (pos: Vector, b: SkRect) => boolean;
|
9
|
-
export declare const topLeft: (r: SkRect | SkRRect) => import("../../skia").SkPoint;
|
10
|
-
export declare const topRight: (r: SkRect | SkRRect) => import("../../skia").SkPoint;
|
11
|
-
export declare const bottomLeft: (r: SkRect | SkRRect) => import("../../skia").SkPoint;
|
12
|
-
export declare const bottomRight: (r: SkRect | SkRRect) => import("../../skia").SkPoint;
|
13
|
-
export declare const center: (r: SkRect | SkRRect) => import("../../skia").SkPoint;
|
14
|
-
export declare const isRRect: (def: SkRect | SkRRect) => def is SkRRect;
|
15
4
|
export interface RectCtor {
|
16
5
|
x: number;
|
17
6
|
y: number;
|
@@ -27,5 +16,5 @@ export declare type RectDef = RectCtor | {
|
|
27
16
|
export declare type RRectDef = RRectCtor | {
|
28
17
|
rect: SkRRect;
|
29
18
|
};
|
30
|
-
export declare const processRect: (def: RectDef) => SkRect;
|
31
|
-
export declare const processRRect: (def: RRectDef) => SkRRect;
|
19
|
+
export declare const processRect: (Skia: Skia, def: RectDef) => SkRect;
|
20
|
+
export declare const processRRect: (Skia: Skia, def: RRectDef) => SkRRect;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import type { DrawingContext } from "../DrawingContext";
|
2
|
-
import type { SkMatrix } from "../../skia/types";
|
3
|
-
import type { Transforms2d, Vector } from "./math";
|
2
|
+
import type { SkMatrix, Vector, Transforms2d } from "../../skia/types";
|
4
3
|
export interface TransformProps {
|
5
4
|
transform?: Transforms2d;
|
6
5
|
origin?: Vector;
|
7
6
|
matrix?: SkMatrix;
|
8
7
|
}
|
9
|
-
export declare const
|
10
|
-
export declare const localMatrix: ({ transform, origin }: TransformProps) => SkMatrix | undefined;
|
8
|
+
export declare const processCanvasTransform: ({ canvas, Skia }: DrawingContext, { transform, origin, matrix }: TransformProps) => void;
|
9
|
+
export declare const localMatrix: (m: SkMatrix, { transform, origin }: TransformProps) => SkMatrix | undefined;
|
11
10
|
export declare const transformOrigin: (origin: Vector, transform: Transforms2d) => (Pick<{
|
12
11
|
readonly translateX: number;
|
13
12
|
readonly translateY: number;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
export * from "./Paint";
|
2
1
|
export * from "./Transform";
|
3
2
|
export * from "./Animations";
|
4
3
|
export * from "./Circles";
|
@@ -8,3 +7,5 @@ export * from "./Font";
|
|
8
7
|
export * from "./Paths";
|
9
8
|
export * from "./Clips";
|
10
9
|
export * from "./Radius";
|
10
|
+
export * from "./Color";
|
11
|
+
export * from "./Paint";
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import type { Skia } from "../skia/types";
|
3
|
+
import type { SkiaValue } from "../values/types";
|
4
|
+
interface CanvasContext {
|
5
|
+
Skia: Skia;
|
6
|
+
size: SkiaValue<{
|
7
|
+
width: number;
|
8
|
+
height: number;
|
9
|
+
}>;
|
10
|
+
}
|
11
|
+
declare const CanvasContext: React.Context<CanvasContext | null>;
|
12
|
+
export declare const CanvasProvider: React.Provider<CanvasContext | null>;
|
13
|
+
export declare const useCanvas: () => CanvasContext;
|
14
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const Skia: import("./types").Skia;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { DependencyList } from "react";
|
2
|
-
import type {
|
3
|
-
export declare const useDataCollection: <T>(sources: DataSource[], factory: (data:
|
4
|
-
export declare const useRawData: <T>(source: DataSource | null | undefined, factory: (data:
|
5
|
-
export declare const useData: (source: DataSource | null | undefined, onError?: ((err: Error) => void) | undefined) =>
|
2
|
+
import type { SkData, DataSource } from "../types";
|
3
|
+
export declare const useDataCollection: <T>(sources: DataSource[], factory: (data: SkData[]) => T, deps?: DependencyList) => T | null;
|
4
|
+
export declare const useRawData: <T>(source: DataSource | null | undefined, factory: (data: SkData) => T, onError?: ((err: Error) => void) | undefined) => T | null;
|
5
|
+
export declare const useData: (source: DataSource | null | undefined, onError?: ((err: Error) => void) | undefined) => SkData | null;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { SkRect, SkRRect } from "../types";
|
2
|
+
export declare const rect: (x: number, y: number, width: number, height: number) => SkRect;
|
3
|
+
export declare const bounds: (rects: SkRect[]) => SkRect;
|
4
|
+
export declare const topLeft: (r: SkRect | SkRRect) => import("../types").SkPoint;
|
5
|
+
export declare const topRight: (r: SkRect | SkRRect) => import("../types").SkPoint;
|
6
|
+
export declare const bottomLeft: (r: SkRect | SkRRect) => import("../types").SkPoint;
|
7
|
+
export declare const bottomRight: (r: SkRect | SkRRect) => import("../types").SkPoint;
|
8
|
+
export declare const center: (r: SkRect | SkRRect) => import("../types").SkPoint;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { Vector } from "../types";
|
2
|
+
export declare const vec: (x?: number, y?: number | undefined) => import("../types").SkPoint;
|
3
|
+
export declare const point: (x?: number, y?: number | undefined) => import("../types").SkPoint;
|
4
|
+
export declare const neg: (a: Vector) => import("../types").SkPoint;
|
5
|
+
export declare const add: (a: Vector, b: Vector) => import("../types").SkPoint;
|
6
|
+
export declare const sub: (a: Vector, b: Vector) => import("../types").SkPoint;
|
7
|
+
export declare const dist: (a: Vector, b: Vector) => number;
|
8
|
+
export declare const translate: ({ x, y }: Vector) => readonly [{
|
9
|
+
readonly translateX: number;
|
10
|
+
}, {
|
11
|
+
readonly translateY: number;
|
12
|
+
}];
|
@@ -1,10 +1,12 @@
|
|
1
|
-
export * from "./Color";
|
2
1
|
export * from "./Data";
|
3
2
|
export * from "./Font";
|
4
3
|
export * from "./Typeface";
|
5
4
|
export * from "./Image";
|
6
5
|
export * from "./Picture";
|
7
6
|
export * from "./SVG";
|
8
|
-
export * from "./Shader";
|
9
|
-
export * from "./Paint";
|
10
7
|
export * from "./Path";
|
8
|
+
export * from "./Vector";
|
9
|
+
export * from "./Rect";
|
10
|
+
export * from "./RRect";
|
11
|
+
export * from "./Matrix";
|
12
|
+
export * from "./Paint";
|
@@ -6,15 +6,13 @@ export interface PosTan {
|
|
6
6
|
tx: number;
|
7
7
|
ty: number;
|
8
8
|
}
|
9
|
-
export interface SkContourMeasure extends SkJSIInstance<"
|
9
|
+
export interface SkContourMeasure extends SkJSIInstance<"ContourMeasure"> {
|
10
10
|
/**
|
11
11
|
* Returns the given position and tangent line for the distance on the given contour.
|
12
12
|
* The return value is 4 floats in this order: posX, posY, vecX, vecY.
|
13
13
|
* @param distance - will be pinned between 0 and length().
|
14
|
-
* @param output - if provided, the four floats of the PosTan will be copied into this array
|
15
|
-
* instead of allocating a new one.
|
16
14
|
*/
|
17
|
-
getPosTan(distance: number
|
15
|
+
getPosTan(distance: number): PosTan;
|
18
16
|
/**
|
19
17
|
* Returns an Path representing the segment of this contour.
|
20
18
|
* @param startD - will be pinned between 0 and length()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="react-native" />
|
3
3
|
import type { SkJSIInstance } from "../JsiInstance";
|
4
|
-
export declare type
|
4
|
+
export declare type SkData = SkJSIInstance<"Data">;
|
5
5
|
export declare type DataSource = ReturnType<typeof require> | string | Uint8Array;
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkData } from "./Data";
|
2
2
|
export interface DataFactory {
|
3
3
|
/**
|
4
4
|
* Creates a new Data object from an Uri, either locally or remotely.
|
5
5
|
* @param uri Uri to a valid resource
|
6
6
|
*/
|
7
|
-
fromURI(uri: string): Promise<
|
7
|
+
fromURI(uri: string): Promise<SkData>;
|
8
8
|
/**
|
9
9
|
* Creates a new Data object from a byte array.
|
10
10
|
* @param bytes An array of bytes representing the data
|
11
11
|
*/
|
12
|
-
fromBytes(bytes: Uint8Array):
|
12
|
+
fromBytes(bytes: Uint8Array): SkData;
|
13
13
|
/**
|
14
14
|
* Creates a new Data object from a base64 encoded string.
|
15
15
|
* @param base64 A Base64 encoded string representing the data
|
16
16
|
*/
|
17
|
-
fromBase64(base64: string):
|
17
|
+
fromBase64(base64: string): SkData;
|
18
18
|
}
|
@@ -10,6 +10,14 @@ export interface FontMetrics {
|
|
10
10
|
bounds?: SkRect;
|
11
11
|
}
|
12
12
|
export interface SkFont extends SkJSIInstance<"Font"> {
|
13
|
+
/**
|
14
|
+
* Retrieves the advanceX measurements for each glyph.
|
15
|
+
* If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.
|
16
|
+
* One width per glyph is returned in the returned array.
|
17
|
+
* @param glyphs
|
18
|
+
* @param paint
|
19
|
+
*/
|
20
|
+
getGlyphWidths(glyphs: number[], paint?: SkPaint): number[];
|
13
21
|
/** Returns the advance width of text.
|
14
22
|
The advance is the normal distance to move before drawing additional text.
|
15
23
|
Returns the bounding box of text if bounds is not nullptr. The paint
|
@@ -34,15 +42,6 @@ export interface SkFont extends SkJSIInstance<"Font"> {
|
|
34
42
|
* @param numCodePoints - the number of code points in the string. Defaults to str.length.
|
35
43
|
*/
|
36
44
|
getGlyphIDs(str: string, numCodePoints?: number): number[];
|
37
|
-
/**
|
38
|
-
* Retrieves the advanceX measurements for each glyph.
|
39
|
-
* If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.
|
40
|
-
* One width per glyph is returned in the returned array.
|
41
|
-
* @param glyphs
|
42
|
-
* @param paint
|
43
|
-
* @param output - if provided, the results will be copied into this array.
|
44
|
-
*/
|
45
|
-
getGlyphWidths(glyphs: number[], paint?: SkPaint | null, output?: Float32Array): Float32Array;
|
46
45
|
/**
|
47
46
|
* Computes any intersections of a thick "line" and a run of positionsed glyphs.
|
48
47
|
* The thick line is represented as a top and bottom coordinate (positive for
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { SkJSIInstance } from "../JsiInstance";
|
2
2
|
import type { FontStyle } from "../Font/Font";
|
3
3
|
import type { SkTypeface } from "../Typeface";
|
4
|
-
export interface
|
4
|
+
export interface SkFontMgr extends SkJSIInstance<"FontMgr"> {
|
5
5
|
/**
|
6
6
|
* Return the number of font families loaded in this manager. Useful for debugging.
|
7
7
|
*/
|
@@ -3,8 +3,8 @@ import type { SkJSIInstance } from "../JsiInstance";
|
|
3
3
|
import type { TileMode } from "../ImageFilter";
|
4
4
|
import type { SkShader } from "../Shader";
|
5
5
|
export declare enum FilterMode {
|
6
|
-
|
7
|
-
|
6
|
+
Nearest = 0,
|
7
|
+
Linear = 1
|
8
8
|
}
|
9
9
|
export declare enum MipmapMode {
|
10
10
|
None = 0,
|
@@ -12,9 +12,9 @@ export declare enum MipmapMode {
|
|
12
12
|
Linear = 2
|
13
13
|
}
|
14
14
|
export declare enum ImageFormat {
|
15
|
-
|
16
|
-
|
17
|
-
WEBP =
|
15
|
+
JPEG = 3,
|
16
|
+
PNG = 4,
|
17
|
+
WEBP = 6
|
18
18
|
}
|
19
19
|
export interface SkImage extends SkJSIInstance<"Image"> {
|
20
20
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SkData } from "../Data";
|
2
2
|
import type { SkImage } from "./Image";
|
3
3
|
export declare enum AlphaType {
|
4
4
|
Unknown = 0,
|
@@ -47,7 +47,7 @@ export interface ImageFactory {
|
|
47
47
|
* @returns If the encoded format is not supported, or subset is outside of the bounds of the decoded
|
48
48
|
* image, nullptr is returned.
|
49
49
|
*/
|
50
|
-
MakeImageFromEncoded: (encoded:
|
50
|
+
MakeImageFromEncoded: (encoded: SkData) => SkImage | null;
|
51
51
|
/**
|
52
52
|
* Returns an image with the given pixel data and format.
|
53
53
|
* Note that we will always make a copy of the pixel data, because of inconsistencies in
|
@@ -58,5 +58,5 @@ export interface ImageFactory {
|
|
58
58
|
* @param data - bytes representing the pixel data.
|
59
59
|
* @param bytesPerRow
|
60
60
|
*/
|
61
|
-
MakeImage(info: ImageInfo, data:
|
61
|
+
MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): SkImage | null;
|
62
62
|
}
|
@@ -11,18 +11,19 @@ export declare enum MatrixIndex {
|
|
11
11
|
persp2 = 8
|
12
12
|
}
|
13
13
|
export interface SkMatrix extends SkJSIInstance<"Matrix"> {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
5: number;
|
20
|
-
6: number;
|
21
|
-
7: number;
|
22
|
-
8: number;
|
23
|
-
preConcat: (matrix: SkMatrix) => void;
|
24
|
-
preTranslate: (x: number, y: number) => void;
|
25
|
-
preScale: (x: number, y: number) => void;
|
26
|
-
preSkew: (x: number, y: number) => void;
|
27
|
-
preRotate: (theta: number) => void;
|
14
|
+
concat: (matrix: SkMatrix) => void;
|
15
|
+
translate: (x: number, y: number) => void;
|
16
|
+
scale: (x: number, y?: number) => void;
|
17
|
+
skew: (x: number, y: number) => void;
|
18
|
+
rotate: (theta: number) => void;
|
28
19
|
}
|
20
|
+
declare type Transform2dName = "translateX" | "translateY" | "scale" | "skewX" | "skewY" | "scaleX" | "scaleY" | "rotateZ" | "rotate";
|
21
|
+
declare type Transformations = {
|
22
|
+
readonly [Name in Transform2dName]: number;
|
23
|
+
};
|
24
|
+
export declare type Transforms2d = readonly (Pick<Transformations, "translateX"> | Pick<Transformations, "translateY"> | Pick<Transformations, "scale"> | Pick<Transformations, "scaleX"> | Pick<Transformations, "scaleY"> | Pick<Transformations, "skewX"> | Pick<Transformations, "skewY"> | Pick<Transformations, "rotate">)[];
|
25
|
+
export interface TransformProp {
|
26
|
+
transform?: Transforms2d;
|
27
|
+
}
|
28
|
+
export declare const processTransform: (m: SkMatrix, transforms: Transforms2d) => SkMatrix;
|
29
|
+
export {};
|
@@ -16,9 +16,9 @@ export declare enum StrokeCap {
|
|
16
16
|
Square = 2
|
17
17
|
}
|
18
18
|
export declare enum StrokeJoin {
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
Miter = 0,
|
20
|
+
Round = 1,
|
21
|
+
Bevel = 2
|
22
22
|
}
|
23
23
|
export declare const isPaint: (obj: SkJSIInstance<string> | null) => obj is SkPaint;
|
24
24
|
export interface SkPaint extends SkJSIInstance<"Paint"> {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { SkFont } from "../Font";
|
2
1
|
import type { SkRect } from "../Rect";
|
3
2
|
import type { SkPoint } from "../Point";
|
4
3
|
import type { SkRRect } from "../RRect";
|
@@ -64,7 +63,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
64
63
|
* @param isCCW - if the path should be drawn counter-clockwise or not
|
65
64
|
* @param startIndex - index of initial point of ellipse
|
66
65
|
*/
|
67
|
-
addOval(oval: SkRect, isCCW?: boolean, startIndex?: number):
|
66
|
+
addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): SkPath;
|
68
67
|
/**
|
69
68
|
* Returns the number of points in this path. Initially zero.
|
70
69
|
*/
|
@@ -78,7 +77,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
78
77
|
* @param points
|
79
78
|
* @param close - if true, will add a line connecting last point to the first point.
|
80
79
|
*/
|
81
|
-
addPoly(points: SkPoint[], close: boolean):
|
80
|
+
addPoly(points: SkPoint[], close: boolean): SkPath;
|
82
81
|
/** Adds beginning of contour at SkPoint (x, y).
|
83
82
|
|
84
83
|
@param x x-axis value of contour start
|
@@ -87,7 +86,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
87
86
|
|
88
87
|
example: https://fiddle.skia.org/c/@Path_moveTo
|
89
88
|
*/
|
90
|
-
moveTo(x: number, y: number):
|
89
|
+
moveTo(x: number, y: number): SkPath;
|
91
90
|
/** Adds line from last point to (x, y). If SkPath is empty, or last SkPath::Verb is
|
92
91
|
kClose_Verb, last point is set to (0, 0) before adding line.
|
93
92
|
|
@@ -100,7 +99,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
100
99
|
|
101
100
|
example: https://fiddle.skia.org/c/@Path_lineTo
|
102
101
|
*/
|
103
|
-
lineTo(x: number, y: number):
|
102
|
+
lineTo(x: number, y: number): SkPath;
|
104
103
|
/**
|
105
104
|
* Returns a new path that covers the same area as the original path, but with the
|
106
105
|
* Winding FillType. This may re-draw some contours in the path as counter-clockwise
|
@@ -113,7 +112,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
113
112
|
* @param dx
|
114
113
|
* @param dy
|
115
114
|
*/
|
116
|
-
offset(dx: number, dy: number):
|
115
|
+
offset(dx: number, dy: number): SkPath;
|
117
116
|
/**
|
118
117
|
* Relative version of arcToRotated.
|
119
118
|
* @param rx
|
@@ -124,7 +123,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
124
123
|
* @param dx
|
125
124
|
* @param dy
|
126
125
|
*/
|
127
|
-
rArcTo(rx: number, ry: number, xAxisRotateInDegrees: number, useSmallArc: boolean, isCCW: boolean, dx: number, dy: number):
|
126
|
+
rArcTo(rx: number, ry: number, xAxisRotateInDegrees: number, useSmallArc: boolean, isCCW: boolean, dx: number, dy: number): SkPath;
|
128
127
|
/**
|
129
128
|
* Relative version of conicTo.
|
130
129
|
* @param dx1
|
@@ -133,7 +132,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
133
132
|
* @param dy2
|
134
133
|
* @param w
|
135
134
|
*/
|
136
|
-
rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number):
|
135
|
+
rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number): SkPath;
|
137
136
|
/**
|
138
137
|
* Relative version of cubicTo.
|
139
138
|
* @param cpx1
|
@@ -143,7 +142,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
143
142
|
* @param x
|
144
143
|
* @param y
|
145
144
|
*/
|
146
|
-
rCubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number):
|
145
|
+
rCubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): SkPath;
|
147
146
|
/**
|
148
147
|
* Relative version of moveTo.
|
149
148
|
* @param x
|
@@ -182,8 +181,9 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
182
181
|
* Turns this path into the filled equivalent of the stroked path. Returns false if the operation
|
183
182
|
* fails (e.g. the path is a hairline).
|
184
183
|
* @param opts - describe how stroked path should look.
|
184
|
+
* If such a transformation cannot be done, null is returned.
|
185
185
|
*/
|
186
|
-
stroke(opts?: StrokeOpts):
|
186
|
+
stroke(opts?: StrokeOpts): null | SkPath;
|
187
187
|
/**
|
188
188
|
* Appends CLOSE_VERB to Path. A closed contour connects the first and last point
|
189
189
|
* with a line, forming a continuous loop.
|
@@ -213,10 +213,8 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
213
213
|
* only lines. If Path contains curves, computed bounds includes
|
214
214
|
* the maximum extent of the quad, conic, or cubic; is slower than getBounds();
|
215
215
|
* and unlike getBounds(), does not cache the result.
|
216
|
-
* @param outputArray - if provided, the bounding box will be copied into this array instead of
|
217
|
-
* allocating a new one.
|
218
216
|
*/
|
219
|
-
computeTightBounds(
|
217
|
+
computeTightBounds(): SkRect;
|
220
218
|
/**
|
221
219
|
* Appends arc to Path. Arc added is part of ellipse
|
222
220
|
* bounded by oval, from startAngle through sweepAngle. Both startAngle and
|
@@ -291,7 +289,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
291
289
|
* @param x
|
292
290
|
* @param y
|
293
291
|
*/
|
294
|
-
cubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number):
|
292
|
+
cubicTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): SkPath;
|
295
293
|
/**
|
296
294
|
* Changes this path to be the dashed version of itself. This is the same effect as creating
|
297
295
|
* a DashPathEffect and calling filterPath on this path.
|
@@ -367,7 +365,18 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
367
365
|
* may not speed repeated drawing.
|
368
366
|
*/
|
369
367
|
isVolatile(): boolean;
|
370
|
-
|
368
|
+
/** Adds circle centered at (x, y) of size radius to SkPath, appending kMove_Verb,
|
369
|
+
four kConic_Verb, and kClose_Verb. Circle begins at: (x + radius, y), continuing
|
370
|
+
clockwise if dir is kCW_Direction, and counterclockwise if dir is kCCW_Direction.
|
371
|
+
|
372
|
+
Has no effect if radius is zero or negative.
|
373
|
+
|
374
|
+
@param x center of circle
|
375
|
+
@param y center of circle
|
376
|
+
@param radius distance from center to edge
|
377
|
+
@return reference to SkPath
|
378
|
+
*/
|
379
|
+
addCircle(x: number, y: number, r: number): SkPath;
|
371
380
|
getLastPt(): {
|
372
381
|
x: number;
|
373
382
|
y: number;
|
@@ -414,15 +423,11 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
414
423
|
* @param stopT - a value in the range [0.0, 1.0]. 1.0 is the end of the path.
|
415
424
|
* @param isComplement
|
416
425
|
*/
|
417
|
-
trim(startT: number, stopT: number, isComplement: boolean):
|
426
|
+
trim(startT: number, stopT: number, isComplement: boolean): null | SkPath;
|
418
427
|
/**
|
419
428
|
* Transforms the path by the specified matrix.
|
420
429
|
*/
|
421
430
|
transform(m3: SkMatrix): void;
|
422
|
-
/**
|
423
|
-
* Converts the text to a path with the given font at location x / y.
|
424
|
-
*/
|
425
|
-
fromText(text: string, x: number, y: number, font: SkFont): void;
|
426
431
|
/**
|
427
432
|
* Interpolates between Path with point array of equal size.
|
428
433
|
* Copy verb array and weights to result, and set result path to a weighted
|
@@ -439,10 +444,10 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
439
444
|
* @param ending path to interpolate with
|
440
445
|
* @param weight contribution of this path, and
|
441
446
|
* one minus contribution of ending path
|
442
|
-
* @return Path replaced by interpolated averages or
|
447
|
+
* @return Path replaced by interpolated averages or null if
|
443
448
|
* not interpolatable
|
444
449
|
* */
|
445
|
-
interpolate(end: SkPath, weight: number): SkPath;
|
450
|
+
interpolate(end: SkPath, weight: number): SkPath | null;
|
446
451
|
/** Returns true if Path contain equal verbs and equal weights.
|
447
452
|
* @param compare path to compare
|
448
453
|
* @return true if Path can be interpolated equivalent
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { SkFont } from "../Font";
|
1
2
|
import type { SkPath, PathOp, PathCommand } from "./Path";
|
2
3
|
export interface PathFactory {
|
3
4
|
Make(): SkPath;
|
@@ -21,4 +22,8 @@ export interface PathFactory {
|
|
21
22
|
* @param cmds
|
22
23
|
*/
|
23
24
|
MakeFromCmds(cmds: PathCommand[]): SkPath | null;
|
25
|
+
/**
|
26
|
+
* Converts the text to a path with the given font at location x / y.
|
27
|
+
*/
|
28
|
+
MakeFromText(text: string, x: number, y: number, font: SkFont): SkPath | null;
|
24
29
|
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { InputColorMatrix } from "../ColorFilter";
|
2
1
|
import type { FilterMode } from "../Image";
|
3
2
|
import type { TileMode } from "../ImageFilter";
|
4
3
|
import type { SkRect } from "../Rect";
|
5
4
|
import type { SkShader } from "../Shader";
|
5
|
+
import type { SkMatrix } from "../Matrix";
|
6
6
|
export interface SkPicture {
|
7
7
|
/**
|
8
8
|
* Returns a new shader that will draw with this picture.
|
@@ -17,7 +17,7 @@ export interface SkPicture {
|
|
17
17
|
* and cropping). If null, the tile rect is considered equal to the picture
|
18
18
|
* bounds.
|
19
19
|
*/
|
20
|
-
makeShader(tmx: TileMode, tmy: TileMode, mode: FilterMode, localMatrix?:
|
20
|
+
makeShader(tmx: TileMode, tmy: TileMode, mode: FilterMode, localMatrix?: SkMatrix, tileRect?: SkRect): SkShader;
|
21
21
|
/**
|
22
22
|
* Returns the serialized format of this SkPicture. The format may change at anytime and
|
23
23
|
* no promises are made for backwards or forward compatibility.
|