@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
@@ -0,0 +1,180 @@
|
|
1
|
+
import type { SkJSIInstance } from "../JsiInstance";
|
2
|
+
import type { SkPaint } from "../Paint";
|
3
|
+
import type { SkRect } from "../Rect";
|
4
|
+
import type { SkPoint } from "../Point";
|
5
|
+
import type { SkTypeface } from "../Typeface";
|
6
|
+
export interface FontMetrics {
|
7
|
+
ascent: number;
|
8
|
+
descent: number;
|
9
|
+
leading: number;
|
10
|
+
bounds?: SkRect;
|
11
|
+
}
|
12
|
+
export interface SkFont extends SkJSIInstance<"Font"> {
|
13
|
+
/**
|
14
|
+
* Retrieves the total width of the provided text
|
15
|
+
* @param text
|
16
|
+
* @param paint
|
17
|
+
*/
|
18
|
+
getTextWidth(text: string, paint?: SkPaint): number;
|
19
|
+
/**
|
20
|
+
* Retrieves the advanceX measurements for each glyph.
|
21
|
+
* If paint is not null, its stroking, PathEffect, and MaskFilter fields are respected.
|
22
|
+
* One width per glyph is returned in the returned array.
|
23
|
+
* @param glyphs
|
24
|
+
* @param paint
|
25
|
+
*/
|
26
|
+
getGlyphWidths(glyphs: number[], paint?: SkPaint): number[];
|
27
|
+
/**
|
28
|
+
* Returns the FontMetrics for this font.
|
29
|
+
*/
|
30
|
+
getMetrics(): FontMetrics;
|
31
|
+
/**
|
32
|
+
* Retrieves the glyph ids for each code point in the provided string. This call is passed to
|
33
|
+
* the typeface of this font. Note that glyph IDs are typeface-dependent; different faces
|
34
|
+
* may have different ids for the same code point.
|
35
|
+
* @param str
|
36
|
+
* @param numCodePoints - the number of code points in the string. Defaults to str.length.
|
37
|
+
*/
|
38
|
+
getGlyphIDs(str: string, numCodePoints?: number): number[];
|
39
|
+
/**
|
40
|
+
* Computes any intersections of a thick "line" and a run of positionsed glyphs.
|
41
|
+
* The thick line is represented as a top and bottom coordinate (positive for
|
42
|
+
* below the baseline, negative for above). If there are no intersections
|
43
|
+
* (e.g. if this is intended as an underline, and there are no "collisions")
|
44
|
+
* then the returned array will be empty. If there are intersections, the array
|
45
|
+
* will contain pairs of X coordinates [start, end] for each segment that
|
46
|
+
* intersected with a glyph.
|
47
|
+
*
|
48
|
+
* @param glyphs the glyphs to intersect with
|
49
|
+
* @param positions x,y coordinates (2 per glyph) for each glyph
|
50
|
+
* @param top top of the thick "line" to use for intersection testing
|
51
|
+
* @param bottom bottom of the thick "line" to use for intersection testing
|
52
|
+
* @return array of [start, end] x-coordinate pairs. Maybe be empty.
|
53
|
+
*/
|
54
|
+
getGlyphIntercepts(glyphs: number[], positions: SkPoint[], top: number, bottom: number): number[];
|
55
|
+
/**
|
56
|
+
* Returns text scale on x-axis. Default value is 1.
|
57
|
+
*/
|
58
|
+
getScaleX(): number;
|
59
|
+
/**
|
60
|
+
* Returns text size in points.
|
61
|
+
*/
|
62
|
+
getSize(): number;
|
63
|
+
/**
|
64
|
+
* Returns text skew on x-axis. Default value is zero.
|
65
|
+
*/
|
66
|
+
getSkewX(): number;
|
67
|
+
/**
|
68
|
+
* Returns embolden effect for this font. Default value is false.
|
69
|
+
*/
|
70
|
+
isEmbolden(): boolean;
|
71
|
+
/**
|
72
|
+
* Returns the Typeface set for this font.
|
73
|
+
*/
|
74
|
+
getTypeface(): SkTypeface | null;
|
75
|
+
/**
|
76
|
+
* Requests, but does not require, that edge pixels draw opaque or with partial transparency.
|
77
|
+
* @param edging
|
78
|
+
*/
|
79
|
+
setEdging(edging: FontEdging): void;
|
80
|
+
/**
|
81
|
+
* Requests, but does not require, to use bitmaps in fonts instead of outlines.
|
82
|
+
* @param embeddedBitmaps
|
83
|
+
*/
|
84
|
+
setEmbeddedBitmaps(embeddedBitmaps: boolean): void;
|
85
|
+
/**
|
86
|
+
* Sets level of glyph outline adjustment.
|
87
|
+
* @param hinting
|
88
|
+
*/
|
89
|
+
setHinting(hinting: FontHinting): void;
|
90
|
+
/**
|
91
|
+
* Requests, but does not require, linearly scalable font and glyph metrics.
|
92
|
+
*
|
93
|
+
* For outline fonts 'true' means font and glyph metrics should ignore hinting and rounding.
|
94
|
+
* Note that some bitmap formats may not be able to scale linearly and will ignore this flag.
|
95
|
+
* @param linearMetrics
|
96
|
+
*/
|
97
|
+
setLinearMetrics(linearMetrics: boolean): void;
|
98
|
+
/**
|
99
|
+
* Sets the text scale on the x-axis.
|
100
|
+
* @param sx
|
101
|
+
*/
|
102
|
+
setScaleX(sx: number): void;
|
103
|
+
/**
|
104
|
+
* Sets the text size in points on this font.
|
105
|
+
* @param points
|
106
|
+
*/
|
107
|
+
setSize(points: number): void;
|
108
|
+
/**
|
109
|
+
* Sets the text-skew on the x axis for this font.
|
110
|
+
* @param sx
|
111
|
+
*/
|
112
|
+
setSkewX(sx: number): void;
|
113
|
+
/**
|
114
|
+
* Set embolden effect for this font.
|
115
|
+
* @param embolden
|
116
|
+
*/
|
117
|
+
setEmbolden(embolden: boolean): void;
|
118
|
+
/**
|
119
|
+
* Requests, but does not require, that glyphs respect sub-pixel positioning.
|
120
|
+
* @param subpixel
|
121
|
+
*/
|
122
|
+
setSubpixel(subpixel: boolean): void;
|
123
|
+
/**
|
124
|
+
* Sets the typeface to use with this font. null means to clear the typeface and use the
|
125
|
+
* default one.
|
126
|
+
* @param face
|
127
|
+
*/
|
128
|
+
setTypeface(face: SkTypeface | null): void;
|
129
|
+
}
|
130
|
+
export interface FontStyle {
|
131
|
+
weight?: FontWeight;
|
132
|
+
width?: FontWidth;
|
133
|
+
slant?: FontSlant;
|
134
|
+
}
|
135
|
+
export declare enum FontWeight {
|
136
|
+
Invisible = 0,
|
137
|
+
Thin = 100,
|
138
|
+
ExtraLight = 200,
|
139
|
+
Light = 300,
|
140
|
+
Normal = 400,
|
141
|
+
Medium = 500,
|
142
|
+
SemiBold = 600,
|
143
|
+
Bold = 700,
|
144
|
+
ExtraBold = 800,
|
145
|
+
Black = 900,
|
146
|
+
ExtraBlack = 1000
|
147
|
+
}
|
148
|
+
export declare enum FontWidth {
|
149
|
+
UltraCondensed = 1,
|
150
|
+
ExtraCondensed = 2,
|
151
|
+
Condensed = 3,
|
152
|
+
SemiCondensed = 4,
|
153
|
+
Normal = 5,
|
154
|
+
SemiExpanded = 6,
|
155
|
+
Expanded = 7,
|
156
|
+
ExtraExpanded = 8,
|
157
|
+
UltraExpanded = 9
|
158
|
+
}
|
159
|
+
export declare enum FontSlant {
|
160
|
+
Upright = 0,
|
161
|
+
Italic = 1,
|
162
|
+
Oblique = 2
|
163
|
+
}
|
164
|
+
export declare enum FontEdging {
|
165
|
+
Alias = 0,
|
166
|
+
AntiAlias = 1,
|
167
|
+
SubpixelAntiAlias = 2
|
168
|
+
}
|
169
|
+
export declare enum FontHinting {
|
170
|
+
None = 0,
|
171
|
+
Slight = 1,
|
172
|
+
Normal = 2,
|
173
|
+
Full = 3
|
174
|
+
}
|
175
|
+
export declare const FontStyle: {
|
176
|
+
Normal: FontStyle;
|
177
|
+
Bold: FontStyle;
|
178
|
+
Italic: FontStyle;
|
179
|
+
BoldItalic: FontStyle;
|
180
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./Font";
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import type { SkMatrix } from "../Matrix";
|
2
|
+
import type { SkJSIInstance } from "../JsiInstance";
|
3
|
+
import type { TileMode } from "../ImageFilter";
|
4
|
+
import type { SkShader } from "../Shader";
|
5
|
+
export declare enum FilterMode {
|
6
|
+
Nearest = 0,
|
7
|
+
Linear = 1
|
8
|
+
}
|
9
|
+
export declare enum MipmapMode {
|
10
|
+
None = 0,
|
11
|
+
Nearest = 1,
|
12
|
+
Linear = 2
|
13
|
+
}
|
14
|
+
export declare enum ImageFormat {
|
15
|
+
JPEG = 3,
|
16
|
+
PNG = 4,
|
17
|
+
WEBP = 6
|
18
|
+
}
|
19
|
+
export interface SkImage extends SkJSIInstance<"Image"> {
|
20
|
+
/**
|
21
|
+
* Returns the possibly scaled height of the image.
|
22
|
+
*/
|
23
|
+
height(): number;
|
24
|
+
/**
|
25
|
+
* Returns the possibly scaled width of the image.
|
26
|
+
*/
|
27
|
+
width(): number;
|
28
|
+
/**
|
29
|
+
* Returns this image as a shader with the specified tiling. It will use cubic sampling.
|
30
|
+
* @param tx - tile mode in the x direction.
|
31
|
+
* @param ty - tile mode in the y direction.
|
32
|
+
* @param fm - The filter mode. (default nearest)
|
33
|
+
* @param mm - The mipmap mode. Note: for settings other than None, the image must have mipmaps (default none)
|
34
|
+
* calculated with makeCopyWithDefaultMipmaps;
|
35
|
+
* @param localMatrix
|
36
|
+
*/
|
37
|
+
makeShaderOptions(tx: TileMode, ty: TileMode, fm: FilterMode, mm: MipmapMode, localMatrix?: SkMatrix): SkShader;
|
38
|
+
/**
|
39
|
+
* Returns this image as a shader with the specified tiling. It will use cubic sampling.
|
40
|
+
* @param tx - tile mode in the x direction.
|
41
|
+
* @param ty - tile mode in the y direction.
|
42
|
+
* @param B - See CubicResampler in SkSamplingOptions.h for more information
|
43
|
+
* @param C - See CubicResampler in SkSamplingOptions.h for more information
|
44
|
+
* @param localMatrix
|
45
|
+
*/
|
46
|
+
makeShaderCubic(tx: TileMode, ty: TileMode, B: number, C: number, localMatrix?: SkMatrix): SkShader;
|
47
|
+
/** Encodes Image pixels, returning result as UInt8Array. Returns existing
|
48
|
+
encoded data if present; otherwise, SkImage is encoded with
|
49
|
+
SkEncodedImageFormat::kPNG. Skia must be built with SK_ENCODE_PNG to encode
|
50
|
+
SkImage.
|
51
|
+
|
52
|
+
Returns nullptr if existing encoded data is missing or invalid, and
|
53
|
+
encoding fails.
|
54
|
+
|
55
|
+
@param fmt - PNG is the default value.
|
56
|
+
@param quality - a value from 0 to 100; 100 is the least lossy. May be ignored.
|
57
|
+
|
58
|
+
@return Uint8Array with data
|
59
|
+
*/
|
60
|
+
encodeToBytes(fmt?: ImageFormat, quality?: number): Uint8Array;
|
61
|
+
/** Encodes Image pixels, returning result as a base64 encoded string. Returns existing
|
62
|
+
encoded data if present; otherwise, SkImage is encoded with
|
63
|
+
SkEncodedImageFormat::kPNG. Skia must be built with SK_ENCODE_PNG to encode
|
64
|
+
SkImage.
|
65
|
+
|
66
|
+
Returns nullptr if existing encoded data is missing or invalid, and
|
67
|
+
encoding fails.
|
68
|
+
|
69
|
+
@param fmt - PNG is the default value.
|
70
|
+
@param quality - a value from 0 to 100; 100 is the least lossy. May be ignored.
|
71
|
+
|
72
|
+
@return base64 encoded string of data
|
73
|
+
*/
|
74
|
+
encodeToBase64(fmt?: ImageFormat, quality?: number): string;
|
75
|
+
}
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import type { SkData } from "../Data";
|
2
|
+
import type { SkImage } from "./Image";
|
3
|
+
export declare enum AlphaType {
|
4
|
+
Unknown = 0,
|
5
|
+
Opaque = 1,
|
6
|
+
Premul = 2,
|
7
|
+
Unpremul = 3
|
8
|
+
}
|
9
|
+
export declare enum ColorType {
|
10
|
+
Unknown = 0,
|
11
|
+
Alpha_8 = 1,
|
12
|
+
RGB_565 = 2,
|
13
|
+
ARGB_4444 = 3,
|
14
|
+
RGBA_8888 = 4,
|
15
|
+
RGB_888x = 5,
|
16
|
+
BGRA_8888 = 6,
|
17
|
+
RGBA_1010102 = 7,
|
18
|
+
BGRA_1010102 = 8,
|
19
|
+
RGB_101010x = 9,
|
20
|
+
BGR_101010x = 10,
|
21
|
+
Gray_8 = 11,
|
22
|
+
RGBA_F16Norm = 12,
|
23
|
+
RGBA_F16 = 13,
|
24
|
+
RGBA_F32 = 14,
|
25
|
+
R8G8_unorm = 15,
|
26
|
+
A16_float = 16,
|
27
|
+
R16G16_float = 17,
|
28
|
+
A16_unorm = 18,
|
29
|
+
R16G16_unorm = 19,
|
30
|
+
R16G16B16A16_unorm = 20,
|
31
|
+
SRGBA_8888 = 21
|
32
|
+
}
|
33
|
+
export interface ImageInfo {
|
34
|
+
alphaType: AlphaType;
|
35
|
+
colorType: ColorType;
|
36
|
+
height: number;
|
37
|
+
width: number;
|
38
|
+
}
|
39
|
+
export interface ImageFactory {
|
40
|
+
/**
|
41
|
+
* Return an Image backed by the encoded data, but attempt to defer decoding until the image
|
42
|
+
* is actually used/drawn. This deferral allows the system to cache the result, either on the
|
43
|
+
* CPU or on the GPU, depending on where the image is drawn.
|
44
|
+
* This decoding uses the codecs that have been compiled into CanvasKit. If the bytes are
|
45
|
+
* invalid (or an unrecognized codec), null will be returned. See Image.h for more details.
|
46
|
+
* @param data - Data object with bytes of data
|
47
|
+
* @returns If the encoded format is not supported, or subset is outside of the bounds of the decoded
|
48
|
+
* image, nullptr is returned.
|
49
|
+
*/
|
50
|
+
MakeImageFromEncoded: (encoded: SkData) => SkImage | null;
|
51
|
+
/**
|
52
|
+
* Returns an image with the given pixel data and format.
|
53
|
+
* Note that we will always make a copy of the pixel data, because of inconsistencies in
|
54
|
+
* behavior between GPU and CPU (i.e. the pixel data will be turned into a GPU texture and
|
55
|
+
* not modifiable after creation).
|
56
|
+
*
|
57
|
+
* @param info
|
58
|
+
* @param data - bytes representing the pixel data.
|
59
|
+
* @param bytesPerRow
|
60
|
+
*/
|
61
|
+
MakeImage(info: ImageInfo, data: SkData, bytesPerRow: number): SkImage | null;
|
62
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { SkJSIInstance } from "../JsiInstance";
|
2
|
+
export declare enum TileMode {
|
3
|
+
/**
|
4
|
+
* Replicate the edge color if the shader draws outside of its
|
5
|
+
* original bounds.
|
6
|
+
*/
|
7
|
+
Clamp = 0,
|
8
|
+
/**
|
9
|
+
* Repeat the shader's image horizontally and vertically.
|
10
|
+
*/
|
11
|
+
Repeat = 1,
|
12
|
+
/**
|
13
|
+
* Repeat the shader's image horizontally and vertically, alternating
|
14
|
+
* mirror images so that adjacent images always seam.
|
15
|
+
*/
|
16
|
+
Mirror = 2,
|
17
|
+
/**
|
18
|
+
* Only draw within the original domain, return transparent-black everywhere else.
|
19
|
+
*/
|
20
|
+
Decal = 3
|
21
|
+
}
|
22
|
+
export declare const isImageFilter: (obj: SkJSIInstance<string> | null) => obj is SkImageFilter;
|
23
|
+
export declare type SkImageFilter = SkJSIInstance<"ImageFilter">;
|
@@ -0,0 +1,130 @@
|
|
1
|
+
import type { SkColor } from "../Color";
|
2
|
+
import type { SkColorFilter } from "../ColorFilter/ColorFilter";
|
3
|
+
import type { BlendMode } from "../Paint";
|
4
|
+
import type { SkRect } from "../Rect";
|
5
|
+
import type { SkRuntimeShaderBuilder } from "../RuntimeEffect";
|
6
|
+
import type { SkShader } from "../Shader";
|
7
|
+
import type { SkImageFilter, TileMode } from "./ImageFilter";
|
8
|
+
export declare enum ColorChannel {
|
9
|
+
R = 0,
|
10
|
+
G = 1,
|
11
|
+
B = 2,
|
12
|
+
A = 3
|
13
|
+
}
|
14
|
+
export interface ImageFilterFactory {
|
15
|
+
/**
|
16
|
+
* Offsets the input image
|
17
|
+
*
|
18
|
+
* @param dx - Offset along the X axis
|
19
|
+
* @param dy - Offset along the X axis
|
20
|
+
* @param input - if null, it will use the dynamic source image
|
21
|
+
*/
|
22
|
+
MakeOffset(dx: number, dy: number, input: SkImageFilter | null): SkImageFilter;
|
23
|
+
/**
|
24
|
+
* Spatially displace pixel values of the filtered image
|
25
|
+
*
|
26
|
+
* @param channelX - Color channel to be used along the X axis
|
27
|
+
* @param channelY - Color channel to be used along the Y axis
|
28
|
+
* @param scale - Scale factor to be used in the displacement
|
29
|
+
* @param in1 - Source image filter to use for the displacement
|
30
|
+
* @param input - if null, it will use the dynamic source image
|
31
|
+
*/
|
32
|
+
MakeDisplacementMap(channelX: ColorChannel, channelY: ColorChannel, scale: number, in1: SkImageFilter, input: SkImageFilter | null): SkImageFilter;
|
33
|
+
/**
|
34
|
+
* Transforms a shader into an impage filter
|
35
|
+
*
|
36
|
+
* @param shader - The Shader to be transformed
|
37
|
+
* @param input - if null, it will use the dynamic source image
|
38
|
+
*/
|
39
|
+
MakeShader(shader: SkShader, input: SkImageFilter | null): SkImageFilter;
|
40
|
+
/**
|
41
|
+
* Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode
|
42
|
+
* is used when the blur kernel goes outside the input image.
|
43
|
+
*
|
44
|
+
* @param sigmaX - The Gaussian sigma value for blurring along the X axis.
|
45
|
+
* @param sigmaY - The Gaussian sigma value for blurring along the Y axis.
|
46
|
+
* @param mode
|
47
|
+
* @param input - if null, it will use the dynamic source image (e.g. a saved layer)
|
48
|
+
*/
|
49
|
+
MakeBlur(sigmaX: number, sigmaY: number, mode: TileMode, input: SkImageFilter | null): SkImageFilter;
|
50
|
+
/**
|
51
|
+
* Create a filter that applies the color filter to the input filter results.
|
52
|
+
* @param cf
|
53
|
+
* @param input - if null, it will use the dynamic source image (e.g. a saved layer)
|
54
|
+
*/
|
55
|
+
MakeColorFilter(cf: SkColorFilter, input: SkImageFilter | null): SkImageFilter;
|
56
|
+
/**
|
57
|
+
* Create a filter that composes 'inner' with 'outer', such that the results of 'inner' are
|
58
|
+
* treated as the source bitmap passed to 'outer'.
|
59
|
+
* If either param is null, the other param will be returned.
|
60
|
+
* @param outer
|
61
|
+
* @param inner - if null, it will use the dynamic source image (e.g. a saved layer)
|
62
|
+
*/
|
63
|
+
MakeCompose(outer: SkImageFilter | null, inner: SkImageFilter | null): SkImageFilter;
|
64
|
+
/**
|
65
|
+
* Create a filter that draws a drop shadow under the input content.
|
66
|
+
* This filter produces an image that includes the inputs' content.
|
67
|
+
* @param dx The X offset of the shadow.
|
68
|
+
* @param dy The Y offset of the shadow.
|
69
|
+
* @param sigmaX The blur radius for the shadow, along the X axis.
|
70
|
+
* @param sigmaY The blur radius for the shadow, along the Y axis.
|
71
|
+
* @param color The color of the drop shadow.
|
72
|
+
* @param input The input filter, or will use the source bitmap if this is null.
|
73
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
74
|
+
*/
|
75
|
+
MakeDropShadow: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect) => SkImageFilter;
|
76
|
+
/**
|
77
|
+
* Create a filter that renders a drop shadow, in exactly the same manner as ::DropShadow, except
|
78
|
+
* that the resulting image does not include the input content.
|
79
|
+
* This allows the shadow and input to be composed by a filter DAG in a more flexible manner.
|
80
|
+
* @param dx The X offset of the shadow.
|
81
|
+
* @param dy The Y offset of the shadow.
|
82
|
+
* @param sigmaX The blur radius for the shadow, along the X axis.
|
83
|
+
* @param sigmaY The blur radius for the shadow, along the Y axis.
|
84
|
+
* @param color The color of the drop shadow.
|
85
|
+
* @param input The input filter, or will use the source bitmap if this is null.
|
86
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
87
|
+
*/
|
88
|
+
MakeDropShadowOnly: (dx: number, dy: number, sigmaX: number, sigmaY: number, color: SkColor, input: SkImageFilter | null, cropRect?: SkRect) => SkImageFilter;
|
89
|
+
/**
|
90
|
+
* Create a filter that erodes each input pixel's channel values to the minimum channel value
|
91
|
+
* within the given radii along the x and y axes.
|
92
|
+
* @param radiusX The distance to erode along the x axis to either side of each pixel.
|
93
|
+
* @param radiusY The distance to erode along the y axis to either side of each pixel.
|
94
|
+
* @param input The image filter that is eroded, using source bitmap if this is null.
|
95
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
96
|
+
*/
|
97
|
+
MakeErode: (rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect) => SkImageFilter;
|
98
|
+
/**
|
99
|
+
* Create a filter that dilates each input pixel's channel values to the max value within the
|
100
|
+
* given radii along the x and y axes.
|
101
|
+
* @param radiusX The distance to dilate along the x axis to either side of each pixel.
|
102
|
+
* @param radiusY The distance to dilate along the y axis to either side of each pixel.
|
103
|
+
* @param input The image filter that is dilated, using source bitmap if this is null.
|
104
|
+
* @param cropRect Optional rectangle that crops the input and output.
|
105
|
+
*/
|
106
|
+
MakeDilate: (rx: number, ry: number, input: SkImageFilter | null, cropRect?: SkRect) => SkImageFilter;
|
107
|
+
/**
|
108
|
+
* This filter takes an SkBlendMode and uses it to composite the two filters together.
|
109
|
+
* @param mode The blend mode that defines the compositing operation
|
110
|
+
* @param background The Dst pixels used in blending, if null the source bitmap is used.
|
111
|
+
* @param foreground The Src pixels used in blending, if null the source bitmap is used.
|
112
|
+
* @cropRect Optional rectangle to crop input and output.
|
113
|
+
*/
|
114
|
+
MakeBlend: (mode: BlendMode, background: SkImageFilter, foreground: SkImageFilter | null, cropRect?: SkRect) => SkImageFilter;
|
115
|
+
/**
|
116
|
+
* Create a filter that fills the output with the per-pixel evaluation of the SkShader produced
|
117
|
+
* by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate
|
118
|
+
* system, so it will automatically be affected by SkCanvas' transform.
|
119
|
+
*
|
120
|
+
* @param builder The builder used to produce the runtime shader, that will in turn
|
121
|
+
* fill the result image
|
122
|
+
* @param childShaderName The name of the child shader defined in the builder that will be
|
123
|
+
* bound to the input param (or the source image if the input param
|
124
|
+
* is null). If null the builder can have exactly one child shader,
|
125
|
+
* which automatically binds the input param.
|
126
|
+
* @param input The image filter that will be provided as input to the runtime
|
127
|
+
* shader. If null the implicit source image is used instead
|
128
|
+
*/
|
129
|
+
MakeRuntimeShader: (builder: SkRuntimeShaderBuilder, childShaderName: string | null, input: SkImageFilter | null) => SkImageFilter;
|
130
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { SkJSIInstance } from "./JsiInstance";
|
2
|
+
export declare enum BlurStyle {
|
3
|
+
Normal = 0,
|
4
|
+
Solid = 1,
|
5
|
+
Outer = 2,
|
6
|
+
Inner = 3
|
7
|
+
}
|
8
|
+
export declare const isMaskFilter: (obj: SkJSIInstance<string> | null) => obj is SkMaskFilter;
|
9
|
+
export declare type SkMaskFilter = SkJSIInstance<"MaskFilter">;
|
10
|
+
/**
|
11
|
+
* See SkMaskFilter.h for more details.
|
12
|
+
*/
|
13
|
+
export interface MaskFilterFactory {
|
14
|
+
/**
|
15
|
+
* Create a blur maskfilter
|
16
|
+
* @param style
|
17
|
+
* @param sigma - Standard deviation of the Gaussian blur to apply. Must be > 0.
|
18
|
+
* @param respectCTM - if true the blur's sigma is modified by the CTM.
|
19
|
+
*/
|
20
|
+
MakeBlur(style: BlurStyle, sigma: number, respectCTM: boolean): SkMaskFilter;
|
21
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import type { SkJSIInstance } from "./JsiInstance";
|
2
|
+
import type { SkCanvas } from "./Canvas";
|
3
|
+
export declare enum MatrixIndex {
|
4
|
+
ScaleX = 0,
|
5
|
+
SkewX = 1,
|
6
|
+
TransX = 2,
|
7
|
+
SkewY = 3,
|
8
|
+
ScaleY = 4,
|
9
|
+
TransY = 5,
|
10
|
+
Persp0 = 6,
|
11
|
+
Persp1 = 7,
|
12
|
+
Persp2 = 8
|
13
|
+
}
|
14
|
+
export declare const isMatrix: (obj: unknown) => obj is SkMatrix;
|
15
|
+
export interface SkMatrix extends SkJSIInstance<"Matrix"> {
|
16
|
+
concat: (matrix: SkMatrix) => void;
|
17
|
+
translate: (x: number, y: number) => void;
|
18
|
+
scale: (x: number, y?: number) => void;
|
19
|
+
skew: (x: number, y: number) => void;
|
20
|
+
rotate: (theta: number) => void;
|
21
|
+
identity: () => void;
|
22
|
+
get: () => number[];
|
23
|
+
}
|
24
|
+
declare type Transform2dName = "translateX" | "translateY" | "scale" | "skewX" | "skewY" | "scaleX" | "scaleY" | "rotateZ" | "rotate";
|
25
|
+
declare type Transformations = {
|
26
|
+
readonly [Name in Transform2dName]: number;
|
27
|
+
};
|
28
|
+
export declare type Transforms2d = readonly (Pick<Transformations, "translateX"> | Pick<Transformations, "translateY"> | Pick<Transformations, "scale"> | Pick<Transformations, "scaleX"> | Pick<Transformations, "scaleY"> | Pick<Transformations, "skewX"> | Pick<Transformations, "skewY"> | Pick<Transformations, "rotate">)[];
|
29
|
+
export interface TransformProp {
|
30
|
+
transform?: Transforms2d;
|
31
|
+
}
|
32
|
+
export declare const processTransform: <T extends SkMatrix | SkCanvas>(m: T, transforms: Transforms2d) => T;
|
33
|
+
export declare const toDegrees: (rad: number) => number;
|
34
|
+
export {};
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/**
|
2
|
+
* Blends are operators that take in two colors (source, destination) and
|
3
|
+
* return a new color. Many of these operate the same on all 4 components: red,
|
4
|
+
* green, blue, alpha. For these, we just document what happens to one
|
5
|
+
* component, rather than naming each one separately.
|
6
|
+
*
|
7
|
+
* Different SkColorTypes have different representations for color components:
|
8
|
+
* 8-bit: 0..255
|
9
|
+
* 6-bit: 0..63
|
10
|
+
* 5-bit: 0..31
|
11
|
+
* 4-bit: 0..15
|
12
|
+
* floats: 0...1
|
13
|
+
*
|
14
|
+
* The documentation is expressed as if the component values are always 0..1
|
15
|
+
* (floats).
|
16
|
+
*
|
17
|
+
* For brevity, the documentation uses the following abbreviations
|
18
|
+
* s : source
|
19
|
+
* d : destination
|
20
|
+
* sa : source alpha
|
21
|
+
* da : destination alpha
|
22
|
+
*
|
23
|
+
* Results are abbreviated
|
24
|
+
* r : if all 4 components are computed in the same manner
|
25
|
+
* ra : result alpha component
|
26
|
+
* rc : result "color": red, green, blue components
|
27
|
+
*/
|
28
|
+
export declare enum BlendMode {
|
29
|
+
Clear = 0,
|
30
|
+
Src = 1,
|
31
|
+
Dst = 2,
|
32
|
+
SrcOver = 3,
|
33
|
+
DstOver = 4,
|
34
|
+
SrcIn = 5,
|
35
|
+
DstIn = 6,
|
36
|
+
SrcOut = 7,
|
37
|
+
DstOut = 8,
|
38
|
+
SrcATop = 9,
|
39
|
+
DstATop = 10,
|
40
|
+
Xor = 11,
|
41
|
+
Plus = 12,
|
42
|
+
Modulate = 13,
|
43
|
+
Screen = 14,
|
44
|
+
Overlay = 15,
|
45
|
+
Darken = 16,
|
46
|
+
Lighten = 17,
|
47
|
+
ColorDodge = 18,
|
48
|
+
ColorBurn = 19,
|
49
|
+
HardLight = 20,
|
50
|
+
SoftLight = 21,
|
51
|
+
Difference = 22,
|
52
|
+
Exclusion = 23,
|
53
|
+
Multiply = 24,
|
54
|
+
Hue = 25,
|
55
|
+
Saturation = 26,
|
56
|
+
Color = 27,
|
57
|
+
Luminosity = 28
|
58
|
+
}
|