@shopify/react-native-skia 0.1.171 → 0.1.173
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +1 -0
- package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +5 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +106 -5
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +3 -1
- package/cpp/api/JsiSkSurface.h +7 -1
- package/cpp/api/JsiSkSurfaceFactory.h +15 -2
- package/cpp/rnskia/RNSkDomView.cpp +2 -4
- package/cpp/rnskia/RNSkJsView.cpp +3 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +2 -2
- package/cpp/rnskia/RNSkPictureView.h +3 -0
- package/cpp/rnskia/RNSkPlatformContext.h +9 -0
- package/cpp/rnskia/dom/JsiDomApi.h +1 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.cpp +117 -0
- package/cpp/rnskia/dom/base/ConcatablePaint.h +49 -0
- package/cpp/rnskia/dom/base/Declaration.h +88 -0
- package/cpp/rnskia/dom/base/DeclarationContext.h +79 -0
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +25 -9
- package/cpp/rnskia/dom/base/DrawingContext.cpp +32 -186
- package/cpp/rnskia/dom/base/DrawingContext.h +45 -64
- package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +35 -106
- package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +28 -9
- package/cpp/rnskia/dom/base/JsiDomNode.h +46 -17
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +81 -67
- package/cpp/rnskia/dom/base/NodeProp.h +12 -2
- package/cpp/rnskia/dom/base/NodePropsContainer.h +15 -16
- package/cpp/rnskia/dom/nodes/JsiBackdropFilterNode.h +22 -11
- package/cpp/rnskia/dom/nodes/JsiBlendNode.h +43 -59
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +16 -17
- package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +6 -5
- package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +45 -69
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +8 -1
- package/cpp/rnskia/dom/nodes/JsiGroupNode.h +1 -1
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +121 -161
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +1 -0
- package/cpp/rnskia/dom/nodes/JsiLayerNode.h +28 -18
- package/cpp/rnskia/dom/nodes/JsiPaintNode.h +82 -45
- package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +68 -101
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +3 -2
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +150 -207
- package/cpp/rnskia/dom/props/BezierProps.h +4 -2
- package/cpp/rnskia/dom/props/BlendModeProp.h +4 -2
- package/cpp/rnskia/dom/props/BoxShadowProps.h +8 -10
- package/cpp/rnskia/dom/props/CircleProp.h +6 -5
- package/cpp/rnskia/dom/props/ClipProp.h +6 -4
- package/cpp/rnskia/dom/props/ColorProp.h +8 -4
- package/cpp/rnskia/dom/props/DrawingProp.h +5 -3
- package/cpp/rnskia/dom/props/FontProp.h +4 -2
- package/cpp/rnskia/dom/props/GlyphsProp.h +4 -2
- package/cpp/rnskia/dom/props/ImageProps.h +9 -6
- package/cpp/rnskia/dom/props/LayerProp.h +6 -4
- package/cpp/rnskia/dom/props/MatrixProp.h +4 -2
- package/cpp/rnskia/dom/props/NumbersProp.h +8 -4
- package/cpp/rnskia/dom/props/PaintProps.h +55 -92
- package/cpp/rnskia/dom/props/PathProp.h +4 -2
- package/cpp/rnskia/dom/props/PictureProp.h +4 -2
- package/cpp/rnskia/dom/props/PointProp.h +4 -2
- package/cpp/rnskia/dom/props/PointsProp.h +8 -4
- package/cpp/rnskia/dom/props/RRectProp.h +23 -16
- package/cpp/rnskia/dom/props/RadiusProp.h +4 -2
- package/cpp/rnskia/dom/props/RectProp.h +18 -12
- package/cpp/rnskia/dom/props/StrokeProps.h +8 -4
- package/cpp/rnskia/dom/props/SvgProp.h +4 -2
- package/cpp/rnskia/dom/props/TextBlobProp.h +10 -8
- package/cpp/rnskia/dom/props/TileModeProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformProp.h +4 -2
- package/cpp/rnskia/dom/props/TransformsProps.h +5 -7
- package/cpp/rnskia/dom/props/UniformsProp.h +4 -2
- package/cpp/rnskia/dom/props/VertexModeProp.h +4 -2
- package/cpp/rnskia/dom/props/VerticesProps.h +7 -11
- package/ios/RNSkia-iOS/DisplayLink.mm +22 -24
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +57 -50
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +2 -0
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +38 -25
- package/ios/RNSkia-iOS/SkiaDomViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaManager.mm +12 -10
- package/ios/RNSkia-iOS/SkiaMetalRenderer.h +5 -0
- package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +53 -0
- package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +17 -17
- package/ios/RNSkia-iOS/SkiaUIView.mm +63 -53
- package/ios/RNSkiaModule.mm +5 -7
- package/lib/commonjs/animation/decay/decay.d.ts +2 -0
- package/lib/commonjs/animation/decay/index.d.ts +1 -0
- package/lib/commonjs/animation/decay/runDecay.d.ts +10 -0
- package/lib/commonjs/animation/decay/types.d.ts +21 -0
- package/lib/commonjs/animation/functions/index.d.ts +4 -0
- package/lib/commonjs/animation/functions/interpolate.d.ts +17 -0
- package/lib/commonjs/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/commonjs/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/commonjs/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/commonjs/animation/index.d.ts +4 -0
- package/lib/commonjs/animation/spring/Spring.d.ts +65 -0
- package/lib/commonjs/animation/spring/functions/index.d.ts +1 -0
- package/lib/commonjs/animation/spring/functions/spring.d.ts +10 -0
- package/lib/commonjs/animation/spring/index.d.ts +3 -0
- package/lib/commonjs/animation/spring/runSpring.d.ts +16 -0
- package/lib/commonjs/animation/spring/types.d.ts +6 -0
- package/lib/commonjs/animation/spring/useSpring.d.ts +10 -0
- package/lib/commonjs/animation/timing/Easing.d.ts +19 -0
- package/lib/commonjs/animation/timing/createTiming.d.ts +17 -0
- package/lib/commonjs/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/commonjs/animation/timing/functions/index.d.ts +4 -0
- package/lib/commonjs/animation/timing/functions/timing.d.ts +17 -0
- package/lib/commonjs/animation/timing/functions/types.d.ts +7 -0
- package/lib/commonjs/animation/timing/index.d.ts +4 -0
- package/lib/commonjs/animation/timing/runTiming.d.ts +16 -0
- package/lib/commonjs/animation/timing/useLoop.d.ts +8 -0
- package/lib/commonjs/animation/timing/useTiming.d.ts +10 -0
- package/lib/commonjs/animation/types.d.ts +18 -0
- package/lib/commonjs/dom/nodes/DrawingNode.d.ts +14 -0
- package/lib/commonjs/dom/nodes/DrawingNode.js +5 -1
- package/lib/commonjs/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/GroupNode.d.ts +7 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +64 -0
- package/lib/commonjs/dom/nodes/LayerNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/LayerNode.js +13 -6
- package/lib/commonjs/dom/nodes/LayerNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.d.ts +38 -0
- package/lib/commonjs/dom/nodes/Node.js +8 -26
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintContext.d.ts +18 -0
- package/lib/commonjs/dom/nodes/PaintContext.js.map +1 -1
- package/lib/commonjs/dom/nodes/PaintNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/PaintNode.js +32 -15
- package/lib/commonjs/dom/nodes/PaintNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.d.ts +26 -0
- package/lib/commonjs/dom/nodes/RenderNode.js +19 -187
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.d.ts +7 -0
- package/lib/commonjs/dom/nodes/datatypes/Enum.d.ts +1 -0
- package/lib/commonjs/dom/nodes/datatypes/Fitting.d.ts +33 -0
- package/lib/commonjs/dom/nodes/datatypes/Gradient.d.ts +92 -0
- package/lib/commonjs/dom/nodes/datatypes/Path.d.ts +4 -0
- package/lib/commonjs/dom/nodes/datatypes/Radius.d.ts +3 -0
- package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +5 -0
- package/lib/commonjs/dom/nodes/datatypes/Transform.d.ts +3 -0
- package/lib/commonjs/dom/nodes/datatypes/index.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js +25 -7
- package/lib/commonjs/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.d.ts +15 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js +3 -0
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/DiffRectNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/FillNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/ImageNode.d.ts +25 -0
- package/lib/commonjs/dom/nodes/drawings/ImageSVG.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/LineNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/OvalNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/PatchNode.d.ts +18 -0
- package/lib/commonjs/dom/nodes/drawings/PathNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/PictureNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/PointsNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +10 -0
- package/lib/commonjs/dom/nodes/drawings/RectNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/Text.d.ts +30 -0
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.d.ts +9 -0
- package/lib/commonjs/dom/nodes/drawings/index.d.ts +18 -0
- package/lib/commonjs/dom/nodes/index.d.ts +3 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/paint/BlendNode.js +16 -47
- package/lib/commonjs/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.d.ts +35 -0
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.d.ts +42 -0
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +45 -42
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/MaskFilters.d.ts +8 -0
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/commonjs/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/PathEffects.d.ts +39 -0
- package/lib/commonjs/dom/nodes/paint/PathEffects.js +30 -72
- package/lib/commonjs/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.d.ts +43 -0
- package/lib/commonjs/dom/nodes/paint/Shaders.js +28 -18
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/index.d.ts +6 -0
- package/lib/commonjs/dom/types/ColorFilters.d.ts +12 -0
- package/lib/commonjs/dom/types/Common.d.ts +56 -0
- package/lib/commonjs/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/commonjs/dom/types/DeclarationContext.js +118 -0
- package/lib/commonjs/dom/types/DeclarationContext.js.map +1 -0
- package/lib/commonjs/dom/types/DrawingContext.d.ts +22 -0
- package/lib/commonjs/dom/types/DrawingContext.js +330 -0
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +104 -0
- package/lib/commonjs/dom/types/ImageFilters.d.ts +37 -0
- package/lib/commonjs/dom/types/MaskFilters.d.ts +7 -0
- package/lib/commonjs/dom/types/Node.d.ts +23 -0
- package/lib/commonjs/dom/types/Node.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +67 -0
- package/lib/commonjs/dom/types/PathEffects.d.ts +28 -0
- package/lib/commonjs/dom/types/Shaders.d.ts +59 -0
- package/lib/commonjs/dom/types/SkDOM.d.ts +71 -0
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.d.ts +12 -0
- package/lib/commonjs/dom/types/index.js +13 -0
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/external/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/commonjs/index.d.ts +11 -0
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.d.ts +16 -0
- package/lib/commonjs/renderer/Canvas.d.ts +11 -0
- package/lib/commonjs/renderer/Canvas.js +3 -3
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +12 -0
- package/lib/commonjs/renderer/DependencyManager.d.ts +46 -0
- package/lib/commonjs/renderer/DrawingContext.d.ts +7 -0
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +132 -0
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.d.ts +19 -0
- package/lib/commonjs/renderer/HostConfig.js +1 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -0
- package/lib/commonjs/renderer/Offscreen.js +31 -0
- package/lib/commonjs/renderer/Offscreen.js.map +1 -0
- package/lib/commonjs/renderer/Reconciler.d.ts +13 -0
- package/lib/commonjs/renderer/Reconciler.js +0 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.d.ts +4 -0
- package/lib/commonjs/renderer/components/Drawing.d.ts +3 -0
- package/lib/commonjs/renderer/components/Group.d.ts +8 -0
- package/lib/commonjs/renderer/components/Mask.d.ts +9 -0
- package/lib/commonjs/renderer/components/Paint.d.ts +4 -0
- package/lib/commonjs/renderer/components/Picture.d.ts +4 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.d.ts +9 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/commonjs/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.d.ts +5 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +4 -0
- package/lib/commonjs/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/commonjs/renderer/components/image/Image.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/ImageShader.d.ts +4 -0
- package/lib/commonjs/renderer/components/image/index.d.ts +3 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.d.ts +4 -0
- package/lib/commonjs/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/commonjs/renderer/components/index.d.ts +16 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.d.ts +4 -0
- package/lib/commonjs/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.d.ts +4 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.d.ts +3 -0
- package/lib/commonjs/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/commonjs/renderer/components/shaders/Color.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/Shader.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.d.ts +4 -0
- package/lib/commonjs/renderer/components/shaders/index.d.ts +9 -0
- package/lib/commonjs/renderer/components/shapes/Box.d.ts +5 -0
- package/lib/commonjs/renderer/components/shapes/Circle.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Fill.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.d.ts +20 -0
- package/lib/commonjs/renderer/components/shapes/Line.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Oval.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Patch.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Path.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Points.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/index.d.ts +13 -0
- package/lib/commonjs/renderer/components/text/Glyphs.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/Text.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/TextBlob.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/TextPath.d.ts +4 -0
- package/lib/commonjs/renderer/components/text/index.d.ts +4 -0
- package/lib/commonjs/renderer/index.d.ts +2 -0
- package/lib/commonjs/renderer/index.js +0 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +17 -0
- package/lib/commonjs/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/commonjs/renderer/processors/index.d.ts +2 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/commonjs/renderer/processors/math/Math.d.ts +15 -0
- package/lib/commonjs/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/commonjs/renderer/processors/math/index.d.ts +3 -0
- package/lib/commonjs/renderer/typeddash.d.ts +3 -0
- package/lib/commonjs/skia/NativeSetup.d.ts +1 -0
- package/lib/commonjs/skia/Skia.d.ts +8 -0
- package/lib/commonjs/skia/Skia.web.d.ts +1 -0
- package/lib/commonjs/skia/core/Data.d.ts +3 -0
- package/lib/commonjs/skia/core/Font.d.ts +5 -0
- package/lib/commonjs/skia/core/Image.d.ts +5 -0
- package/lib/commonjs/skia/core/Matrix.d.ts +2 -0
- package/lib/commonjs/skia/core/Picture.d.ts +8 -0
- package/lib/commonjs/skia/core/RRect.d.ts +2 -0
- package/lib/commonjs/skia/core/Rect.d.ts +8 -0
- package/lib/commonjs/skia/core/SVG.d.ts +2 -0
- package/lib/commonjs/skia/core/Typeface.d.ts +5 -0
- package/lib/commonjs/skia/core/Vector.d.ts +12 -0
- package/lib/commonjs/skia/core/index.d.ts +10 -0
- package/lib/commonjs/skia/index.d.ts +3 -0
- package/lib/commonjs/skia/types/Canvas.d.ts +381 -0
- package/lib/commonjs/skia/types/Color.d.ts +2 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/commonjs/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/commonjs/skia/types/ContourMeasure.d.ts +41 -0
- package/lib/commonjs/skia/types/Data/Data.d.ts +12 -0
- package/lib/commonjs/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/commonjs/skia/types/Data/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Font/Font.d.ts +180 -0
- package/lib/commonjs/skia/types/Font/index.d.ts +1 -0
- package/lib/commonjs/skia/types/Image/Image.d.ts +75 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/commonjs/skia/types/Image/index.d.ts +2 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/commonjs/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/commonjs/skia/types/JsiInstance.d.ts +3 -0
- package/lib/commonjs/skia/types/MaskFilter.d.ts +21 -0
- package/lib/commonjs/skia/types/Matrix.d.ts +34 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/commonjs/skia/types/Paint/Paint.d.ts +136 -0
- package/lib/commonjs/skia/types/Paint/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Path/Path.d.ts +474 -0
- package/lib/commonjs/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/commonjs/skia/types/Path/index.d.ts +2 -0
- package/lib/commonjs/skia/types/PathEffect.d.ts +75 -0
- package/lib/commonjs/skia/types/Picture/Picture.d.ts +27 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/commonjs/skia/types/Picture/index.d.ts +3 -0
- package/lib/commonjs/skia/types/Point.d.ts +10 -0
- package/lib/commonjs/skia/types/RRect.d.ts +7 -0
- package/lib/commonjs/skia/types/RSXform.d.ts +2 -0
- package/lib/commonjs/skia/types/Rect.d.ts +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.d.ts +52 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/commonjs/skia/types/SVG/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Shader/Shader.d.ts +10 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/commonjs/skia/types/Shader/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Size.d.ts +4 -0
- package/lib/commonjs/skia/types/Skia.d.ts +66 -0
- package/lib/commonjs/skia/types/Surface/Surface.d.ts +29 -0
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.d.ts +17 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/types/Surface/index.d.ts +2 -0
- package/lib/commonjs/skia/types/TextBlob.d.ts +44 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/commonjs/skia/types/Typeface/index.d.ts +2 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/commonjs/skia/types/Vertices/index.d.ts +1 -0
- package/lib/commonjs/skia/types/index.d.ts +28 -0
- package/lib/commonjs/skia/web/Host.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/commonjs/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.d.ts +12 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkData.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkPaint.d.ts +28 -0
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +57 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkPoint.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkRRect.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +7 -0
- package/lib/commonjs/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.d.ts +16 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/commonjs/skia/web/JsiSkSurface.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +4 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.d.ts +13 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/commonjs/skia/web/JsiSkia.d.ts +3 -0
- package/lib/commonjs/skia/web/index.d.ts +1 -0
- package/lib/commonjs/values/api.d.ts +5 -0
- package/lib/commonjs/values/api.web.d.ts +2 -0
- package/lib/commonjs/values/hooks/index.d.ts +4 -0
- package/lib/commonjs/values/hooks/useClockValue.d.ts +6 -0
- package/lib/commonjs/values/hooks/useComputedValue.d.ts +8 -0
- package/lib/commonjs/values/hooks/useValue.d.ts +7 -0
- package/lib/commonjs/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/commonjs/values/index.d.ts +4 -0
- package/lib/commonjs/values/selector.d.ts +14 -0
- package/lib/commonjs/values/types.d.ts +63 -0
- package/lib/commonjs/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/commonjs/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/commonjs/values/web/RNSkComputedValue.d.ts +10 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +12 -0
- package/lib/commonjs/values/web/RNSkValue.d.ts +14 -0
- package/lib/commonjs/values/web/api.d.ts +2 -0
- package/lib/commonjs/values/web/index.d.ts +1 -0
- package/lib/commonjs/views/SkiaBaseWebView.d.ts +62 -0
- package/lib/commonjs/views/SkiaBaseWebView.js +6 -4
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.d.ts +31 -0
- package/lib/commonjs/views/SkiaDomView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaDomView.web.js +3 -14
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.d.ts +27 -0
- package/lib/commonjs/views/SkiaPictureView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaPictureView.web.js +0 -7
- package/lib/commonjs/views/SkiaPictureView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaView.d.ts +30 -0
- package/lib/commonjs/views/SkiaView.web.d.ts +7 -0
- package/lib/commonjs/views/SkiaView.web.js +0 -7
- package/lib/commonjs/views/SkiaView.web.js.map +1 -1
- package/lib/commonjs/views/api.d.ts +5 -0
- package/lib/commonjs/views/index.d.ts +6 -0
- package/lib/commonjs/views/types.d.ts +91 -0
- package/lib/commonjs/views/useDrawCallback.d.ts +8 -0
- package/lib/commonjs/views/useTouchHandler.d.ts +22 -0
- package/lib/commonjs/web/LoadSkiaWeb.d.ts +6 -0
- package/lib/commonjs/web/WithSkiaWeb.d.ts +12 -0
- package/lib/commonjs/web/index.d.ts +2 -0
- package/lib/module/animation/decay/decay.d.ts +2 -0
- package/lib/module/animation/decay/index.d.ts +1 -0
- package/lib/module/animation/decay/runDecay.d.ts +10 -0
- package/lib/module/animation/decay/types.d.ts +21 -0
- package/lib/module/animation/functions/index.d.ts +4 -0
- package/lib/module/animation/functions/interpolate.d.ts +17 -0
- package/lib/module/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/module/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/module/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/module/animation/index.d.ts +4 -0
- package/lib/module/animation/spring/Spring.d.ts +65 -0
- package/lib/module/animation/spring/functions/index.d.ts +1 -0
- package/lib/module/animation/spring/functions/spring.d.ts +10 -0
- package/lib/module/animation/spring/index.d.ts +3 -0
- package/lib/module/animation/spring/runSpring.d.ts +16 -0
- package/lib/module/animation/spring/types.d.ts +6 -0
- package/lib/module/animation/spring/useSpring.d.ts +10 -0
- package/lib/module/animation/timing/Easing.d.ts +19 -0
- package/lib/module/animation/timing/createTiming.d.ts +17 -0
- package/lib/module/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/module/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/module/animation/timing/functions/index.d.ts +4 -0
- package/lib/module/animation/timing/functions/timing.d.ts +17 -0
- package/lib/module/animation/timing/functions/types.d.ts +7 -0
- package/lib/module/animation/timing/index.d.ts +4 -0
- package/lib/module/animation/timing/runTiming.d.ts +16 -0
- package/lib/module/animation/timing/useLoop.d.ts +8 -0
- package/lib/module/animation/timing/useTiming.d.ts +10 -0
- package/lib/module/animation/types.d.ts +18 -0
- package/lib/module/dom/nodes/DrawingNode.d.ts +14 -0
- package/lib/module/dom/nodes/DrawingNode.js +5 -1
- package/lib/module/dom/nodes/DrawingNode.js.map +1 -1
- package/lib/module/dom/nodes/GroupNode.d.ts +7 -0
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +64 -0
- package/lib/module/dom/nodes/LayerNode.d.ts +8 -0
- package/lib/module/dom/nodes/LayerNode.js +13 -7
- package/lib/module/dom/nodes/LayerNode.js.map +1 -1
- package/lib/module/dom/nodes/Node.d.ts +38 -0
- package/lib/module/dom/nodes/Node.js +8 -25
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/PaintContext.d.ts +18 -0
- package/lib/module/dom/nodes/PaintContext.js.map +1 -1
- package/lib/module/dom/nodes/PaintNode.d.ts +8 -0
- package/lib/module/dom/nodes/PaintNode.js +32 -15
- package/lib/module/dom/nodes/PaintNode.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.d.ts +26 -0
- package/lib/module/dom/nodes/RenderNode.js +20 -187
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.d.ts +7 -0
- package/lib/module/dom/nodes/datatypes/Enum.d.ts +1 -0
- package/lib/module/dom/nodes/datatypes/Fitting.d.ts +33 -0
- package/lib/module/dom/nodes/datatypes/Gradient.d.ts +92 -0
- package/lib/module/dom/nodes/datatypes/Path.d.ts +4 -0
- package/lib/module/dom/nodes/datatypes/Radius.d.ts +3 -0
- package/lib/module/dom/nodes/datatypes/Rect.d.ts +5 -0
- package/lib/module/dom/nodes/datatypes/Transform.d.ts +3 -0
- package/lib/module/dom/nodes/datatypes/index.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js +23 -4
- package/lib/module/dom/nodes/drawings/BackdropFilterNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.d.ts +15 -0
- package/lib/module/dom/nodes/drawings/Box.js +3 -0
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/DiffRectNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/FillNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/ImageNode.d.ts +25 -0
- package/lib/module/dom/nodes/drawings/ImageSVG.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/LineNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/OvalNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/PatchNode.d.ts +18 -0
- package/lib/module/dom/nodes/drawings/PathNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/PictureNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/PointsNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/RRectNode.d.ts +10 -0
- package/lib/module/dom/nodes/drawings/RectNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/Text.d.ts +30 -0
- package/lib/module/dom/nodes/drawings/VerticesNode.d.ts +9 -0
- package/lib/module/dom/nodes/drawings/index.d.ts +18 -0
- package/lib/module/dom/nodes/index.d.ts +3 -0
- package/lib/module/dom/nodes/paint/BlendNode.d.ts +8 -0
- package/lib/module/dom/nodes/paint/BlendNode.js +15 -46
- package/lib/module/dom/nodes/paint/BlendNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.d.ts +35 -0
- package/lib/module/dom/nodes/paint/ColorFilters.js +29 -43
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.d.ts +42 -0
- package/lib/module/dom/nodes/paint/ImageFilters.js +48 -41
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/MaskFilters.d.ts +8 -0
- package/lib/module/dom/nodes/paint/MaskFilters.js +3 -2
- package/lib/module/dom/nodes/paint/MaskFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/PathEffects.d.ts +39 -0
- package/lib/module/dom/nodes/paint/PathEffects.js +29 -72
- package/lib/module/dom/nodes/paint/PathEffects.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.d.ts +43 -0
- package/lib/module/dom/nodes/paint/Shaders.js +28 -18
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/nodes/paint/index.d.ts +6 -0
- package/lib/module/dom/types/ColorFilters.d.ts +12 -0
- package/lib/module/dom/types/Common.d.ts +56 -0
- package/lib/module/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/module/dom/types/DeclarationContext.js +107 -0
- package/lib/module/dom/types/DeclarationContext.js.map +1 -0
- package/lib/module/dom/types/DrawingContext.d.ts +22 -0
- package/lib/module/dom/types/DrawingContext.js +322 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +104 -0
- package/lib/module/dom/types/ImageFilters.d.ts +37 -0
- package/lib/module/dom/types/MaskFilters.d.ts +7 -0
- package/lib/module/dom/types/Node.d.ts +23 -0
- package/lib/module/dom/types/Node.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +67 -0
- package/lib/module/dom/types/PathEffects.d.ts +28 -0
- package/lib/module/dom/types/Shaders.d.ts +59 -0
- package/lib/module/dom/types/SkDOM.d.ts +71 -0
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.d.ts +12 -0
- package/lib/module/dom/types/index.js +1 -0
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/external/index.d.ts +1 -0
- package/lib/module/external/reanimated/index.d.ts +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/module/index.d.ts +11 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.d.ts +16 -0
- package/lib/module/renderer/Canvas.d.ts +11 -0
- package/lib/module/renderer/Canvas.js +3 -3
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +12 -0
- package/lib/module/renderer/DependencyManager.d.ts +46 -0
- package/lib/module/renderer/DrawingContext.d.ts +7 -0
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +132 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.d.ts +19 -0
- package/lib/module/renderer/HostConfig.js +1 -0
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -0
- package/lib/module/renderer/Offscreen.js +19 -0
- package/lib/module/renderer/Offscreen.js.map +1 -0
- package/lib/module/renderer/Reconciler.d.ts +13 -0
- package/lib/module/renderer/Reconciler.js +0 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/Blend.d.ts +4 -0
- package/lib/module/renderer/components/Drawing.d.ts +3 -0
- package/lib/module/renderer/components/Group.d.ts +8 -0
- package/lib/module/renderer/components/Mask.d.ts +9 -0
- package/lib/module/renderer/components/Paint.d.ts +4 -0
- package/lib/module/renderer/components/Picture.d.ts +4 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.d.ts +9 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/module/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/Lerp.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/Matrix.d.ts +5 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +4 -0
- package/lib/module/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/module/renderer/components/image/Image.d.ts +4 -0
- package/lib/module/renderer/components/image/ImageSVG.d.ts +4 -0
- package/lib/module/renderer/components/image/ImageShader.d.ts +4 -0
- package/lib/module/renderer/components/image/index.d.ts +3 -0
- package/lib/module/renderer/components/imageFilters/Blur.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Morphology.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Offset.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/Shadow.d.ts +4 -0
- package/lib/module/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/module/renderer/components/index.d.ts +16 -0
- package/lib/module/renderer/components/maskFilters/Blur.d.ts +4 -0
- package/lib/module/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/module/renderer/components/pathEffects/Corner.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Dash.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Discrete.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Line2D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Path1D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Path2D.d.ts +4 -0
- package/lib/module/renderer/components/pathEffects/Sum.d.ts +3 -0
- package/lib/module/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/module/renderer/components/shaders/Color.d.ts +4 -0
- package/lib/module/renderer/components/shaders/FractalNoise.d.ts +4 -0
- package/lib/module/renderer/components/shaders/LinearGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/RadialGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/Shader.d.ts +4 -0
- package/lib/module/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/module/renderer/components/shaders/SweepGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/Turbulence.d.ts +4 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.d.ts +4 -0
- package/lib/module/renderer/components/shaders/index.d.ts +9 -0
- package/lib/module/renderer/components/shapes/Box.d.ts +5 -0
- package/lib/module/renderer/components/shapes/Circle.d.ts +4 -0
- package/lib/module/renderer/components/shapes/DiffRect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Fill.d.ts +4 -0
- package/lib/module/renderer/components/shapes/FitBox.d.ts +20 -0
- package/lib/module/renderer/components/shapes/Line.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Oval.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Patch.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Path.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Points.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/RoundedRect.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Vertices.d.ts +4 -0
- package/lib/module/renderer/components/shapes/index.d.ts +13 -0
- package/lib/module/renderer/components/text/Glyphs.d.ts +4 -0
- package/lib/module/renderer/components/text/Text.d.ts +4 -0
- package/lib/module/renderer/components/text/TextBlob.d.ts +4 -0
- package/lib/module/renderer/components/text/TextPath.d.ts +4 -0
- package/lib/module/renderer/components/text/index.d.ts +4 -0
- package/lib/module/renderer/index.d.ts +2 -0
- package/lib/module/renderer/index.js +0 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +17 -0
- package/lib/module/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/module/renderer/processors/index.d.ts +2 -0
- package/lib/module/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/module/renderer/processors/math/Math.d.ts +15 -0
- package/lib/module/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/module/renderer/processors/math/index.d.ts +3 -0
- package/lib/module/renderer/typeddash.d.ts +3 -0
- package/lib/module/skia/NativeSetup.d.ts +1 -0
- package/lib/module/skia/Skia.d.ts +8 -0
- package/lib/module/skia/Skia.web.d.ts +1 -0
- package/lib/module/skia/core/Data.d.ts +3 -0
- package/lib/module/skia/core/Font.d.ts +5 -0
- package/lib/module/skia/core/Image.d.ts +5 -0
- package/lib/module/skia/core/Matrix.d.ts +2 -0
- package/lib/module/skia/core/Picture.d.ts +8 -0
- package/lib/module/skia/core/RRect.d.ts +2 -0
- package/lib/module/skia/core/Rect.d.ts +8 -0
- package/lib/module/skia/core/SVG.d.ts +2 -0
- package/lib/module/skia/core/Typeface.d.ts +5 -0
- package/lib/module/skia/core/Vector.d.ts +12 -0
- package/lib/module/skia/core/index.d.ts +10 -0
- package/lib/module/skia/index.d.ts +3 -0
- package/lib/module/skia/types/Canvas.d.ts +381 -0
- package/lib/module/skia/types/Color.d.ts +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/module/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/module/skia/types/ContourMeasure.d.ts +41 -0
- package/lib/module/skia/types/Data/Data.d.ts +12 -0
- package/lib/module/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/module/skia/types/Data/index.d.ts +2 -0
- package/lib/module/skia/types/Font/Font.d.ts +180 -0
- package/lib/module/skia/types/Font/index.d.ts +1 -0
- package/lib/module/skia/types/Image/Image.d.ts +75 -0
- package/lib/module/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/module/skia/types/Image/index.d.ts +2 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/module/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/module/skia/types/JsiInstance.d.ts +3 -0
- package/lib/module/skia/types/MaskFilter.d.ts +21 -0
- package/lib/module/skia/types/Matrix.d.ts +34 -0
- package/lib/module/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/module/skia/types/Paint/Paint.d.ts +136 -0
- package/lib/module/skia/types/Paint/index.d.ts +2 -0
- package/lib/module/skia/types/Path/Path.d.ts +474 -0
- package/lib/module/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/module/skia/types/Path/index.d.ts +2 -0
- package/lib/module/skia/types/PathEffect.d.ts +75 -0
- package/lib/module/skia/types/Picture/Picture.d.ts +27 -0
- package/lib/module/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/module/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/module/skia/types/Picture/index.d.ts +3 -0
- package/lib/module/skia/types/Point.d.ts +10 -0
- package/lib/module/skia/types/RRect.d.ts +7 -0
- package/lib/module/skia/types/RSXform.d.ts +2 -0
- package/lib/module/skia/types/Rect.d.ts +6 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.d.ts +52 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/module/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/module/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/module/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/module/skia/types/SVG/index.d.ts +2 -0
- package/lib/module/skia/types/Shader/Shader.d.ts +10 -0
- package/lib/module/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/module/skia/types/Shader/index.d.ts +2 -0
- package/lib/module/skia/types/Size.d.ts +4 -0
- package/lib/module/skia/types/Skia.d.ts +66 -0
- package/lib/module/skia/types/Surface/Surface.d.ts +29 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -1
- package/lib/module/skia/types/Surface/SurfaceFactory.d.ts +17 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -1
- package/lib/module/skia/types/Surface/index.d.ts +2 -0
- package/lib/module/skia/types/TextBlob.d.ts +44 -0
- package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/module/skia/types/Typeface/index.d.ts +2 -0
- package/lib/module/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/module/skia/types/Vertices/index.d.ts +1 -0
- package/lib/module/skia/types/index.d.ts +28 -0
- package/lib/module/skia/web/Host.d.ts +19 -0
- package/lib/module/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/module/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/module/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/module/skia/web/JsiSkContourMeasure.d.ts +12 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/module/skia/web/JsiSkData.d.ts +8 -0
- package/lib/module/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/module/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/module/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/module/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/module/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/module/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkMatrix.d.ts +13 -0
- package/lib/module/skia/web/JsiSkPaint.d.ts +28 -0
- package/lib/module/skia/web/JsiSkPath.d.ts +57 -0
- package/lib/module/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/module/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/module/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/module/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/module/skia/web/JsiSkPoint.d.ts +9 -0
- package/lib/module/skia/web/JsiSkRRect.d.ts +11 -0
- package/lib/module/skia/web/JsiSkRSXform.d.ts +7 -0
- package/lib/module/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +16 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/module/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/module/skia/web/JsiSkSurface.d.ts +9 -0
- package/lib/module/skia/web/JsiSkSurface.js +4 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.d.ts +9 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +21 -1
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.d.ts +13 -0
- package/lib/module/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/module/skia/web/JsiSkia.d.ts +3 -0
- package/lib/module/skia/web/index.d.ts +1 -0
- package/lib/module/values/api.d.ts +5 -0
- package/lib/module/values/api.web.d.ts +2 -0
- package/lib/module/values/hooks/index.d.ts +4 -0
- package/lib/module/values/hooks/useClockValue.d.ts +6 -0
- package/lib/module/values/hooks/useComputedValue.d.ts +8 -0
- package/lib/module/values/hooks/useValue.d.ts +7 -0
- package/lib/module/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/module/values/index.d.ts +4 -0
- package/lib/module/values/selector.d.ts +14 -0
- package/lib/module/values/types.d.ts +63 -0
- package/lib/module/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/module/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/module/values/web/RNSkComputedValue.d.ts +10 -0
- package/lib/module/values/web/RNSkReadonlyValue.d.ts +12 -0
- package/lib/module/values/web/RNSkValue.d.ts +14 -0
- package/lib/module/values/web/api.d.ts +2 -0
- package/lib/module/values/web/index.d.ts +1 -0
- package/lib/module/views/SkiaBaseWebView.d.ts +62 -0
- package/lib/module/views/SkiaBaseWebView.js +6 -4
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.d.ts +31 -0
- package/lib/module/views/SkiaDomView.web.d.ts +7 -0
- package/lib/module/views/SkiaDomView.web.js +2 -11
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/SkiaPictureView.d.ts +27 -0
- package/lib/module/views/SkiaPictureView.web.d.ts +7 -0
- package/lib/module/views/SkiaPictureView.web.js +0 -5
- package/lib/module/views/SkiaPictureView.web.js.map +1 -1
- package/lib/module/views/SkiaView.d.ts +30 -0
- package/lib/module/views/SkiaView.web.d.ts +7 -0
- package/lib/module/views/SkiaView.web.js +0 -5
- package/lib/module/views/SkiaView.web.js.map +1 -1
- package/lib/module/views/api.d.ts +5 -0
- package/lib/module/views/index.d.ts +6 -0
- package/lib/module/views/types.d.ts +91 -0
- package/lib/module/views/useDrawCallback.d.ts +8 -0
- package/lib/module/views/useTouchHandler.d.ts +22 -0
- package/lib/module/web/LoadSkiaWeb.d.ts +6 -0
- package/lib/module/web/WithSkiaWeb.d.ts +12 -0
- package/lib/module/web/index.d.ts +2 -0
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +33 -34
- package/lib/typescript/src/dom/nodes/Node.d.ts +6 -11
- package/lib/typescript/src/dom/nodes/PaintNode.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/RenderNode.d.ts +2 -3
- package/lib/typescript/src/dom/nodes/drawings/BackdropFilterNode.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +3 -1
- package/lib/typescript/src/dom/nodes/paint/BlendNode.d.ts +3 -7
- package/lib/typescript/src/dom/nodes/paint/ColorFilters.d.ts +10 -11
- package/lib/typescript/src/dom/nodes/paint/ImageFilters.d.ts +11 -11
- package/lib/typescript/src/dom/nodes/paint/MaskFilters.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/paint/PathEffects.d.ts +15 -18
- package/lib/typescript/src/dom/nodes/paint/Shaders.d.ts +11 -12
- package/lib/typescript/src/dom/types/DeclarationContext.d.ts +29 -0
- package/lib/typescript/src/dom/types/DrawingContext.d.ts +18 -1
- package/lib/typescript/src/dom/types/Node.d.ts +4 -10
- package/lib/typescript/src/dom/types/SkDOM.d.ts +22 -23
- package/lib/typescript/src/dom/types/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +4 -3
- package/lib/typescript/src/renderer/HostComponents.d.ts +35 -35
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -0
- package/lib/typescript/src/renderer/index.d.ts +0 -1
- package/lib/typescript/src/skia/types/Surface/Surface.d.ts +4 -0
- package/lib/typescript/src/skia/types/Surface/SurfaceFactory.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +2 -1
- package/package.json +5 -4
- package/src/dom/nodes/DrawingNode.ts +5 -1
- package/src/dom/nodes/LayerNode.ts +13 -11
- package/src/dom/nodes/Node.ts +18 -41
- package/src/dom/nodes/PaintContext.ts +1 -0
- package/src/dom/nodes/PaintNode.ts +28 -18
- package/src/dom/nodes/RenderNode.ts +25 -183
- package/src/dom/nodes/drawings/BackdropFilterNode.ts +18 -11
- package/src/dom/nodes/drawings/Box.ts +6 -4
- package/src/dom/nodes/paint/BlendNode.ts +16 -63
- package/src/dom/nodes/paint/ColorFilters.ts +32 -55
- package/src/dom/nodes/paint/ImageFilters.ts +58 -53
- package/src/dom/nodes/paint/MaskFilters.ts +5 -7
- package/src/dom/nodes/paint/PathEffects.ts +37 -90
- package/src/dom/nodes/paint/Shaders.ts +31 -29
- package/src/dom/types/DeclarationContext.ts +105 -0
- package/src/dom/types/DrawingContext.ts +304 -1
- package/src/dom/types/Node.ts +4 -20
- package/src/dom/types/SkDOM.ts +22 -43
- package/src/dom/types/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/renderer/Canvas.tsx +3 -3
- package/src/renderer/DrawingContext.ts +4 -5
- package/src/renderer/HostComponents.ts +34 -53
- package/src/renderer/HostConfig.ts +1 -0
- package/src/renderer/Offscreen.tsx +24 -0
- package/src/renderer/Reconciler.tsx +0 -1
- package/src/renderer/index.ts +0 -1
- package/src/skia/types/Surface/Surface.ts +5 -0
- package/src/skia/types/Surface/SurfaceFactory.ts +7 -0
- package/src/skia/web/JsiSkSurface.ts +4 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +21 -2
- package/src/views/SkiaBaseWebView.tsx +6 -2
- package/src/views/SkiaDomView.web.tsx +2 -13
- package/src/views/SkiaPictureView.web.tsx +0 -7
- package/src/views/SkiaView.web.tsx +0 -7
- package/lib/commonjs/renderer/useContextBridge.js +0 -35
- package/lib/commonjs/renderer/useContextBridge.js.map +0 -1
- package/lib/module/renderer/useContextBridge.js +0 -21
- package/lib/module/renderer/useContextBridge.js.map +0 -1
- package/lib/typescript/src/renderer/useContextBridge.d.ts +0 -5
- package/src/renderer/useContextBridge.tsx +0 -21
@@ -8,6 +8,7 @@ import {
|
|
8
8
|
import type {
|
9
9
|
BlendImageFilterProps,
|
10
10
|
BlurImageFilterProps,
|
11
|
+
DeclarationContext,
|
11
12
|
DisplacementMapImageFilterProps,
|
12
13
|
DropShadowImageFilterProps,
|
13
14
|
MorphologyImageFilterProps,
|
@@ -55,37 +56,31 @@ const MakeInnerShadow = (
|
|
55
56
|
);
|
56
57
|
};
|
57
58
|
|
58
|
-
export abstract class ImageFilterDeclaration<
|
59
|
-
P,
|
60
|
-
Nullable extends null | never = never
|
61
|
-
> extends JsiDeclarationNode<P, SkImageFilter, Nullable> {
|
59
|
+
export abstract class ImageFilterDeclaration<P> extends JsiDeclarationNode<P> {
|
62
60
|
constructor(ctx: NodeContext, type: NodeType, props: P) {
|
63
61
|
super(ctx, DeclarationType.ImageFilter, type, props);
|
64
62
|
}
|
65
63
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
if (
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
} else if (child.declarationType === DeclarationType.ColorFilter) {
|
82
|
-
return this.Skia.ImageFilter.MakeColorFilter(child.materialize(), null);
|
83
|
-
} else {
|
84
|
-
throw new Error(`Found invalid child ${child.type} in ${this.type}`);
|
85
|
-
}
|
86
|
-
} else {
|
87
|
-
throw new Error(`Found invalid child ${child.type} in ${this.type}`);
|
64
|
+
protected input(ctx: DeclarationContext) {
|
65
|
+
return ctx.imageFilters.pop() ?? null;
|
66
|
+
}
|
67
|
+
|
68
|
+
protected composeAndPush(ctx: DeclarationContext, imgf1: SkImageFilter) {
|
69
|
+
ctx.save();
|
70
|
+
this.decorateChildren(ctx);
|
71
|
+
let imgf2 = ctx.imageFilters.popAllAsOne();
|
72
|
+
const cf = ctx.colorFilters.popAllAsOne();
|
73
|
+
ctx.restore();
|
74
|
+
if (cf) {
|
75
|
+
imgf2 = this.Skia.ImageFilter.MakeCompose(
|
76
|
+
imgf2 ?? null,
|
77
|
+
this.Skia.ImageFilter.MakeColorFilter(cf, null)
|
78
|
+
);
|
88
79
|
}
|
80
|
+
const imgf = imgf2
|
81
|
+
? this.Skia.ImageFilter.MakeCompose(imgf1, imgf2)
|
82
|
+
: imgf1;
|
83
|
+
ctx.imageFilters.push(imgf);
|
89
84
|
}
|
90
85
|
}
|
91
86
|
|
@@ -94,13 +89,11 @@ export class OffsetImageFilterNode extends ImageFilterDeclaration<OffsetImageFil
|
|
94
89
|
super(ctx, NodeType.OffsetImageFilter, props);
|
95
90
|
}
|
96
91
|
|
97
|
-
|
92
|
+
decorate(ctx: DeclarationContext) {
|
93
|
+
this.decorateChildren(ctx);
|
98
94
|
const { x, y } = this.props;
|
99
|
-
|
100
|
-
|
101
|
-
y,
|
102
|
-
this.getOptionalChildInstance(0)
|
103
|
-
);
|
95
|
+
const imgf = this.Skia.ImageFilter.MakeOffset(x, y, null);
|
96
|
+
this.composeAndPush(ctx, imgf);
|
104
97
|
}
|
105
98
|
}
|
106
99
|
|
@@ -109,15 +102,16 @@ export class DisplacementMapImageFilterNode extends ImageFilterDeclaration<Displ
|
|
109
102
|
super(ctx, NodeType.DisplacementMapImageFilter, props);
|
110
103
|
}
|
111
104
|
|
112
|
-
|
105
|
+
decorate(ctx: DeclarationContext) {
|
113
106
|
const { channelX, channelY, scale } = this.props;
|
114
|
-
|
107
|
+
const imgf = this.Skia.ImageFilter.MakeDisplacementMap(
|
115
108
|
ColorChannel[enumKey(channelX)],
|
116
109
|
ColorChannel[enumKey(channelY)],
|
117
110
|
scale,
|
118
|
-
|
119
|
-
this.
|
111
|
+
ctx.imageFilters.pop()!,
|
112
|
+
this.input(ctx)
|
120
113
|
);
|
114
|
+
this.composeAndPush(ctx, imgf);
|
121
115
|
}
|
122
116
|
}
|
123
117
|
|
@@ -126,15 +120,16 @@ export class BlurImageFilterNode extends ImageFilterDeclaration<BlurImageFilterP
|
|
126
120
|
super(ctx, NodeType.BlurImageFilter, props);
|
127
121
|
}
|
128
122
|
|
129
|
-
|
123
|
+
decorate(ctx: DeclarationContext) {
|
130
124
|
const { mode, blur } = this.props;
|
131
125
|
const sigma = processRadius(this.Skia, blur);
|
132
|
-
|
126
|
+
const imgf = this.Skia.ImageFilter.MakeBlur(
|
133
127
|
sigma.x,
|
134
128
|
sigma.y,
|
135
129
|
TileMode[enumKey(mode)],
|
136
|
-
this.
|
130
|
+
this.input(ctx)
|
137
131
|
);
|
132
|
+
this.composeAndPush(ctx, imgf);
|
138
133
|
}
|
139
134
|
}
|
140
135
|
|
@@ -143,10 +138,9 @@ export class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadow
|
|
143
138
|
super(ctx, NodeType.DropShadowImageFilter, props);
|
144
139
|
}
|
145
140
|
|
146
|
-
|
141
|
+
decorate(ctx: DeclarationContext) {
|
147
142
|
const { dx, dy, blur, shadowOnly, color: cl, inner } = this.props;
|
148
143
|
const color = this.Skia.Color(cl);
|
149
|
-
const input = this.getOptionalChildInstance(0);
|
150
144
|
let factory;
|
151
145
|
if (inner) {
|
152
146
|
factory = MakeInnerShadow.bind(null, this.Skia, shadowOnly);
|
@@ -155,7 +149,8 @@ export class DropShadowImageFilterNode extends ImageFilterDeclaration<DropShadow
|
|
155
149
|
? this.Skia.ImageFilter.MakeDropShadowOnly.bind(this.Skia.ImageFilter)
|
156
150
|
: this.Skia.ImageFilter.MakeDropShadow.bind(this.Skia.ImageFilter);
|
157
151
|
}
|
158
|
-
|
152
|
+
const imgf = factory(dx, dy, blur, blur, color, this.input(ctx));
|
153
|
+
this.composeAndPush(ctx, imgf);
|
159
154
|
}
|
160
155
|
}
|
161
156
|
|
@@ -169,14 +164,16 @@ export class MorphologyImageFilterNode extends ImageFilterDeclaration<Morphology
|
|
169
164
|
super(ctx, NodeType.MorphologyImageFilter, props);
|
170
165
|
}
|
171
166
|
|
172
|
-
|
167
|
+
decorate(ctx: DeclarationContext) {
|
173
168
|
const { operator } = this.props;
|
174
169
|
const r = processRadius(this.Skia, this.props.radius);
|
175
|
-
|
170
|
+
let imgf;
|
176
171
|
if (MorphologyOperator[enumKey(operator)] === MorphologyOperator.Erode) {
|
177
|
-
|
172
|
+
imgf = this.Skia.ImageFilter.MakeErode(r.x, r.y, this.input(ctx));
|
173
|
+
} else {
|
174
|
+
imgf = this.Skia.ImageFilter.MakeDilate(r.x, r.y, this.input(ctx));
|
178
175
|
}
|
179
|
-
|
176
|
+
this.composeAndPush(ctx, imgf);
|
180
177
|
}
|
181
178
|
}
|
182
179
|
|
@@ -185,11 +182,15 @@ export class BlendImageFilterNode extends ImageFilterDeclaration<BlendImageFilte
|
|
185
182
|
super(ctx, NodeType.BlendImageFilter, props);
|
186
183
|
}
|
187
184
|
|
188
|
-
|
185
|
+
decorate(ctx: DeclarationContext) {
|
189
186
|
const { mode } = this.props;
|
190
|
-
const a =
|
191
|
-
const b =
|
192
|
-
|
187
|
+
const a = ctx.imageFilters.pop();
|
188
|
+
const b = ctx.imageFilters.pop();
|
189
|
+
if (!a || !b) {
|
190
|
+
throw new Error("BlendImageFilter requires two image filters");
|
191
|
+
}
|
192
|
+
const imgf = this.Skia.ImageFilter.MakeBlend(mode, a, b);
|
193
|
+
this.composeAndPush(ctx, imgf);
|
193
194
|
}
|
194
195
|
}
|
195
196
|
|
@@ -198,13 +199,17 @@ export class RuntimeShaderImageFilterNode extends ImageFilterDeclaration<Runtime
|
|
198
199
|
super(ctx, NodeType.RuntimeShaderImageFilter, props);
|
199
200
|
}
|
200
201
|
|
201
|
-
|
202
|
+
decorate(ctx: DeclarationContext) {
|
202
203
|
const { source, uniforms } = this.props;
|
203
204
|
const rtb = this.Skia.RuntimeShaderBuilder(source);
|
204
205
|
if (uniforms) {
|
205
206
|
processUniforms(source, uniforms, rtb);
|
206
207
|
}
|
207
|
-
const
|
208
|
-
|
208
|
+
const imgf = this.Skia.ImageFilter.MakeRuntimeShader(
|
209
|
+
rtb,
|
210
|
+
null,
|
211
|
+
this.input(ctx)
|
212
|
+
);
|
213
|
+
this.composeAndPush(ctx, imgf);
|
209
214
|
}
|
210
215
|
}
|
@@ -1,25 +1,23 @@
|
|
1
|
-
import type { SkMaskFilter } from "../../../skia/types";
|
2
1
|
import { BlurStyle } from "../../../skia/types";
|
3
2
|
import type { NodeContext } from "../Node";
|
4
3
|
import { JsiDeclarationNode } from "../Node";
|
5
4
|
import type { BlurMaskFilterProps } from "../../types";
|
6
5
|
import { DeclarationType, NodeType } from "../../types";
|
7
6
|
import { enumKey } from "../datatypes";
|
7
|
+
import type { DeclarationContext } from "../../types/DeclarationContext";
|
8
8
|
|
9
|
-
export class BlurMaskFilterNode extends JsiDeclarationNode<
|
10
|
-
BlurMaskFilterProps,
|
11
|
-
SkMaskFilter
|
12
|
-
> {
|
9
|
+
export class BlurMaskFilterNode extends JsiDeclarationNode<BlurMaskFilterProps> {
|
13
10
|
constructor(ctx: NodeContext, props: BlurMaskFilterProps) {
|
14
11
|
super(ctx, DeclarationType.MaskFilter, NodeType.BlurMaskFilter, props);
|
15
12
|
}
|
16
13
|
|
17
|
-
|
14
|
+
decorate(ctx: DeclarationContext) {
|
18
15
|
const { style, blur, respectCTM } = this.props;
|
19
|
-
|
16
|
+
const mf = this.Skia.MaskFilter.MakeBlur(
|
20
17
|
BlurStyle[enumKey(style)],
|
21
18
|
blur,
|
22
19
|
respectCTM
|
23
20
|
);
|
21
|
+
ctx.maskFilters.push(mf);
|
24
22
|
}
|
25
23
|
}
|
@@ -7,71 +7,27 @@ import type {
|
|
7
7
|
DashPathEffectProps,
|
8
8
|
DiscretePathEffectProps,
|
9
9
|
Line2DPathEffectProps,
|
10
|
-
Node,
|
11
10
|
Path1DPathEffectProps,
|
12
11
|
Path2DPathEffectProps,
|
13
12
|
} from "../../types";
|
14
13
|
import { DeclarationType, NodeType } from "../../types";
|
15
14
|
import { enumKey } from "../datatypes/Enum";
|
16
15
|
import { processPath } from "../datatypes";
|
16
|
+
import type { DeclarationContext } from "../../types/DeclarationContext";
|
17
|
+
import { composeDeclarations } from "../../types/DeclarationContext";
|
17
18
|
|
18
|
-
abstract class PathEffectDeclaration<
|
19
|
-
P,
|
20
|
-
Nullable extends null | never = never
|
21
|
-
> extends JsiDeclarationNode<P, SkPathEffect, Nullable> {
|
19
|
+
abstract class PathEffectDeclaration<P> extends JsiDeclarationNode<P> {
|
22
20
|
constructor(ctx: NodeContext, type: NodeType, props: P) {
|
23
21
|
super(ctx, DeclarationType.PathEffect, type, props);
|
24
22
|
}
|
25
23
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
insertChildBefore(child: Node<unknown>, before: Node<unknown>): void {
|
34
|
-
if (!(child instanceof PathEffectDeclaration)) {
|
35
|
-
throw new Error(`Cannot add child of type ${child.type} to ${this.type}`);
|
36
|
-
}
|
37
|
-
super.insertChildBefore(child, before);
|
38
|
-
}
|
39
|
-
|
40
|
-
compose(pe: SkPathEffect) {
|
41
|
-
const children = this._children as PathEffectDeclaration<unknown>[];
|
42
|
-
if (this._children.length === 0) {
|
43
|
-
return pe;
|
44
|
-
} else {
|
45
|
-
return this.Skia.PathEffect.MakeCompose(
|
46
|
-
pe,
|
47
|
-
children.reduce<SkPathEffect | null>((acc, child) => {
|
48
|
-
if (acc === null) {
|
49
|
-
return child.materialize();
|
50
|
-
}
|
51
|
-
return this.Skia.PathEffect.MakeCompose(acc, child.materialize());
|
52
|
-
}, null) as SkPathEffect
|
53
|
-
);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
getOptionalChildInstance(index: number) {
|
57
|
-
const child = this._children[index];
|
58
|
-
if (!child) {
|
59
|
-
return null;
|
60
|
-
}
|
61
|
-
return this.getMandatoryChildInstance(index);
|
62
|
-
}
|
63
|
-
|
64
|
-
getMandatoryChildInstance(index: number) {
|
65
|
-
const child = this._children[index];
|
66
|
-
if (child instanceof JsiDeclarationNode) {
|
67
|
-
if (child.isPathEffect()) {
|
68
|
-
return child.materialize();
|
69
|
-
} else {
|
70
|
-
throw new Error(`Found invalid child ${child.type} in ${this.type}`);
|
71
|
-
}
|
72
|
-
} else {
|
73
|
-
throw new Error(`Found invalid child ${child.type} in ${this.type}`);
|
74
|
-
}
|
24
|
+
protected composeAndPush(ctx: DeclarationContext, pe1: SkPathEffect) {
|
25
|
+
ctx.save();
|
26
|
+
this.decorateChildren(ctx);
|
27
|
+
const pe2 = ctx.pathEffects.popAllAsOne();
|
28
|
+
ctx.restore();
|
29
|
+
const pe = pe2 ? this.Skia.PathEffect.MakeCompose(pe1, pe2) : pe1;
|
30
|
+
ctx.pathEffects.push(pe);
|
75
31
|
}
|
76
32
|
}
|
77
33
|
|
@@ -80,29 +36,26 @@ export class DiscretePathEffectNode extends PathEffectDeclaration<DiscretePathEf
|
|
80
36
|
super(ctx, NodeType.DiscretePathEffect, props);
|
81
37
|
}
|
82
38
|
|
83
|
-
|
39
|
+
decorate(ctx: DeclarationContext) {
|
84
40
|
const { length, deviation, seed } = this.props;
|
85
41
|
const pe = this.Skia.PathEffect.MakeDiscrete(length, deviation, seed);
|
86
|
-
|
42
|
+
this.composeAndPush(ctx, pe);
|
87
43
|
}
|
88
44
|
}
|
89
45
|
|
90
|
-
export class Path2DPathEffectNode extends PathEffectDeclaration<
|
91
|
-
Path2DPathEffectProps,
|
92
|
-
null
|
93
|
-
> {
|
46
|
+
export class Path2DPathEffectNode extends PathEffectDeclaration<Path2DPathEffectProps> {
|
94
47
|
constructor(ctx: NodeContext, props: Path2DPathEffectProps) {
|
95
48
|
super(ctx, NodeType.Path2DPathEffect, props);
|
96
49
|
}
|
97
50
|
|
98
|
-
|
51
|
+
decorate(ctx: DeclarationContext) {
|
99
52
|
const { matrix } = this.props;
|
100
53
|
const path = processPath(this.Skia, this.props.path);
|
101
54
|
const pe = this.Skia.PathEffect.MakePath2D(matrix, path);
|
102
55
|
if (pe === null) {
|
103
|
-
|
56
|
+
throw new Error("Path2DPathEffectNode: invalid path");
|
104
57
|
}
|
105
|
-
|
58
|
+
this.composeAndPush(ctx, pe);
|
106
59
|
}
|
107
60
|
}
|
108
61
|
|
@@ -111,28 +64,25 @@ export class DashPathEffectNode extends PathEffectDeclaration<DashPathEffectProp
|
|
111
64
|
super(ctx, NodeType.DashPathEffect, props);
|
112
65
|
}
|
113
66
|
|
114
|
-
|
67
|
+
decorate(ctx: DeclarationContext) {
|
115
68
|
const { intervals, phase } = this.props;
|
116
69
|
const pe = this.Skia.PathEffect.MakeDash(intervals, phase);
|
117
|
-
|
70
|
+
this.composeAndPush(ctx, pe);
|
118
71
|
}
|
119
72
|
}
|
120
73
|
|
121
|
-
export class CornerPathEffectNode extends PathEffectDeclaration<
|
122
|
-
CornerPathEffectProps,
|
123
|
-
null
|
124
|
-
> {
|
74
|
+
export class CornerPathEffectNode extends PathEffectDeclaration<CornerPathEffectProps> {
|
125
75
|
constructor(ctx: NodeContext, props: CornerPathEffectProps) {
|
126
76
|
super(ctx, NodeType.CornerPathEffect, props);
|
127
77
|
}
|
128
78
|
|
129
|
-
|
79
|
+
decorate(ctx: DeclarationContext) {
|
130
80
|
const { r } = this.props;
|
131
81
|
const pe = this.Skia.PathEffect.MakeCorner(r);
|
132
82
|
if (pe === null) {
|
133
|
-
|
83
|
+
throw new Error("CornerPathEffectNode: couldn't create path effect");
|
134
84
|
}
|
135
|
-
|
85
|
+
this.composeAndPush(ctx, pe);
|
136
86
|
}
|
137
87
|
}
|
138
88
|
|
@@ -141,41 +91,38 @@ export class SumPathEffectNode extends PathEffectDeclaration<null> {
|
|
141
91
|
super(ctx, NodeType.SumPathEffect, null);
|
142
92
|
}
|
143
93
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
94
|
+
decorate(ctx: DeclarationContext) {
|
95
|
+
this.decorateChildren(ctx);
|
96
|
+
const pes = ctx.pathEffects.popAll();
|
97
|
+
const pe = composeDeclarations(
|
98
|
+
pes,
|
99
|
+
this.Skia.PathEffect.MakeSum.bind(this.Skia.PathEffect)
|
148
100
|
);
|
101
|
+
ctx.pathEffects.push(pe);
|
149
102
|
}
|
150
103
|
}
|
151
104
|
|
152
|
-
export class Line2DPathEffectNode extends PathEffectDeclaration<
|
153
|
-
Line2DPathEffectProps,
|
154
|
-
null
|
155
|
-
> {
|
105
|
+
export class Line2DPathEffectNode extends PathEffectDeclaration<Line2DPathEffectProps> {
|
156
106
|
constructor(ctx: NodeContext, props: Line2DPathEffectProps) {
|
157
107
|
super(ctx, NodeType.Line2DPathEffect, props);
|
158
108
|
}
|
159
109
|
|
160
|
-
|
110
|
+
decorate(ctx: DeclarationContext) {
|
161
111
|
const { width, matrix } = this.props;
|
162
112
|
const pe = this.Skia.PathEffect.MakeLine2D(width, matrix);
|
163
113
|
if (pe === null) {
|
164
|
-
|
114
|
+
throw new Error("Line2DPathEffectNode: could not create path effect");
|
165
115
|
}
|
166
|
-
|
116
|
+
this.composeAndPush(ctx, pe);
|
167
117
|
}
|
168
118
|
}
|
169
119
|
|
170
|
-
export class Path1DPathEffectNode extends PathEffectDeclaration<
|
171
|
-
Path1DPathEffectProps,
|
172
|
-
null
|
173
|
-
> {
|
120
|
+
export class Path1DPathEffectNode extends PathEffectDeclaration<Path1DPathEffectProps> {
|
174
121
|
constructor(ctx: NodeContext, props: Path1DPathEffectProps) {
|
175
122
|
super(ctx, NodeType.Path1DPathEffect, props);
|
176
123
|
}
|
177
124
|
|
178
|
-
|
125
|
+
decorate(ctx: DeclarationContext) {
|
179
126
|
const { advance, phase, style } = this.props;
|
180
127
|
const path = processPath(this.Skia, this.props.path);
|
181
128
|
const pe = this.Skia.PathEffect.MakePath1D(
|
@@ -185,8 +132,8 @@ export class Path1DPathEffectNode extends PathEffectDeclaration<
|
|
185
132
|
Path1DEffectStyle[enumKey(style)]
|
186
133
|
);
|
187
134
|
if (pe === null) {
|
188
|
-
|
135
|
+
throw new Error("Path1DPathEffectNode: could not create path effect");
|
189
136
|
}
|
190
|
-
|
137
|
+
this.composeAndPush(ctx, pe);
|
191
138
|
}
|
192
139
|
}
|
@@ -4,11 +4,11 @@ import {
|
|
4
4
|
MipmapMode,
|
5
5
|
TileMode,
|
6
6
|
} from "../../../skia/types";
|
7
|
-
import type { SkShader } from "../../../skia/types";
|
8
7
|
import type { NodeContext } from "../Node";
|
9
8
|
import { JsiDeclarationNode } from "../Node";
|
10
9
|
import type {
|
11
10
|
ColorProps,
|
11
|
+
DeclarationContext,
|
12
12
|
FractalNoiseProps,
|
13
13
|
ImageShaderProps,
|
14
14
|
LinearGradientProps,
|
@@ -28,10 +28,7 @@ import {
|
|
28
28
|
rect2rect,
|
29
29
|
} from "../datatypes";
|
30
30
|
|
31
|
-
export abstract class ShaderDeclaration<P> extends JsiDeclarationNode<
|
32
|
-
P,
|
33
|
-
SkShader
|
34
|
-
> {
|
31
|
+
export abstract class ShaderDeclaration<P> extends JsiDeclarationNode<P> {
|
35
32
|
constructor(ctx: NodeContext, type: NodeType, props: P) {
|
36
33
|
super(ctx, DeclarationType.Shader, type, props);
|
37
34
|
}
|
@@ -42,20 +39,17 @@ export class ShaderNode extends ShaderDeclaration<ShaderProps> {
|
|
42
39
|
super(ctx, NodeType.Shader, props);
|
43
40
|
}
|
44
41
|
|
45
|
-
|
42
|
+
decorate(ctx: DeclarationContext) {
|
43
|
+
this.decorateChildren(ctx);
|
46
44
|
const { source, uniforms, ...transform } = this.props;
|
47
45
|
const m3 = this.Skia.Matrix();
|
48
46
|
processTransformProps(m3, transform);
|
49
|
-
|
47
|
+
const shader = source.makeShaderWithChildren(
|
50
48
|
processUniforms(source, uniforms),
|
51
|
-
|
52
|
-
.filter(
|
53
|
-
(child): child is JsiDeclarationNode<unknown, SkShader> =>
|
54
|
-
child instanceof JsiDeclarationNode && child.isShader()
|
55
|
-
)
|
56
|
-
.map((child) => child.materialize()),
|
49
|
+
ctx.shaders.popAll(),
|
57
50
|
m3
|
58
51
|
);
|
52
|
+
ctx.shaders.push(shader);
|
59
53
|
}
|
60
54
|
}
|
61
55
|
|
@@ -64,7 +58,7 @@ export class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {
|
|
64
58
|
super(ctx, NodeType.ImageShader, props);
|
65
59
|
}
|
66
60
|
|
67
|
-
|
61
|
+
decorate(ctx: DeclarationContext) {
|
68
62
|
const { fit, image, tx, ty, fm, mm, ...imageShaderProps } = this.props;
|
69
63
|
const rct = getRect(this.Skia, imageShaderProps);
|
70
64
|
const m3 = this.Skia.Matrix();
|
@@ -81,13 +75,14 @@ export class ImageShaderNode extends ShaderDeclaration<ImageShaderProps> {
|
|
81
75
|
const lm = this.Skia.Matrix();
|
82
76
|
lm.concat(m3);
|
83
77
|
processTransformProps(lm, imageShaderProps);
|
84
|
-
|
78
|
+
const shader = image.makeShaderOptions(
|
85
79
|
TileMode[enumKey(tx)],
|
86
80
|
TileMode[enumKey(ty)],
|
87
81
|
FilterMode[enumKey(fm)],
|
88
82
|
MipmapMode[enumKey(mm)],
|
89
83
|
lm
|
90
84
|
);
|
85
|
+
ctx.shaders.push(shader);
|
91
86
|
}
|
92
87
|
}
|
93
88
|
|
@@ -96,9 +91,10 @@ export class ColorNode extends ShaderDeclaration<ColorProps> {
|
|
96
91
|
super(ctx, NodeType.ColorShader, props);
|
97
92
|
}
|
98
93
|
|
99
|
-
|
94
|
+
decorate(ctx: DeclarationContext) {
|
100
95
|
const { color } = this.props;
|
101
|
-
|
96
|
+
const shader = this.Skia.Shader.MakeColor(this.Skia.Color(color));
|
97
|
+
ctx.shaders.push(shader);
|
102
98
|
}
|
103
99
|
}
|
104
100
|
|
@@ -107,9 +103,9 @@ export class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {
|
|
107
103
|
super(ctx, NodeType.Turbulence, props);
|
108
104
|
}
|
109
105
|
|
110
|
-
|
106
|
+
decorate(ctx: DeclarationContext) {
|
111
107
|
const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;
|
112
|
-
|
108
|
+
const shader = this.Skia.Shader.MakeTurbulence(
|
113
109
|
freqX,
|
114
110
|
freqY,
|
115
111
|
octaves,
|
@@ -117,6 +113,7 @@ export class TurbulenceNode extends ShaderDeclaration<TurbulenceProps> {
|
|
117
113
|
tileWidth,
|
118
114
|
tileHeight
|
119
115
|
);
|
116
|
+
ctx.shaders.push(shader);
|
120
117
|
}
|
121
118
|
}
|
122
119
|
|
@@ -125,9 +122,9 @@ export class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {
|
|
125
122
|
super(ctx, NodeType.FractalNoise, props);
|
126
123
|
}
|
127
124
|
|
128
|
-
|
125
|
+
decorate(ctx: DeclarationContext) {
|
129
126
|
const { freqX, freqY, octaves, seed, tileWidth, tileHeight } = this.props;
|
130
|
-
|
127
|
+
const shader = this.Skia.Shader.MakeFractalNoise(
|
131
128
|
freqX,
|
132
129
|
freqY,
|
133
130
|
octaves,
|
@@ -135,6 +132,7 @@ export class FractalNoiseNode extends ShaderDeclaration<FractalNoiseProps> {
|
|
135
132
|
tileWidth,
|
136
133
|
tileHeight
|
137
134
|
);
|
135
|
+
ctx.shaders.push(shader);
|
138
136
|
}
|
139
137
|
}
|
140
138
|
|
@@ -143,11 +141,11 @@ export class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {
|
|
143
141
|
super(ctx, NodeType.LinearGradient, props);
|
144
142
|
}
|
145
143
|
|
146
|
-
|
144
|
+
decorate(ctx: DeclarationContext) {
|
147
145
|
const { start, end } = this.props;
|
148
146
|
const { colors, positions, mode, localMatrix, flags } =
|
149
147
|
processGradientProps(this.Skia, this.props);
|
150
|
-
|
148
|
+
const shader = this.Skia.Shader.MakeLinearGradient(
|
151
149
|
start,
|
152
150
|
end,
|
153
151
|
colors,
|
@@ -156,6 +154,7 @@ export class LinearGradientNode extends ShaderDeclaration<LinearGradientProps> {
|
|
156
154
|
localMatrix,
|
157
155
|
flags
|
158
156
|
);
|
157
|
+
ctx.shaders.push(shader);
|
159
158
|
}
|
160
159
|
}
|
161
160
|
|
@@ -164,11 +163,11 @@ export class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {
|
|
164
163
|
super(ctx, NodeType.RadialGradient, props);
|
165
164
|
}
|
166
165
|
|
167
|
-
|
166
|
+
decorate(ctx: DeclarationContext) {
|
168
167
|
const { c, r } = this.props;
|
169
168
|
const { colors, positions, mode, localMatrix, flags } =
|
170
169
|
processGradientProps(this.Skia, this.props);
|
171
|
-
|
170
|
+
const shader = this.Skia.Shader.MakeRadialGradient(
|
172
171
|
c,
|
173
172
|
r,
|
174
173
|
colors,
|
@@ -177,6 +176,7 @@ export class RadialGradientNode extends ShaderDeclaration<RadialGradientProps> {
|
|
177
176
|
localMatrix,
|
178
177
|
flags
|
179
178
|
);
|
179
|
+
ctx.shaders.push(shader);
|
180
180
|
}
|
181
181
|
}
|
182
182
|
|
@@ -185,11 +185,11 @@ export class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {
|
|
185
185
|
super(ctx, NodeType.SweepGradient, props);
|
186
186
|
}
|
187
187
|
|
188
|
-
|
188
|
+
decorate(ctx: DeclarationContext) {
|
189
189
|
const { c, start, end } = this.props;
|
190
190
|
const { colors, positions, mode, localMatrix, flags } =
|
191
191
|
processGradientProps(this.Skia, this.props);
|
192
|
-
|
192
|
+
const shader = this.Skia.Shader.MakeSweepGradient(
|
193
193
|
c.x,
|
194
194
|
c.y,
|
195
195
|
colors,
|
@@ -200,6 +200,7 @@ export class SweepGradientNode extends ShaderDeclaration<SweepGradientProps> {
|
|
200
200
|
start,
|
201
201
|
end
|
202
202
|
);
|
203
|
+
ctx.shaders.push(shader);
|
203
204
|
}
|
204
205
|
}
|
205
206
|
|
@@ -208,11 +209,11 @@ export class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConic
|
|
208
209
|
super(ctx, NodeType.TwoPointConicalGradient, props);
|
209
210
|
}
|
210
211
|
|
211
|
-
|
212
|
+
decorate(ctx: DeclarationContext) {
|
212
213
|
const { startR, endR, start, end } = this.props;
|
213
214
|
const { colors, positions, mode, localMatrix, flags } =
|
214
215
|
processGradientProps(this.Skia, this.props);
|
215
|
-
|
216
|
+
const shader = this.Skia.Shader.MakeTwoPointConicalGradient(
|
216
217
|
start,
|
217
218
|
startR,
|
218
219
|
end,
|
@@ -223,5 +224,6 @@ export class TwoPointConicalGradientNode extends ShaderDeclaration<TwoPointConic
|
|
223
224
|
localMatrix,
|
224
225
|
flags
|
225
226
|
);
|
227
|
+
ctx.shaders.push(shader);
|
226
228
|
}
|
227
229
|
}
|