@shopify/react-native-skia 1.3.12 → 1.3.13
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/__tests__/globalSetup.d.ts +9 -0
- package/lib/commonjs/__tests__/globalTeardown.d.ts +2 -0
- package/lib/commonjs/__tests__/setup.d.ts +18 -0
- package/lib/commonjs/dom/__tests__/Compose.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/Demos.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/DrawingContext.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/Group.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/Paint.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/RenderNodes.spec.d.ts +1 -0
- package/lib/commonjs/dom/__tests__/Shaders.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Data.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/FitBox.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Glyphs.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Image.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Paths.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Picture.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Simple.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/SkiaDOM.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Surfaces.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Text.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/TouchHandler.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/Transform.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/documentation/Group.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/documentation/getting-started/HelloWorld.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/documentation/paint/Overview.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/documentation/shapes/Box.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/AnimatedImages.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Atlas.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/BackdropFilters.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Blending.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Blur.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Box.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/ColorFilters.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/CoonPatch.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/DataEncoding.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Drawings.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/FontMgr.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Gradient.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Group.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Image.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/ImageEncoding.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/ImageFilters.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Mask.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Matrix4.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/NativeBuffer.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Offscreen.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Opacity.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Paint.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/ParagraphPaint.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Paragraphs.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/PathEffects.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Paths.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Picture.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Point.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Rect.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/RuntimeShader.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/SDF.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/SVG.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Shader.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Snapshot.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Surfaces.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Text.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/TextPath.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Transforms.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Vertices.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/Video.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/e2e/setup/Paragraph.d.ts +19 -0
- package/lib/commonjs/renderer/__tests__/e2e/setup/SVG.d.ts +12 -0
- package/lib/commonjs/renderer/__tests__/e2e/setup/SkiaObject.d.ts +11 -0
- package/lib/commonjs/renderer/__tests__/e2e/setup/index.d.ts +3 -0
- package/lib/commonjs/renderer/__tests__/examples/BlendModes.spec.d.ts +1 -0
- package/lib/commonjs/renderer/__tests__/setup.d.ts +66 -0
- package/lib/commonjs/skia/__tests__/ColorFilter.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Data.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Enums.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Geometry.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/ImageFilter.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Mock.spec.d.ts +0 -0
- package/lib/commonjs/skia/__tests__/Paint.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Path.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/RuntimeEffect.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Shader.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Text.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Transform.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/Vertices.spec.d.ts +1 -0
- package/lib/commonjs/skia/__tests__/setup.d.ts +19 -0
- package/lib/module/__tests__/globalSetup.d.ts +9 -0
- package/lib/module/__tests__/globalTeardown.d.ts +2 -0
- package/lib/module/__tests__/setup.d.ts +18 -0
- package/lib/module/dom/__tests__/Compose.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/Demos.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/DrawingContext.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/Group.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/Paint.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/RenderNodes.spec.d.ts +1 -0
- package/lib/module/dom/__tests__/Shaders.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Data.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/FitBox.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Glyphs.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Image.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Paths.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Picture.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Simple.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/SkiaDOM.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Surfaces.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Text.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/TouchHandler.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/Transform.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/documentation/Group.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/documentation/getting-started/HelloWorld.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/documentation/paint/Overview.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/documentation/shapes/Box.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/AnimatedImages.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Atlas.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/BackdropFilters.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Blending.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Blur.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Box.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/ColorFilters.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/CoonPatch.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/DataEncoding.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Drawings.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/FontMgr.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Gradient.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Group.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Image.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/ImageEncoding.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/ImageFilters.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Mask.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Matrix4.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/NativeBuffer.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Offscreen.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Opacity.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Paint.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/ParagraphPaint.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Paragraphs.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/PathEffects.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Paths.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Picture.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Point.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Rect.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/RuntimeShader.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/SDF.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/SVG.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Shader.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Snapshot.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Surfaces.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Text.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/TextPath.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Transforms.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Vertices.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/Video.d.ts +1 -0
- package/lib/module/renderer/__tests__/e2e/setup/Paragraph.d.ts +19 -0
- package/lib/module/renderer/__tests__/e2e/setup/SVG.d.ts +12 -0
- package/lib/module/renderer/__tests__/e2e/setup/SkiaObject.d.ts +11 -0
- package/lib/module/renderer/__tests__/e2e/setup/index.d.ts +3 -0
- package/lib/module/renderer/__tests__/examples/BlendModes.spec.d.ts +1 -0
- package/lib/module/renderer/__tests__/setup.d.ts +66 -0
- package/lib/module/skia/__tests__/ColorFilter.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Data.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Enums.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Geometry.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/ImageFilter.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Mock.spec.d.ts +0 -0
- package/lib/module/skia/__tests__/Paint.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Path.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/RuntimeEffect.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Shader.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Text.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Transform.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/Vertices.spec.d.ts +1 -0
- package/lib/module/skia/__tests__/setup.d.ts +19 -0
- package/lib/typescript/src/__tests__/globalSetup.d.ts +9 -0
- package/lib/typescript/src/__tests__/globalTeardown.d.ts +2 -0
- package/lib/typescript/src/__tests__/setup.d.ts +18 -0
- package/lib/typescript/src/dom/__tests__/Compose.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/Demos.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/DrawingContext.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/Group.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/Paint.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/RenderNodes.spec.d.ts +1 -0
- package/lib/typescript/src/dom/__tests__/Shaders.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Data.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/FitBox.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Glyphs.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Image.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Paths.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Picture.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Simple.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/SkiaDOM.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Surfaces.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Text.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/TouchHandler.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/Transform.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/documentation/Group.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/documentation/paint/Overview.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/documentation/shapes/Box.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/AnimatedImages.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Atlas.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/BackdropFilters.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Blending.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Blur.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Box.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/ColorFilters.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/CoonPatch.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/DataEncoding.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Drawings.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/FontMgr.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Gradient.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Group.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Image.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/ImageEncoding.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/ImageFilters.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Mask.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Matrix4.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/NativeBuffer.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Offscreen.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Opacity.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Paint.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/ParagraphPaint.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Paragraphs.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/PathEffects.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Paths.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Picture.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Point.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Rect.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/RuntimeShader.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/SDF.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/SVG.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Shader.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Snapshot.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Surfaces.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Text.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/TextPath.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Transforms.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Vertices.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/Video.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/e2e/setup/Paragraph.d.ts +19 -0
- package/lib/typescript/src/renderer/__tests__/e2e/setup/SVG.d.ts +12 -0
- package/lib/typescript/src/renderer/__tests__/e2e/setup/SkiaObject.d.ts +11 -0
- package/lib/typescript/src/renderer/__tests__/e2e/setup/index.d.ts +3 -0
- package/lib/typescript/src/renderer/__tests__/examples/BlendModes.spec.d.ts +1 -0
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +66 -0
- package/lib/typescript/src/skia/__tests__/ColorFilter.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Data.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Drawings.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Enums.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Geometry.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/ImageFilter.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Mock.spec.d.ts +0 -0
- package/lib/typescript/src/skia/__tests__/Paint.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Path.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/RuntimeEffect.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Shader.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Text.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Transform.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/Vertices.spec.d.ts +1 -0
- package/lib/typescript/src/skia/__tests__/setup.d.ts +19 -0
- package/libs/ios/libskia.xcframework/Info.plist +46 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/Info.plist +46 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +46 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/Info.plist +46 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +46 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/Info.plist +46 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +46 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +11 -14
- package/src/__tests__/globalSetup.ts +51 -0
- package/src/__tests__/globalTeardown.ts +11 -0
- package/src/__tests__/setup.ts +129 -0
- package/src/__tests__/snapshots/animated-images/bird.png +0 -0
- package/src/__tests__/snapshots/animations/green.png +0 -0
- package/src/__tests__/snapshots/animations/lightblue.png +0 -0
- package/src/__tests__/snapshots/animations/quarter-lightblue.png +0 -0
- package/src/__tests__/snapshots/animations/red.png +0 -0
- package/src/__tests__/snapshots/atlas/identity.png +0 -0
- package/src/__tests__/snapshots/atlas/rsxform.png +0 -0
- package/src/__tests__/snapshots/atlas/rsxform1.png +0 -0
- package/src/__tests__/snapshots/atlas/simple.png +0 -0
- package/src/__tests__/snapshots/atlas/simple2.png +0 -0
- package/src/__tests__/snapshots/box/box-shadow.png +0 -0
- package/src/__tests__/snapshots/box/box-shadow2.png +0 -0
- package/src/__tests__/snapshots/box/box-shadow3.png +0 -0
- package/src/__tests__/snapshots/box/box-stroke.png +0 -0
- package/src/__tests__/snapshots/color-filter/color-filter-composition.png +0 -0
- package/src/__tests__/snapshots/color-filter/matrix1.png +0 -0
- package/src/__tests__/snapshots/color-filter/matrix3.png +0 -0
- package/src/__tests__/snapshots/color-filter/zurich-sepia.png +0 -0
- package/src/__tests__/snapshots/coons-patch/patch-with-opacity.png +0 -0
- package/src/__tests__/snapshots/coons-patch/simple.png +0 -0
- package/src/__tests__/snapshots/cyan-buffer.png +0 -0
- package/src/__tests__/snapshots/data/oslo.png +0 -0
- package/src/__tests__/snapshots/data/red.png +0 -0
- package/src/__tests__/snapshots/data/zurich.png +0 -0
- package/src/__tests__/snapshots/demos/apple-breathe.png +0 -0
- package/src/__tests__/snapshots/demos/apple-breathe1.png +0 -0
- package/src/__tests__/snapshots/demos/breathe.png +0 -0
- package/src/__tests__/snapshots/demos/breathe2.png +0 -0
- package/src/__tests__/snapshots/demos/product.png +0 -0
- package/src/__tests__/snapshots/demos/product2.png +0 -0
- package/src/__tests__/snapshots/demos/skia-neon.png +0 -0
- package/src/__tests__/snapshots/demos/skia-neon1.png +0 -0
- package/src/__tests__/snapshots/drawings/arc.png +0 -0
- package/src/__tests__/snapshots/drawings/blend-mode-multiply.png +0 -0
- package/src/__tests__/snapshots/drawings/blend-modes.png +0 -0
- package/src/__tests__/snapshots/drawings/blur-node.png +0 -0
- package/src/__tests__/snapshots/drawings/blur.png +0 -0
- package/src/__tests__/snapshots/drawings/blur2.png +0 -0
- package/src/__tests__/snapshots/drawings/custom-drawing.png +0 -0
- package/src/__tests__/snapshots/drawings/cyan-circle.png +0 -0
- package/src/__tests__/snapshots/drawings/cyan.png +0 -0
- package/src/__tests__/snapshots/drawings/default-props.png +0 -0
- package/src/__tests__/snapshots/drawings/hello-world.png +0 -0
- package/src/__tests__/snapshots/drawings/image-default-props.png +0 -0
- package/src/__tests__/snapshots/drawings/lightblue-quarter-circle.png +0 -0
- package/src/__tests__/snapshots/drawings/lightblue-rect.png +0 -0
- package/src/__tests__/snapshots/drawings/line.png +0 -0
- package/src/__tests__/snapshots/drawings/multiple-paints.png +0 -0
- package/src/__tests__/snapshots/drawings/nested-shader.png +0 -0
- package/src/__tests__/snapshots/drawings/nested-shader2.png +0 -0
- package/src/__tests__/snapshots/drawings/opacity-image.png +0 -0
- package/src/__tests__/snapshots/drawings/opacity-multiplication.png +0 -0
- package/src/__tests__/snapshots/drawings/opacity-multiplication2.png +0 -0
- package/src/__tests__/snapshots/drawings/points.png +0 -0
- package/src/__tests__/snapshots/drawings/purple.png +0 -0
- package/src/__tests__/snapshots/drawings/rotated-image.png +0 -0
- package/src/__tests__/snapshots/drawings/rotated-scaled-image.png +0 -0
- package/src/__tests__/snapshots/drawings/rrect-aa.png +0 -0
- package/src/__tests__/snapshots/drawings/rrect-no-aa.png +0 -0
- package/src/__tests__/snapshots/drawings/scaled-image.png +0 -0
- package/src/__tests__/snapshots/drawings/scaled-image2.png +0 -0
- package/src/__tests__/snapshots/drawings/shader-opacity-reference.png +0 -0
- package/src/__tests__/snapshots/drawings/skew-transform.png +0 -0
- package/src/__tests__/snapshots/drawings/skew-transform2.png +0 -0
- package/src/__tests__/snapshots/drawings/small-lightblue-rect.png +0 -0
- package/src/__tests__/snapshots/drawings/stroke.png +0 -0
- package/src/__tests__/snapshots/drawings/transform-origin.png +0 -0
- package/src/__tests__/snapshots/drawings/transparent.png +0 -0
- package/src/__tests__/snapshots/drawings/violet.png +0 -0
- package/src/__tests__/snapshots/font/green.png +0 -0
- package/src/__tests__/snapshots/font/red.png +0 -0
- package/src/__tests__/snapshots/glyphs/simple.png +0 -0
- package/src/__tests__/snapshots/gradient/linear-with-opacity.png +0 -0
- package/src/__tests__/snapshots/gradient/linear.png +0 -0
- package/src/__tests__/snapshots/green.png +0 -0
- package/src/__tests__/snapshots/image-filter/blur.png +0 -0
- package/src/__tests__/snapshots/image-filter/test-shadow.png +0 -0
- package/src/__tests__/snapshots/images/bundle-android.png +0 -0
- package/src/__tests__/snapshots/images/bundle-ios.png +0 -0
- package/src/__tests__/snapshots/images/bundle-node.png +0 -0
- package/src/__tests__/snapshots/images/bundle.png +0 -0
- package/src/__tests__/snapshots/images/filter.png +0 -0
- package/src/__tests__/snapshots/leak.png +0 -0
- package/src/__tests__/snapshots/matrix4/perspective.png +0 -0
- package/src/__tests__/snapshots/paint/blend-mode.png +0 -0
- package/src/__tests__/snapshots/paint/circle.png +0 -0
- package/src/__tests__/snapshots/paint/colors.png +0 -0
- package/src/__tests__/snapshots/paint/dither.png +0 -0
- package/src/__tests__/snapshots/paint/path-paint.png +0 -0
- package/src/__tests__/snapshots/paint/without-dither.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-auto-linebreaks-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-auto-linebreaks-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-bounding-box-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-bounding-box-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-bounding-box-node.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-ellipse-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-ellipse-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-linebreaks-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-linebreaks-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-center-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-center-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-justify-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-justify-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-left-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-left-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-right-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-right-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-rtl-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-align-rtl-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-colors-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-colors-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-decoration-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-decoration-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-shadow-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-shadow-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-style-android-box.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-style-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-style-ios-box.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-font-style-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-in-paragraph-style-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/paragraph-text-style-in-paragraph-style-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/simple-paragraph-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/simple-paragraph-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/simple-paragraph-with-provider-android.png +0 -0
- package/src/__tests__/snapshots/paragraph/simple-paragraph-with-provider-ios.png +0 -0
- package/src/__tests__/snapshots/paragraph/simple-paragraph-with-provider-node.png +0 -0
- package/src/__tests__/snapshots/path/interpolate.png +0 -0
- package/src/__tests__/snapshots/path/logo.png +0 -0
- package/src/__tests__/snapshots/path-effects/discrete.png +0 -0
- package/src/__tests__/snapshots/path-effects/sum.png +0 -0
- package/src/__tests__/snapshots/path-effects/sum2.png +0 -0
- package/src/__tests__/snapshots/paths/arc.png +0 -0
- package/src/__tests__/snapshots/paths/emptyPath.png +0 -0
- package/src/__tests__/snapshots/paths/interpolation1.png +0 -0
- package/src/__tests__/snapshots/paths/oval.png +0 -0
- package/src/__tests__/snapshots/paths/pattern.png +0 -0
- package/src/__tests__/snapshots/paths/poly.png +0 -0
- package/src/__tests__/snapshots/paths/rrect.png +0 -0
- package/src/__tests__/snapshots/paths/skia-trimmed.png +0 -0
- package/src/__tests__/snapshots/paths/skia.png +0 -0
- package/src/__tests__/snapshots/pictures/create-picture.png +0 -0
- package/src/__tests__/snapshots/pictures/green.png +0 -0
- package/src/__tests__/snapshots/pictures/hello-world.png +0 -0
- package/src/__tests__/snapshots/pictures/red.png +0 -0
- package/src/__tests__/snapshots/pictures/simple-picture.png +0 -0
- package/src/__tests__/snapshots/platform-buffer-bgra.png +0 -0
- package/src/__tests__/snapshots/platform-buffer.png +0 -0
- package/src/__tests__/snapshots/points/points.png +0 -0
- package/src/__tests__/snapshots/points/points2.png +0 -0
- package/src/__tests__/snapshots/render-nodes/simple.png +0 -0
- package/src/__tests__/snapshots/render-nodes/simple2.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/blend-color-burn.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/blend-color-burn2.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/blend-color-burn3.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/blend-color-dodge.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/blend-multiply.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/int-uniform.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/linear-gradient.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/linear-gradient2.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/small-spiral.png +0 -0
- package/src/__tests__/snapshots/runtime-effects/spiral.png +0 -0
- package/src/__tests__/snapshots/runtime-shader/scaled-circle.png +0 -0
- package/src/__tests__/snapshots/runtime-shader/scaled-circle2.png +0 -0
- package/src/__tests__/snapshots/runtime-shader/simple.png +0 -0
- package/src/__tests__/snapshots/runtime-shader/spiral.png +0 -0
- package/src/__tests__/snapshots/runtime-shader/unscaled-image.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot1-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot1-android.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot1-ios.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot2-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot2-android.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot2-ios.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot3-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot3-android.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot3-ios.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot4-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot4-android.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot4-ios.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot5-android.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot5-ios.png +0 -0
- package/src/__tests__/snapshots/sdf/circle.png +0 -0
- package/src/__tests__/snapshots/sdf/heart.png +0 -0
- package/src/__tests__/snapshots/sdf/line.png +0 -0
- package/src/__tests__/snapshots/sdf/rectangle.png +0 -0
- package/src/__tests__/snapshots/shader/bilinear-interpolation.png +0 -0
- package/src/__tests__/snapshots/shader/hue.png +0 -0
- package/src/__tests__/snapshots/shader/hue2.png +0 -0
- package/src/__tests__/snapshots/shader/shader1.png +0 -0
- package/src/__tests__/snapshots/shader/shader2.png +0 -0
- package/src/__tests__/snapshots/shader/sweep-gradient.png +0 -0
- package/src/__tests__/snapshots/text/text-bounds-android.png +0 -0
- package/src/__tests__/snapshots/text/text-bounds-ios.png +0 -0
- package/src/__tests__/snapshots/text/text-default-font-android.png +0 -0
- package/src/__tests__/snapshots/text/text-default-font-ios.png +0 -0
- package/src/__tests__/snapshots/text/text-path-bug-android.png +0 -0
- package/src/__tests__/snapshots/text/text-path-bug-ios.png +0 -0
- package/src/__tests__/snapshots/text/text-path-bug-node.png +0 -0
- package/src/__tests__/snapshots/text/text-path1-android.png +0 -0
- package/src/__tests__/snapshots/text/text-path1-ios.png +0 -0
- package/src/__tests__/snapshots/text/text-path1-node.png +0 -0
- package/src/__tests__/snapshots/text/text-path2-android.png +0 -0
- package/src/__tests__/snapshots/text/text-path2-ios.png +0 -0
- package/src/__tests__/snapshots/text/text-path2-node.png +0 -0
- package/src/__tests__/snapshots/transform/rectangles.png +0 -0
- package/src/__tests__/snapshots/transform/rotate-radiants.png +0 -0
- package/src/__tests__/snapshots/transform/rotate.png +0 -0
- package/src/__tests__/snapshots/transform/scale-origin.png +0 -0
- package/src/__tests__/snapshots/transform/scale.png +0 -0
- package/src/__tests__/snapshots/transform/skew.png +0 -0
- package/src/__tests__/snapshots/transparent.png +0 -0
- package/src/__tests__/snapshots/vertices/billinear-gradient.png +0 -0
- package/src/__tests__/snapshots/vertices/strip.png +0 -0
- package/src/__tests__/snapshots/vertices/vertices.png +0 -0
- package/src/dom/__tests__/Compose.spec.tsx +42 -0
- package/src/dom/__tests__/Demos.spec.tsx +145 -0
- package/src/dom/__tests__/DrawingContext.spec.tsx +99 -0
- package/src/dom/__tests__/Drawings.spec.tsx +95 -0
- package/src/dom/__tests__/Group.spec.tsx +132 -0
- package/src/dom/__tests__/Paint.spec.tsx +100 -0
- package/src/dom/__tests__/RenderNodes.spec.tsx +44 -0
- package/src/dom/__tests__/Shaders.spec.tsx +123 -0
- package/src/renderer/__tests__/Data.spec.tsx +67 -0
- package/src/renderer/__tests__/Drawings.spec.tsx +96 -0
- package/src/renderer/__tests__/FitBox.spec.tsx +126 -0
- package/src/renderer/__tests__/Glyphs.spec.tsx +46 -0
- package/src/renderer/__tests__/Image.spec.tsx +45 -0
- package/src/renderer/__tests__/Paths.spec.tsx +75 -0
- package/src/renderer/__tests__/Picture.spec.tsx +82 -0
- package/src/renderer/__tests__/Simple.spec.tsx +81 -0
- package/src/renderer/__tests__/SkiaDOM.spec.tsx +46 -0
- package/src/renderer/__tests__/Surfaces.spec.tsx +73 -0
- package/src/renderer/__tests__/Text.spec.tsx +134 -0
- package/src/renderer/__tests__/TouchHandler.spec.tsx +113 -0
- package/src/renderer/__tests__/Transform.spec.tsx +72 -0
- package/src/renderer/__tests__/documentation/Group.spec.tsx +171 -0
- package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +51 -0
- package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +84 -0
- package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +46 -0
- package/src/renderer/__tests__/e2e/AnimatedImages.spec.tsx +88 -0
- package/src/renderer/__tests__/e2e/Atlas.spec.tsx +358 -0
- package/src/renderer/__tests__/e2e/BackdropFilters.spec.tsx +141 -0
- package/src/renderer/__tests__/e2e/Blending.spec.tsx +115 -0
- package/src/renderer/__tests__/e2e/Blur.spec.tsx +56 -0
- package/src/renderer/__tests__/e2e/Box.spec.tsx +83 -0
- package/src/renderer/__tests__/e2e/ColorFilters.spec.tsx +212 -0
- package/src/renderer/__tests__/e2e/Composition/ColorFilterComposition.spec.tsx +81 -0
- package/src/renderer/__tests__/e2e/CoonPatch.spec.tsx +74 -0
- package/src/renderer/__tests__/e2e/DataEncoding.spec.tsx +75 -0
- package/src/renderer/__tests__/e2e/Drawings.spec.tsx +209 -0
- package/src/renderer/__tests__/e2e/FontMgr.spec.tsx +150 -0
- package/src/renderer/__tests__/e2e/Gradient.spec.tsx +40 -0
- package/src/renderer/__tests__/e2e/Group.spec.tsx +129 -0
- package/src/renderer/__tests__/e2e/Image.spec.tsx +139 -0
- package/src/renderer/__tests__/e2e/ImageEncoding.spec.tsx +255 -0
- package/src/renderer/__tests__/e2e/ImageFilters.spec.tsx +230 -0
- package/src/renderer/__tests__/e2e/Mask.spec.tsx +85 -0
- package/src/renderer/__tests__/e2e/Matrix4.spec.tsx +275 -0
- package/src/renderer/__tests__/e2e/NativeBuffer.spec.tsx +156 -0
- package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +109 -0
- package/src/renderer/__tests__/e2e/Opacity.spec.tsx +278 -0
- package/src/renderer/__tests__/e2e/Paint.spec.tsx +170 -0
- package/src/renderer/__tests__/e2e/ParagraphPaint.spec.tsx +262 -0
- package/src/renderer/__tests__/e2e/Paragraphs.spec.tsx +615 -0
- package/src/renderer/__tests__/e2e/PathEffects.spec.tsx +73 -0
- package/src/renderer/__tests__/e2e/Paths.spec.tsx +390 -0
- package/src/renderer/__tests__/e2e/Picture.spec.tsx +134 -0
- package/src/renderer/__tests__/e2e/Point.spec.tsx +35 -0
- package/src/renderer/__tests__/e2e/Rect.spec.tsx +139 -0
- package/src/renderer/__tests__/e2e/RuntimeShader.spec.tsx +324 -0
- package/src/renderer/__tests__/e2e/SDF.spec.tsx +148 -0
- package/src/renderer/__tests__/e2e/SVG.spec.tsx +191 -0
- package/src/renderer/__tests__/e2e/Shader.spec.tsx +260 -0
- package/src/renderer/__tests__/e2e/Snapshot.spec.tsx +29 -0
- package/src/renderer/__tests__/e2e/Surfaces.spec.tsx +17 -0
- package/src/renderer/__tests__/e2e/Text.spec.tsx +109 -0
- package/src/renderer/__tests__/e2e/TextPath.spec.tsx +45 -0
- package/src/renderer/__tests__/e2e/Transforms.spec.tsx +63 -0
- package/src/renderer/__tests__/e2e/Vertices.spec.tsx +30 -0
- package/src/renderer/__tests__/e2e/Video.ts +69 -0
- package/src/renderer/__tests__/e2e/setup/Paragraph.ts +56 -0
- package/src/renderer/__tests__/e2e/setup/SVG.ts +27 -0
- package/src/renderer/__tests__/e2e/setup/SkiaObject.ts +31 -0
- package/src/renderer/__tests__/e2e/setup/index.ts +3 -0
- package/src/renderer/__tests__/examples/BlendModes.spec.tsx +123 -0
- package/src/renderer/__tests__/setup.tsx +489 -0
- package/src/skia/__tests__/ColorFilter.spec.ts +67 -0
- package/src/skia/__tests__/Data.spec.ts +29 -0
- package/src/skia/__tests__/Drawings.spec.ts +119 -0
- package/src/skia/__tests__/Enums.spec.ts +114 -0
- package/src/skia/__tests__/Geometry.spec.ts +39 -0
- package/src/skia/__tests__/ImageFilter.spec.ts +19 -0
- package/src/skia/__tests__/Mock.spec.ts +7 -0
- package/src/skia/__tests__/Paint.spec.ts +25 -0
- package/src/skia/__tests__/Path.spec.ts +386 -0
- package/src/skia/__tests__/RuntimeEffect.spec.ts +66 -0
- package/src/skia/__tests__/Shader.spec.ts +96 -0
- package/src/skia/__tests__/Text.spec.ts +32 -0
- package/src/skia/__tests__/Transform.spec.ts +89 -0
- package/src/skia/__tests__/Vertices.spec.ts +40 -0
- package/src/skia/__tests__/assets/DIN-Medium.ttf +0 -0
- package/src/skia/__tests__/assets/NotoColorEmoji.ttf +0 -0
- package/src/skia/__tests__/assets/NotoSansSC-Regular.otf +0 -0
- package/src/skia/__tests__/assets/Pacifico-Regular.ttf +0 -0
- package/src/skia/__tests__/assets/Roboto-BlackItalic.ttf +0 -0
- package/src/skia/__tests__/assets/Roboto-Bold.ttf +0 -0
- package/src/skia/__tests__/assets/Roboto-Italic.ttf +0 -0
- package/src/skia/__tests__/assets/Roboto-Medium.ttf +0 -0
- package/src/skia/__tests__/assets/Roboto-Regular.ttf +0 -0
- package/src/skia/__tests__/assets/UberMove-Medium_mono.ttf +0 -0
- package/src/skia/__tests__/assets/bird.gif +0 -0
- package/src/skia/__tests__/assets/box.png +0 -0
- package/src/skia/__tests__/assets/box2.png +0 -0
- package/src/skia/__tests__/assets/card.png +0 -0
- package/src/skia/__tests__/assets/mask.png +0 -0
- package/src/skia/__tests__/assets/oslo.jpg +0 -0
- package/src/skia/__tests__/assets/product.png +0 -0
- package/src/skia/__tests__/assets/skia_logo.png +0 -0
- package/src/skia/__tests__/assets/skia_logo_jpeg.jpg +0 -0
- package/src/skia/__tests__/assets/tiger.svg +724 -0
- package/src/skia/__tests__/assets/zurich.jpg +0 -0
- package/src/skia/__tests__/setup.ts +77 -0
@@ -0,0 +1,209 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
import { checkImage } from "../../../__tests__/setup";
|
4
|
+
import {
|
5
|
+
Blur,
|
6
|
+
Circle,
|
7
|
+
FitBox,
|
8
|
+
Group,
|
9
|
+
LinearGradient,
|
10
|
+
Path,
|
11
|
+
Rect,
|
12
|
+
Image,
|
13
|
+
} from "../../components";
|
14
|
+
import { images, importSkia, surface } from "../setup";
|
15
|
+
|
16
|
+
describe("Drawings", () => {
|
17
|
+
it("Should blend colors using multiplication", async () => {
|
18
|
+
const { width, height } = surface;
|
19
|
+
const r = width * 0.33;
|
20
|
+
const image = await surface.draw(
|
21
|
+
<Group blendMode="multiply">
|
22
|
+
<Circle cx={r} cy={r} r={r} color="cyan" />
|
23
|
+
<Circle cx={width - r} cy={r} r={r} color="magenta" />
|
24
|
+
<Circle cx={width / 2} cy={height - r} r={r} color="yellow" />
|
25
|
+
</Group>
|
26
|
+
);
|
27
|
+
checkImage(image, "snapshots/drawings/blend-mode-multiply.png");
|
28
|
+
});
|
29
|
+
|
30
|
+
it("Should use a blur image filter", async () => {
|
31
|
+
const { width, height } = surface;
|
32
|
+
const r = width * 0.33;
|
33
|
+
const image = await surface.draw(
|
34
|
+
<Group blendMode="multiply">
|
35
|
+
<Blur blur={10} />
|
36
|
+
<Circle cx={r} cy={r} r={r} color="cyan" />
|
37
|
+
<Circle cx={width - r} cy={r} r={r} color="magenta" />
|
38
|
+
<Circle cx={width / 2} cy={height - r} r={r} color="yellow" />
|
39
|
+
</Group>
|
40
|
+
);
|
41
|
+
checkImage(image, "snapshots/drawings/blur2.png");
|
42
|
+
});
|
43
|
+
|
44
|
+
it("Should render a transform with the correct origin", async () => {
|
45
|
+
const { Skia } = importSkia();
|
46
|
+
const { width, height } = surface;
|
47
|
+
const r = width * 0.33;
|
48
|
+
const image = await surface.draw(
|
49
|
+
<Group
|
50
|
+
blendMode="multiply"
|
51
|
+
transform={[{ rotate: Math.PI }]}
|
52
|
+
origin={Skia.Point(width / 2, height / 2)}
|
53
|
+
>
|
54
|
+
<Circle cx={r} cy={r} r={r} color={Skia.Color("cyan")} />
|
55
|
+
<Circle cx={width - r} cy={r} r={r} color={Skia.Color("magenta")} />
|
56
|
+
<Circle
|
57
|
+
cx={width / 2}
|
58
|
+
cy={height - r}
|
59
|
+
r={r}
|
60
|
+
color={Skia.Color("yellow")}
|
61
|
+
/>
|
62
|
+
</Group>
|
63
|
+
);
|
64
|
+
checkImage(image, "snapshots/drawings/transform-origin.png");
|
65
|
+
});
|
66
|
+
|
67
|
+
it("Should do rect marshalling properly", async () => {
|
68
|
+
const result = await surface.eval((Skia) => {
|
69
|
+
const path = Skia.Path.Make();
|
70
|
+
path.addRect({ x: 0, y: 0, width: 100, height: 100 });
|
71
|
+
return path.getBounds().width;
|
72
|
+
});
|
73
|
+
expect(result).toBe(100);
|
74
|
+
});
|
75
|
+
|
76
|
+
it("Should render the Skia logo with proper stroke joins and caps", async () => {
|
77
|
+
const { Skia } = importSkia();
|
78
|
+
const { width, height } = surface;
|
79
|
+
const path = Skia.Path.MakeFromSVGString(
|
80
|
+
// eslint-disable-next-line max-len
|
81
|
+
"M512.213 204.005C500.312 185.697 406.758 105.581 332.94 105.581C259.122 105.581 219.088 132 204.638 149.85C157.952 207.52 141.933 264.275 156.579 320.115C175.803 387.854 228.896 449.644 315.859 505.483C415.638 562.238 479.716 626.774 508.093 699.091C518.163 731.13 519.536 762.711 512.213 793.835C504.889 824.959 490.243 853.336 468.273 878.967C449.965 903.683 425.707 921.534 395.499 932.518C365.291 942.588 328.675 950.369 285.651 955.861C182.21 964.1 97.9935 948.538 33 909.176M595.972 733.419C710.397 564.985 795.529 424.47 851.369 311.876C865.1 279.837 875.169 255.579 881.577 239.102C887.985 221.709 894.393 198.824 900.801 170.447C907.208 142.069 909.497 115.98 907.666 92.1797C904.92 68.3793 893.02 51.9021 871.965 40.0019C850.911 28.1016 835.5 31.3101 811.549 44.1212C772.187 65.1754 745.64 101.334 731.909 152.596C723.67 174.566 715.432 200.197 707.193 229.49C699.87 258.783 694.378 281.21 690.716 296.772C687.97 312.334 682.935 340.711 675.612 381.904C668.289 422.182 663.712 445.982 661.881 453.306C643.573 567.731 621.603 733.876 595.972 951.742C624.349 852.878 656.846 774.154 693.462 715.568C706.278 689.937 717.263 669.798 726.417 655.152C735.571 640.505 748.844 624.486 766.237 607.093C784.545 589.701 803.768 576.885 823.907 568.646C892.562 543.015 941.994 545.304 972.202 575.512C990.51 594.735 999.664 618.078 999.664 645.54C1000.58 673.002 990.052 694.514 968.083 710.076C925.059 733.876 859.608 741.657 771.729 733.419C786.375 737.996 797.36 742.115 804.683 745.776C812.922 748.523 822.992 753.1 834.892 759.508C847.707 765.915 857.319 773.696 863.727 782.85C871.05 792.004 875.627 802.531 877.458 814.432C878.373 819.009 879.746 827.705 881.577 840.521C884.323 853.336 886.612 862.948 888.443 869.356C890.273 875.763 892.562 884.002 895.308 894.072C898.97 904.141 903.089 912.837 907.666 920.16C913.159 926.568 919.566 932.976 926.89 939.384C949.775 961.354 987.764 958.607 1040.86 931.145C1056.42 923.822 1070.61 914.668 1083.42 903.683C1097.15 892.698 1109.97 879.425 1121.87 863.863C1134.69 847.386 1144.76 834.113 1152.08 824.043C1159.4 813.058 1169.47 797.039 1182.29 775.985C1195.1 754.931 1204.26 740.742 1209.75 733.419C1239.04 674.833 1268.33 616.247 1297.63 557.661C1252.77 670.256 1223.94 756.304 1211.12 815.805C1205.63 833.197 1203.34 853.336 1204.26 876.221C1205.17 899.106 1212.04 917.414 1224.85 931.145C1234.01 942.13 1245.45 949.453 1259.18 953.115C1273.83 956.777 1287.56 956.319 1300.37 951.742C1356.21 935.265 1401.53 903.226 1436.31 855.625C1456.45 828.163 1483.45 787.427 1517.32 733.419M1360.79 390.143C1347.97 390.143 1340.19 384.193 1337.45 372.293C1335.62 359.477 1336.99 348.492 1341.57 339.338C1345.24 332 1357.13 333.846 1369.03 333.846C1380.93 333.846 1390.5 340.5 1391 348.95M1925.13 697.718C1902.25 633.64 1874.33 593.82 1841.38 578.258C1810.25 559.95 1775.47 551.254 1737.02 552.169C1698.57 552.169 1664.25 562.238 1634.04 582.377C1605.66 598.855 1581.4 620.824 1561.26 648.286C1541.12 674.833 1527.39 704.126 1520.07 736.165C1513.66 767.288 1514.58 798.87 1522.82 830.909C1531.97 862.032 1547.53 888.579 1569.5 910.549C1604.29 939.842 1646.4 954.488 1695.83 954.488C1745.26 954.488 1787.82 939.842 1823.53 910.549C1838.17 895.902 1848.7 885.375 1855.11 878.967C1861.51 872.56 1868.84 863.406 1877.08 851.505C1886.23 839.605 1893.55 827.247 1899.05 814.432M1958.09 556.288C1933.37 657.898 1916.9 746.234 1908.66 821.297C1900.42 878.967 1911.4 918.787 1941.61 940.757C1964.5 959.065 2000.2 956.319 2048.71 932.518C2090.82 912.38 2131.1 873.017 2169.55 814.432"
|
82
|
+
)!;
|
83
|
+
const PADDING = width / 16;
|
84
|
+
const image = await surface.draw(
|
85
|
+
<FitBox
|
86
|
+
src={Skia.XYWHRect(0, 0, 2139, 928)}
|
87
|
+
dst={Skia.XYWHRect(
|
88
|
+
PADDING,
|
89
|
+
PADDING,
|
90
|
+
width - PADDING * 2,
|
91
|
+
height - PADDING * 2
|
92
|
+
)}
|
93
|
+
>
|
94
|
+
<Group strokeJoin="round" strokeCap="round">
|
95
|
+
<LinearGradient
|
96
|
+
start={path.getPoint(0)}
|
97
|
+
end={path.getLastPt()}
|
98
|
+
colors={[
|
99
|
+
"#3FCEBC",
|
100
|
+
"#3CBCEB",
|
101
|
+
"#5F96E7",
|
102
|
+
"#816FE3",
|
103
|
+
"#9F5EE2",
|
104
|
+
"#DE589F",
|
105
|
+
"#FF645E",
|
106
|
+
"#FDA859",
|
107
|
+
"#FAEC54",
|
108
|
+
"#9EE671",
|
109
|
+
"#41E08D",
|
110
|
+
]}
|
111
|
+
/>
|
112
|
+
<Path path={path} style="stroke" strokeWidth={116} />
|
113
|
+
</Group>
|
114
|
+
</FitBox>
|
115
|
+
);
|
116
|
+
checkImage(image, "snapshots/paths/skia.png");
|
117
|
+
});
|
118
|
+
|
119
|
+
it("Should trim a path properly", async () => {
|
120
|
+
const { Skia } = importSkia();
|
121
|
+
const { width, height } = surface;
|
122
|
+
const path = Skia.Path.MakeFromSVGString(
|
123
|
+
// eslint-disable-next-line max-len
|
124
|
+
"M512.213 204.005C500.312 185.697 406.758 105.581 332.94 105.581C259.122 105.581 219.088 132 204.638 149.85C157.952 207.52 141.933 264.275 156.579 320.115C175.803 387.854 228.896 449.644 315.859 505.483C415.638 562.238 479.716 626.774 508.093 699.091C518.163 731.13 519.536 762.711 512.213 793.835C504.889 824.959 490.243 853.336 468.273 878.967C449.965 903.683 425.707 921.534 395.499 932.518C365.291 942.588 328.675 950.369 285.651 955.861C182.21 964.1 97.9935 948.538 33 909.176M595.972 733.419C710.397 564.985 795.529 424.47 851.369 311.876C865.1 279.837 875.169 255.579 881.577 239.102C887.985 221.709 894.393 198.824 900.801 170.447C907.208 142.069 909.497 115.98 907.666 92.1797C904.92 68.3793 893.02 51.9021 871.965 40.0019C850.911 28.1016 835.5 31.3101 811.549 44.1212C772.187 65.1754 745.64 101.334 731.909 152.596C723.67 174.566 715.432 200.197 707.193 229.49C699.87 258.783 694.378 281.21 690.716 296.772C687.97 312.334 682.935 340.711 675.612 381.904C668.289 422.182 663.712 445.982 661.881 453.306C643.573 567.731 621.603 733.876 595.972 951.742C624.349 852.878 656.846 774.154 693.462 715.568C706.278 689.937 717.263 669.798 726.417 655.152C735.571 640.505 748.844 624.486 766.237 607.093C784.545 589.701 803.768 576.885 823.907 568.646C892.562 543.015 941.994 545.304 972.202 575.512C990.51 594.735 999.664 618.078 999.664 645.54C1000.58 673.002 990.052 694.514 968.083 710.076C925.059 733.876 859.608 741.657 771.729 733.419C786.375 737.996 797.36 742.115 804.683 745.776C812.922 748.523 822.992 753.1 834.892 759.508C847.707 765.915 857.319 773.696 863.727 782.85C871.05 792.004 875.627 802.531 877.458 814.432C878.373 819.009 879.746 827.705 881.577 840.521C884.323 853.336 886.612 862.948 888.443 869.356C890.273 875.763 892.562 884.002 895.308 894.072C898.97 904.141 903.089 912.837 907.666 920.16C913.159 926.568 919.566 932.976 926.89 939.384C949.775 961.354 987.764 958.607 1040.86 931.145C1056.42 923.822 1070.61 914.668 1083.42 903.683C1097.15 892.698 1109.97 879.425 1121.87 863.863C1134.69 847.386 1144.76 834.113 1152.08 824.043C1159.4 813.058 1169.47 797.039 1182.29 775.985C1195.1 754.931 1204.26 740.742 1209.75 733.419C1239.04 674.833 1268.33 616.247 1297.63 557.661C1252.77 670.256 1223.94 756.304 1211.12 815.805C1205.63 833.197 1203.34 853.336 1204.26 876.221C1205.17 899.106 1212.04 917.414 1224.85 931.145C1234.01 942.13 1245.45 949.453 1259.18 953.115C1273.83 956.777 1287.56 956.319 1300.37 951.742C1356.21 935.265 1401.53 903.226 1436.31 855.625C1456.45 828.163 1483.45 787.427 1517.32 733.419M1360.79 390.143C1347.97 390.143 1340.19 384.193 1337.45 372.293C1335.62 359.477 1336.99 348.492 1341.57 339.338C1345.24 332 1357.13 333.846 1369.03 333.846C1380.93 333.846 1390.5 340.5 1391 348.95M1925.13 697.718C1902.25 633.64 1874.33 593.82 1841.38 578.258C1810.25 559.95 1775.47 551.254 1737.02 552.169C1698.57 552.169 1664.25 562.238 1634.04 582.377C1605.66 598.855 1581.4 620.824 1561.26 648.286C1541.12 674.833 1527.39 704.126 1520.07 736.165C1513.66 767.288 1514.58 798.87 1522.82 830.909C1531.97 862.032 1547.53 888.579 1569.5 910.549C1604.29 939.842 1646.4 954.488 1695.83 954.488C1745.26 954.488 1787.82 939.842 1823.53 910.549C1838.17 895.902 1848.7 885.375 1855.11 878.967C1861.51 872.56 1868.84 863.406 1877.08 851.505C1886.23 839.605 1893.55 827.247 1899.05 814.432M1958.09 556.288C1933.37 657.898 1916.9 746.234 1908.66 821.297C1900.42 878.967 1911.4 918.787 1941.61 940.757C1964.5 959.065 2000.2 956.319 2048.71 932.518C2090.82 912.38 2131.1 873.017 2169.55 814.432"
|
125
|
+
)!;
|
126
|
+
const PADDING = width / 16;
|
127
|
+
const image = await surface.draw(
|
128
|
+
<FitBox
|
129
|
+
src={Skia.XYWHRect(0, 0, 2139, 928)}
|
130
|
+
dst={Skia.XYWHRect(
|
131
|
+
PADDING,
|
132
|
+
PADDING,
|
133
|
+
width - PADDING * 2,
|
134
|
+
height - PADDING * 2
|
135
|
+
)}
|
136
|
+
>
|
137
|
+
<Group strokeJoin="round" strokeCap="round" color="black">
|
138
|
+
<Path path={path} style="stroke" strokeWidth={116} end={0.5} />
|
139
|
+
</Group>
|
140
|
+
</FitBox>
|
141
|
+
);
|
142
|
+
checkImage(image, "snapshots/paths/skia-trimmed.png");
|
143
|
+
});
|
144
|
+
|
145
|
+
it("Should clamp the trim values automatically", async () => {
|
146
|
+
const { Skia } = importSkia();
|
147
|
+
const { width, height } = surface;
|
148
|
+
const path = Skia.Path.MakeFromSVGString(
|
149
|
+
// eslint-disable-next-line max-len
|
150
|
+
"M512.213 204.005C500.312 185.697 406.758 105.581 332.94 105.581C259.122 105.581 219.088 132 204.638 149.85C157.952 207.52 141.933 264.275 156.579 320.115C175.803 387.854 228.896 449.644 315.859 505.483C415.638 562.238 479.716 626.774 508.093 699.091C518.163 731.13 519.536 762.711 512.213 793.835C504.889 824.959 490.243 853.336 468.273 878.967C449.965 903.683 425.707 921.534 395.499 932.518C365.291 942.588 328.675 950.369 285.651 955.861C182.21 964.1 97.9935 948.538 33 909.176M595.972 733.419C710.397 564.985 795.529 424.47 851.369 311.876C865.1 279.837 875.169 255.579 881.577 239.102C887.985 221.709 894.393 198.824 900.801 170.447C907.208 142.069 909.497 115.98 907.666 92.1797C904.92 68.3793 893.02 51.9021 871.965 40.0019C850.911 28.1016 835.5 31.3101 811.549 44.1212C772.187 65.1754 745.64 101.334 731.909 152.596C723.67 174.566 715.432 200.197 707.193 229.49C699.87 258.783 694.378 281.21 690.716 296.772C687.97 312.334 682.935 340.711 675.612 381.904C668.289 422.182 663.712 445.982 661.881 453.306C643.573 567.731 621.603 733.876 595.972 951.742C624.349 852.878 656.846 774.154 693.462 715.568C706.278 689.937 717.263 669.798 726.417 655.152C735.571 640.505 748.844 624.486 766.237 607.093C784.545 589.701 803.768 576.885 823.907 568.646C892.562 543.015 941.994 545.304 972.202 575.512C990.51 594.735 999.664 618.078 999.664 645.54C1000.58 673.002 990.052 694.514 968.083 710.076C925.059 733.876 859.608 741.657 771.729 733.419C786.375 737.996 797.36 742.115 804.683 745.776C812.922 748.523 822.992 753.1 834.892 759.508C847.707 765.915 857.319 773.696 863.727 782.85C871.05 792.004 875.627 802.531 877.458 814.432C878.373 819.009 879.746 827.705 881.577 840.521C884.323 853.336 886.612 862.948 888.443 869.356C890.273 875.763 892.562 884.002 895.308 894.072C898.97 904.141 903.089 912.837 907.666 920.16C913.159 926.568 919.566 932.976 926.89 939.384C949.775 961.354 987.764 958.607 1040.86 931.145C1056.42 923.822 1070.61 914.668 1083.42 903.683C1097.15 892.698 1109.97 879.425 1121.87 863.863C1134.69 847.386 1144.76 834.113 1152.08 824.043C1159.4 813.058 1169.47 797.039 1182.29 775.985C1195.1 754.931 1204.26 740.742 1209.75 733.419C1239.04 674.833 1268.33 616.247 1297.63 557.661C1252.77 670.256 1223.94 756.304 1211.12 815.805C1205.63 833.197 1203.34 853.336 1204.26 876.221C1205.17 899.106 1212.04 917.414 1224.85 931.145C1234.01 942.13 1245.45 949.453 1259.18 953.115C1273.83 956.777 1287.56 956.319 1300.37 951.742C1356.21 935.265 1401.53 903.226 1436.31 855.625C1456.45 828.163 1483.45 787.427 1517.32 733.419M1360.79 390.143C1347.97 390.143 1340.19 384.193 1337.45 372.293C1335.62 359.477 1336.99 348.492 1341.57 339.338C1345.24 332 1357.13 333.846 1369.03 333.846C1380.93 333.846 1390.5 340.5 1391 348.95M1925.13 697.718C1902.25 633.64 1874.33 593.82 1841.38 578.258C1810.25 559.95 1775.47 551.254 1737.02 552.169C1698.57 552.169 1664.25 562.238 1634.04 582.377C1605.66 598.855 1581.4 620.824 1561.26 648.286C1541.12 674.833 1527.39 704.126 1520.07 736.165C1513.66 767.288 1514.58 798.87 1522.82 830.909C1531.97 862.032 1547.53 888.579 1569.5 910.549C1604.29 939.842 1646.4 954.488 1695.83 954.488C1745.26 954.488 1787.82 939.842 1823.53 910.549C1838.17 895.902 1848.7 885.375 1855.11 878.967C1861.51 872.56 1868.84 863.406 1877.08 851.505C1886.23 839.605 1893.55 827.247 1899.05 814.432M1958.09 556.288C1933.37 657.898 1916.9 746.234 1908.66 821.297C1900.42 878.967 1911.4 918.787 1941.61 940.757C1964.5 959.065 2000.2 956.319 2048.71 932.518C2090.82 912.38 2131.1 873.017 2169.55 814.432"
|
151
|
+
)!;
|
152
|
+
const PADDING = width / 16;
|
153
|
+
const image = await surface.draw(
|
154
|
+
<FitBox
|
155
|
+
src={Skia.XYWHRect(0, 0, 2139, 928)}
|
156
|
+
dst={Skia.XYWHRect(
|
157
|
+
PADDING,
|
158
|
+
PADDING,
|
159
|
+
width - PADDING * 2,
|
160
|
+
height - PADDING * 2
|
161
|
+
)}
|
162
|
+
>
|
163
|
+
<Group strokeJoin="round" strokeCap="round" color="black">
|
164
|
+
<Path path={path} style="stroke" strokeWidth={116} end={1.009}>
|
165
|
+
<LinearGradient
|
166
|
+
start={path.getPoint(0)}
|
167
|
+
end={path.getLastPt()}
|
168
|
+
colors={[
|
169
|
+
"#3FCEBC",
|
170
|
+
"#3CBCEB",
|
171
|
+
"#5F96E7",
|
172
|
+
"#816FE3",
|
173
|
+
"#9F5EE2",
|
174
|
+
"#DE589F",
|
175
|
+
"#FF645E",
|
176
|
+
"#FDA859",
|
177
|
+
"#FAEC54",
|
178
|
+
"#9EE671",
|
179
|
+
"#41E08D",
|
180
|
+
]}
|
181
|
+
/>
|
182
|
+
</Path>
|
183
|
+
</Group>
|
184
|
+
</FitBox>
|
185
|
+
);
|
186
|
+
checkImage(image, "snapshots/paths/skia.png");
|
187
|
+
});
|
188
|
+
|
189
|
+
it("should use default props (1)", async () => {
|
190
|
+
const image = await surface.draw(
|
191
|
+
<Group strokeJoin="round" strokeCap="round" color="black">
|
192
|
+
<Rect width={64} height={64} color="lightblue" />
|
193
|
+
<Circle r={128} color="rgba(100, 200, 300, 0.5)" />
|
194
|
+
</Group>
|
195
|
+
);
|
196
|
+
checkImage(image, "snapshots/drawings/default-props.png");
|
197
|
+
});
|
198
|
+
|
199
|
+
it("should use default props for Images (2)", async () => {
|
200
|
+
const { oslo } = images;
|
201
|
+
const { width, height } = surface;
|
202
|
+
const image = await surface.draw(
|
203
|
+
<Group>
|
204
|
+
<Image image={oslo} x={0} y={0} width={width} height={height} />
|
205
|
+
</Group>
|
206
|
+
);
|
207
|
+
checkImage(image, "snapshots/drawings/image-default-props.png");
|
208
|
+
});
|
209
|
+
});
|
@@ -0,0 +1,150 @@
|
|
1
|
+
import { itRunsE2eOnly } from "../../../__tests__/setup";
|
2
|
+
import { surface, testingFonts } from "../setup";
|
3
|
+
import { FontStyle } from "../../../skia/types";
|
4
|
+
|
5
|
+
// Currently this tests only run on iOS and Android
|
6
|
+
// We've contributed a patch to CanvasKit to make it work on Web too in the next release:
|
7
|
+
// https://github.com/google/skia/blob/main/modules/canvaskit/CHANGELOG.md#unreleased
|
8
|
+
describe("FontMgr", () => {
|
9
|
+
itRunsE2eOnly(
|
10
|
+
"Custom font manager should work on every platform",
|
11
|
+
async () => {
|
12
|
+
const result = await surface.eval(
|
13
|
+
(Skia, { fonts }) => {
|
14
|
+
const fontMgr = Skia.TypefaceFontProvider.Make();
|
15
|
+
(Object.keys(fonts) as (keyof typeof fonts)[]).flatMap(
|
16
|
+
(familyName) => {
|
17
|
+
const typefaces = fonts[familyName];
|
18
|
+
typefaces.forEach((typeface) => {
|
19
|
+
const data = Skia.Data.fromBytes(new Uint8Array(typeface));
|
20
|
+
fontMgr.registerFont(
|
21
|
+
Skia.Typeface.MakeFreeTypeFaceFromData(data)!,
|
22
|
+
familyName
|
23
|
+
);
|
24
|
+
});
|
25
|
+
}
|
26
|
+
);
|
27
|
+
const familyNames = new Array(fontMgr.countFamilies())
|
28
|
+
.fill(0)
|
29
|
+
.map((_, i) => fontMgr.getFamilyName(i));
|
30
|
+
|
31
|
+
const identities = new Array(fontMgr.countFamilies())
|
32
|
+
.fill(0)
|
33
|
+
.map((_, i) => {
|
34
|
+
const t1 = fontMgr.matchFamilyStyle(fontMgr.getFamilyName(i), {
|
35
|
+
weight: 400,
|
36
|
+
});
|
37
|
+
const t2 = fontMgr.matchFamilyStyle(fontMgr.getFamilyName(i), {
|
38
|
+
weight: 900,
|
39
|
+
});
|
40
|
+
return t1 !== t2;
|
41
|
+
});
|
42
|
+
return { familyNames, identities };
|
43
|
+
},
|
44
|
+
{ fonts: testingFonts }
|
45
|
+
);
|
46
|
+
expect(result.identities).toEqual([true]);
|
47
|
+
expect(result.familyNames.length).toBeGreaterThan(0);
|
48
|
+
expect(result.familyNames.indexOf("Helvetica")).toBe(-1);
|
49
|
+
expect(result.familyNames.indexOf("Roboto")).not.toBe(-1);
|
50
|
+
}
|
51
|
+
);
|
52
|
+
itRunsE2eOnly("system font managers have at least one font", async () => {
|
53
|
+
const names = await surface.eval((Skia) => {
|
54
|
+
const fontMgr = Skia.FontMgr.System();
|
55
|
+
return new Array(fontMgr.countFamilies())
|
56
|
+
.fill(0)
|
57
|
+
.map((_, i) => fontMgr.getFamilyName(i));
|
58
|
+
});
|
59
|
+
expect(names.length).toBeGreaterThan(0);
|
60
|
+
if (surface.OS === "ios") {
|
61
|
+
expect(names.indexOf("Apple Color Emoji")).not.toBe(-1);
|
62
|
+
} else {
|
63
|
+
expect(names.indexOf("Apple Color Emoji")).toBe(-1);
|
64
|
+
}
|
65
|
+
if (surface.OS === "ios") {
|
66
|
+
expect(names.indexOf("Helvetica")).not.toBe(-1);
|
67
|
+
} else {
|
68
|
+
expect(names.indexOf("Helvetica")).toBe(-1);
|
69
|
+
}
|
70
|
+
});
|
71
|
+
itRunsE2eOnly("Non-emoji font shouldn't resolve emojis", async () => {
|
72
|
+
const width = await surface.eval(
|
73
|
+
(Skia, { fontStyle }) => {
|
74
|
+
const fontMgr = Skia.FontMgr.System();
|
75
|
+
const typeface = fontMgr.matchFamilyStyle(
|
76
|
+
fontMgr.getFamilyName(0),
|
77
|
+
fontStyle.Normal
|
78
|
+
);
|
79
|
+
const font = Skia.Font(typeface, 10);
|
80
|
+
return font.getGlyphIDs("😉😍");
|
81
|
+
},
|
82
|
+
{ fontStyle: FontStyle }
|
83
|
+
);
|
84
|
+
expect(width).toEqual([0, 0]);
|
85
|
+
});
|
86
|
+
itRunsE2eOnly("Emoji fonts should resolve emojis", async () => {
|
87
|
+
const fontName =
|
88
|
+
surface.OS === "ios" ? "Apple Color Emoji" : "Noto Color Emoji";
|
89
|
+
const width = await surface.eval(
|
90
|
+
(Skia, { fontStyle, familyName }) => {
|
91
|
+
const fontMgr = Skia.FontMgr.System();
|
92
|
+
const typeface = fontMgr.matchFamilyStyle(familyName, fontStyle.Normal);
|
93
|
+
const font = Skia.Font(typeface, 10);
|
94
|
+
return font.getGlyphIDs("😉😍");
|
95
|
+
},
|
96
|
+
{ fontStyle: FontStyle, familyName: fontName }
|
97
|
+
);
|
98
|
+
if (surface.OS === "android") {
|
99
|
+
expect(width).toEqual([0, 0]);
|
100
|
+
} else {
|
101
|
+
expect(width).not.toEqual([0, 0]);
|
102
|
+
}
|
103
|
+
});
|
104
|
+
itRunsE2eOnly("Shouldn't crash the font cannot be resolved", async () => {
|
105
|
+
const result = await surface.eval(
|
106
|
+
(Skia, { fonts }) => {
|
107
|
+
const fontMgr = Skia.TypefaceFontProvider.Make();
|
108
|
+
(Object.keys(fonts) as (keyof typeof fonts)[]).flatMap((familyName) => {
|
109
|
+
const typefaces = fonts[familyName];
|
110
|
+
typefaces.forEach((typeface) => {
|
111
|
+
const data = Skia.Data.fromBytes(new Uint8Array(typeface));
|
112
|
+
fontMgr.registerFont(
|
113
|
+
Skia.Typeface.MakeFreeTypeFaceFromData(data)!,
|
114
|
+
familyName
|
115
|
+
);
|
116
|
+
});
|
117
|
+
});
|
118
|
+
let exists1 = true;
|
119
|
+
let exists2 = true;
|
120
|
+
let exists3 = true;
|
121
|
+
try {
|
122
|
+
fontMgr.matchFamilyStyle("Robot", {
|
123
|
+
weight: 400,
|
124
|
+
});
|
125
|
+
} catch {
|
126
|
+
exists1 = false;
|
127
|
+
}
|
128
|
+
try {
|
129
|
+
fontMgr.matchFamilyStyle("Roboto", {
|
130
|
+
weight: 100,
|
131
|
+
});
|
132
|
+
} catch {
|
133
|
+
exists2 = false;
|
134
|
+
}
|
135
|
+
try {
|
136
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
137
|
+
// @ts-expect-error
|
138
|
+
fontMgr.matchFamilyStyle();
|
139
|
+
} catch {
|
140
|
+
exists3 = false;
|
141
|
+
}
|
142
|
+
return { exists1, exists2, exists3 };
|
143
|
+
},
|
144
|
+
{ fonts: testingFonts }
|
145
|
+
);
|
146
|
+
expect(result.exists1).toBe(false);
|
147
|
+
expect(result.exists2).toBe(true);
|
148
|
+
expect(result.exists3).toBe(false);
|
149
|
+
});
|
150
|
+
});
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
import { surface } from "../setup";
|
4
|
+
import { Fill } from "../../components";
|
5
|
+
import { checkImage } from "../../../__tests__/setup";
|
6
|
+
import { LinearGradient } from "../../components/shaders/LinearGradient";
|
7
|
+
|
8
|
+
describe("Gradient", () => {
|
9
|
+
it("should display a simple linear gradient", async () => {
|
10
|
+
const vec = (x: number, y: number) => ({ x, y });
|
11
|
+
const colors = ["#61dafb", "#fb61da", "#61fbcf", "#dafb61"];
|
12
|
+
const { width, height } = surface;
|
13
|
+
const start = vec(0, 0);
|
14
|
+
const end = vec(width, height);
|
15
|
+
|
16
|
+
const img = await surface.draw(
|
17
|
+
<Fill>
|
18
|
+
<LinearGradient colors={colors} start={start} end={end} />
|
19
|
+
</Fill>
|
20
|
+
);
|
21
|
+
checkImage(img, "snapshots/gradient/linear.png");
|
22
|
+
});
|
23
|
+
it("should display a simple linear gradient with opacity", async () => {
|
24
|
+
const vec = (x: number, y: number) => ({ x, y });
|
25
|
+
const colors = ["#61dafb", "#fb61da", "#61fbcf", "#dafb61"];
|
26
|
+
const { width, height } = surface;
|
27
|
+
const start = vec(0, 0);
|
28
|
+
const end = vec(width, height);
|
29
|
+
|
30
|
+
const img = await surface.draw(
|
31
|
+
<>
|
32
|
+
<Fill color="white" />
|
33
|
+
<Fill opacity={0.5}>
|
34
|
+
<LinearGradient colors={colors} start={start} end={end} />
|
35
|
+
</Fill>
|
36
|
+
</>
|
37
|
+
);
|
38
|
+
checkImage(img, "snapshots/gradient/linear-with-opacity.png");
|
39
|
+
});
|
40
|
+
});
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
import { checkImage, docPath } from "../../../__tests__/setup";
|
4
|
+
import { Image, Group, Fill, FitBox, Path } from "../../components";
|
5
|
+
import { images, importSkia, PIXEL_RATIO, surface } from "../setup";
|
6
|
+
|
7
|
+
describe("Group", () => {
|
8
|
+
it("Should use a rectangle as a clip", async () => {
|
9
|
+
const { oslo } = images;
|
10
|
+
const { width } = surface;
|
11
|
+
const size = width;
|
12
|
+
const padding = 48 / 3;
|
13
|
+
|
14
|
+
const { rect } = importSkia();
|
15
|
+
const rct = rect(padding, padding, size - padding * 2, size - padding * 2);
|
16
|
+
const img = await surface.draw(
|
17
|
+
<>
|
18
|
+
<Fill color="lightblue" />
|
19
|
+
<Group clip={rct}>
|
20
|
+
<Image
|
21
|
+
image={oslo}
|
22
|
+
x={0}
|
23
|
+
y={0}
|
24
|
+
width={size}
|
25
|
+
height={size}
|
26
|
+
fit="cover"
|
27
|
+
/>
|
28
|
+
</Group>
|
29
|
+
</>
|
30
|
+
);
|
31
|
+
checkImage(img, docPath("group/clip-rect.png"));
|
32
|
+
});
|
33
|
+
it("Should use a rounded rectangle as a clip", async () => {
|
34
|
+
const { oslo } = images;
|
35
|
+
const { width } = surface;
|
36
|
+
const size = width;
|
37
|
+
const padding = 48 / 3;
|
38
|
+
const r = 24 / 3;
|
39
|
+
const { rect, rrect } = importSkia();
|
40
|
+
const rct = rrect(
|
41
|
+
rect(padding, padding, size - padding * 2, size - padding * 2),
|
42
|
+
r,
|
43
|
+
r
|
44
|
+
);
|
45
|
+
const img = await surface.draw(
|
46
|
+
<Group clip={rct}>
|
47
|
+
<Image
|
48
|
+
image={oslo}
|
49
|
+
x={0}
|
50
|
+
y={0}
|
51
|
+
width={size}
|
52
|
+
height={size}
|
53
|
+
fit="cover"
|
54
|
+
/>
|
55
|
+
</Group>
|
56
|
+
);
|
57
|
+
checkImage(img, docPath("group/clip-rrect.png"));
|
58
|
+
});
|
59
|
+
it("Should use a path as a clip", async () => {
|
60
|
+
const { oslo } = images;
|
61
|
+
const { processTransform2d, Skia } = importSkia();
|
62
|
+
const star = Skia.Path.MakeFromSVGString(
|
63
|
+
"M 128 0 L 168 80 L 256 93 L 192 155 L 207 244 L 128 202 L 49 244 L 64 155 L 0 93 L 88 80 L 128 0 Z"
|
64
|
+
)!;
|
65
|
+
expect(star).toBeTruthy();
|
66
|
+
star.transform(processTransform2d([{ scale: 1 }]));
|
67
|
+
const size = surface.width;
|
68
|
+
const img = await surface.draw(
|
69
|
+
<Group clip={star}>
|
70
|
+
<Image
|
71
|
+
image={oslo}
|
72
|
+
x={0}
|
73
|
+
y={0}
|
74
|
+
width={size}
|
75
|
+
height={size}
|
76
|
+
fit="cover"
|
77
|
+
/>
|
78
|
+
</Group>
|
79
|
+
);
|
80
|
+
checkImage(img, docPath("group/clip-path.png"));
|
81
|
+
});
|
82
|
+
it("Should invert a clip", async () => {
|
83
|
+
const { oslo } = images;
|
84
|
+
const { width } = surface;
|
85
|
+
const size = width;
|
86
|
+
const { processTransform2d, Skia } = importSkia();
|
87
|
+
const star = Skia.Path.MakeFromSVGString(
|
88
|
+
"M 128 0 L 168 80 L 256 93 L 192 155 L 207 244 L 128 202 L 49 244 L 64 155 L 0 93 L 88 80 L 128 0 Z"
|
89
|
+
)!;
|
90
|
+
expect(star).toBeTruthy();
|
91
|
+
star.transform(processTransform2d([{ scale: 1 }]));
|
92
|
+
const img = await surface.draw(
|
93
|
+
<Group clip={star} invertClip>
|
94
|
+
<Image
|
95
|
+
image={oslo}
|
96
|
+
x={0}
|
97
|
+
y={0}
|
98
|
+
width={size}
|
99
|
+
height={size}
|
100
|
+
fit="cover"
|
101
|
+
/>
|
102
|
+
</Group>
|
103
|
+
);
|
104
|
+
checkImage(img, docPath("group/invert-clip.png"));
|
105
|
+
});
|
106
|
+
it("Should scale an SVG Path properly", async () => {
|
107
|
+
const { width, height } = surface;
|
108
|
+
const { rect, Skia } = importSkia();
|
109
|
+
const svgPath =
|
110
|
+
// eslint-disable-next-line max-len
|
111
|
+
"M481.586 193.457C470.446 176.319 382.871 101.323 313.771 101.323C244.671 101.323 207.195 126.054 193.668 142.763C149.967 196.747 134.971 249.875 148.681 302.146C166.676 365.556 216.376 423.397 297.781 475.668C391.183 528.795 451.166 589.207 477.73 656.902C487.156 686.893 488.441 716.456 481.586 745.591C474.731 774.725 461.021 801.289 440.455 825.282C423.317 848.419 400.609 865.128 372.332 875.411C344.054 884.837 309.778 892.12 269.504 897.262C172.674 904.974 93.8398 890.407 33 853.56M559.992 689.035C667.105 531.366 746.796 399.832 799.067 294.434C811.92 264.442 821.346 241.735 827.344 226.31C833.343 210.029 839.341 188.607 845.339 162.043C851.338 135.479 853.48 111.058 851.766 88.7783C849.195 66.4989 838.056 51.0748 818.347 39.9351C798.638 28.7954 784.212 31.7989 761.792 43.7911C724.945 63.4998 700.095 97.3473 687.242 145.334C679.53 165.899 671.817 189.892 664.105 217.313C657.25 244.734 652.109 265.728 648.681 280.295C646.111 294.862 641.398 321.426 634.542 359.987C627.687 397.69 623.403 419.969 621.689 426.825C604.551 533.937 583.985 689.464 559.992 893.406C586.556 800.861 616.976 727.167 651.252 672.326C663.248 648.333 673.531 629.481 682.1 615.771C690.669 602.06 703.094 587.065 719.375 570.784C736.513 554.502 754.508 542.506 773.36 534.794C837.627 510.801 883.9 512.943 912.177 541.221C929.315 559.215 937.884 581.066 937.884 606.773C938.741 632.48 928.887 652.617 908.321 667.185C868.047 689.464 806.779 696.748 724.517 689.035C738.227 693.32 748.51 697.176 755.365 700.604C763.077 703.174 772.503 707.459 783.643 713.457C795.639 719.455 804.637 726.739 810.635 735.308C817.49 743.877 821.775 753.731 823.488 764.871C824.345 769.155 825.631 777.296 827.344 789.293C829.915 801.289 832.057 810.287 833.771 816.285C835.485 822.283 837.627 829.995 840.198 839.421C843.626 848.847 847.482 856.987 851.766 863.843C856.907 869.841 862.906 875.839 869.761 881.838C891.183 902.403 926.745 899.832 976.445 874.125C991.012 867.27 1004.29 858.701 1016.29 848.418C1029.14 838.136 1041.14 825.711 1052.28 811.143C1064.28 795.719 1073.7 783.294 1080.56 773.868C1087.41 763.586 1096.84 748.59 1108.84 728.881C1120.83 709.173 1129.4 695.891 1134.54 689.035C1161.96 634.194 1189.38 579.352 1216.8 524.511C1174.82 629.909 1147.82 710.458 1135.83 766.156C1130.69 782.437 1128.54 801.289 1129.4 822.712C1130.26 844.134 1136.68 861.272 1148.68 874.125C1157.25 884.408 1167.96 891.263 1180.81 894.691C1194.53 898.119 1207.38 897.69 1219.38 893.406C1271.65 877.981 1314.06 847.99 1346.62 803.431C1365.48 777.724 1390.75 739.592 1422.46 689.035M1275.93 367.699C1263.93 367.699 1256.65 362.129 1254.08 350.989C1252.37 338.993 1253.65 328.71 1257.94 320.141C1261.37 313.272 1272.5 314.999 1283.64 314.999C1294.78 314.999 1303.74 321.228 1304.21 329.138M1804.21 655.616C1782.79 595.634 1756.65 558.358 1725.8 543.791C1696.67 526.653 1664.11 518.513 1628.12 519.37C1592.13 519.37 1559.99 528.796 1531.71 547.647C1505.15 563.071 1482.44 583.637 1463.59 609.344C1444.74 634.194 1431.89 661.615 1425.03 691.606C1419.03 720.741 1419.89 750.304 1427.6 780.295C1436.17 809.43 1450.74 834.28 1471.3 854.845C1503.87 882.266 1543.28 895.976 1589.56 895.976C1635.83 895.976 1675.67 882.266 1709.09 854.845C1722.8 841.135 1732.66 831.281 1738.66 825.282C1744.65 819.284 1751.51 810.715 1759.22 799.575C1767.79 788.436 1774.65 776.868 1779.79 764.871M1835.06 523.226C1811.92 618.341 1796.5 701.032 1788.78 771.298C1781.07 825.282 1791.35 862.557 1819.63 883.123C1841.05 900.261 1874.47 897.69 1919.89 875.411C1959.31 856.559 1997.01 819.712 2033 764.871";
|
112
|
+
const path = Skia.Path.MakeFromSVGString(svgPath)!;
|
113
|
+
expect(path).toBeTruthy();
|
114
|
+
const src = path.computeTightBounds();
|
115
|
+
const strokeWidth = 30 * PIXEL_RATIO;
|
116
|
+
const img = await surface.draw(
|
117
|
+
<FitBox src={src} dst={rect(0, 0, width, height)}>
|
118
|
+
<Path
|
119
|
+
path={path}
|
120
|
+
strokeCap="round"
|
121
|
+
strokeJoin="round"
|
122
|
+
style="stroke"
|
123
|
+
strokeWidth={strokeWidth}
|
124
|
+
/>
|
125
|
+
</FitBox>
|
126
|
+
);
|
127
|
+
checkImage(img, docPath("group/scale-path.png"));
|
128
|
+
});
|
129
|
+
});
|