@shopify/react-native-skia 0.1.128 → 0.1.129
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +1 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +1 -3
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Compose.js +2 -6
- package/lib/commonjs/renderer/components/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +1 -3
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +2 -4
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +1 -3
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -3
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +2 -4
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +1 -3
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +1 -3
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/index.js +13 -0
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.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/Clips.js.map +1 -1
- package/lib/commonjs/renderer/processors/Font.js.map +1 -1
- package/lib/commonjs/renderer/processors/Rects.js +5 -1
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
- package/lib/commonjs/skia/Skia.js +2 -36
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/{Color.js → core/Color.js} +1 -1
- package/lib/commonjs/skia/core/Color.js.map +1 -0
- package/lib/commonjs/skia/{Data → core}/Data.js +29 -8
- package/lib/commonjs/skia/core/Data.js.map +1 -0
- package/lib/commonjs/skia/{Font/useFont.js → core/Font.js} +4 -4
- package/lib/commonjs/skia/core/Font.js.map +1 -0
- package/lib/commonjs/skia/{Image/useImage.js → core/Image.js} +4 -4
- package/lib/commonjs/skia/core/Image.js.map +1 -0
- package/lib/commonjs/skia/{Paint/usePaint.js → core/Paint.js} +14 -4
- package/lib/commonjs/skia/core/Paint.js.map +1 -0
- package/lib/commonjs/skia/{Path/usePath.js → core/Path.js} +1 -1
- package/lib/commonjs/skia/core/Path.js.map +1 -0
- package/lib/commonjs/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
- package/lib/commonjs/skia/core/Picture.js.map +1 -0
- package/lib/commonjs/skia/core/SVG.js +15 -0
- package/lib/commonjs/skia/core/SVG.js.map +1 -0
- package/lib/commonjs/skia/{Shader/useShader.js → core/Shader.js} +1 -1
- package/lib/commonjs/skia/core/Shader.js.map +1 -0
- package/lib/commonjs/skia/{Typeface/useTypeface.js → core/Typeface.js} +3 -3
- package/lib/commonjs/skia/core/Typeface.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +136 -0
- package/lib/commonjs/skia/core/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +8 -302
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/commonjs/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/commonjs/skia/types/Color.js +2 -0
- package/lib/commonjs/skia/{ColorFilter/ColorFilterFactory.js.map → types/Color.js.map} +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/ColorFilter/ColorFilterFactory.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/commonjs/skia/types/Data/Data.js +6 -0
- package/lib/commonjs/skia/{Data/DataFactory.js.map → types/Data/Data.js.map} +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/Data/DataFactory.js.map +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/commonjs/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/{Font → types/Font}/index.js +0 -13
- package/lib/commonjs/skia/{FontMgr → types/Font}/index.js.map +1 -1
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js.map +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js.map +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/index.js +13 -0
- package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/Image.js.map +1 -1
- package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
- package/lib/commonjs/skia/{Image → types/Image}/index.js +0 -13
- package/lib/commonjs/skia/types/Image/index.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/commonjs/skia/{JsiInstance.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/commonjs/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/{Matrix.js → types/Matrix.js} +0 -0
- package/lib/commonjs/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/Paint.js +1 -13
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/index.js +0 -13
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/{Path → types/Path}/Path.js +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/Path.js.map +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js.map +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/index.js +0 -13
- package/lib/commonjs/skia/types/Path/index.js.map +1 -0
- package/lib/commonjs/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/index.js +0 -13
- package/lib/commonjs/skia/{Paint → types/Picture}/index.js.map +1 -1
- package/lib/commonjs/skia/{Point.js → types/Point.js} +0 -0
- package/lib/commonjs/skia/{Point.js.map → types/Point.js.map} +0 -0
- package/lib/commonjs/skia/{RRect.js → types/RRect.js} +0 -0
- package/lib/commonjs/skia/{RRect.js.map → types/RRect.js.map} +0 -0
- package/lib/commonjs/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/commonjs/skia/{RSXform.js.map → types/RSXform.js.map} +0 -0
- package/lib/commonjs/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/commonjs/skia/{Rect.js.map → types/Rect.js.map} +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/index.js +0 -13
- package/lib/commonjs/skia/{Font → types/SVG}/index.js.map +1 -1
- package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js.map +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js.map +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/index.js +0 -13
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.js +6 -0
- package/lib/commonjs/skia/{Surface/Surface.js.map → types/Skia.js.map} +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/Surface/Surface.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/commonjs/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/commonjs/skia/{TextBlob.js.map → types/TextBlob.js.map} +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js.map +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js.map +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/index.js +0 -13
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/commonjs/skia/types/index.js +370 -0
- package/lib/commonjs/skia/types/index.js.map +1 -0
- package/lib/commonjs/skia/web/api/Host.js +66 -0
- package/lib/commonjs/skia/web/api/Host.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js +170 -0
- package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkColor.js +180 -0
- package/lib/commonjs/skia/web/api/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkColorFilter.js +18 -0
- package/lib/commonjs/skia/web/api/JsiSkColorFilter.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkImage.js +56 -0
- package/lib/commonjs/skia/web/api/JsiSkImage.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkPaint.js +106 -0
- package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkRect.js +34 -0
- package/lib/commonjs/skia/web/api/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkSurface.js +31 -0
- package/lib/commonjs/skia/web/api/JsiSkSurface.js.map +1 -0
- package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js +30 -0
- package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/api/index.js +26 -0
- package/lib/commonjs/skia/web/api/index.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +19 -0
- package/lib/commonjs/skia/web/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/decay/runDecay.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.js.map +1 -1
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/createTiming.js.map +1 -1
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +1 -2
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +1 -2
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Compose.js +1 -3
- package/lib/module/renderer/components/Compose.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +1 -2
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +1 -2
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +1 -2
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +1 -2
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +1 -2
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +1 -2
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +1 -2
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +1 -2
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +1 -2
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +1 -2
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/index.js +1 -0
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.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/Clips.js.map +1 -1
- package/lib/module/renderer/processors/Font.js.map +1 -1
- package/lib/module/renderer/processors/Rects.js +1 -0
- package/lib/module/renderer/processors/Rects.js.map +1 -1
- package/lib/module/renderer/processors/Transform.js.map +1 -1
- package/lib/module/skia/Skia.js +2 -35
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/{Color.js → core/Color.js} +1 -2
- package/lib/module/skia/core/Color.js.map +1 -0
- package/lib/module/skia/core/Data.js +56 -0
- package/lib/module/skia/core/Data.js.map +1 -0
- package/lib/module/skia/{Font/useFont.js → core/Font.js} +5 -5
- package/lib/module/skia/core/Font.js.map +1 -0
- package/lib/module/skia/core/Image.js +8 -0
- package/lib/module/skia/core/Image.js.map +1 -0
- package/lib/module/skia/{Paint/usePaint.js → core/Paint.js} +8 -3
- package/lib/module/skia/core/Paint.js.map +1 -0
- package/lib/module/skia/{Path/usePath.js → core/Path.js} +1 -1
- package/lib/module/skia/core/Path.js.map +1 -0
- package/lib/module/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
- package/lib/module/skia/core/Picture.js.map +1 -0
- package/lib/module/skia/core/SVG.js +4 -0
- package/lib/module/skia/core/SVG.js.map +1 -0
- package/lib/module/skia/{Shader/useShader.js → core/Shader.js} +1 -1
- package/lib/module/skia/core/Shader.js.map +1 -0
- package/lib/module/skia/core/Typeface.js +8 -0
- package/lib/module/skia/core/Typeface.js.map +1 -0
- package/lib/module/skia/core/index.js +11 -0
- package/lib/module/skia/core/index.js.map +1 -0
- package/lib/module/skia/index.js +2 -23
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/module/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/module/skia/types/Color.js +2 -0
- package/lib/module/skia/{ContourMeasure.js.map → types/Color.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/module/skia/{FontMgr/FontMgr.js.map → types/ColorFilter/ColorFilterFactory.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/module/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/module/skia/{FontMgr/FontMgrFactory.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/module/skia/types/Data/Data.js +2 -0
- package/lib/module/skia/{JsiInstance.js.map → types/Data/Data.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/module/skia/{Path/PathFactory.js.map → types/Data/DataFactory.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/module/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/module/skia/types/Font/Font.js.map +1 -0
- package/lib/module/skia/types/Font/index.js +2 -0
- package/lib/module/skia/types/Font/index.js.map +1 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/module/skia/{Picture/Picture.js.map → types/FontMgr/FontMgr.js.map} +0 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/module/skia/{Picture/PictureFactory.js.map → types/FontMgr/FontMgrFactory.js.map} +0 -0
- package/lib/module/skia/types/FontMgr/index.js +3 -0
- package/lib/module/skia/types/FontMgr/index.js.map +1 -0
- package/lib/module/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/module/skia/{Image → types/Image}/Image.js.map +1 -1
- package/lib/module/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/module/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
- package/lib/module/skia/types/Image/index.js +3 -0
- package/lib/module/skia/types/Image/index.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/module/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/module/skia/{Picture/PictureRecorder.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/module/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -0
- package/lib/module/skia/{Matrix.js → types/Matrix.js} +0 -0
- package/lib/module/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/module/skia/{Paint → types/Paint}/Paint.js +0 -6
- package/lib/module/skia/types/Paint/Paint.js.map +1 -0
- package/lib/module/skia/types/Paint/index.js +3 -0
- package/lib/module/skia/types/Paint/index.js.map +1 -0
- package/lib/module/skia/{Path → types/Path}/Path.js +0 -0
- package/lib/module/skia/{Path → types/Path}/Path.js.map +0 -0
- package/lib/module/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/module/skia/{RRect.js.map → types/Path/PathFactory.js.map} +0 -0
- package/lib/module/skia/types/Path/index.js +3 -0
- package/lib/module/skia/types/Path/index.js.map +1 -0
- package/lib/module/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/module/skia/types/PathEffect.js.map +1 -0
- package/lib/module/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/module/skia/{RSXform.js.map → types/Picture/Picture.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/module/skia/{Rect.js.map → types/Picture/PictureFactory.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffect.js.map → types/Picture/PictureRecorder.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/index.js +0 -1
- package/lib/module/skia/types/Picture/index.js.map +1 -0
- package/lib/module/skia/{Point.js → types/Point.js} +0 -0
- package/lib/module/skia/{Point.js.map → types/Point.js.map} +0 -0
- package/lib/module/skia/{RRect.js → types/RRect.js} +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffectFactory.js.map → types/RRect.js.map} +0 -0
- package/lib/module/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/module/skia/{SVG/SVG.js.map → types/RSXform.js.map} +0 -0
- package/lib/module/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/module/skia/{SVG/SVGFactory.js.map → types/Rect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/module/skia/{Shader/ShaderFactory.js.map → types/RuntimeEffect/RuntimeEffect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/module/skia/{Surface/SurfaceFactory.js.map → types/RuntimeEffect/RuntimeEffectFactory.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/module/skia/{TextBlob.js.map → types/SVG/SVG.js.map} +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/module/skia/{Typeface/Typeface.js.map → types/SVG/SVGFactory.js.map} +0 -0
- package/lib/module/skia/types/SVG/index.js +3 -0
- package/lib/module/skia/types/SVG/index.js.map +1 -0
- package/lib/module/skia/{Shader → types/Shader}/Shader.js +0 -0
- package/lib/module/skia/{Shader → types/Shader}/Shader.js.map +0 -0
- package/lib/module/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/module/skia/{Typeface/TypefaceFactory.js.map → types/Shader/ShaderFactory.js.map} +0 -0
- package/lib/module/skia/types/Shader/index.js +3 -0
- package/lib/module/skia/types/Shader/index.js.map +1 -0
- package/lib/module/skia/types/Skia.js +2 -0
- package/lib/module/skia/types/Skia.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/module/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/module/skia/types/TextBlob.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/module/skia/types/Typeface/index.js +3 -0
- package/lib/module/skia/types/Typeface/index.js.map +1 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/module/skia/types/index.js +29 -0
- package/lib/module/skia/types/index.js.map +1 -0
- package/lib/module/skia/web/api/Host.js +36 -0
- package/lib/module/skia/web/api/Host.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkCanvas.js +160 -0
- package/lib/module/skia/web/api/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkColor.js +170 -0
- package/lib/module/skia/web/api/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkColorFilter.js +8 -0
- package/lib/module/skia/web/api/JsiSkColorFilter.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkImage.js +46 -0
- package/lib/module/skia/web/api/JsiSkImage.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkPaint.js +96 -0
- package/lib/module/skia/web/api/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkRect.js +24 -0
- package/lib/module/skia/web/api/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkSurface.js +19 -0
- package/lib/module/skia/web/api/JsiSkSurface.js.map +1 -0
- package/lib/module/skia/web/api/JsiSkSurfaceFactory.js +19 -0
- package/lib/module/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/module/skia/web/api/index.js +13 -0
- package/lib/module/skia/web/api/index.js.map +1 -0
- package/lib/module/skia/web/index.js +2 -0
- package/lib/module/skia/web/index.js.map +1 -0
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +2 -2
- package/lib/typescript/src/animation/spring/runSpring.d.ts +2 -2
- package/lib/typescript/src/animation/spring/useSpring.d.ts +2 -2
- package/lib/typescript/src/animation/timing/createTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/runTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useTiming.d.ts +2 -2
- package/lib/typescript/src/renderer/Canvas.d.ts +4 -4
- package/lib/typescript/src/renderer/DependencyManager.d.ts +2 -2
- package/lib/typescript/src/renderer/DrawingContext.d.ts +1 -2
- package/lib/typescript/src/renderer/components/colorFilters/Compose.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 +1 -2
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -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/Gradient.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -2
- package/lib/typescript/src/renderer/components/shapes/DiffRect.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 -0
- 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 +3 -3
- package/lib/typescript/src/renderer/processors/Clips.d.ts +1 -2
- package/lib/typescript/src/renderer/processors/Font.d.ts +1 -2
- package/lib/typescript/src/renderer/processors/Rects.d.ts +2 -0
- package/lib/typescript/src/renderer/processors/Transform.d.ts +1 -1
- package/lib/typescript/src/skia/Skia.d.ts +2 -35
- package/lib/typescript/src/skia/{Color.d.ts → core/Color.d.ts} +1 -2
- package/lib/typescript/src/skia/core/Data.d.ts +5 -0
- package/lib/typescript/src/skia/core/Font.d.ts +5 -0
- package/lib/typescript/src/skia/core/Image.d.ts +5 -0
- package/lib/typescript/src/skia/{Paint/usePaint.d.ts → core/Paint.d.ts} +2 -1
- package/lib/typescript/src/skia/{Path/usePath.d.ts → core/Path.d.ts} +1 -2
- package/lib/typescript/src/skia/{Picture/usePicture.d.ts → core/Picture.d.ts} +1 -3
- package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/{Shader/useShader.d.ts → core/Shader.d.ts} +0 -0
- package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/core/index.d.ts +10 -0
- package/lib/typescript/src/skia/index.d.ts +2 -23
- package/lib/typescript/src/skia/{Canvas.d.ts → types/Canvas.d.ts} +0 -0
- package/lib/typescript/src/skia/types/Color.d.ts +2 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.d.ts +0 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{ContourMeasure.d.ts → types/ContourMeasure.d.ts} +0 -0
- package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
- package/lib/typescript/src/skia/{Data → types/Data}/DataFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Data → types/Data}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{Font → types/Font}/Font.d.ts +1 -1
- package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgr.d.ts +1 -1
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/index.d.ts +1 -0
- package/lib/typescript/src/skia/{Image → types/Image}/Image.d.ts +2 -2
- package/lib/typescript/src/skia/{Image → types/Image}/ImageFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Image → types/Image}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.d.ts +0 -0
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.d.ts +2 -2
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{JsiInstance.d.ts → types/JsiInstance.d.ts} +0 -0
- package/lib/typescript/src/skia/{MaskFilter.d.ts → types/MaskFilter.d.ts} +3 -3
- package/lib/typescript/src/skia/{Matrix.d.ts → types/Matrix.d.ts} +0 -0
- package/lib/typescript/src/skia/{Paint → types/Paint}/BlendMode.d.ts +0 -0
- package/lib/typescript/src/skia/{Paint → types/Paint}/Paint.d.ts +5 -6
- package/lib/typescript/src/skia/{Paint → types/Paint}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Path → types/Path}/Path.d.ts +0 -0
- package/lib/typescript/src/skia/{Path → types/Path}/PathFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Path → types/Path}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{PathEffect.d.ts → types/PathEffect.d.ts} +10 -10
- package/lib/typescript/src/skia/{Picture → types/Picture}/Picture.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureRecorder.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Point.d.ts → types/Point.d.ts} +0 -0
- package/lib/typescript/src/skia/{RRect.d.ts → types/RRect.d.ts} +0 -0
- package/lib/typescript/src/skia/{RSXform.d.ts → types/RSXform.d.ts} +0 -0
- package/lib/typescript/src/skia/{Rect.d.ts → types/Rect.d.ts} +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.d.ts +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{SVG → types/SVG}/SVG.d.ts +0 -0
- package/lib/typescript/src/skia/{SVG → types/SVG}/SVGFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{SVG → types/SVG}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Shader → types/Shader}/Shader.d.ts +0 -0
- package/lib/typescript/src/skia/{Shader → types/Shader}/ShaderFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Shader → types/Shader}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{SkiaApi.d.ts → types/Skia.d.ts} +2 -5
- package/lib/typescript/src/skia/{Surface → types/Surface}/Surface.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/SurfaceFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{TextBlob.d.ts → types/TextBlob.d.ts} +0 -0
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/Typeface.d.ts +0 -0
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/TypefaceFactory.d.ts +1 -1
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/index.d.ts +0 -1
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/Vertices.d.ts +0 -0
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/index.d.ts +0 -0
- package/lib/typescript/src/skia/types/index.d.ts +28 -0
- package/lib/typescript/src/skia/web/api/Host.d.ts +18 -0
- package/lib/typescript/src/skia/web/api/JsiSkCanvas.d.ts +44 -0
- package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +3 -0
- package/lib/typescript/src/skia/web/api/JsiSkColorFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/api/JsiSkImage.d.ts +12 -0
- package/lib/typescript/src/skia/web/api/JsiSkPaint.d.ts +26 -0
- package/lib/typescript/src/skia/web/api/JsiSkRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/api/JsiSkSurface.d.ts +8 -0
- package/lib/typescript/src/skia/web/api/JsiSkSurfaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/api/index.d.ts +10 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -0
- package/lib/typescript/src/values/api.d.ts +1 -1
- package/lib/typescript/src/values/api.web.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useValue.d.ts +2 -2
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +2 -2
- package/lib/typescript/src/values/types.d.ts +5 -5
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +2 -2
- package/lib/typescript/src/views/SkiaView.d.ts +4 -4
- package/lib/typescript/src/views/types.d.ts +3 -4
- package/package.json +5 -3
- package/src/animation/decay/runDecay.ts +5 -2
- package/src/animation/functions/interpolateColors.ts +1 -2
- package/src/animation/spring/runSpring.ts +2 -2
- package/src/animation/spring/useSpring.ts +2 -2
- package/src/animation/timing/createTiming.ts +2 -2
- package/src/animation/timing/runTiming.ts +2 -2
- package/src/animation/timing/useTiming.ts +2 -2
- package/src/index.ts +0 -1
- package/src/renderer/Canvas.tsx +4 -5
- package/src/renderer/DependencyManager.tsx +2 -2
- package/src/renderer/DrawingContext.ts +1 -2
- package/src/renderer/components/Blend.tsx +1 -2
- package/src/renderer/components/Compose.tsx +1 -3
- package/src/renderer/components/colorFilters/Lerp.tsx +1 -2
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +1 -2
- package/src/renderer/components/imageFilters/InnerShadow.tsx +1 -2
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +1 -1
- package/src/renderer/components/imageFilters/Shadow.tsx +2 -3
- package/src/renderer/components/maskFilters/Blur.tsx +1 -2
- package/src/renderer/components/pathEffects/Corner.tsx +1 -2
- package/src/renderer/components/pathEffects/Dash.tsx +1 -2
- package/src/renderer/components/pathEffects/Discrete.tsx +1 -2
- package/src/renderer/components/pathEffects/Line2D.tsx +2 -3
- package/src/renderer/components/pathEffects/Path1D.tsx +1 -2
- package/src/renderer/components/pathEffects/Path2D.tsx +2 -3
- package/src/renderer/components/pathEffects/Sum.tsx +1 -2
- package/src/renderer/components/shaders/Gradient.ts +1 -1
- package/src/renderer/components/shapes/Box.tsx +1 -3
- package/src/renderer/components/shapes/DiffRect.tsx +1 -1
- package/src/renderer/components/shapes/Patch.tsx +1 -2
- package/src/renderer/components/text/TextBlob.tsx +1 -1
- package/src/renderer/components/text/TextPath.tsx +1 -2
- package/src/renderer/index.ts +1 -0
- package/src/renderer/nodes/Declaration.tsx +1 -1
- package/src/renderer/nodes/Node.ts +1 -1
- package/src/renderer/processors/Animations/Animations.ts +5 -8
- package/src/renderer/processors/Clips.ts +1 -2
- package/src/renderer/processors/Font.ts +1 -2
- package/src/renderer/processors/Rects.ts +4 -0
- package/src/renderer/processors/Transform.ts +1 -1
- package/src/skia/Skia.ts +2 -38
- package/src/skia/__tests__/Rects.spec.ts +40 -0
- package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
- package/src/skia/{Color.ts → core/Color.ts} +2 -6
- package/src/skia/core/Data.ts +78 -0
- package/src/skia/{Font/useFont.ts → core/Font.ts} +8 -5
- package/src/skia/core/Image.ts +12 -0
- package/src/skia/{Paint/usePaint.ts → core/Paint.ts} +7 -2
- package/src/skia/{Path/usePath.ts → core/Path.ts} +1 -3
- package/src/skia/{Picture/usePicture.ts → core/Picture.ts} +1 -4
- package/src/skia/core/SVG.ts +9 -0
- package/src/skia/{Shader/useShader.ts → core/Shader.ts} +0 -0
- package/src/skia/core/Typeface.ts +11 -0
- package/src/skia/core/index.ts +10 -0
- package/src/skia/index.ts +2 -23
- package/src/skia/{Canvas.ts → types/Canvas.ts} +0 -0
- package/src/skia/types/Color.ts +4 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.ts +0 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.ts +1 -1
- package/src/skia/{ColorFilter → types/ColorFilter}/index.ts +0 -0
- package/src/skia/{ContourMeasure.tsx → types/ContourMeasure.tsx} +0 -0
- package/src/skia/types/Data/Data.ts +5 -0
- package/src/skia/{Data → types/Data}/DataFactory.ts +0 -0
- package/src/skia/{Data → types/Data}/index.ts +0 -0
- package/src/skia/{Font → types/Font}/Font.ts +1 -1
- package/src/skia/types/Font/index.ts +1 -0
- package/src/skia/{FontMgr → types/FontMgr}/FontMgr.ts +1 -1
- package/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.ts +1 -6
- package/src/skia/{FontMgr → types/FontMgr}/index.ts +1 -0
- package/src/skia/{Image → types/Image}/Image.ts +2 -2
- package/src/skia/{Image → types/Image}/ImageFactory.ts +0 -0
- package/src/skia/{Image → types/Image}/index.ts +0 -1
- package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.ts +0 -0
- package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.ts +2 -2
- package/src/skia/{ImageFilter → types/ImageFilter}/index.ts +0 -0
- package/src/skia/{JsiInstance.ts → types/JsiInstance.ts} +0 -0
- package/src/skia/{MaskFilter.ts → types/MaskFilter.ts} +3 -3
- package/src/skia/{Matrix.ts → types/Matrix.ts} +0 -0
- package/src/skia/{Paint → types/Paint}/BlendMode.ts +0 -0
- package/src/skia/{Paint → types/Paint}/Paint.ts +5 -12
- package/src/skia/{Paint → types/Paint}/index.ts +0 -1
- package/src/skia/{Path → types/Path}/Path.ts +0 -0
- package/src/skia/{Path → types/Path}/PathFactory.ts +0 -0
- package/src/skia/{Path → types/Path}/index.ts +0 -1
- package/src/skia/{PathEffect.ts → types/PathEffect.ts} +14 -10
- package/src/skia/{Picture → types/Picture}/Picture.ts +0 -0
- package/src/skia/{Picture → types/Picture}/PictureFactory.ts +0 -0
- package/src/skia/{Picture → types/Picture}/PictureRecorder.ts +0 -0
- package/src/skia/{Picture → types/Picture}/index.ts +0 -1
- package/src/skia/{Point.ts → types/Point.ts} +0 -0
- package/src/skia/{RRect.ts → types/RRect.ts} +0 -0
- package/src/skia/{RSXform.ts → types/RSXform.ts} +0 -0
- package/src/skia/{Rect.ts → types/Rect.ts} +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.ts +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.ts +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.ts +0 -0
- package/src/skia/{SVG → types/SVG}/SVG.ts +0 -0
- package/src/skia/{SVG → types/SVG}/SVGFactory.ts +1 -1
- package/src/skia/{SVG → types/SVG}/index.ts +0 -1
- package/src/skia/{Shader → types/Shader}/Shader.ts +0 -0
- package/src/skia/{Shader → types/Shader}/ShaderFactory.ts +0 -0
- package/src/skia/{Shader → types/Shader}/index.ts +0 -1
- package/src/skia/{SkiaApi.ts → types/Skia.ts} +6 -8
- package/src/skia/{Surface → types/Surface}/Surface.ts +0 -0
- package/src/skia/{Surface → types/Surface}/SurfaceFactory.ts +0 -0
- package/src/skia/{Surface → types/Surface}/index.ts +0 -0
- package/src/skia/{TextBlob.ts → types/TextBlob.ts} +0 -0
- package/src/skia/{Typeface → types/Typeface}/Typeface.ts +0 -0
- package/src/skia/{Typeface → types/Typeface}/TypefaceFactory.ts +1 -1
- package/src/skia/{Typeface → types/Typeface}/index.ts +0 -1
- package/src/skia/{Vertices → types/Vertices}/Vertices.tsx +0 -0
- package/src/skia/{Vertices → types/Vertices}/index.ts +0 -0
- package/src/skia/types/index.ts +28 -0
- package/src/skia/web/api/Host.ts +50 -0
- package/src/skia/web/api/JsiSkCanvas.ts +322 -0
- package/src/skia/web/api/JsiSkColor.ts +181 -0
- package/src/skia/web/api/JsiSkColorFilter.ts +14 -0
- package/src/skia/web/api/JsiSkImage.ts +66 -0
- package/src/skia/web/api/JsiSkPaint.ts +103 -0
- package/src/skia/web/api/JsiSkRect.ts +27 -0
- package/src/skia/web/api/JsiSkSurface.ts +25 -0
- package/src/skia/web/api/JsiSkSurfaceFactory.ts +20 -0
- package/src/skia/web/api/index.ts +15 -0
- package/src/skia/web/index.ts +1 -0
- package/src/values/hooks/useValue.ts +2 -2
- package/src/values/hooks/useValueEffect.ts +2 -5
- package/src/values/types.ts +6 -6
- package/src/values/web/RNSkReadonlyValue.ts +2 -2
- package/src/values/web/api.ts +4 -4
- package/src/views/SkiaView.tsx +3 -3
- package/src/views/types.ts +3 -4
- package/lib/commonjs/skia/Color.js.map +0 -1
- package/lib/commonjs/skia/Data/Data.js.map +0 -1
- package/lib/commonjs/skia/Font/Font.js.map +0 -1
- package/lib/commonjs/skia/Font/useFont.js.map +0 -1
- package/lib/commonjs/skia/Image/index.js.map +0 -1
- package/lib/commonjs/skia/Image/useImage.js.map +0 -1
- package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/commonjs/skia/MaskFilter.js.map +0 -1
- package/lib/commonjs/skia/Paint/Paint.js.map +0 -1
- package/lib/commonjs/skia/Paint/usePaint.js.map +0 -1
- package/lib/commonjs/skia/Path/index.js.map +0 -1
- package/lib/commonjs/skia/Path/usePath.js.map +0 -1
- package/lib/commonjs/skia/PathEffect.js.map +0 -1
- package/lib/commonjs/skia/Picture/index.js.map +0 -1
- package/lib/commonjs/skia/Picture/usePicture.js.map +0 -1
- package/lib/commonjs/skia/SVG/index.js.map +0 -1
- package/lib/commonjs/skia/SVG/useSvg.js +0 -15
- package/lib/commonjs/skia/SVG/useSvg.js.map +0 -1
- package/lib/commonjs/skia/Shader/index.js.map +0 -1
- package/lib/commonjs/skia/Shader/useShader.js.map +0 -1
- package/lib/commonjs/skia/SkiaApi.js +0 -4
- package/lib/commonjs/skia/SkiaApi.js.map +0 -1
- package/lib/commonjs/skia/Typeface/index.js.map +0 -1
- package/lib/commonjs/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/module/skia/Color.js.map +0 -1
- package/lib/module/skia/Data/Data.js +0 -35
- package/lib/module/skia/Data/Data.js.map +0 -1
- package/lib/module/skia/Font/Font.js.map +0 -1
- package/lib/module/skia/Font/index.js +0 -3
- package/lib/module/skia/Font/index.js.map +0 -1
- package/lib/module/skia/Font/useFont.js.map +0 -1
- package/lib/module/skia/FontMgr/index.js +0 -2
- package/lib/module/skia/FontMgr/index.js.map +0 -1
- package/lib/module/skia/Image/index.js +0 -4
- package/lib/module/skia/Image/index.js.map +0 -1
- package/lib/module/skia/Image/useImage.js +0 -8
- package/lib/module/skia/Image/useImage.js.map +0 -1
- package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/module/skia/MaskFilter.js.map +0 -1
- package/lib/module/skia/Paint/Paint.js.map +0 -1
- package/lib/module/skia/Paint/index.js +0 -4
- package/lib/module/skia/Paint/index.js.map +0 -1
- package/lib/module/skia/Paint/usePaint.js.map +0 -1
- package/lib/module/skia/Path/index.js +0 -4
- package/lib/module/skia/Path/index.js.map +0 -1
- package/lib/module/skia/Path/usePath.js.map +0 -1
- package/lib/module/skia/PathEffect.js.map +0 -1
- package/lib/module/skia/Picture/index.js.map +0 -1
- package/lib/module/skia/Picture/usePicture.js.map +0 -1
- package/lib/module/skia/SVG/index.js +0 -4
- package/lib/module/skia/SVG/index.js.map +0 -1
- package/lib/module/skia/SVG/useSvg.js +0 -4
- package/lib/module/skia/SVG/useSvg.js.map +0 -1
- package/lib/module/skia/Shader/index.js +0 -4
- package/lib/module/skia/Shader/index.js.map +0 -1
- package/lib/module/skia/Shader/useShader.js.map +0 -1
- package/lib/module/skia/SkiaApi.js +0 -2
- package/lib/module/skia/SkiaApi.js.map +0 -1
- package/lib/module/skia/Typeface/index.js +0 -4
- package/lib/module/skia/Typeface/index.js.map +0 -1
- package/lib/module/skia/Typeface/useTypeface.js +0 -8
- package/lib/module/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/typescript/src/skia/Data/Data.d.ts +0 -9
- package/lib/typescript/src/skia/Font/index.d.ts +0 -2
- package/lib/typescript/src/skia/Font/useFont.d.ts +0 -6
- package/lib/typescript/src/skia/Image/useImage.d.ts +0 -5
- package/lib/typescript/src/skia/SVG/useSvg.d.ts +0 -2
- package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +0 -5
- package/src/skia/Data/Data.ts +0 -61
- package/src/skia/Font/index.ts +0 -2
- package/src/skia/Image/useImage.ts +0 -9
- package/src/skia/SVG/useSvg.ts +0 -6
- package/src/skia/Typeface/useTypeface.ts +0 -9
@@ -0,0 +1,322 @@
|
|
1
|
+
import type { Canvas, CanvasKit, Image, Paint, Rect } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type {
|
4
|
+
BlendMode,
|
5
|
+
ClipOp,
|
6
|
+
FilterMode,
|
7
|
+
MipmapMode,
|
8
|
+
PointMode,
|
9
|
+
SaveLayerFlag,
|
10
|
+
SkCanvas,
|
11
|
+
SkColor,
|
12
|
+
SkFont,
|
13
|
+
SkImage,
|
14
|
+
SkImageFilter,
|
15
|
+
SkMatrix,
|
16
|
+
SkPaint,
|
17
|
+
SkPath,
|
18
|
+
SkPicture,
|
19
|
+
SkPoint,
|
20
|
+
SkRect,
|
21
|
+
SkRRect,
|
22
|
+
SkSVG,
|
23
|
+
SkTextBlob,
|
24
|
+
SkVertices,
|
25
|
+
} from "../../types";
|
26
|
+
|
27
|
+
import {
|
28
|
+
ckEnum,
|
29
|
+
HostObject,
|
30
|
+
toValue,
|
31
|
+
toUndefinedableValue,
|
32
|
+
toOptionalValue,
|
33
|
+
} from "./Host";
|
34
|
+
|
35
|
+
export class JsiSkCanvas
|
36
|
+
extends HostObject<Canvas, "Canvas">
|
37
|
+
implements SkCanvas
|
38
|
+
{
|
39
|
+
constructor(CanvasKit: CanvasKit, ref: Canvas) {
|
40
|
+
super(CanvasKit, ref, "Canvas");
|
41
|
+
}
|
42
|
+
|
43
|
+
drawRect(rect: SkRect, paint: SkPaint) {
|
44
|
+
this.ref.drawRect(toValue<Rect>(rect), toValue<Paint>(paint));
|
45
|
+
}
|
46
|
+
|
47
|
+
drawImage(image: SkImage, x: number, y: number, paint?: SkPaint) {
|
48
|
+
this.ref.drawImage(toValue<Image>(image), x, y, toOptionalValue(paint));
|
49
|
+
}
|
50
|
+
|
51
|
+
drawImageRect(
|
52
|
+
img: SkImage,
|
53
|
+
src: SkRect,
|
54
|
+
dest: SkRect,
|
55
|
+
paint: SkPaint,
|
56
|
+
fastSample?: boolean
|
57
|
+
) {
|
58
|
+
this.ref.drawImageRect(
|
59
|
+
toValue<Image>(img),
|
60
|
+
toValue<Rect>(src),
|
61
|
+
toValue<Rect>(dest),
|
62
|
+
toValue<Paint>(paint),
|
63
|
+
fastSample
|
64
|
+
);
|
65
|
+
}
|
66
|
+
|
67
|
+
drawImageCubic(
|
68
|
+
img: SkImage,
|
69
|
+
left: number,
|
70
|
+
top: number,
|
71
|
+
B: number,
|
72
|
+
C: number,
|
73
|
+
paint?: SkPaint | null
|
74
|
+
) {
|
75
|
+
this.ref.drawImageCubic(
|
76
|
+
toValue(img),
|
77
|
+
left,
|
78
|
+
top,
|
79
|
+
B,
|
80
|
+
C,
|
81
|
+
toOptionalValue(paint)
|
82
|
+
);
|
83
|
+
}
|
84
|
+
|
85
|
+
drawImageOptions(
|
86
|
+
img: SkImage,
|
87
|
+
left: number,
|
88
|
+
top: number,
|
89
|
+
fm: FilterMode,
|
90
|
+
mm: MipmapMode,
|
91
|
+
paint?: SkPaint | null
|
92
|
+
) {
|
93
|
+
this.ref.drawImageOptions(
|
94
|
+
toValue(img),
|
95
|
+
left,
|
96
|
+
top,
|
97
|
+
ckEnum(fm),
|
98
|
+
ckEnum(mm),
|
99
|
+
toOptionalValue(paint)
|
100
|
+
);
|
101
|
+
}
|
102
|
+
|
103
|
+
drawImageNine(
|
104
|
+
img: SkImage,
|
105
|
+
center: SkRect,
|
106
|
+
dest: SkRect,
|
107
|
+
filter: FilterMode,
|
108
|
+
paint?: SkPaint | null
|
109
|
+
) {
|
110
|
+
this.ref.drawImageNine(
|
111
|
+
toValue(img),
|
112
|
+
toValue(center),
|
113
|
+
toValue(dest),
|
114
|
+
ckEnum(filter),
|
115
|
+
toOptionalValue(paint)
|
116
|
+
);
|
117
|
+
}
|
118
|
+
|
119
|
+
drawImageRectCubic(
|
120
|
+
img: SkImage,
|
121
|
+
src: SkRect,
|
122
|
+
dest: SkRect,
|
123
|
+
B: number,
|
124
|
+
C: number,
|
125
|
+
paint?: SkPaint | null
|
126
|
+
) {
|
127
|
+
this.ref.drawImageRectCubic(
|
128
|
+
toValue<Image>(img),
|
129
|
+
toValue<Rect>(src),
|
130
|
+
toValue<Rect>(dest),
|
131
|
+
B,
|
132
|
+
C,
|
133
|
+
toOptionalValue(paint)
|
134
|
+
);
|
135
|
+
}
|
136
|
+
|
137
|
+
drawImageRectOptions(
|
138
|
+
img: SkImage,
|
139
|
+
src: SkRect,
|
140
|
+
dest: SkRect,
|
141
|
+
fm: FilterMode,
|
142
|
+
mm: MipmapMode,
|
143
|
+
paint?: SkPaint | null
|
144
|
+
) {
|
145
|
+
this.ref.drawImageRectOptions(
|
146
|
+
toValue<Image>(img),
|
147
|
+
toValue<Rect>(src),
|
148
|
+
toValue<Rect>(dest),
|
149
|
+
ckEnum(fm),
|
150
|
+
ckEnum(mm),
|
151
|
+
toOptionalValue(paint)
|
152
|
+
);
|
153
|
+
}
|
154
|
+
|
155
|
+
drawPaint(paint: SkPaint) {
|
156
|
+
this.ref.drawPaint(toValue(paint));
|
157
|
+
}
|
158
|
+
|
159
|
+
drawLine(x0: number, y0: number, x1: number, y1: number, paint: SkPaint) {
|
160
|
+
this.ref.drawLine(x0, y0, x1, y1, toValue(paint));
|
161
|
+
}
|
162
|
+
|
163
|
+
drawCircle(cx: number, cy: number, radius: number, paint: SkPaint) {
|
164
|
+
this.ref.drawCircle(cx, cy, radius, toValue(paint));
|
165
|
+
}
|
166
|
+
|
167
|
+
drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint) {
|
168
|
+
this.ref.drawVertices(toValue(verts), ckEnum(mode), toValue(paint));
|
169
|
+
}
|
170
|
+
|
171
|
+
drawPatch(
|
172
|
+
cubics: SkPoint[],
|
173
|
+
colors?: SkColor[] | null,
|
174
|
+
texs?: SkPoint[] | null,
|
175
|
+
mode?: BlendMode | null,
|
176
|
+
paint?: SkPaint
|
177
|
+
) {
|
178
|
+
this.ref.drawPatch(
|
179
|
+
toValue(cubics),
|
180
|
+
colors,
|
181
|
+
toOptionalValue(texs),
|
182
|
+
mode ? ckEnum(mode) : null,
|
183
|
+
toUndefinedableValue(paint)
|
184
|
+
);
|
185
|
+
}
|
186
|
+
|
187
|
+
restoreToCount(saveCount: number) {
|
188
|
+
this.ref.restoreToCount(saveCount);
|
189
|
+
}
|
190
|
+
|
191
|
+
drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint) {
|
192
|
+
this.ref.drawPoints(ckEnum(mode), toValue(points), toValue(paint));
|
193
|
+
}
|
194
|
+
|
195
|
+
drawArc(
|
196
|
+
oval: SkRect,
|
197
|
+
startAngle: number,
|
198
|
+
sweepAngle: number,
|
199
|
+
useCenter: boolean,
|
200
|
+
paint: SkPaint
|
201
|
+
) {
|
202
|
+
this.ref.drawArc(
|
203
|
+
toValue(oval),
|
204
|
+
startAngle,
|
205
|
+
sweepAngle,
|
206
|
+
useCenter,
|
207
|
+
toValue(paint)
|
208
|
+
);
|
209
|
+
}
|
210
|
+
|
211
|
+
drawRRect(rrect: SkRRect, paint: SkPaint) {
|
212
|
+
this.ref.drawRRect(toValue(rrect), toValue(paint));
|
213
|
+
}
|
214
|
+
|
215
|
+
drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint) {
|
216
|
+
this.ref.drawDRRect(toValue(outer), toValue(inner), toValue(paint));
|
217
|
+
}
|
218
|
+
|
219
|
+
drawOval(oval: SkRect, paint: SkPaint) {
|
220
|
+
this.ref.drawOval(toValue(oval), toValue(paint));
|
221
|
+
}
|
222
|
+
|
223
|
+
drawPath(path: SkPath, paint: SkPaint) {
|
224
|
+
this.ref.drawPath(toValue(path), toValue(paint));
|
225
|
+
}
|
226
|
+
|
227
|
+
drawText(str: string, x: number, y: number, paint: SkPaint, font: SkFont) {
|
228
|
+
this.ref.drawText(str, x, y, toValue(paint), toValue(font));
|
229
|
+
}
|
230
|
+
|
231
|
+
drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint) {
|
232
|
+
this.ref.drawTextBlob(toValue(blob), x, y, toValue(paint));
|
233
|
+
}
|
234
|
+
|
235
|
+
drawGlyphs(
|
236
|
+
glyphs: number[],
|
237
|
+
positions: SkPoint[],
|
238
|
+
x: number,
|
239
|
+
y: number,
|
240
|
+
font: SkFont,
|
241
|
+
paint: SkPaint
|
242
|
+
) {
|
243
|
+
this.ref.drawGlyphs(
|
244
|
+
glyphs,
|
245
|
+
toValue(positions),
|
246
|
+
x,
|
247
|
+
y,
|
248
|
+
toValue(font),
|
249
|
+
toValue(paint)
|
250
|
+
);
|
251
|
+
}
|
252
|
+
|
253
|
+
drawSvg(_svgDom: SkSVG, _width?: number, _height?: number) {
|
254
|
+
throw new Error("drawSvg is not implemented on React Native Web");
|
255
|
+
}
|
256
|
+
|
257
|
+
save() {
|
258
|
+
return this.ref.save();
|
259
|
+
}
|
260
|
+
|
261
|
+
saveLayer(
|
262
|
+
paint?: SkPaint,
|
263
|
+
bounds?: SkRect | null,
|
264
|
+
backdrop?: SkImageFilter | null,
|
265
|
+
flags?: SaveLayerFlag
|
266
|
+
) {
|
267
|
+
return this.ref.saveLayer(
|
268
|
+
toUndefinedableValue(paint),
|
269
|
+
toOptionalValue(bounds),
|
270
|
+
toOptionalValue(backdrop),
|
271
|
+
flags
|
272
|
+
);
|
273
|
+
}
|
274
|
+
|
275
|
+
restore() {
|
276
|
+
this.ref.restore();
|
277
|
+
}
|
278
|
+
|
279
|
+
rotate(rotationInDegrees: number, rx: number, ry: number) {
|
280
|
+
this.ref.rotate(rotationInDegrees, rx, ry);
|
281
|
+
}
|
282
|
+
|
283
|
+
scale(sx: number, sy: number) {
|
284
|
+
this.ref.scale(sx, sy);
|
285
|
+
}
|
286
|
+
|
287
|
+
skew(sx: number, sy: number) {
|
288
|
+
this.ref.skew(sx, sy);
|
289
|
+
}
|
290
|
+
|
291
|
+
translate(dx: number, dy: number) {
|
292
|
+
this.ref.translate(dx, dy);
|
293
|
+
}
|
294
|
+
|
295
|
+
drawColor(color: SkColor, blendMode?: BlendMode) {
|
296
|
+
this.ref.drawColor(color, blendMode ? ckEnum(blendMode) : undefined);
|
297
|
+
}
|
298
|
+
|
299
|
+
clear(color: SkColor) {
|
300
|
+
this.ref.clear(color);
|
301
|
+
}
|
302
|
+
|
303
|
+
clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean) {
|
304
|
+
this.ref.clipPath(toValue(path), ckEnum(op), doAntiAlias);
|
305
|
+
}
|
306
|
+
|
307
|
+
clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean) {
|
308
|
+
this.ref.clipRect(toValue(rect), ckEnum(op), doAntiAlias);
|
309
|
+
}
|
310
|
+
|
311
|
+
clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean) {
|
312
|
+
this.ref.clipRRect(toValue(rrect), ckEnum(op), doAntiAlias);
|
313
|
+
}
|
314
|
+
|
315
|
+
concat(m: SkMatrix) {
|
316
|
+
this.ref.concat(toValue(m));
|
317
|
+
}
|
318
|
+
|
319
|
+
drawPicture(skp: SkPicture) {
|
320
|
+
this.ref.drawPicture(toValue(skp));
|
321
|
+
}
|
322
|
+
}
|
@@ -0,0 +1,181 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkColor, Color as InputColor } from "../../types";
|
4
|
+
|
5
|
+
const alphaf = (c: number) => ((c >> 24) & 255) / 255;
|
6
|
+
const red = (c: number) => (c >> 16) & 255;
|
7
|
+
const green = (c: number) => (c >> 8) & 255;
|
8
|
+
const blue = (c: number) => c & 255;
|
9
|
+
|
10
|
+
const colorMap = {
|
11
|
+
transparent: Float32Array.of(0, 0, 0, 0),
|
12
|
+
aliceblue: Float32Array.of(240, 248, 255, 1),
|
13
|
+
antiquewhite: Float32Array.of(250, 235, 215, 1),
|
14
|
+
aqua: Float32Array.of(0, 255, 255, 1),
|
15
|
+
aquamarine: Float32Array.of(127, 255, 212, 1),
|
16
|
+
azure: Float32Array.of(240, 255, 255, 1),
|
17
|
+
beige: Float32Array.of(245, 245, 220, 1),
|
18
|
+
bisque: Float32Array.of(255, 228, 196, 1),
|
19
|
+
black: Float32Array.of(0, 0, 0, 1),
|
20
|
+
blanchedalmond: Float32Array.of(255, 235, 205, 1),
|
21
|
+
blue: Float32Array.of(0, 0, 255, 1),
|
22
|
+
blueviolet: Float32Array.of(138, 43, 226, 1),
|
23
|
+
brown: Float32Array.of(165, 42, 42, 1),
|
24
|
+
burlywood: Float32Array.of(222, 184, 135, 1),
|
25
|
+
cadetblue: Float32Array.of(95, 158, 160, 1),
|
26
|
+
chartreuse: Float32Array.of(127, 255, 0, 1),
|
27
|
+
chocolate: Float32Array.of(210, 105, 30, 1),
|
28
|
+
coral: Float32Array.of(255, 127, 80, 1),
|
29
|
+
cornflowerblue: Float32Array.of(100, 149, 237, 1),
|
30
|
+
cornsilk: Float32Array.of(255, 248, 220, 1),
|
31
|
+
crimson: Float32Array.of(220, 20, 60, 1),
|
32
|
+
cyan: Float32Array.of(0, 255, 255, 1),
|
33
|
+
darkblue: Float32Array.of(0, 0, 139, 1),
|
34
|
+
darkcyan: Float32Array.of(0, 139, 139, 1),
|
35
|
+
darkgoldenrod: Float32Array.of(184, 134, 11, 1),
|
36
|
+
darkgray: Float32Array.of(169, 169, 169, 1),
|
37
|
+
darkgreen: Float32Array.of(0, 100, 0, 1),
|
38
|
+
darkgrey: Float32Array.of(169, 169, 169, 1),
|
39
|
+
darkkhaki: Float32Array.of(189, 183, 107, 1),
|
40
|
+
darkmagenta: Float32Array.of(139, 0, 139, 1),
|
41
|
+
darkolivegreen: Float32Array.of(85, 107, 47, 1),
|
42
|
+
darkorange: Float32Array.of(255, 140, 0, 1),
|
43
|
+
darkorchid: Float32Array.of(153, 50, 204, 1),
|
44
|
+
darkred: Float32Array.of(139, 0, 0, 1),
|
45
|
+
darksalmon: Float32Array.of(233, 150, 122, 1),
|
46
|
+
darkseagreen: Float32Array.of(143, 188, 143, 1),
|
47
|
+
darkslateblue: Float32Array.of(72, 61, 139, 1),
|
48
|
+
darkslategray: Float32Array.of(47, 79, 79, 1),
|
49
|
+
darkslategrey: Float32Array.of(47, 79, 79, 1),
|
50
|
+
darkturquoise: Float32Array.of(0, 206, 209, 1),
|
51
|
+
darkviolet: Float32Array.of(148, 0, 211, 1),
|
52
|
+
deeppink: Float32Array.of(255, 20, 147, 1),
|
53
|
+
deepskyblue: Float32Array.of(0, 191, 255, 1),
|
54
|
+
dimgray: Float32Array.of(105, 105, 105, 1),
|
55
|
+
dimgrey: Float32Array.of(105, 105, 105, 1),
|
56
|
+
dodgerblue: Float32Array.of(30, 144, 255, 1),
|
57
|
+
firebrick: Float32Array.of(178, 34, 34, 1),
|
58
|
+
floralwhite: Float32Array.of(255, 250, 240, 1),
|
59
|
+
forestgreen: Float32Array.of(34, 139, 34, 1),
|
60
|
+
fuchsia: Float32Array.of(255, 0, 255, 1),
|
61
|
+
gainsboro: Float32Array.of(220, 220, 220, 1),
|
62
|
+
ghostwhite: Float32Array.of(248, 248, 255, 1),
|
63
|
+
gold: Float32Array.of(255, 215, 0, 1),
|
64
|
+
goldenrod: Float32Array.of(218, 165, 32, 1),
|
65
|
+
gray: Float32Array.of(128, 128, 128, 1),
|
66
|
+
green: Float32Array.of(0, 128, 0, 1),
|
67
|
+
greenyellow: Float32Array.of(173, 255, 47, 1),
|
68
|
+
grey: Float32Array.of(128, 128, 128, 1),
|
69
|
+
honeydew: Float32Array.of(240, 255, 240, 1),
|
70
|
+
hotpink: Float32Array.of(255, 105, 180, 1),
|
71
|
+
indianred: Float32Array.of(205, 92, 92, 1),
|
72
|
+
indigo: Float32Array.of(75, 0, 130, 1),
|
73
|
+
ivory: Float32Array.of(255, 255, 240, 1),
|
74
|
+
khaki: Float32Array.of(240, 230, 140, 1),
|
75
|
+
lavender: Float32Array.of(230, 230, 250, 1),
|
76
|
+
lavenderblush: Float32Array.of(255, 240, 245, 1),
|
77
|
+
lawngreen: Float32Array.of(124, 252, 0, 1),
|
78
|
+
lemonchiffon: Float32Array.of(255, 250, 205, 1),
|
79
|
+
lightblue: Float32Array.of(173, 216, 230, 1),
|
80
|
+
lightcoral: Float32Array.of(240, 128, 128, 1),
|
81
|
+
lightcyan: Float32Array.of(224, 255, 255, 1),
|
82
|
+
lightgoldenrodyellow: Float32Array.of(250, 250, 210, 1),
|
83
|
+
lightgray: Float32Array.of(211, 211, 211, 1),
|
84
|
+
lightgreen: Float32Array.of(144, 238, 144, 1),
|
85
|
+
lightgrey: Float32Array.of(211, 211, 211, 1),
|
86
|
+
lightpink: Float32Array.of(255, 182, 193, 1),
|
87
|
+
lightsalmon: Float32Array.of(255, 160, 122, 1),
|
88
|
+
lightseagreen: Float32Array.of(32, 178, 170, 1),
|
89
|
+
lightskyblue: Float32Array.of(135, 206, 250, 1),
|
90
|
+
lightslategray: Float32Array.of(119, 136, 153, 1),
|
91
|
+
lightslategrey: Float32Array.of(119, 136, 153, 1),
|
92
|
+
lightsteelblue: Float32Array.of(176, 196, 222, 1),
|
93
|
+
lightyellow: Float32Array.of(255, 255, 224, 1),
|
94
|
+
lime: Float32Array.of(0, 255, 0, 1),
|
95
|
+
limegreen: Float32Array.of(50, 205, 50, 1),
|
96
|
+
linen: Float32Array.of(250, 240, 230, 1),
|
97
|
+
magenta: Float32Array.of(255, 0, 255, 1),
|
98
|
+
maroon: Float32Array.of(128, 0, 0, 1),
|
99
|
+
mediumaquamarine: Float32Array.of(102, 205, 170, 1),
|
100
|
+
mediumblue: Float32Array.of(0, 0, 205, 1),
|
101
|
+
mediumorchid: Float32Array.of(186, 85, 211, 1),
|
102
|
+
mediumpurple: Float32Array.of(147, 112, 219, 1),
|
103
|
+
mediumseagreen: Float32Array.of(60, 179, 113, 1),
|
104
|
+
mediumslateblue: Float32Array.of(123, 104, 238, 1),
|
105
|
+
mediumspringgreen: Float32Array.of(0, 250, 154, 1),
|
106
|
+
mediumturquoise: Float32Array.of(72, 209, 204, 1),
|
107
|
+
mediumvioletred: Float32Array.of(199, 21, 133, 1),
|
108
|
+
midnightblue: Float32Array.of(25, 25, 112, 1),
|
109
|
+
mintcream: Float32Array.of(245, 255, 250, 1),
|
110
|
+
mistyrose: Float32Array.of(255, 228, 225, 1),
|
111
|
+
moccasin: Float32Array.of(255, 228, 181, 1),
|
112
|
+
navajowhite: Float32Array.of(255, 222, 173, 1),
|
113
|
+
navy: Float32Array.of(0, 0, 128, 1),
|
114
|
+
oldlace: Float32Array.of(253, 245, 230, 1),
|
115
|
+
olive: Float32Array.of(128, 128, 0, 1),
|
116
|
+
olivedrab: Float32Array.of(107, 142, 35, 1),
|
117
|
+
orange: Float32Array.of(255, 165, 0, 1),
|
118
|
+
orangered: Float32Array.of(255, 69, 0, 1),
|
119
|
+
orchid: Float32Array.of(218, 112, 214, 1),
|
120
|
+
palegoldenrod: Float32Array.of(238, 232, 170, 1),
|
121
|
+
palegreen: Float32Array.of(152, 251, 152, 1),
|
122
|
+
paleturquoise: Float32Array.of(175, 238, 238, 1),
|
123
|
+
palevioletred: Float32Array.of(219, 112, 147, 1),
|
124
|
+
papayawhip: Float32Array.of(255, 239, 213, 1),
|
125
|
+
peachpuff: Float32Array.of(255, 218, 185, 1),
|
126
|
+
peru: Float32Array.of(205, 133, 63, 1),
|
127
|
+
pink: Float32Array.of(255, 192, 203, 1),
|
128
|
+
plum: Float32Array.of(221, 160, 221, 1),
|
129
|
+
powderblue: Float32Array.of(176, 224, 230, 1),
|
130
|
+
purple: Float32Array.of(128, 0, 128, 1),
|
131
|
+
rebeccapurple: Float32Array.of(102, 51, 153, 1),
|
132
|
+
red: Float32Array.of(255, 0, 0, 1),
|
133
|
+
rosybrown: Float32Array.of(188, 143, 143, 1),
|
134
|
+
royalblue: Float32Array.of(65, 105, 225, 1),
|
135
|
+
saddlebrown: Float32Array.of(139, 69, 19, 1),
|
136
|
+
salmon: Float32Array.of(250, 128, 114, 1),
|
137
|
+
sandybrown: Float32Array.of(244, 164, 96, 1),
|
138
|
+
seagreen: Float32Array.of(46, 139, 87, 1),
|
139
|
+
seashell: Float32Array.of(255, 245, 238, 1),
|
140
|
+
sienna: Float32Array.of(160, 82, 45, 1),
|
141
|
+
silver: Float32Array.of(192, 192, 192, 1),
|
142
|
+
skyblue: Float32Array.of(135, 206, 235, 1),
|
143
|
+
slateblue: Float32Array.of(106, 90, 205, 1),
|
144
|
+
slategray: Float32Array.of(112, 128, 144, 1),
|
145
|
+
slategrey: Float32Array.of(112, 128, 144, 1),
|
146
|
+
snow: Float32Array.of(255, 250, 250, 1),
|
147
|
+
springgreen: Float32Array.of(0, 255, 127, 1),
|
148
|
+
steelblue: Float32Array.of(70, 130, 180, 1),
|
149
|
+
tan: Float32Array.of(210, 180, 140, 1),
|
150
|
+
teal: Float32Array.of(0, 128, 128, 1),
|
151
|
+
thistle: Float32Array.of(216, 191, 216, 1),
|
152
|
+
tomato: Float32Array.of(255, 99, 71, 1),
|
153
|
+
turquoise: Float32Array.of(64, 224, 208, 1),
|
154
|
+
violet: Float32Array.of(238, 130, 238, 1),
|
155
|
+
wheat: Float32Array.of(245, 222, 179, 1),
|
156
|
+
white: Float32Array.of(255, 255, 255, 1),
|
157
|
+
whitesmoke: Float32Array.of(245, 245, 245, 1),
|
158
|
+
yellow: Float32Array.of(255, 255, 0, 1),
|
159
|
+
yellowgreen: Float32Array.of(154, 205, 50, 1),
|
160
|
+
};
|
161
|
+
|
162
|
+
export const Color = (CanvasKit: CanvasKit, color: InputColor): SkColor => {
|
163
|
+
if (color instanceof Float32Array) {
|
164
|
+
return color;
|
165
|
+
} else if (typeof color === "string") {
|
166
|
+
const rgba = CanvasKit.parseColorString(color, colorMap);
|
167
|
+
return Float32Array.of(
|
168
|
+
rgba[0] / 255,
|
169
|
+
rgba[1] / 255,
|
170
|
+
rgba[2] / 255,
|
171
|
+
rgba[3]
|
172
|
+
);
|
173
|
+
} else {
|
174
|
+
return Float32Array.of(
|
175
|
+
red(color) / 255,
|
176
|
+
green(color) / 255,
|
177
|
+
blue(color) / 255,
|
178
|
+
alphaf(color)
|
179
|
+
);
|
180
|
+
}
|
181
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { CanvasKit, ColorFilter } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkColorFilter } from "../../types";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
|
7
|
+
export class JsiSkColorFilter
|
8
|
+
extends HostObject<ColorFilter, "ColorFilter">
|
9
|
+
implements SkColorFilter
|
10
|
+
{
|
11
|
+
constructor(CanvasKit: CanvasKit, ref: ColorFilter) {
|
12
|
+
super(CanvasKit, ref, "ColorFilter");
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import type { CanvasKit, Image } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type {
|
4
|
+
ImageFormat,
|
5
|
+
FilterMode,
|
6
|
+
MipmapMode,
|
7
|
+
SkImage,
|
8
|
+
SkMatrix,
|
9
|
+
SkShader,
|
10
|
+
TileMode,
|
11
|
+
} from "../../types";
|
12
|
+
|
13
|
+
import { ckEnum, HostObject } from "./Host";
|
14
|
+
|
15
|
+
export class JsiSkImage extends HostObject<Image, "Image"> implements SkImage {
|
16
|
+
constructor(CanvasKit: CanvasKit, ref: Image) {
|
17
|
+
super(CanvasKit, ref, "Image");
|
18
|
+
}
|
19
|
+
|
20
|
+
height() {
|
21
|
+
return this.ref.height();
|
22
|
+
}
|
23
|
+
|
24
|
+
width() {
|
25
|
+
return this.ref.width();
|
26
|
+
}
|
27
|
+
|
28
|
+
makeShaderOptions(
|
29
|
+
_tx: TileMode,
|
30
|
+
_ty: TileMode,
|
31
|
+
_fm: FilterMode,
|
32
|
+
_mm: MipmapMode,
|
33
|
+
_localMatrix?: SkMatrix
|
34
|
+
): SkShader {
|
35
|
+
throw new Error("Not implemented yet");
|
36
|
+
}
|
37
|
+
|
38
|
+
makeShaderCubic(
|
39
|
+
_tx: TileMode,
|
40
|
+
_ty: TileMode,
|
41
|
+
_B: number,
|
42
|
+
_C: number,
|
43
|
+
_localMatrix?: SkMatrix
|
44
|
+
): SkShader {
|
45
|
+
throw new Error("Not implemented yet");
|
46
|
+
}
|
47
|
+
|
48
|
+
encodeToBytes(fmt?: ImageFormat, quality?: number): Uint8Array {
|
49
|
+
let result: Uint8Array | null;
|
50
|
+
if (fmt && quality) {
|
51
|
+
result = this.ref.encodeToBytes(ckEnum(fmt), quality);
|
52
|
+
} else if (fmt) {
|
53
|
+
result = this.ref.encodeToBytes(ckEnum(fmt));
|
54
|
+
} else {
|
55
|
+
result = this.ref.encodeToBytes();
|
56
|
+
}
|
57
|
+
if (!result) {
|
58
|
+
throw new Error("encodeToBytes failed");
|
59
|
+
}
|
60
|
+
return result;
|
61
|
+
}
|
62
|
+
|
63
|
+
encodeToBase64(_fmt?: ImageFormat, _quality?: number): string {
|
64
|
+
throw new Error("Not implemented yet");
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
import type { CanvasKit, Paint } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type {
|
4
|
+
BlendMode,
|
5
|
+
SkColor,
|
6
|
+
SkColorFilter,
|
7
|
+
SkImageFilter,
|
8
|
+
SkPaint,
|
9
|
+
SkShader,
|
10
|
+
StrokeCap,
|
11
|
+
StrokeJoin,
|
12
|
+
PaintStyle,
|
13
|
+
SkMaskFilter,
|
14
|
+
SkPathEffect,
|
15
|
+
} from "../../types";
|
16
|
+
|
17
|
+
import { HostObject, toNullableValue } from "./Host";
|
18
|
+
|
19
|
+
export class JsiSkPaint extends HostObject<Paint, "Paint"> implements SkPaint {
|
20
|
+
constructor(CanvasKit: CanvasKit, ref: Paint) {
|
21
|
+
super(CanvasKit, ref, "Paint");
|
22
|
+
}
|
23
|
+
|
24
|
+
copy() {
|
25
|
+
return new JsiSkPaint(this.CanvasKit, this.ref.copy());
|
26
|
+
}
|
27
|
+
|
28
|
+
getColor() {
|
29
|
+
return this.ref.getColor();
|
30
|
+
}
|
31
|
+
|
32
|
+
getStrokeCap() {
|
33
|
+
return this.ref.getStrokeCap().value;
|
34
|
+
}
|
35
|
+
|
36
|
+
getStrokeJoin() {
|
37
|
+
return this.ref.getStrokeJoin().value;
|
38
|
+
}
|
39
|
+
|
40
|
+
getStrokeMiter() {
|
41
|
+
return this.ref.getStrokeMiter();
|
42
|
+
}
|
43
|
+
|
44
|
+
getStrokeWidth() {
|
45
|
+
return this.ref.getStrokeWidth();
|
46
|
+
}
|
47
|
+
|
48
|
+
setAlphaf(alpha: number) {
|
49
|
+
this.ref.setAlphaf(alpha);
|
50
|
+
}
|
51
|
+
|
52
|
+
setAntiAlias(aa: boolean) {
|
53
|
+
this.ref.setAntiAlias(aa);
|
54
|
+
}
|
55
|
+
|
56
|
+
setBlendMode(blendMode: BlendMode) {
|
57
|
+
this.ref.setBlendMode({ value: blendMode });
|
58
|
+
}
|
59
|
+
|
60
|
+
setColor(color: SkColor) {
|
61
|
+
this.ref.setColor(color);
|
62
|
+
}
|
63
|
+
|
64
|
+
setColorFilter(filter: SkColorFilter | null) {
|
65
|
+
this.ref.setColorFilter(toNullableValue(filter));
|
66
|
+
}
|
67
|
+
|
68
|
+
setImageFilter(filter: SkImageFilter | null) {
|
69
|
+
this.ref.setImageFilter(toNullableValue(filter));
|
70
|
+
}
|
71
|
+
|
72
|
+
setMaskFilter(filter: SkMaskFilter | null) {
|
73
|
+
this.ref.setMaskFilter(toNullableValue(filter));
|
74
|
+
}
|
75
|
+
|
76
|
+
setPathEffect(effect: SkPathEffect | null) {
|
77
|
+
this.ref.setPathEffect(toNullableValue(effect));
|
78
|
+
}
|
79
|
+
|
80
|
+
setShader(shader: SkShader | null) {
|
81
|
+
this.ref.setShader(toNullableValue(shader));
|
82
|
+
}
|
83
|
+
|
84
|
+
setStrokeCap(cap: StrokeCap) {
|
85
|
+
this.ref.setStrokeCap({ value: cap });
|
86
|
+
}
|
87
|
+
|
88
|
+
setStrokeJoin(join: StrokeJoin) {
|
89
|
+
this.ref.setStrokeJoin({ value: join });
|
90
|
+
}
|
91
|
+
|
92
|
+
setStrokeMiter(limit: number) {
|
93
|
+
this.ref.setStrokeMiter(limit);
|
94
|
+
}
|
95
|
+
|
96
|
+
setStrokeWidth(width: number) {
|
97
|
+
this.ref.setStrokeWidth(width);
|
98
|
+
}
|
99
|
+
|
100
|
+
setStyle(style: PaintStyle) {
|
101
|
+
this.ref.setStyle({ value: style });
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { CanvasKit, Rect } from "canvaskit-wasm";
|
2
|
+
|
3
|
+
import type { SkRect } from "../../types";
|
4
|
+
|
5
|
+
import { HostObject } from "./Host";
|
6
|
+
|
7
|
+
export class JsiSkRect extends HostObject<Rect, "Rect"> implements SkRect {
|
8
|
+
constructor(CanvasKit: CanvasKit, ref: Rect) {
|
9
|
+
super(CanvasKit, ref, "Rect");
|
10
|
+
}
|
11
|
+
|
12
|
+
get x() {
|
13
|
+
return this.ref[0];
|
14
|
+
}
|
15
|
+
|
16
|
+
get y() {
|
17
|
+
return this.ref[1];
|
18
|
+
}
|
19
|
+
|
20
|
+
get width() {
|
21
|
+
return this.ref[2] - this.ref[0];
|
22
|
+
}
|
23
|
+
|
24
|
+
get height() {
|
25
|
+
return this.ref[3] - this.ref[1];
|
26
|
+
}
|
27
|
+
}
|