@shopify/react-native-skia 0.0.135
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +7 -0
- package/README.md +52 -0
- package/android/CMakeLists.txt +151 -0
- package/android/README.md +14 -0
- package/android/build.gradle +258 -0
- package/android/cpp/jni/JniLoad.cpp +13 -0
- package/android/cpp/jni/JniPlatformContext.cpp +142 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +113 -0
- package/android/cpp/jni/JniSkiaManager.cpp +57 -0
- package/android/cpp/jni/include/JniPlatformContext.h +75 -0
- package/android/cpp/jni/include/JniSkiaDrawView.h +78 -0
- package/android/cpp/jni/include/JniSkiaManager.h +81 -0
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.cpp +73 -0
- package/android/cpp/rnskia-android/RNSkDrawViewImpl.h +48 -0
- package/android/cpp/rnskia-android/RNSkPlatformContextImpl.h +54 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +325 -0
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +131 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/shopify/reactnative/skia/PlatformContext.java +181 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +88 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +24 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaViewManager.java +72 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +131 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaManager.java +66 -0
- package/cpp/api/JsiSkApi.h +105 -0
- package/cpp/api/JsiSkCanvas.h +540 -0
- package/cpp/api/JsiSkColor.h +83 -0
- package/cpp/api/JsiSkColorFilter.h +43 -0
- package/cpp/api/JsiSkColorFilterFactory.h +99 -0
- package/cpp/api/JsiSkContourMeasure.h +102 -0
- package/cpp/api/JsiSkContourMeasureIter.h +90 -0
- package/cpp/api/JsiSkData.h +46 -0
- package/cpp/api/JsiSkDataFactory.h +92 -0
- package/cpp/api/JsiSkFont.h +354 -0
- package/cpp/api/JsiSkFontMgr.h +84 -0
- package/cpp/api/JsiSkFontMgrFactory.h +48 -0
- package/cpp/api/JsiSkHostObjects.h +83 -0
- package/cpp/api/JsiSkImage.h +124 -0
- package/cpp/api/JsiSkImageFactory.h +50 -0
- package/cpp/api/JsiSkImageFilter.h +45 -0
- package/cpp/api/JsiSkImageFilterFactory.h +237 -0
- package/cpp/api/JsiSkImageInfo.h +57 -0
- package/cpp/api/JsiSkMaskFilter.h +45 -0
- package/cpp/api/JsiSkMaskFilterFactory.h +42 -0
- package/cpp/api/JsiSkMatrix.h +119 -0
- package/cpp/api/JsiSkPaint.h +199 -0
- package/cpp/api/JsiSkPath.h +592 -0
- package/cpp/api/JsiSkPathEffect.h +45 -0
- package/cpp/api/JsiSkPathEffectFactory.h +123 -0
- package/cpp/api/JsiSkPathFactory.h +172 -0
- package/cpp/api/JsiSkPicture.h +71 -0
- package/cpp/api/JsiSkPictureFactory.h +50 -0
- package/cpp/api/JsiSkPictureRecorder.h +53 -0
- package/cpp/api/JsiSkPoint.h +81 -0
- package/cpp/api/JsiSkRRect.h +93 -0
- package/cpp/api/JsiSkRSXform.h +105 -0
- package/cpp/api/JsiSkRect.h +119 -0
- package/cpp/api/JsiSkRuntimeEffect.h +222 -0
- package/cpp/api/JsiSkRuntimeEffectFactory.h +42 -0
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +88 -0
- package/cpp/api/JsiSkSVG.h +43 -0
- package/cpp/api/JsiSkSVGFactory.h +48 -0
- package/cpp/api/JsiSkShader.h +45 -0
- package/cpp/api/JsiSkShaderFactory.h +214 -0
- package/cpp/api/JsiSkSurface.h +67 -0
- package/cpp/api/JsiSkSurfaceFactory.h +44 -0
- package/cpp/api/JsiSkTextBlob.h +50 -0
- package/cpp/api/JsiSkTextBlobFactory.h +109 -0
- package/cpp/api/JsiSkTypeface.h +85 -0
- package/cpp/api/JsiSkTypefaceFactory.h +34 -0
- package/cpp/api/JsiSkVertices.h +145 -0
- package/cpp/api/third_party/CSSColorParser.cpp +194 -0
- package/cpp/api/third_party/CSSColorParser.h +134 -0
- package/cpp/jsi/JsiHostObject.cpp +154 -0
- package/cpp/jsi/JsiHostObject.h +241 -0
- package/cpp/jsi/JsiSimpleValueWrapper.h +108 -0
- package/cpp/rnskia/RNSkAnimation.h +68 -0
- package/cpp/rnskia/RNSkDispatchQueue.cpp +84 -0
- package/cpp/rnskia/RNSkDispatchQueue.h +47 -0
- package/cpp/rnskia/RNSkDrawView.cpp +291 -0
- package/cpp/rnskia/RNSkDrawView.h +212 -0
- package/cpp/rnskia/RNSkInfoParameter.h +102 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +308 -0
- package/cpp/rnskia/RNSkManager.cpp +81 -0
- package/cpp/rnskia/RNSkManager.h +81 -0
- package/cpp/rnskia/RNSkPlatformContext.h +196 -0
- package/cpp/rnskia/RNSkValueApi.h +73 -0
- package/cpp/rnskia/values/RNSkClockValue.h +141 -0
- package/cpp/rnskia/values/RNSkComputedValue.h +99 -0
- package/cpp/rnskia/values/RNSkReadonlyValue.h +142 -0
- package/cpp/rnskia/values/RNSkValue.h +117 -0
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +61 -0
- package/cpp/skia/include/android/SkAnimatedImage.h +179 -0
- package/cpp/skia/include/c/sk_canvas.h +159 -0
- package/cpp/skia/include/c/sk_colorspace.h +25 -0
- package/cpp/skia/include/c/sk_data.h +65 -0
- package/cpp/skia/include/c/sk_image.h +71 -0
- package/cpp/skia/include/c/sk_imageinfo.h +62 -0
- package/cpp/skia/include/c/sk_maskfilter.h +47 -0
- package/cpp/skia/include/c/sk_matrix.h +49 -0
- package/cpp/skia/include/c/sk_paint.h +145 -0
- package/cpp/skia/include/c/sk_path.h +102 -0
- package/cpp/skia/include/c/sk_picture.h +70 -0
- package/cpp/skia/include/c/sk_shader.h +143 -0
- package/cpp/skia/include/c/sk_surface.h +73 -0
- package/cpp/skia/include/c/sk_types.h +278 -0
- package/cpp/skia/include/codec/SkAndroidCodec.h +263 -0
- package/cpp/skia/include/codec/SkCodec.h +998 -0
- package/cpp/skia/include/codec/SkCodecAnimation.h +61 -0
- package/cpp/skia/include/codec/SkEncodedOrigin.h +54 -0
- package/cpp/skia/include/config/SkUserConfig.h +89 -0
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkAnnotation.h +50 -0
- package/cpp/skia/include/core/SkBBHFactory.h +63 -0
- package/cpp/skia/include/core/SkBitmap.h +1214 -0
- package/cpp/skia/include/core/SkBlendMode.h +110 -0
- package/cpp/skia/include/core/SkBlender.h +33 -0
- package/cpp/skia/include/core/SkBlurTypes.h +22 -0
- package/cpp/skia/include/core/SkCanvas.h +2594 -0
- package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +61 -0
- package/cpp/skia/include/core/SkClipOp.h +19 -0
- package/cpp/skia/include/core/SkColor.h +438 -0
- package/cpp/skia/include/core/SkColorFilter.h +91 -0
- package/cpp/skia/include/core/SkColorPriv.h +152 -0
- package/cpp/skia/include/core/SkColorSpace.h +245 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkContourMeasure.h +131 -0
- package/cpp/skia/include/core/SkCoverageMode.h +30 -0
- package/cpp/skia/include/core/SkCubicMap.h +45 -0
- package/cpp/skia/include/core/SkData.h +188 -0
- package/cpp/skia/include/core/SkDataTable.h +118 -0
- package/cpp/skia/include/core/SkDeferredDisplayList.h +110 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +97 -0
- package/cpp/skia/include/core/SkDocument.h +91 -0
- package/cpp/skia/include/core/SkDrawLooper.h +135 -0
- package/cpp/skia/include/core/SkDrawable.h +167 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +36 -0
- package/cpp/skia/include/core/SkExecutor.h +41 -0
- package/cpp/skia/include/core/SkFlattenable.h +113 -0
- package/cpp/skia/include/core/SkFont.h +535 -0
- package/cpp/skia/include/core/SkFontArguments.h +94 -0
- package/cpp/skia/include/core/SkFontMetrics.h +138 -0
- package/cpp/skia/include/core/SkFontMgr.h +157 -0
- package/cpp/skia/include/core/SkFontParameters.h +42 -0
- package/cpp/skia/include/core/SkFontStyle.h +81 -0
- package/cpp/skia/include/core/SkFontTypes.h +25 -0
- package/cpp/skia/include/core/SkGraphics.h +166 -0
- package/cpp/skia/include/core/SkICC.h +19 -0
- package/cpp/skia/include/core/SkImage.h +1347 -0
- package/cpp/skia/include/core/SkImageEncoder.h +69 -0
- package/cpp/skia/include/core/SkImageFilter.h +114 -0
- package/cpp/skia/include/core/SkImageGenerator.h +216 -0
- package/cpp/skia/include/core/SkImageInfo.h +614 -0
- package/cpp/skia/include/core/SkM44.h +426 -0
- package/cpp/skia/include/core/SkMallocPixelRef.h +42 -0
- package/cpp/skia/include/core/SkMaskFilter.h +50 -0
- package/cpp/skia/include/core/SkMath.h +54 -0
- package/cpp/skia/include/core/SkMatrix.h +1986 -0
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +9 -0
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkOverdrawCanvas.h +68 -0
- package/cpp/skia/include/core/SkPaint.h +705 -0
- package/cpp/skia/include/core/SkPath.h +1878 -0
- package/cpp/skia/include/core/SkPathBuilder.h +263 -0
- package/cpp/skia/include/core/SkPathEffect.h +106 -0
- package/cpp/skia/include/core/SkPathMeasure.h +88 -0
- package/cpp/skia/include/core/SkPathTypes.h +59 -0
- package/cpp/skia/include/core/SkPicture.h +280 -0
- package/cpp/skia/include/core/SkPictureRecorder.h +115 -0
- package/cpp/skia/include/core/SkPixelRef.h +123 -0
- package/cpp/skia/include/core/SkPixmap.h +721 -0
- package/cpp/skia/include/core/SkPngChunkReader.h +45 -0
- package/cpp/skia/include/core/SkPoint.h +566 -0
- package/cpp/skia/include/core/SkPoint3.h +157 -0
- package/cpp/skia/include/core/SkPromiseImageTexture.h +46 -0
- package/cpp/skia/include/core/SkRRect.h +512 -0
- package/cpp/skia/include/core/SkRSXform.h +69 -0
- package/cpp/skia/include/core/SkRasterHandleAllocator.h +92 -0
- package/cpp/skia/include/core/SkRect.h +1378 -0
- package/cpp/skia/include/core/SkRefCnt.h +382 -0
- package/cpp/skia/include/core/SkRegion.h +672 -0
- package/cpp/skia/include/core/SkSamplingOptions.h +103 -0
- package/cpp/skia/include/core/SkScalar.h +194 -0
- package/cpp/skia/include/core/SkSerialProcs.h +73 -0
- package/cpp/skia/include/core/SkShader.h +148 -0
- package/cpp/skia/include/core/SkSize.h +90 -0
- package/cpp/skia/include/core/SkSpan.h +89 -0
- package/cpp/skia/include/core/SkStream.h +524 -0
- package/cpp/skia/include/core/SkString.h +299 -0
- package/cpp/skia/include/core/SkStrokeRec.h +154 -0
- package/cpp/skia/include/core/SkSurface.h +1100 -0
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +263 -0
- package/cpp/skia/include/core/SkSurfaceProps.h +92 -0
- package/cpp/skia/include/core/SkSwizzle.h +19 -0
- package/cpp/skia/include/core/SkTextBlob.h +503 -0
- package/cpp/skia/include/core/SkTileMode.h +41 -0
- package/cpp/skia/include/core/SkTime.h +63 -0
- package/cpp/skia/include/core/SkTraceMemoryDump.h +99 -0
- package/cpp/skia/include/core/SkTypeface.h +470 -0
- package/cpp/skia/include/core/SkTypes.h +625 -0
- package/cpp/skia/include/core/SkUnPreMultiply.h +56 -0
- package/cpp/skia/include/core/SkVertices.h +132 -0
- package/cpp/skia/include/core/SkYUVAInfo.h +304 -0
- package/cpp/skia/include/core/SkYUVAPixmaps.h +336 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +196 -0
- package/cpp/skia/include/docs/SkXPSDocument.h +27 -0
- package/cpp/skia/include/effects/Sk1DPathEffect.h +35 -0
- package/cpp/skia/include/effects/Sk2DPathEffect.h +30 -0
- package/cpp/skia/include/effects/SkBlenders.h +27 -0
- package/cpp/skia/include/effects/SkBlurDrawLooper.h +26 -0
- package/cpp/skia/include/effects/SkBlurMaskFilter.h +35 -0
- package/cpp/skia/include/effects/SkColorMatrix.h +55 -0
- package/cpp/skia/include/effects/SkColorMatrixFilter.h +25 -0
- package/cpp/skia/include/effects/SkCornerPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkDashPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkDiscretePathEffect.h +37 -0
- package/cpp/skia/include/effects/SkGradientShader.h +255 -0
- package/cpp/skia/include/effects/SkHighContrastFilter.h +80 -0
- package/cpp/skia/include/effects/SkImageFilters.h +551 -0
- package/cpp/skia/include/effects/SkLayerDrawLooper.h +161 -0
- package/cpp/skia/include/effects/SkLumaColorFilter.h +34 -0
- package/cpp/skia/include/effects/SkOpPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkOverdrawColorFilter.h +29 -0
- package/cpp/skia/include/effects/SkPerlinNoiseShader.h +54 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +522 -0
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +24 -0
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkTableColorFilter.h +42 -0
- package/cpp/skia/include/effects/SkTableMaskFilter.h +37 -0
- package/cpp/skia/include/effects/SkTrimPathEffect.h +41 -0
- package/cpp/skia/include/encode/SkEncoder.h +42 -0
- package/cpp/skia/include/encode/SkJpegEncoder.h +97 -0
- package/cpp/skia/include/encode/SkPngEncoder.h +99 -0
- package/cpp/skia/include/encode/SkWebpEncoder.h +48 -0
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendDrawableInfo.h +44 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +140 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +644 -0
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +91 -0
- package/cpp/skia/include/gpu/GrConfig.h +53 -0
- package/cpp/skia/include/gpu/GrContextOptions.h +355 -0
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +166 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +885 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +52 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +43 -0
- package/cpp/skia/include/gpu/GrRecordingContext.h +282 -0
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +166 -0
- package/cpp/skia/include/gpu/GrTypes.h +244 -0
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +124 -0
- package/cpp/skia/include/gpu/ShaderErrorHandler.h +36 -0
- package/cpp/skia/include/gpu/d3d/GrD3DBackendContext.h +35 -0
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +248 -0
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +95 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h +11 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleInterface.h +39 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig.h +79 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig_chrome.h +14 -0
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +78 -0
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +306 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +342 -0
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +207 -0
- package/cpp/skia/include/gpu/gl/egl/GrGLMakeEGLInterface.h +14 -0
- package/cpp/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h +14 -0
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
- package/cpp/skia/include/gpu/graphite/Context.h +124 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
- package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
- package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +143 -0
- package/cpp/skia/include/gpu/mtl/GrMtlBackendContext.h +21 -0
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +76 -0
- package/cpp/skia/include/gpu/vk/GrVkExtensions.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +140 -0
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +187 -0
- package/cpp/skia/include/gpu/vk/GrVkVulkan.h +32 -0
- package/cpp/skia/include/pathops/SkPathOps.h +113 -0
- package/cpp/skia/include/ports/SkCFObject.h +180 -0
- package/cpp/skia/include/ports/SkFontConfigInterface.h +115 -0
- package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +20 -0
- package/cpp/skia/include/ports/SkFontMgr_android.h +45 -0
- package/cpp/skia/include/ports/SkFontMgr_directory.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_empty.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_fontconfig.h +22 -0
- package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +19 -0
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +102 -0
- package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +27 -0
- package/cpp/skia/include/ports/SkImageGeneratorCG.h +20 -0
- package/cpp/skia/include/ports/SkImageGeneratorNDK.h +40 -0
- package/cpp/skia/include/ports/SkImageGeneratorWIC.h +35 -0
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +139 -0
- package/cpp/skia/include/ports/SkTypeface_mac.h +44 -0
- package/cpp/skia/include/ports/SkTypeface_win.h +79 -0
- package/cpp/skia/include/private/SingleOwner.h +72 -0
- package/cpp/skia/include/private/SkBitmaskEnum.h +59 -0
- package/cpp/skia/include/private/SkChecksum.h +77 -0
- package/cpp/skia/include/private/SkColorData.h +441 -0
- package/cpp/skia/include/private/SkDeque.h +141 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +266 -0
- package/cpp/skia/include/private/SkFixed.h +141 -0
- package/cpp/skia/include/private/SkFloatBits.h +91 -0
- package/cpp/skia/include/private/SkFloatingPoint.h +219 -0
- package/cpp/skia/include/private/SkHalf.h +85 -0
- package/cpp/skia/include/private/SkIDChangeListener.h +75 -0
- package/cpp/skia/include/private/SkImageInfoPriv.h +199 -0
- package/cpp/skia/include/private/SkMacros.h +79 -0
- package/cpp/skia/include/private/SkMalloc.h +143 -0
- package/cpp/skia/include/private/SkMutex.h +64 -0
- package/cpp/skia/include/private/SkNoncopyable.h +30 -0
- package/cpp/skia/include/private/SkNx.h +430 -0
- package/cpp/skia/include/private/SkNx_neon.h +713 -0
- package/cpp/skia/include/private/SkNx_sse.h +823 -0
- package/cpp/skia/include/private/SkOnce.h +53 -0
- package/cpp/skia/include/private/SkOpts_spi.h +21 -0
- package/cpp/skia/include/private/SkPathRef.h +522 -0
- package/cpp/skia/include/private/SkSLDefines.h +64 -0
- package/cpp/skia/include/private/SkSLIRNode.h +64 -0
- package/cpp/skia/include/private/SkSLLayout.h +144 -0
- package/cpp/skia/include/private/SkSLModifiers.h +142 -0
- package/cpp/skia/include/private/SkSLProgramElement.h +77 -0
- package/cpp/skia/include/private/SkSLProgramKind.h +34 -0
- package/cpp/skia/include/private/SkSLSampleUsage.h +89 -0
- package/cpp/skia/include/private/SkSLStatement.h +86 -0
- package/cpp/skia/include/private/SkSLString.h +41 -0
- package/cpp/skia/include/private/SkSLSymbol.h +90 -0
- package/cpp/skia/include/private/SkSafe32.h +34 -0
- package/cpp/skia/include/private/SkSafe_math.h +52 -0
- package/cpp/skia/include/private/SkSemaphore.h +83 -0
- package/cpp/skia/include/private/SkShadowFlags.h +27 -0
- package/cpp/skia/include/private/SkSpinlock.h +57 -0
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +641 -0
- package/cpp/skia/include/private/SkTDArray.h +385 -0
- package/cpp/skia/include/private/SkTFitsIn.h +99 -0
- package/cpp/skia/include/private/SkTHash.h +590 -0
- package/cpp/skia/include/private/SkTLogic.h +56 -0
- package/cpp/skia/include/private/SkTPin.h +23 -0
- package/cpp/skia/include/private/SkTemplates.h +453 -0
- package/cpp/skia/include/private/SkThreadAnnotations.h +91 -0
- package/cpp/skia/include/private/SkThreadID.h +20 -0
- package/cpp/skia/include/private/SkTo.h +28 -0
- package/cpp/skia/include/private/SkUniquePaintParamsID.h +35 -0
- package/cpp/skia/include/private/SkVx.h +943 -0
- package/cpp/skia/include/private/SkWeakRefCnt.h +170 -0
- package/cpp/skia/include/private/chromium/GrSlug.h +78 -0
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +149 -0
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +99 -0
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +74 -0
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +26 -0
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +108 -0
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +55 -0
- package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +31 -0
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +75 -0
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1012 -0
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +107 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +38 -0
- package/cpp/skia/include/sksl/DSLBlock.h +72 -0
- package/cpp/skia/include/sksl/DSLCase.h +68 -0
- package/cpp/skia/include/sksl/DSLCore.h +499 -0
- package/cpp/skia/include/sksl/DSLExpression.h +332 -0
- package/cpp/skia/include/sksl/DSLFunction.h +121 -0
- package/cpp/skia/include/sksl/DSLLayout.h +92 -0
- package/cpp/skia/include/sksl/DSLModifiers.h +66 -0
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +32 -0
- package/cpp/skia/include/sksl/DSLStatement.h +117 -0
- package/cpp/skia/include/sksl/DSLSymbols.h +71 -0
- package/cpp/skia/include/sksl/DSLType.h +263 -0
- package/cpp/skia/include/sksl/DSLVar.h +321 -0
- package/cpp/skia/include/sksl/DSLWrapper.h +77 -0
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +28 -0
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +78 -0
- package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
- package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +41 -0
- package/cpp/skia/include/third_party/skcms/LICENSE +29 -0
- package/cpp/skia/include/third_party/skcms/skcms.h +394 -0
- package/cpp/skia/include/third_party/vulkan/LICENSE +29 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +84 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +93 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +112 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +12620 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +315 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +55 -0
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +67 -0
- package/cpp/skia/include/utils/SkBase64.h +51 -0
- package/cpp/skia/include/utils/SkCamera.h +109 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +81 -0
- package/cpp/skia/include/utils/SkCustomTypeface.h +50 -0
- package/cpp/skia/include/utils/SkEventTracer.h +79 -0
- package/cpp/skia/include/utils/SkNWayCanvas.h +126 -0
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +80 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +22 -0
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +65 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +136 -0
- package/cpp/skia/include/utils/SkParse.h +34 -0
- package/cpp/skia/include/utils/SkParsePath.h +25 -0
- package/cpp/skia/include/utils/SkRandom.h +169 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +86 -0
- package/cpp/skia/include/utils/SkTextUtils.h +42 -0
- package/cpp/skia/include/utils/SkTraceEventPhase.h +19 -0
- package/cpp/skia/include/utils/mac/SkCGUtils.h +78 -0
- package/cpp/skia/modules/skresources/include/SkResources.h +254 -0
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +113 -0
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +160 -0
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGClipPath.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +100 -0
- package/cpp/skia/modules/svg/include/SkSVGDefs.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGEllipse.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFe.h +85 -0
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +89 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +121 -0
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +47 -0
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +40 -0
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +39 -0
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +69 -0
- package/cpp/skia/modules/svg/include/SkSVGG.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +48 -0
- package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +19 -0
- package/cpp/skia/modules/svg/include/SkSVGImage.h +58 -0
- package/cpp/skia/modules/svg/include/SkSVGLine.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +37 -0
- package/cpp/skia/modules/svg/include/SkSVGMask.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGNode.h +223 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGPath.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +55 -0
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +38 -0
- package/cpp/skia/modules/svg/include/SkSVGRect.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +188 -0
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +54 -0
- package/cpp/skia/modules/svg/include/SkSVGShape.h +33 -0
- package/cpp/skia/modules/svg/include/SkSVGStop.h +34 -0
- package/cpp/skia/modules/svg/include/SkSVGText.h +122 -0
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +730 -0
- package/cpp/skia/modules/svg/include/SkSVGUse.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGValue.h +85 -0
- package/cpp/skia/readme.txt +1 -0
- package/cpp/utils/RNSkLog.h +80 -0
- package/cpp/utils/RNSkMeasureTime.h +32 -0
- package/cpp/utils/RNSkTimingInfo.h +103 -0
- package/ios/RNSkia-iOS/DisplayLink.h +17 -0
- package/ios/RNSkia-iOS/DisplayLink.mm +36 -0
- package/ios/RNSkia-iOS/PlatformContext.h +76 -0
- package/ios/RNSkia-iOS/PlatformContext.mm +52 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.h +52 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +112 -0
- package/ios/RNSkia-iOS/SkiaDrawView.h +23 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +169 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.h +7 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +42 -0
- package/ios/RNSkia-iOS/SkiaManager.h +17 -0
- package/ios/RNSkia-iOS/SkiaManager.mm +50 -0
- package/ios/RNSkiaModule.h +11 -0
- package/ios/RNSkiaModule.mm +42 -0
- package/ios/Rnskia.xcodeproj/project.pbxproj +281 -0
- package/ios/Rnskia.xcworkspace/contents.xcworkspacedata +7 -0
- package/jestSetup.js +5 -0
- package/lib/commonjs/animation/decay/decay.js +42 -0
- package/lib/commonjs/animation/decay/decay.js.map +1 -0
- package/lib/commonjs/animation/decay/index.js +14 -0
- package/lib/commonjs/animation/decay/index.js.map +1 -0
- package/lib/commonjs/animation/decay/runDecay.js +48 -0
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -0
- package/lib/commonjs/animation/decay/types.js +6 -0
- package/lib/commonjs/animation/decay/types.js.map +1 -0
- package/lib/commonjs/animation/functions/index.js +58 -0
- package/lib/commonjs/animation/functions/index.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolate.js +142 -0
- package/lib/commonjs/animation/functions/interpolate.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateColors.js +39 -0
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js +79 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
- package/lib/commonjs/animation/index.js +58 -0
- package/lib/commonjs/animation/index.js.map +1 -0
- package/lib/commonjs/animation/spring/Spring.js +77 -0
- package/lib/commonjs/animation/spring/Spring.js.map +1 -0
- package/lib/commonjs/animation/spring/functions/index.js +14 -0
- package/lib/commonjs/animation/spring/functions/index.js.map +1 -0
- package/lib/commonjs/animation/spring/functions/spring.js +94 -0
- package/lib/commonjs/animation/spring/functions/spring.js.map +1 -0
- package/lib/commonjs/animation/spring/index.js +30 -0
- package/lib/commonjs/animation/spring/index.js.map +1 -0
- package/lib/commonjs/animation/spring/runSpring.js +32 -0
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -0
- package/lib/commonjs/animation/spring/types.js +2 -0
- package/lib/commonjs/animation/spring/types.js.map +1 -0
- package/lib/commonjs/animation/spring/useSpring.js +24 -0
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -0
- package/lib/commonjs/animation/timing/Easing.js +108 -0
- package/lib/commonjs/animation/timing/Easing.js.map +1 -0
- package/lib/commonjs/animation/timing/createTiming.js +59 -0
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/bezier.js +147 -0
- package/lib/commonjs/animation/timing/functions/bezier.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +56 -0
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/index.js +54 -0
- package/lib/commonjs/animation/timing/functions/index.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/timing.js +50 -0
- package/lib/commonjs/animation/timing/functions/timing.js.map +1 -0
- package/lib/commonjs/animation/timing/functions/types.js +2 -0
- package/lib/commonjs/animation/timing/functions/types.js.map +1 -0
- package/lib/commonjs/animation/timing/index.js +38 -0
- package/lib/commonjs/animation/timing/index.js.map +1 -0
- package/lib/commonjs/animation/timing/runTiming.js +33 -0
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -0
- package/lib/commonjs/animation/timing/useLoop.js +22 -0
- package/lib/commonjs/animation/timing/useLoop.js.map +1 -0
- package/lib/commonjs/animation/timing/useTiming.js +66 -0
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -0
- package/lib/commonjs/animation/types.js +2 -0
- package/lib/commonjs/animation/types.js.map +1 -0
- package/lib/commonjs/external/index.js +19 -0
- package/lib/commonjs/external/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/index.js +19 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +86 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/commonjs/index.js +99 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/mock/index.js +134 -0
- package/lib/commonjs/mock/index.js.map +1 -0
- package/lib/commonjs/renderer/Canvas.js +163 -0
- package/lib/commonjs/renderer/Canvas.js.map +1 -0
- package/lib/commonjs/renderer/DependencyManager.js +70 -0
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -0
- package/lib/commonjs/renderer/DrawingContext.js +6 -0
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -0
- package/lib/commonjs/renderer/HostConfig.js +250 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -0
- package/lib/commonjs/renderer/components/Blend.js +47 -0
- package/lib/commonjs/renderer/components/Blend.js.map +1 -0
- package/lib/commonjs/renderer/components/Compose.js +40 -0
- package/lib/commonjs/renderer/components/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/Drawing.js +31 -0
- package/lib/commonjs/renderer/components/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/components/Group.js +85 -0
- package/lib/commonjs/renderer/components/Group.js.map +1 -0
- package/lib/commonjs/renderer/components/Mask.js +61 -0
- package/lib/commonjs/renderer/components/Mask.js.map +1 -0
- package/lib/commonjs/renderer/components/Paint.js +37 -0
- package/lib/commonjs/renderer/components/Paint.js.map +1 -0
- package/lib/commonjs/renderer/components/Picture.js +35 -0
- package/lib/commonjs/renderer/components/Picture.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +33 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +54 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/index.js +32 -0
- package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +41 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +24 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +39 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +40 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js +160 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/commonjs/renderer/components/image/Image.js +56 -0
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js +46 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js +85 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/commonjs/renderer/components/image/index.js +58 -0
- package/lib/commonjs/renderer/components/image/index.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +46 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +54 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +28 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +44 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +40 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +44 -0
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +55 -0
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +33 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/index.js +227 -0
- package/lib/commonjs/renderer/components/index.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +43 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js +19 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +46 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +43 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +53 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +49 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +33 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js +97 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Color.js +35 -0
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +43 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js +32 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +44 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +44 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js +42 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js +52 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +45 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +43 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +46 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/index.js +123 -0
- package/lib/commonjs/renderer/components/shaders/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Box.js +123 -0
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js +44 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js +35 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js +31 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js +42 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Line.js +35 -0
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js +39 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js +53 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Path.js +67 -0
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Points.js +45 -0
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js +35 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +38 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js +55 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/index.js +175 -0
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js +61 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Text.js +46 -0
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js +40 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextPath.js +91 -0
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -0
- package/lib/commonjs/renderer/components/text/index.js +58 -0
- package/lib/commonjs/renderer/components/text/index.js.map +1 -0
- package/lib/commonjs/renderer/index.js +71 -0
- package/lib/commonjs/renderer/index.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Container.js +28 -0
- package/lib/commonjs/renderer/nodes/Container.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Declaration.js +58 -0
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Drawing.js +60 -0
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Node.js +71 -0
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -0
- package/lib/commonjs/renderer/nodes/index.js +58 -0
- package/lib/commonjs/renderer/nodes/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js +52 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/index.js +19 -0
- package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Circles.js +24 -0
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -0
- package/lib/commonjs/renderer/processors/Clips.js +24 -0
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -0
- package/lib/commonjs/renderer/processors/Color.js +27 -0
- package/lib/commonjs/renderer/processors/Color.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +39 -0
- package/lib/commonjs/renderer/processors/Font.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paint.js +98 -0
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paths.js +26 -0
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -0
- package/lib/commonjs/renderer/processors/Radius.js +17 -0
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -0
- package/lib/commonjs/renderer/processors/Rects.js +41 -0
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -0
- package/lib/commonjs/renderer/processors/Transform.js +65 -0
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -0
- package/lib/commonjs/renderer/processors/index.js +149 -0
- package/lib/commonjs/renderer/processors/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js +43 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Math.js +29 -0
- package/lib/commonjs/renderer/processors/math/Math.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js +22 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/index.js +45 -0
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -0
- package/lib/commonjs/renderer/typeddash.js +41 -0
- package/lib/commonjs/renderer/typeddash.js.map +1 -0
- package/lib/commonjs/renderer/useCanvas.js +30 -0
- package/lib/commonjs/renderer/useCanvas.js.map +1 -0
- package/lib/commonjs/renderer/useContextBridge.js +35 -0
- package/lib/commonjs/renderer/useContextBridge.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +19 -0
- package/lib/commonjs/skia/NativeSetup.js.map +1 -0
- package/lib/commonjs/skia/Skia.js +15 -0
- package/lib/commonjs/skia/Skia.js.map +1 -0
- package/lib/commonjs/skia/Skia.web.js +12 -0
- package/lib/commonjs/skia/Skia.web.js.map +1 -0
- package/lib/commonjs/skia/core/Data.js +69 -0
- package/lib/commonjs/skia/core/Data.js.map +1 -0
- package/lib/commonjs/skia/core/Font.js +34 -0
- package/lib/commonjs/skia/core/Font.js.map +1 -0
- package/lib/commonjs/skia/core/Image.js +18 -0
- package/lib/commonjs/skia/core/Image.js.map +1 -0
- package/lib/commonjs/skia/core/Matrix.js +15 -0
- package/lib/commonjs/skia/core/Matrix.js.map +1 -0
- package/lib/commonjs/skia/core/Paint.js +28 -0
- package/lib/commonjs/skia/core/Paint.js.map +1 -0
- package/lib/commonjs/skia/core/Path.js +72 -0
- package/lib/commonjs/skia/core/Path.js.map +1 -0
- package/lib/commonjs/skia/core/Picture.js +30 -0
- package/lib/commonjs/skia/core/Picture.js.map +1 -0
- package/lib/commonjs/skia/core/RRect.js +13 -0
- package/lib/commonjs/skia/core/RRect.js.map +1 -0
- package/lib/commonjs/skia/core/Rect.js +47 -0
- package/lib/commonjs/skia/core/Rect.js.map +1 -0
- package/lib/commonjs/skia/core/SVG.js +15 -0
- package/lib/commonjs/skia/core/SVG.js.map +1 -0
- package/lib/commonjs/skia/core/Typeface.js +18 -0
- package/lib/commonjs/skia/core/Typeface.js.map +1 -0
- package/lib/commonjs/skia/core/Vector.js +49 -0
- package/lib/commonjs/skia/core/Vector.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +162 -0
- package/lib/commonjs/skia/core/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +45 -0
- package/lib/commonjs/skia/index.js.map +1 -0
- package/lib/commonjs/skia/types/Canvas.js +22 -0
- package/lib/commonjs/skia/types/Canvas.js.map +1 -0
- package/lib/commonjs/skia/types/Color.js +2 -0
- package/lib/commonjs/skia/types/Color.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js +11 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js +6 -0
- package/lib/commonjs/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/types/ColorFilter/index.js +32 -0
- package/lib/commonjs/skia/types/ColorFilter/index.js.map +1 -0
- package/lib/commonjs/skia/types/ContourMeasure.js +6 -0
- package/lib/commonjs/skia/types/ContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/types/Data/Data.js +6 -0
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -0
- package/lib/commonjs/skia/types/Data/DataFactory.js +6 -0
- package/lib/commonjs/skia/types/Data/DataFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Data/index.js +32 -0
- package/lib/commonjs/skia/types/Data/index.js.map +1 -0
- package/lib/commonjs/skia/types/Font/Font.js +81 -0
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/types/Font/index.js +19 -0
- package/lib/commonjs/skia/types/Font/index.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgr.js +6 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgr.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgrFactory.js +6 -0
- package/lib/commonjs/skia/types/FontMgr/FontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/types/FontMgr/index.js +32 -0
- package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/types/Image/Image.js +32 -0
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.js +46 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Image/index.js +32 -0
- package/lib/commonjs/skia/types/Image/index.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js +20 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js +16 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/types/ImageFilter/index.js +32 -0
- package/lib/commonjs/skia/types/ImageFilter/index.js.map +1 -0
- package/lib/commonjs/skia/types/JsiInstance.js +2 -0
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -0
- package/lib/commonjs/skia/types/MaskFilter.js +20 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/types/Matrix.js +78 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.js +69 -0
- package/lib/commonjs/skia/types/Paint/BlendMode.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/Paint.js +36 -0
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/index.js +32 -0
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/types/Path/Path.js +47 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -0
- package/lib/commonjs/skia/types/Path/PathFactory.js +6 -0
- package/lib/commonjs/skia/types/Path/PathFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Path/index.js +32 -0
- package/lib/commonjs/skia/types/Path/index.js.map +1 -0
- package/lib/commonjs/skia/types/PathEffect.js +19 -0
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/Picture.js +6 -0
- package/lib/commonjs/skia/types/Picture/Picture.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.js +6 -0
- package/lib/commonjs/skia/types/Picture/PictureFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js +6 -0
- package/lib/commonjs/skia/types/Picture/PictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/types/Picture/index.js +45 -0
- package/lib/commonjs/skia/types/Picture/index.js.map +1 -0
- package/lib/commonjs/skia/types/Point.js +15 -0
- package/lib/commonjs/skia/types/Point.js.map +1 -0
- package/lib/commonjs/skia/types/RRect.js +13 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -0
- package/lib/commonjs/skia/types/RSXform.js +6 -0
- package/lib/commonjs/skia/types/RSXform.js.map +1 -0
- package/lib/commonjs/skia/types/Rect.js +2 -0
- package/lib/commonjs/skia/types/Rect.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js +6 -0
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.js +32 -0
- package/lib/commonjs/skia/types/RuntimeEffect/index.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/SVG.js +6 -0
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.js +6 -0
- package/lib/commonjs/skia/types/SVG/SVGFactory.js.map +1 -0
- package/lib/commonjs/skia/types/SVG/index.js +32 -0
- package/lib/commonjs/skia/types/SVG/index.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/Shader.js +55 -0
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js +6 -0
- package/lib/commonjs/skia/types/Shader/ShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/index.js +32 -0
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.js +6 -0
- package/lib/commonjs/skia/types/Skia.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/Surface.js +6 -0
- package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js +6 -0
- package/lib/commonjs/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Surface/index.js +32 -0
- package/lib/commonjs/skia/types/Surface/index.js.map +1 -0
- package/lib/commonjs/skia/types/TextBlob.js +6 -0
- package/lib/commonjs/skia/types/TextBlob.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.js +6 -0
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js +6 -0
- package/lib/commonjs/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Typeface/index.js +32 -0
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.js +15 -0
- package/lib/commonjs/skia/types/Vertices/Vertices.js.map +1 -0
- package/lib/commonjs/skia/types/Vertices/index.js +19 -0
- package/lib/commonjs/skia/types/Vertices/index.js.map +1 -0
- package/lib/commonjs/skia/types/index.js +370 -0
- package/lib/commonjs/skia/types/index.js.map +1 -0
- package/lib/commonjs/skia/web/Host.js +75 -0
- package/lib/commonjs/skia/web/Host.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js +184 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColor.js +339 -0
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +18 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +119 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js +33 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImage.js +60 -0
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js +101 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +337 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRect.js +42 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +31 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +49 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +97 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +19 -0
- package/lib/commonjs/skia/web/index.js.map +1 -0
- package/lib/commonjs/values/api.js +12 -0
- package/lib/commonjs/values/api.js.map +1 -0
- package/lib/commonjs/values/api.web.js +18 -0
- package/lib/commonjs/values/api.web.js.map +1 -0
- package/lib/commonjs/values/hooks/index.js +58 -0
- package/lib/commonjs/values/hooks/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useClockValue.js +27 -0
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useComputedValue.js +32 -0
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js +23 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValueEffect.js +22 -0
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -0
- package/lib/commonjs/values/index.js +45 -0
- package/lib/commonjs/values/index.js.map +1 -0
- package/lib/commonjs/values/types.js +2 -0
- package/lib/commonjs/values/types.js.map +1 -0
- package/lib/commonjs/values/web/RNSkAnimation.js +46 -0
- package/lib/commonjs/values/web/RNSkAnimation.js.map +1 -0
- package/lib/commonjs/values/web/RNSkClockValue.js +75 -0
- package/lib/commonjs/values/web/RNSkClockValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkComputedValue.js +51 -0
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.js +45 -0
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -0
- package/lib/commonjs/values/web/RNSkValue.js +73 -0
- package/lib/commonjs/values/web/RNSkValue.js.map +1 -0
- package/lib/commonjs/values/web/api.js +31 -0
- package/lib/commonjs/values/web/api.js.map +1 -0
- package/lib/commonjs/values/web/index.js +19 -0
- package/lib/commonjs/values/web/index.js.map +1 -0
- package/lib/commonjs/views/SkiaView.js +128 -0
- package/lib/commonjs/views/SkiaView.js.map +1 -0
- package/lib/commonjs/views/SkiaView.web.js +216 -0
- package/lib/commonjs/views/SkiaView.web.js.map +1 -0
- package/lib/commonjs/views/api.js +11 -0
- package/lib/commonjs/views/api.js.map +1 -0
- package/lib/commonjs/views/index.js +58 -0
- package/lib/commonjs/views/index.js.map +1 -0
- package/lib/commonjs/views/types.js +16 -0
- package/lib/commonjs/views/types.js.map +1 -0
- package/lib/commonjs/views/useDrawCallback.js +23 -0
- package/lib/commonjs/views/useDrawCallback.js.map +1 -0
- package/lib/commonjs/views/useTouchHandler.js +99 -0
- package/lib/commonjs/views/useTouchHandler.js.map +1 -0
- package/lib/commonjs/web/index.js +22 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/module/animation/decay/decay.js +33 -0
- package/lib/module/animation/decay/decay.js.map +1 -0
- package/lib/module/animation/decay/index.js +2 -0
- package/lib/module/animation/decay/index.js.map +1 -0
- package/lib/module/animation/decay/runDecay.js +38 -0
- package/lib/module/animation/decay/runDecay.js.map +1 -0
- package/lib/module/animation/decay/types.js +2 -0
- package/lib/module/animation/decay/types.js.map +1 -0
- package/lib/module/animation/functions/index.js +5 -0
- package/lib/module/animation/functions/index.js.map +1 -0
- package/lib/module/animation/functions/interpolate.js +132 -0
- package/lib/module/animation/functions/interpolate.js.map +1 -0
- package/lib/module/animation/functions/interpolateColors.js +23 -0
- package/lib/module/animation/functions/interpolateColors.js.map +1 -0
- package/lib/module/animation/functions/interpolatePaths.js +69 -0
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/module/animation/functions/interpolateVector.js +7 -0
- package/lib/module/animation/functions/interpolateVector.js.map +1 -0
- package/lib/module/animation/index.js +5 -0
- package/lib/module/animation/index.js.map +1 -0
- package/lib/module/animation/spring/Spring.js +69 -0
- package/lib/module/animation/spring/Spring.js.map +1 -0
- package/lib/module/animation/spring/functions/index.js +2 -0
- package/lib/module/animation/spring/functions/index.js.map +1 -0
- package/lib/module/animation/spring/functions/spring.js +85 -0
- package/lib/module/animation/spring/functions/spring.js.map +1 -0
- package/lib/module/animation/spring/index.js +4 -0
- package/lib/module/animation/spring/index.js.map +1 -0
- package/lib/module/animation/spring/runSpring.js +21 -0
- package/lib/module/animation/spring/runSpring.js.map +1 -0
- package/lib/module/animation/spring/types.js +2 -0
- package/lib/module/animation/spring/types.js.map +1 -0
- package/lib/module/animation/spring/useSpring.js +13 -0
- package/lib/module/animation/spring/useSpring.js.map +1 -0
- package/lib/module/animation/timing/Easing.js +98 -0
- package/lib/module/animation/timing/Easing.js.map +1 -0
- package/lib/module/animation/timing/createTiming.js +49 -0
- package/lib/module/animation/timing/createTiming.js.map +1 -0
- package/lib/module/animation/timing/functions/bezier.js +141 -0
- package/lib/module/animation/timing/functions/bezier.js.map +1 -0
- package/lib/module/animation/timing/functions/getResolvedParams.js +48 -0
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/module/animation/timing/functions/index.js +5 -0
- package/lib/module/animation/timing/functions/index.js.map +1 -0
- package/lib/module/animation/timing/functions/timing.js +41 -0
- package/lib/module/animation/timing/functions/timing.js.map +1 -0
- package/lib/module/animation/timing/functions/types.js +2 -0
- package/lib/module/animation/timing/functions/types.js.map +1 -0
- package/lib/module/animation/timing/index.js +5 -0
- package/lib/module/animation/timing/index.js.map +1 -0
- package/lib/module/animation/timing/runTiming.js +23 -0
- package/lib/module/animation/timing/runTiming.js.map +1 -0
- package/lib/module/animation/timing/useLoop.js +13 -0
- package/lib/module/animation/timing/useLoop.js.map +1 -0
- package/lib/module/animation/timing/useTiming.js +54 -0
- package/lib/module/animation/timing/useTiming.js.map +1 -0
- package/lib/module/animation/types.js +2 -0
- package/lib/module/animation/types.js.map +1 -0
- package/lib/module/external/index.js +2 -0
- package/lib/module/external/index.js.map +1 -0
- package/lib/module/external/reanimated/index.js +2 -0
- package/lib/module/external/reanimated/index.js.map +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js +81 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/module/index.js +9 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/mock/index.js +108 -0
- package/lib/module/mock/index.js.map +1 -0
- package/lib/module/renderer/Canvas.js +131 -0
- package/lib/module/renderer/Canvas.js.map +1 -0
- package/lib/module/renderer/DependencyManager.js +60 -0
- package/lib/module/renderer/DependencyManager.js.map +1 -0
- package/lib/module/renderer/DrawingContext.js +2 -0
- package/lib/module/renderer/DrawingContext.js.map +1 -0
- package/lib/module/renderer/HostConfig.js +237 -0
- package/lib/module/renderer/HostConfig.js.map +1 -0
- package/lib/module/renderer/components/Blend.js +30 -0
- package/lib/module/renderer/components/Blend.js.map +1 -0
- package/lib/module/renderer/components/Compose.js +25 -0
- package/lib/module/renderer/components/Compose.js.map +1 -0
- package/lib/module/renderer/components/Drawing.js +17 -0
- package/lib/module/renderer/components/Drawing.js.map +1 -0
- package/lib/module/renderer/components/Group.js +69 -0
- package/lib/module/renderer/components/Group.js.map +1 -0
- package/lib/module/renderer/components/Mask.js +44 -0
- package/lib/module/renderer/components/Mask.js.map +1 -0
- package/lib/module/renderer/components/Paint.js +19 -0
- package/lib/module/renderer/components/Paint.js.map +1 -0
- package/lib/module/renderer/components/Picture.js +21 -0
- package/lib/module/renderer/components/Picture.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js +19 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +39 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/module/renderer/components/backdrop/index.js +3 -0
- package/lib/module/renderer/components/backdrop/index.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js +24 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Compose.js +14 -0
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js +23 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +19 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +19 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js +22 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +19 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/index.js +7 -0
- package/lib/module/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/module/renderer/components/image/BoxFit.js +144 -0
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/module/renderer/components/image/Image.js +40 -0
- package/lib/module/renderer/components/image/Image.js.map +1 -0
- package/lib/module/renderer/components/image/ImageSVG.js +31 -0
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/module/renderer/components/image/ImageShader.js +69 -0
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/module/renderer/components/image/index.js +5 -0
- package/lib/module/renderer/components/image/index.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Blur.js +28 -0
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +34 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +17 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js +28 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Offset.js +25 -0
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +28 -0
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Shadow.js +38 -0
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/getInput.js +23 -0
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/index.js +7 -0
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/module/renderer/components/index.js +18 -0
- package/lib/module/renderer/components/index.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/Blur.js +27 -0
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/index.js +2 -0
- package/lib/module/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Corner.js +31 -0
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Dash.js +28 -0
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js +32 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js +32 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js +36 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js +33 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Sum.js +18 -0
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/index.js +8 -0
- package/lib/module/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/module/renderer/components/shaders/Color.js +20 -0
- package/lib/module/renderer/components/shaders/Color.js.map +1 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js +29 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/module/renderer/components/shaders/Gradient.js +20 -0
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js +29 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js +29 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Shader.js +26 -0
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js +45 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js +30 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Turbulence.js +29 -0
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +31 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/index.js +10 -0
- package/lib/module/renderer/components/shaders/index.js.map +1 -0
- package/lib/module/renderer/components/shapes/Box.js +103 -0
- package/lib/module/renderer/components/shapes/Box.js.map +1 -0
- package/lib/module/renderer/components/shapes/Circle.js +29 -0
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/module/renderer/components/shapes/DiffRect.js +21 -0
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Fill.js +17 -0
- package/lib/module/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/module/renderer/components/shapes/FitBox.js +23 -0
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/module/renderer/components/shapes/Line.js +21 -0
- package/lib/module/renderer/components/shapes/Line.js.map +1 -0
- package/lib/module/renderer/components/shapes/Oval.js +24 -0
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/module/renderer/components/shapes/Patch.js +36 -0
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/module/renderer/components/shapes/Path.js +51 -0
- package/lib/module/renderer/components/shapes/Path.js.map +1 -0
- package/lib/module/renderer/components/shapes/Points.js +27 -0
- package/lib/module/renderer/components/shapes/Points.js.map +1 -0
- package/lib/module/renderer/components/shapes/Rect.js +20 -0
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js +23 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Vertices.js +38 -0
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/module/renderer/components/shapes/index.js +14 -0
- package/lib/module/renderer/components/shapes/index.js.map +1 -0
- package/lib/module/renderer/components/text/Glyphs.js +46 -0
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/module/renderer/components/text/Text.js +31 -0
- package/lib/module/renderer/components/text/Text.js.map +1 -0
- package/lib/module/renderer/components/text/TextBlob.js +26 -0
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/module/renderer/components/text/TextPath.js +76 -0
- package/lib/module/renderer/components/text/TextPath.js.map +1 -0
- package/lib/module/renderer/components/text/index.js +5 -0
- package/lib/module/renderer/components/text/index.js.map +1 -0
- package/lib/module/renderer/index.js +6 -0
- package/lib/module/renderer/index.js.map +1 -0
- package/lib/module/renderer/nodes/Container.js +18 -0
- package/lib/module/renderer/nodes/Container.js.map +1 -0
- package/lib/module/renderer/nodes/Declaration.js +37 -0
- package/lib/module/renderer/nodes/Declaration.js.map +1 -0
- package/lib/module/renderer/nodes/Drawing.js +40 -0
- package/lib/module/renderer/nodes/Drawing.js.map +1 -0
- package/lib/module/renderer/nodes/Node.js +61 -0
- package/lib/module/renderer/nodes/Node.js.map +1 -0
- package/lib/module/renderer/nodes/index.js +5 -0
- package/lib/module/renderer/nodes/index.js.map +1 -0
- package/lib/module/renderer/processors/Animations/Animations.js +36 -0
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/module/renderer/processors/Animations/index.js +2 -0
- package/lib/module/renderer/processors/Animations/index.js.map +1 -0
- package/lib/module/renderer/processors/Circles.js +15 -0
- package/lib/module/renderer/processors/Circles.js.map +1 -0
- package/lib/module/renderer/processors/Clips.js +13 -0
- package/lib/module/renderer/processors/Clips.js.map +1 -0
- package/lib/module/renderer/processors/Color.js +11 -0
- package/lib/module/renderer/processors/Color.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +27 -0
- package/lib/module/renderer/processors/Font.js.map +1 -0
- package/lib/module/renderer/processors/Paint.js +84 -0
- package/lib/module/renderer/processors/Paint.js.map +1 -0
- package/lib/module/renderer/processors/Paths.js +13 -0
- package/lib/module/renderer/processors/Paths.js.map +1 -0
- package/lib/module/renderer/processors/Radius.js +8 -0
- package/lib/module/renderer/processors/Radius.js.map +1 -0
- package/lib/module/renderer/processors/Rects.js +25 -0
- package/lib/module/renderer/processors/Rects.js.map +1 -0
- package/lib/module/renderer/processors/Transform.js +49 -0
- package/lib/module/renderer/processors/Transform.js.map +1 -0
- package/lib/module/renderer/processors/index.js +12 -0
- package/lib/module/renderer/processors/index.js.map +1 -0
- package/lib/module/renderer/processors/math/Coordinates.js +19 -0
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/module/renderer/processors/math/Math.js +17 -0
- package/lib/module/renderer/processors/math/Math.js.map +1 -0
- package/lib/module/renderer/processors/math/Transforms.js +12 -0
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/module/renderer/processors/math/index.js +4 -0
- package/lib/module/renderer/processors/math/index.js.map +1 -0
- package/lib/module/renderer/typeddash.js +26 -0
- package/lib/module/renderer/typeddash.js.map +1 -0
- package/lib/module/renderer/useCanvas.js +13 -0
- package/lib/module/renderer/useCanvas.js.map +1 -0
- package/lib/module/renderer/useContextBridge.js +21 -0
- package/lib/module/renderer/useContextBridge.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +17 -0
- package/lib/module/skia/NativeSetup.js.map +1 -0
- package/lib/module/skia/Skia.js +7 -0
- package/lib/module/skia/Skia.js.map +1 -0
- package/lib/module/skia/Skia.web.js +3 -0
- package/lib/module/skia/Skia.web.js.map +1 -0
- package/lib/module/skia/core/Data.js +53 -0
- package/lib/module/skia/core/Data.js.map +1 -0
- package/lib/module/skia/core/Font.js +22 -0
- package/lib/module/skia/core/Font.js.map +1 -0
- package/lib/module/skia/core/Image.js +8 -0
- package/lib/module/skia/core/Image.js.map +1 -0
- package/lib/module/skia/core/Matrix.js +4 -0
- package/lib/module/skia/core/Matrix.js.map +1 -0
- package/lib/module/skia/core/Paint.js +17 -0
- package/lib/module/skia/core/Paint.js.map +1 -0
- package/lib/module/skia/core/Path.js +53 -0
- package/lib/module/skia/core/Path.js.map +1 -0
- package/lib/module/skia/core/Picture.js +19 -0
- package/lib/module/skia/core/Picture.js.map +1 -0
- package/lib/module/skia/core/RRect.js +3 -0
- package/lib/module/skia/core/RRect.js.map +1 -0
- package/lib/module/skia/core/Rect.js +17 -0
- package/lib/module/skia/core/Rect.js.map +1 -0
- package/lib/module/skia/core/SVG.js +4 -0
- package/lib/module/skia/core/SVG.js.map +1 -0
- package/lib/module/skia/core/Typeface.js +8 -0
- package/lib/module/skia/core/Typeface.js.map +1 -0
- package/lib/module/skia/core/Vector.js +23 -0
- package/lib/module/skia/core/Vector.js.map +1 -0
- package/lib/module/skia/core/index.js +13 -0
- package/lib/module/skia/core/index.js.map +1 -0
- package/lib/module/skia/index.js +4 -0
- package/lib/module/skia/index.js.map +1 -0
- package/lib/module/skia/types/Canvas.js +14 -0
- package/lib/module/skia/types/Canvas.js.map +1 -0
- package/lib/module/skia/types/Color.js +2 -0
- package/lib/module/skia/types/Color.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.js +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js +2 -0
- package/lib/module/skia/types/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/module/skia/types/ColorFilter/index.js +3 -0
- package/lib/module/skia/types/ColorFilter/index.js.map +1 -0
- package/lib/module/skia/types/ContourMeasure.js +2 -0
- package/lib/module/skia/types/ContourMeasure.js.map +1 -0
- package/lib/module/skia/types/Data/Data.js +2 -0
- package/lib/module/skia/types/Data/Data.js.map +1 -0
- package/lib/module/skia/types/Data/DataFactory.js +2 -0
- package/lib/module/skia/types/Data/DataFactory.js.map +1 -0
- package/lib/module/skia/types/Data/index.js +3 -0
- package/lib/module/skia/types/Data/index.js.map +1 -0
- package/lib/module/skia/types/Font/Font.js +68 -0
- package/lib/module/skia/types/Font/Font.js.map +1 -0
- package/lib/module/skia/types/Font/index.js +2 -0
- package/lib/module/skia/types/Font/index.js.map +1 -0
- package/lib/module/skia/types/FontMgr/FontMgr.js +2 -0
- package/lib/module/skia/types/FontMgr/FontMgr.js.map +1 -0
- package/lib/module/skia/types/FontMgr/FontMgrFactory.js +2 -0
- package/lib/module/skia/types/FontMgr/FontMgrFactory.js.map +1 -0
- package/lib/module/skia/types/FontMgr/index.js +3 -0
- package/lib/module/skia/types/FontMgr/index.js.map +1 -0
- package/lib/module/skia/types/Image/Image.js +23 -0
- package/lib/module/skia/types/Image/Image.js.map +1 -0
- package/lib/module/skia/types/Image/ImageFactory.js +37 -0
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -0
- package/lib/module/skia/types/Image/index.js +3 -0
- package/lib/module/skia/types/Image/index.js.map +1 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.js +11 -0
- package/lib/module/skia/types/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js +9 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/types/ImageFilter/index.js +3 -0
- package/lib/module/skia/types/ImageFilter/index.js.map +1 -0
- package/lib/module/skia/types/JsiInstance.js +2 -0
- package/lib/module/skia/types/JsiInstance.js.map +1 -0
- package/lib/module/skia/types/MaskFilter.js +11 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -0
- package/lib/module/skia/types/Matrix.js +69 -0
- package/lib/module/skia/types/Matrix.js.map +1 -0
- package/lib/module/skia/types/Paint/BlendMode.js +61 -0
- package/lib/module/skia/types/Paint/BlendMode.js.map +1 -0
- package/lib/module/skia/types/Paint/Paint.js +25 -0
- package/lib/module/skia/types/Paint/Paint.js.map +1 -0
- package/lib/module/skia/types/Paint/index.js +3 -0
- package/lib/module/skia/types/Paint/index.js.map +1 -0
- package/lib/module/skia/types/Path/Path.js +35 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -0
- package/lib/module/skia/types/Path/PathFactory.js +2 -0
- package/lib/module/skia/types/Path/PathFactory.js.map +1 -0
- package/lib/module/skia/types/Path/index.js +3 -0
- package/lib/module/skia/types/Path/index.js.map +1 -0
- package/lib/module/skia/types/PathEffect.js +9 -0
- package/lib/module/skia/types/PathEffect.js.map +1 -0
- package/lib/module/skia/types/Picture/Picture.js +2 -0
- package/lib/module/skia/types/Picture/Picture.js.map +1 -0
- package/lib/module/skia/types/Picture/PictureFactory.js +2 -0
- package/lib/module/skia/types/Picture/PictureFactory.js.map +1 -0
- package/lib/module/skia/types/Picture/PictureRecorder.js +2 -0
- package/lib/module/skia/types/Picture/PictureRecorder.js.map +1 -0
- package/lib/module/skia/types/Picture/index.js +4 -0
- package/lib/module/skia/types/Picture/index.js.map +1 -0
- package/lib/module/skia/types/Point.js +8 -0
- package/lib/module/skia/types/Point.js.map +1 -0
- package/lib/module/skia/types/RRect.js +4 -0
- package/lib/module/skia/types/RRect.js.map +1 -0
- package/lib/module/skia/types/RSXform.js +2 -0
- package/lib/module/skia/types/RSXform.js.map +1 -0
- package/lib/module/skia/types/Rect.js +2 -0
- package/lib/module/skia/types/Rect.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js +2 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js +2 -0
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/types/RuntimeEffect/index.js +3 -0
- package/lib/module/skia/types/RuntimeEffect/index.js.map +1 -0
- package/lib/module/skia/types/SVG/SVG.js +2 -0
- package/lib/module/skia/types/SVG/SVG.js.map +1 -0
- package/lib/module/skia/types/SVG/SVGFactory.js +2 -0
- package/lib/module/skia/types/SVG/SVGFactory.js.map +1 -0
- package/lib/module/skia/types/SVG/index.js +3 -0
- package/lib/module/skia/types/SVG/index.js.map +1 -0
- package/lib/module/skia/types/Shader/Shader.js +44 -0
- package/lib/module/skia/types/Shader/Shader.js.map +1 -0
- package/lib/module/skia/types/Shader/ShaderFactory.js +2 -0
- package/lib/module/skia/types/Shader/ShaderFactory.js.map +1 -0
- package/lib/module/skia/types/Shader/index.js +3 -0
- package/lib/module/skia/types/Shader/index.js.map +1 -0
- package/lib/module/skia/types/Skia.js +2 -0
- package/lib/module/skia/types/Skia.js.map +1 -0
- package/lib/module/skia/types/Surface/Surface.js +2 -0
- package/lib/module/skia/types/Surface/Surface.js.map +1 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js +2 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/types/Surface/index.js +3 -0
- package/lib/module/skia/types/Surface/index.js.map +1 -0
- package/lib/module/skia/types/TextBlob.js +2 -0
- package/lib/module/skia/types/TextBlob.js.map +1 -0
- package/lib/module/skia/types/Typeface/Typeface.js +2 -0
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js +2 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/module/skia/types/Typeface/index.js +3 -0
- package/lib/module/skia/types/Typeface/index.js.map +1 -0
- package/lib/module/skia/types/Vertices/Vertices.js +8 -0
- package/lib/module/skia/types/Vertices/Vertices.js.map +1 -0
- package/lib/module/skia/types/Vertices/index.js +2 -0
- package/lib/module/skia/types/Vertices/index.js.map +1 -0
- package/lib/module/skia/types/index.js +29 -0
- package/lib/module/skia/types/index.js.map +1 -0
- package/lib/module/skia/web/Host.js +42 -0
- package/lib/module/skia/web/Host.js.map +1 -0
- package/lib/module/skia/web/JsiSkCanvas.js +173 -0
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/JsiSkColor.js +330 -0
- package/lib/module/skia/web/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilter.js +8 -0
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/module/skia/web/JsiSkData.js +8 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -0
- package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkFont.js +107 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgr.js +23 -0
- package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImage.js +49 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +28 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/module/skia/web/JsiSkPaint.js +91 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/JsiSkPath.js +324 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +18 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +16 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +21 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +8 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/module/skia/web/JsiSkRect.js +32 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkShader.js +8 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurface.js +19 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +18 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +17 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js +39 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +61 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -0
- package/lib/module/skia/web/index.js +2 -0
- package/lib/module/skia/web/index.js.map +1 -0
- package/lib/module/values/api.js +5 -0
- package/lib/module/values/api.js.map +1 -0
- package/lib/module/values/api.web.js +7 -0
- package/lib/module/values/api.web.js.map +1 -0
- package/lib/module/values/hooks/index.js +5 -0
- package/lib/module/values/hooks/index.js.map +1 -0
- package/lib/module/values/hooks/useClockValue.js +17 -0
- package/lib/module/values/hooks/useClockValue.js.map +1 -0
- package/lib/module/values/hooks/useComputedValue.js +18 -0
- package/lib/module/values/hooks/useComputedValue.js.map +1 -0
- package/lib/module/values/hooks/useValue.js +13 -0
- package/lib/module/values/hooks/useValue.js.map +1 -0
- package/lib/module/values/hooks/useValueEffect.js +13 -0
- package/lib/module/values/hooks/useValueEffect.js.map +1 -0
- package/lib/module/values/index.js +4 -0
- package/lib/module/values/index.js.map +1 -0
- package/lib/module/values/types.js +2 -0
- package/lib/module/values/types.js.map +1 -0
- package/lib/module/values/web/RNSkAnimation.js +36 -0
- package/lib/module/values/web/RNSkAnimation.js.map +1 -0
- package/lib/module/values/web/RNSkClockValue.js +65 -0
- package/lib/module/values/web/RNSkClockValue.js.map +1 -0
- package/lib/module/values/web/RNSkComputedValue.js +41 -0
- package/lib/module/values/web/RNSkComputedValue.js.map +1 -0
- package/lib/module/values/web/RNSkReadonlyValue.js +36 -0
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -0
- package/lib/module/values/web/RNSkValue.js +63 -0
- package/lib/module/values/web/RNSkValue.js.map +1 -0
- package/lib/module/values/web/api.js +19 -0
- package/lib/module/values/web/api.js.map +1 -0
- package/lib/module/values/web/index.js +2 -0
- package/lib/module/values/web/index.js.map +1 -0
- package/lib/module/views/SkiaView.js +109 -0
- package/lib/module/views/SkiaView.js.map +1 -0
- package/lib/module/views/SkiaView.web.js +202 -0
- package/lib/module/views/SkiaView.web.js.map +1 -0
- package/lib/module/views/api.js +4 -0
- package/lib/module/views/api.js.map +1 -0
- package/lib/module/views/index.js +5 -0
- package/lib/module/views/index.js.map +1 -0
- package/lib/module/views/types.js +9 -0
- package/lib/module/views/types.js.map +1 -0
- package/lib/module/views/useDrawCallback.js +14 -0
- package/lib/module/views/useDrawCallback.js.map +1 -0
- package/lib/module/views/useTouchHandler.js +85 -0
- package/lib/module/views/useTouchHandler.js.map +1 -0
- package/lib/module/web/index.js +10 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/jestSetup.d.ts +1 -0
- package/lib/typescript/src/animation/decay/decay.d.ts +2 -0
- package/lib/typescript/src/animation/decay/index.d.ts +1 -0
- package/lib/typescript/src/animation/decay/runDecay.d.ts +10 -0
- package/lib/typescript/src/animation/decay/types.d.ts +21 -0
- package/lib/typescript/src/animation/functions/index.d.ts +4 -0
- package/lib/typescript/src/animation/functions/interpolate.d.ts +17 -0
- package/lib/typescript/src/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +19 -0
- package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/typescript/src/animation/index.d.ts +4 -0
- package/lib/typescript/src/animation/spring/Spring.d.ts +65 -0
- package/lib/typescript/src/animation/spring/functions/index.d.ts +1 -0
- package/lib/typescript/src/animation/spring/functions/spring.d.ts +10 -0
- package/lib/typescript/src/animation/spring/index.d.ts +3 -0
- package/lib/typescript/src/animation/spring/runSpring.d.ts +16 -0
- package/lib/typescript/src/animation/spring/types.d.ts +6 -0
- package/lib/typescript/src/animation/spring/useSpring.d.ts +10 -0
- package/lib/typescript/src/animation/timing/Easing.d.ts +19 -0
- package/lib/typescript/src/animation/timing/createTiming.d.ts +17 -0
- package/lib/typescript/src/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/typescript/src/animation/timing/functions/index.d.ts +4 -0
- package/lib/typescript/src/animation/timing/functions/timing.d.ts +17 -0
- package/lib/typescript/src/animation/timing/functions/types.d.ts +7 -0
- package/lib/typescript/src/animation/timing/index.d.ts +4 -0
- package/lib/typescript/src/animation/timing/runTiming.d.ts +16 -0
- package/lib/typescript/src/animation/timing/useLoop.d.ts +8 -0
- package/lib/typescript/src/animation/timing/useTiming.d.ts +10 -0
- package/lib/typescript/src/animation/types.d.ts +18 -0
- package/lib/typescript/src/external/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/typescript/src/index.d.ts +8 -0
- package/lib/typescript/src/mock/index.d.ts +16 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +16 -0
- package/lib/typescript/src/renderer/DependencyManager.d.ts +21 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +12 -0
- package/lib/typescript/src/renderer/HostConfig.d.ts +27 -0
- package/lib/typescript/src/renderer/components/Blend.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Compose.d.ts +6 -0
- package/lib/typescript/src/renderer/components/Drawing.d.ts +7 -0
- package/lib/typescript/src/renderer/components/Group.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Mask.d.ts +15 -0
- package/lib/typescript/src/renderer/components/Paint.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Picture.d.ts +6 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +8 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/typescript/src/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +10 -0
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +3 -0
- package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +7 -0
- package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +9 -0
- package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +33 -0
- package/lib/typescript/src/renderer/components/image/Image.d.ts +19 -0
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +7 -0
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +26 -0
- package/lib/typescript/src/renderer/components/image/index.d.ts +4 -0
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +15 -0
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +10 -0
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -0
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +13 -0
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +14 -0
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +8 -0
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +12 -0
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +3 -0
- package/lib/typescript/src/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/index.d.ts +17 -0
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +16 -0
- package/lib/typescript/src/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +7 -0
- package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +8 -0
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +14 -0
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +9 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +13 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +10 -0
- package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +6 -0
- package/lib/typescript/src/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +17 -0
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +14 -0
- package/lib/typescript/src/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +11 -0
- package/lib/typescript/src/renderer/components/shaders/index.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +22 -0
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +12 -0
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +5 -0
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +25 -0
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +8 -0
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +21 -0
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +23 -0
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +15 -0
- package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shapes/index.d.ts +13 -0
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +20 -0
- package/lib/typescript/src/renderer/components/text/Text.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/index.d.ts +4 -0
- package/lib/typescript/src/renderer/index.d.ts +5 -0
- package/lib/typescript/src/renderer/nodes/Container.d.ts +8 -0
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +22 -0
- package/lib/typescript/src/renderer/nodes/Drawing.d.ts +21 -0
- package/lib/typescript/src/renderer/nodes/Node.d.ts +23 -0
- package/lib/typescript/src/renderer/nodes/index.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +7 -0
- package/lib/typescript/src/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/Circles.d.ts +13 -0
- package/lib/typescript/src/renderer/processors/Clips.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/processors/Font.d.ts +11 -0
- package/lib/typescript/src/renderer/processors/Paint.d.ts +22 -0
- package/lib/typescript/src/renderer/processors/Paths.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Radius.d.ts +3 -0
- package/lib/typescript/src/renderer/processors/Rects.d.ts +20 -0
- package/lib/typescript/src/renderer/processors/Transform.d.ts +90 -0
- package/lib/typescript/src/renderer/processors/index.d.ts +11 -0
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/typescript/src/renderer/processors/math/Math.d.ts +15 -0
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/typescript/src/renderer/processors/math/index.d.ts +3 -0
- package/lib/typescript/src/renderer/typeddash.d.ts +3 -0
- package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
- package/lib/typescript/src/renderer/useContextBridge.d.ts +5 -0
- package/lib/typescript/src/skia/NativeSetup.d.ts +1 -0
- package/lib/typescript/src/skia/Skia.d.ts +8 -0
- package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +5 -0
- package/lib/typescript/src/skia/core/Font.d.ts +5 -0
- package/lib/typescript/src/skia/core/Image.d.ts +5 -0
- package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
- package/lib/typescript/src/skia/core/Paint.d.ts +6 -0
- package/lib/typescript/src/skia/core/Path.d.ts +21 -0
- package/lib/typescript/src/skia/core/Picture.d.ts +9 -0
- package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
- package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
- package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
- package/lib/typescript/src/skia/core/index.d.ts +12 -0
- package/lib/typescript/src/skia/index.d.ts +3 -0
- package/lib/typescript/src/skia/types/Canvas.d.ts +381 -0
- package/lib/typescript/src/skia/types/Color.d.ts +2 -0
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/typescript/src/skia/types/ColorFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/ContourMeasure.d.ts +40 -0
- package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
- package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/typescript/src/skia/types/Data/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Font/Font.d.ts +192 -0
- package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +18 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +4 -0
- package/lib/typescript/src/skia/types/FontMgr/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Image/Image.d.ts +75 -0
- package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/typescript/src/skia/types/Image/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/typescript/src/skia/types/ImageFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/JsiInstance.d.ts +3 -0
- package/lib/typescript/src/skia/types/MaskFilter.d.ts +21 -0
- package/lib/typescript/src/skia/types/Matrix.d.ts +29 -0
- package/lib/typescript/src/skia/types/Paint/BlendMode.d.ts +58 -0
- package/lib/typescript/src/skia/types/Paint/Paint.d.ts +127 -0
- package/lib/typescript/src/skia/types/Paint/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +461 -0
- package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/typescript/src/skia/types/Path/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/PathEffect.d.ts +75 -0
- package/lib/typescript/src/skia/types/Picture/Picture.d.ts +26 -0
- package/lib/typescript/src/skia/types/Picture/PictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/types/Picture/PictureRecorder.d.ts +15 -0
- package/lib/typescript/src/skia/types/Picture/index.d.ts +3 -0
- package/lib/typescript/src/skia/types/Point.d.ts +10 -0
- package/lib/typescript/src/skia/types/RRect.d.ts +7 -0
- package/lib/typescript/src/skia/types/RSXform.d.ts +2 -0
- package/lib/typescript/src/skia/types/Rect.d.ts +6 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +48 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/typescript/src/skia/types/SVG/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +11 -0
- package/lib/typescript/src/skia/types/Shader/ShaderFactory.d.ts +104 -0
- package/lib/typescript/src/skia/types/Shader/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +68 -0
- package/lib/typescript/src/skia/types/Surface/Surface.d.ts +25 -0
- package/lib/typescript/src/skia/types/Surface/SurfaceFactory.d.ts +11 -0
- package/lib/typescript/src/skia/types/Surface/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/TextBlob.d.ts +44 -0
- package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/typescript/src/skia/types/Typeface/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Vertices/Vertices.d.ts +17 -0
- package/lib/typescript/src/skia/types/Vertices/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/index.d.ts +28 -0
- package/lib/typescript/src/skia/web/Host.d.ts +21 -0
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +34 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilterFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +26 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -0
- package/lib/typescript/src/values/api.d.ts +5 -0
- package/lib/typescript/src/values/api.web.d.ts +2 -0
- package/lib/typescript/src/values/hooks/index.d.ts +4 -0
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +6 -0
- package/lib/typescript/src/values/hooks/useComputedValue.d.ts +9 -0
- package/lib/typescript/src/values/hooks/useValue.d.ts +7 -0
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/typescript/src/values/index.d.ts +3 -0
- package/lib/typescript/src/values/types.d.ts +59 -0
- package/lib/typescript/src/values/web/RNSkAnimation.d.ts +9 -0
- package/lib/typescript/src/values/web/RNSkClockValue.d.ts +13 -0
- package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +9 -0
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +11 -0
- package/lib/typescript/src/values/web/RNSkValue.d.ts +14 -0
- package/lib/typescript/src/values/web/api.d.ts +2 -0
- package/lib/typescript/src/values/web/index.d.ts +1 -0
- package/lib/typescript/src/views/SkiaView.d.ts +37 -0
- package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
- package/lib/typescript/src/views/api.d.ts +5 -0
- package/lib/typescript/src/views/index.d.ts +4 -0
- package/lib/typescript/src/views/types.d.ts +76 -0
- package/lib/typescript/src/views/useDrawCallback.d.ts +8 -0
- package/lib/typescript/src/views/useTouchHandler.d.ts +22 -0
- package/lib/typescript/src/web/index.d.ts +5 -0
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +42 -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/libskshaper.xcframework/Info.plist +42 -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/libsvg.xcframework/Info.plist +42 -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 +102 -0
- package/react-native-skia.podspec +71 -0
- package/scripts/install-npm.js +23 -0
- package/src/animation/decay/decay.ts +35 -0
- package/src/animation/decay/index.ts +1 -0
- package/src/animation/decay/runDecay.ts +40 -0
- package/src/animation/decay/types.ts +24 -0
- package/src/animation/functions/index.ts +4 -0
- package/src/animation/functions/interpolate.ts +184 -0
- package/src/animation/functions/interpolateColors.ts +57 -0
- package/src/animation/functions/interpolatePaths.ts +87 -0
- package/src/animation/functions/interpolateVector.ts +26 -0
- package/src/animation/index.ts +4 -0
- package/src/animation/spring/Spring.ts +61 -0
- package/src/animation/spring/functions/index.ts +1 -0
- package/src/animation/spring/functions/spring.ts +86 -0
- package/src/animation/spring/index.ts +3 -0
- package/src/animation/spring/runSpring.ts +37 -0
- package/src/animation/spring/types.ts +6 -0
- package/src/animation/spring/useSpring.ts +28 -0
- package/src/animation/timing/Easing.ts +102 -0
- package/src/animation/timing/createTiming.ts +62 -0
- package/src/animation/timing/functions/bezier.ts +165 -0
- package/src/animation/timing/functions/getResolvedParams.ts +50 -0
- package/src/animation/timing/functions/index.ts +4 -0
- package/src/animation/timing/functions/timing.ts +44 -0
- package/src/animation/timing/functions/types.ts +8 -0
- package/src/animation/timing/index.ts +4 -0
- package/src/animation/timing/runTiming.ts +33 -0
- package/src/animation/timing/useLoop.ts +18 -0
- package/src/animation/timing/useTiming.ts +68 -0
- package/src/animation/types.ts +23 -0
- package/src/external/index.ts +1 -0
- package/src/external/reanimated/index.ts +1 -0
- package/src/external/reanimated/useSharedValueEffect.ts +81 -0
- package/src/index.ts +8 -0
- package/src/mock/index.ts +110 -0
- package/src/renderer/Canvas.tsx +158 -0
- package/src/renderer/DependencyManager.tsx +59 -0
- package/src/renderer/DrawingContext.ts +14 -0
- package/src/renderer/HostConfig.ts +303 -0
- package/src/renderer/components/Blend.tsx +29 -0
- package/src/renderer/components/Compose.tsx +26 -0
- package/src/renderer/components/Drawing.tsx +16 -0
- package/src/renderer/components/Group.tsx +83 -0
- package/src/renderer/components/Mask.tsx +45 -0
- package/src/renderer/components/Paint.tsx +30 -0
- package/src/renderer/components/Picture.tsx +17 -0
- package/src/renderer/components/backdrop/BackdropBlur.tsx +23 -0
- package/src/renderer/components/backdrop/BackdropFilter.tsx +47 -0
- package/src/renderer/components/backdrop/index.ts +2 -0
- package/src/renderer/components/colorFilters/BlendColor.tsx +30 -0
- package/src/renderer/components/colorFilters/Compose.ts +18 -0
- package/src/renderer/components/colorFilters/Lerp.tsx +27 -0
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +20 -0
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +18 -0
- package/src/renderer/components/colorFilters/Matrix.tsx +46 -0
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +20 -0
- package/src/renderer/components/colorFilters/index.ts +6 -0
- package/src/renderer/components/image/BoxFit.ts +125 -0
- package/src/renderer/components/image/Image.tsx +50 -0
- package/src/renderer/components/image/ImageSVG.tsx +24 -0
- package/src/renderer/components/image/ImageShader.tsx +82 -0
- package/src/renderer/components/image/index.ts +4 -0
- package/src/renderer/components/imageFilters/Blur.tsx +37 -0
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +34 -0
- package/src/renderer/components/imageFilters/InnerShadow.tsx +38 -0
- package/src/renderer/components/imageFilters/Morphology.tsx +33 -0
- package/src/renderer/components/imageFilters/Offset.tsx +28 -0
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +31 -0
- package/src/renderer/components/imageFilters/Shadow.tsx +42 -0
- package/src/renderer/components/imageFilters/getInput.ts +20 -0
- package/src/renderer/components/imageFilters/index.ts +6 -0
- package/src/renderer/components/index.ts +18 -0
- package/src/renderer/components/maskFilters/Blur.tsx +32 -0
- package/src/renderer/components/maskFilters/index.ts +1 -0
- package/src/renderer/components/pathEffects/Corner.tsx +31 -0
- package/src/renderer/components/pathEffects/Dash.tsx +27 -0
- package/src/renderer/components/pathEffects/Discrete.tsx +34 -0
- package/src/renderer/components/pathEffects/Line2D.tsx +33 -0
- package/src/renderer/components/pathEffects/Path1D.tsx +43 -0
- package/src/renderer/components/pathEffects/Path2D.tsx +35 -0
- package/src/renderer/components/pathEffects/Sum.tsx +21 -0
- package/src/renderer/components/pathEffects/index.ts +7 -0
- package/src/renderer/components/shaders/Color.tsx +20 -0
- package/src/renderer/components/shaders/FractalNoise.tsx +36 -0
- package/src/renderer/components/shaders/Gradient.ts +24 -0
- package/src/renderer/components/shaders/LinearGradient.tsx +33 -0
- package/src/renderer/components/shaders/RadialGradient.tsx +33 -0
- package/src/renderer/components/shaders/Shader.tsx +32 -0
- package/src/renderer/components/shaders/ShaderLib.ts +46 -0
- package/src/renderer/components/shaders/SweepGradient.tsx +36 -0
- package/src/renderer/components/shaders/Turbulence.tsx +36 -0
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +39 -0
- package/src/renderer/components/shaders/index.ts +9 -0
- package/src/renderer/components/shapes/Box.tsx +115 -0
- package/src/renderer/components/shapes/Circle.tsx +24 -0
- package/src/renderer/components/shapes/DiffRect.tsx +21 -0
- package/src/renderer/components/shapes/Fill.tsx +15 -0
- package/src/renderer/components/shapes/FitBox.tsx +28 -0
- package/src/renderer/components/shapes/Line.tsx +17 -0
- package/src/renderer/components/shapes/Oval.tsx +27 -0
- package/src/renderer/components/shapes/Patch.tsx +63 -0
- package/src/renderer/components/shapes/Path.tsx +57 -0
- package/src/renderer/components/shapes/Points.tsx +28 -0
- package/src/renderer/components/shapes/Rect.tsx +22 -0
- package/src/renderer/components/shapes/RoundedRect.tsx +25 -0
- package/src/renderer/components/shapes/Vertices.tsx +45 -0
- package/src/renderer/components/shapes/index.ts +13 -0
- package/src/renderer/components/text/Glyphs.tsx +52 -0
- package/src/renderer/components/text/Text.tsx +32 -0
- package/src/renderer/components/text/TextBlob.tsx +26 -0
- package/src/renderer/components/text/TextPath.tsx +68 -0
- package/src/renderer/components/text/index.ts +4 -0
- package/src/renderer/index.ts +5 -0
- package/src/renderer/nodes/Container.tsx +17 -0
- package/src/renderer/nodes/Declaration.tsx +67 -0
- package/src/renderer/nodes/Drawing.tsx +67 -0
- package/src/renderer/nodes/Node.ts +57 -0
- package/src/renderer/nodes/index.ts +4 -0
- package/src/renderer/processors/Animations/Animations.ts +42 -0
- package/src/renderer/processors/Animations/index.ts +1 -0
- package/src/renderer/processors/Circles.ts +26 -0
- package/src/renderer/processors/Clips.ts +23 -0
- package/src/renderer/processors/Color.ts +15 -0
- package/src/renderer/processors/Font.ts +31 -0
- package/src/renderer/processors/Paint.ts +118 -0
- package/src/renderer/processors/Paths.ts +19 -0
- package/src/renderer/processors/Radius.ts +10 -0
- package/src/renderer/processors/Rects.ts +50 -0
- package/src/renderer/processors/Transform.ts +53 -0
- package/src/renderer/processors/index.ts +11 -0
- package/src/renderer/processors/math/Coordinates.ts +32 -0
- package/src/renderer/processors/math/Math.ts +18 -0
- package/src/renderer/processors/math/Transforms.ts +8 -0
- package/src/renderer/processors/math/index.ts +3 -0
- package/src/renderer/typeddash.ts +23 -0
- package/src/renderer/useCanvas.ts +21 -0
- package/src/renderer/useContextBridge.tsx +21 -0
- package/src/skia/NativeSetup.ts +18 -0
- package/src/skia/Skia.ts +11 -0
- package/src/skia/Skia.web.ts +3 -0
- package/src/skia/core/Data.ts +98 -0
- package/src/skia/core/Font.ts +28 -0
- package/src/skia/core/Image.ts +12 -0
- package/src/skia/core/Matrix.ts +6 -0
- package/src/skia/core/Paint.ts +22 -0
- package/src/skia/core/Path.ts +60 -0
- package/src/skia/core/Picture.ts +25 -0
- package/src/skia/core/RRect.tsx +5 -0
- package/src/skia/core/Rect.ts +33 -0
- package/src/skia/core/SVG.ts +9 -0
- package/src/skia/core/Typeface.ts +16 -0
- package/src/skia/core/Vector.ts +11 -0
- package/src/skia/core/index.ts +12 -0
- package/src/skia/index.ts +3 -0
- package/src/skia/types/Canvas.ts +495 -0
- package/src/skia/types/Color.ts +4 -0
- package/src/skia/types/ColorFilter/ColorFilter.ts +7 -0
- package/src/skia/types/ColorFilter/ColorFilterFactory.ts +52 -0
- package/src/skia/types/ColorFilter/index.ts +2 -0
- package/src/skia/types/ContourMeasure.tsx +47 -0
- package/src/skia/types/Data/Data.ts +5 -0
- package/src/skia/types/Data/DataFactory.ts +19 -0
- package/src/skia/types/Data/index.ts +2 -0
- package/src/skia/types/Font/Font.ts +232 -0
- package/src/skia/types/Font/index.ts +1 -0
- package/src/skia/types/FontMgr/FontMgr.ts +24 -0
- package/src/skia/types/FontMgr/FontMgrFactory.ts +12 -0
- package/src/skia/types/FontMgr/index.ts +2 -0
- package/src/skia/types/Image/Image.ts +96 -0
- package/src/skia/types/Image/ImageFactory.ts +78 -0
- package/src/skia/types/Image/index.ts +2 -0
- package/src/skia/types/ImageFilter/ImageFilter.ts +31 -0
- package/src/skia/types/ImageFilter/ImageFilterFactory.ts +192 -0
- package/src/skia/types/ImageFilter/index.ts +2 -0
- package/src/skia/types/JsiInstance.ts +3 -0
- package/src/skia/types/MaskFilter.ts +27 -0
- package/src/skia/types/Matrix.ts +95 -0
- package/src/skia/types/Paint/BlendMode.ts +61 -0
- package/src/skia/types/Paint/Paint.ts +153 -0
- package/src/skia/types/Paint/index.ts +2 -0
- package/src/skia/types/Path/Path.ts +564 -0
- package/src/skia/types/Path/PathFactory.ts +34 -0
- package/src/skia/types/Path/index.ts +2 -0
- package/src/skia/types/PathEffect.ts +97 -0
- package/src/skia/types/Picture/Picture.ts +34 -0
- package/src/skia/types/Picture/PictureFactory.ts +9 -0
- package/src/skia/types/Picture/PictureRecorder.ts +18 -0
- package/src/skia/types/Picture/index.ts +3 -0
- package/src/skia/types/Point.ts +12 -0
- package/src/skia/types/RRect.ts +12 -0
- package/src/skia/types/RSXform.ts +3 -0
- package/src/skia/types/Rect.ts +6 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +61 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffectFactory.ts +12 -0
- package/src/skia/types/RuntimeEffect/index.ts +2 -0
- package/src/skia/types/SVG/SVG.ts +3 -0
- package/src/skia/types/SVG/SVGFactory.ts +8 -0
- package/src/skia/types/SVG/index.ts +2 -0
- package/src/skia/types/Shader/Shader.ts +65 -0
- package/src/skia/types/Shader/ShaderFactory.ts +169 -0
- package/src/skia/types/Shader/index.ts +2 -0
- package/src/skia/types/Skia.ts +84 -0
- package/src/skia/types/Surface/Surface.ts +27 -0
- package/src/skia/types/Surface/SurfaceFactory.ts +12 -0
- package/src/skia/types/Surface/index.ts +2 -0
- package/src/skia/types/TextBlob.ts +52 -0
- package/src/skia/types/Typeface/Typeface.ts +6 -0
- package/src/skia/types/Typeface/TypefaceFactory.ts +7 -0
- package/src/skia/types/Typeface/index.ts +2 -0
- package/src/skia/types/Vertices/Vertices.tsx +20 -0
- package/src/skia/types/Vertices/index.ts +1 -0
- package/src/skia/types/index.ts +28 -0
- package/src/skia/web/Host.ts +56 -0
- package/src/skia/web/JsiSkCanvas.ts +330 -0
- package/src/skia/web/JsiSkColor.ts +327 -0
- package/src/skia/web/JsiSkColorFilter.ts +14 -0
- package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
- package/src/skia/web/JsiSkContourMeasure.ts +35 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
- package/src/skia/web/JsiSkData.ts +13 -0
- package/src/skia/web/JsiSkDataFactory.ts +35 -0
- package/src/skia/web/JsiSkFont.ts +134 -0
- package/src/skia/web/JsiSkFontMgr.ts +38 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/JsiSkImage.ts +87 -0
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkImageFilterFactory.ts +144 -0
- package/src/skia/web/JsiSkMaskFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
- package/src/skia/web/JsiSkMatrix.ts +54 -0
- package/src/skia/web/JsiSkPaint.ts +104 -0
- package/src/skia/web/JsiSkPath.ts +386 -0
- package/src/skia/web/JsiSkPathEffect.ts +14 -0
- package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
- package/src/skia/web/JsiSkPathFactory.ts +54 -0
- package/src/skia/web/JsiSkPicture.ts +45 -0
- package/src/skia/web/JsiSkPictureFactory.ts +20 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
- package/src/skia/web/JsiSkPoint.ts +19 -0
- package/src/skia/web/JsiSkRRect.ts +27 -0
- package/src/skia/web/JsiSkRSXform.ts +16 -0
- package/src/skia/web/JsiSkRect.ts +37 -0
- package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
- package/src/skia/web/JsiSkSVGFactory.ts +20 -0
- package/src/skia/web/JsiSkShader.ts +14 -0
- package/src/skia/web/JsiSkShaderFactory.ts +181 -0
- package/src/skia/web/JsiSkSurface.ts +25 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +20 -0
- package/src/skia/web/JsiSkTextBlob.ts +14 -0
- package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
- package/src/skia/web/JsiSkTypeface.ts +28 -0
- package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
- package/src/skia/web/JsiSkVertices.ts +23 -0
- package/src/skia/web/JsiSkVerticesFactory.ts +41 -0
- package/src/skia/web/JsiSkia.ts +98 -0
- package/src/skia/web/index.ts +1 -0
- package/src/values/api.ts +8 -0
- package/src/values/api.web.ts +5 -0
- package/src/values/hooks/index.ts +4 -0
- package/src/values/hooks/useClockValue.ts +18 -0
- package/src/values/hooks/useComputedValue.ts +23 -0
- package/src/values/hooks/useValue.ts +14 -0
- package/src/values/hooks/useValueEffect.ts +15 -0
- package/src/values/index.ts +3 -0
- package/src/values/types.ts +69 -0
- package/src/values/web/RNSkAnimation.ts +33 -0
- package/src/values/web/RNSkClockValue.ts +58 -0
- package/src/values/web/RNSkComputedValue.ts +38 -0
- package/src/values/web/RNSkReadonlyValue.ts +32 -0
- package/src/values/web/RNSkValue.ts +57 -0
- package/src/values/web/api.ts +33 -0
- package/src/values/web/index.ts +1 -0
- package/src/views/SkiaView.tsx +105 -0
- package/src/views/SkiaView.web.tsx +193 -0
- package/src/views/api.ts +7 -0
- package/src/views/index.ts +4 -0
- package/src/views/types.ts +96 -0
- package/src/views/useDrawCallback.ts +19 -0
- package/src/views/useTouchHandler.ts +111 -0
- package/src/web/index.ts +15 -0
@@ -0,0 +1,1378 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2006 The Android Open Source Project
|
3
|
+
*
|
4
|
+
* Use of this source code is governed by a BSD-style license that can be
|
5
|
+
* found in the LICENSE file.
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef SkRect_DEFINED
|
9
|
+
#define SkRect_DEFINED
|
10
|
+
|
11
|
+
#include "include/core/SkPoint.h"
|
12
|
+
#include "include/core/SkSize.h"
|
13
|
+
#include "include/private/SkSafe32.h"
|
14
|
+
#include "include/private/SkTFitsIn.h"
|
15
|
+
|
16
|
+
#include <algorithm>
|
17
|
+
#include <utility>
|
18
|
+
|
19
|
+
struct SkRect;
|
20
|
+
|
21
|
+
/** \struct SkIRect
|
22
|
+
SkIRect holds four 32-bit integer coordinates describing the upper and
|
23
|
+
lower bounds of a rectangle. SkIRect may be created from outer bounds or
|
24
|
+
from position, width, and height. SkIRect describes an area; if its right
|
25
|
+
is less than or equal to its left, or if its bottom is less than or equal to
|
26
|
+
its top, it is considered empty.
|
27
|
+
*/
|
28
|
+
struct SK_API SkIRect {
|
29
|
+
int32_t fLeft; //!< smaller x-axis bounds
|
30
|
+
int32_t fTop; //!< smaller y-axis bounds
|
31
|
+
int32_t fRight; //!< larger x-axis bounds
|
32
|
+
int32_t fBottom; //!< larger y-axis bounds
|
33
|
+
|
34
|
+
/** Returns constructed SkIRect set to (0, 0, 0, 0).
|
35
|
+
Many other rectangles are empty; if left is equal to or greater than right,
|
36
|
+
or if top is equal to or greater than bottom. Setting all members to zero
|
37
|
+
is a convenience, but does not designate a special empty rectangle.
|
38
|
+
|
39
|
+
@return bounds (0, 0, 0, 0)
|
40
|
+
*/
|
41
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty() {
|
42
|
+
return SkIRect{0, 0, 0, 0};
|
43
|
+
}
|
44
|
+
|
45
|
+
/** Returns constructed SkIRect set to (0, 0, w, h). Does not validate input; w or h
|
46
|
+
may be negative.
|
47
|
+
|
48
|
+
@param w width of constructed SkIRect
|
49
|
+
@param h height of constructed SkIRect
|
50
|
+
@return bounds (0, 0, w, h)
|
51
|
+
*/
|
52
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) {
|
53
|
+
return SkIRect{0, 0, w, h};
|
54
|
+
}
|
55
|
+
|
56
|
+
/** Returns constructed SkIRect set to (0, 0, size.width(), size.height()).
|
57
|
+
Does not validate input; size.width() or size.height() may be negative.
|
58
|
+
|
59
|
+
@param size values for SkIRect width and height
|
60
|
+
@return bounds (0, 0, size.width(), size.height())
|
61
|
+
*/
|
62
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size) {
|
63
|
+
return SkIRect{0, 0, size.fWidth, size.fHeight};
|
64
|
+
}
|
65
|
+
|
66
|
+
/** Returns constructed SkIRect set to (pt.x(), pt.y(), pt.x() + size.width(),
|
67
|
+
pt.y() + size.height()). Does not validate input; size.width() or size.height() may be
|
68
|
+
negative.
|
69
|
+
|
70
|
+
@param pt values for SkIRect fLeft and fTop
|
71
|
+
@param size values for SkIRect width and height
|
72
|
+
@return bounds at pt with width and height of size
|
73
|
+
*/
|
74
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakePtSize(SkIPoint pt, SkISize size) {
|
75
|
+
return MakeXYWH(pt.x(), pt.y(), size.width(), size.height());
|
76
|
+
}
|
77
|
+
|
78
|
+
/** Returns constructed SkIRect set to (l, t, r, b). Does not sort input; SkIRect may
|
79
|
+
result in fLeft greater than fRight, or fTop greater than fBottom.
|
80
|
+
|
81
|
+
@param l integer stored in fLeft
|
82
|
+
@param t integer stored in fTop
|
83
|
+
@param r integer stored in fRight
|
84
|
+
@param b integer stored in fBottom
|
85
|
+
@return bounds (l, t, r, b)
|
86
|
+
*/
|
87
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t,
|
88
|
+
int32_t r, int32_t b) {
|
89
|
+
return SkIRect{l, t, r, b};
|
90
|
+
}
|
91
|
+
|
92
|
+
/** Returns constructed SkIRect set to: (x, y, x + w, y + h).
|
93
|
+
Does not validate input; w or h may be negative.
|
94
|
+
|
95
|
+
@param x stored in fLeft
|
96
|
+
@param y stored in fTop
|
97
|
+
@param w added to x and stored in fRight
|
98
|
+
@param h added to y and stored in fBottom
|
99
|
+
@return bounds at (x, y) with width w and height h
|
100
|
+
*/
|
101
|
+
static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y,
|
102
|
+
int32_t w, int32_t h) {
|
103
|
+
return { x, y, Sk32_sat_add(x, w), Sk32_sat_add(y, h) };
|
104
|
+
}
|
105
|
+
|
106
|
+
/** Returns left edge of SkIRect, if sorted.
|
107
|
+
Call sort() to reverse fLeft and fRight if needed.
|
108
|
+
|
109
|
+
@return fLeft
|
110
|
+
*/
|
111
|
+
constexpr int32_t left() const { return fLeft; }
|
112
|
+
|
113
|
+
/** Returns top edge of SkIRect, if sorted. Call isEmpty() to see if SkIRect may be invalid,
|
114
|
+
and sort() to reverse fTop and fBottom if needed.
|
115
|
+
|
116
|
+
@return fTop
|
117
|
+
*/
|
118
|
+
constexpr int32_t top() const { return fTop; }
|
119
|
+
|
120
|
+
/** Returns right edge of SkIRect, if sorted.
|
121
|
+
Call sort() to reverse fLeft and fRight if needed.
|
122
|
+
|
123
|
+
@return fRight
|
124
|
+
*/
|
125
|
+
constexpr int32_t right() const { return fRight; }
|
126
|
+
|
127
|
+
/** Returns bottom edge of SkIRect, if sorted. Call isEmpty() to see if SkIRect may be invalid,
|
128
|
+
and sort() to reverse fTop and fBottom if needed.
|
129
|
+
|
130
|
+
@return fBottom
|
131
|
+
*/
|
132
|
+
constexpr int32_t bottom() const { return fBottom; }
|
133
|
+
|
134
|
+
/** Returns left edge of SkIRect, if sorted. Call isEmpty() to see if SkIRect may be invalid,
|
135
|
+
and sort() to reverse fLeft and fRight if needed.
|
136
|
+
|
137
|
+
@return fLeft
|
138
|
+
*/
|
139
|
+
constexpr int32_t x() const { return fLeft; }
|
140
|
+
|
141
|
+
/** Returns top edge of SkIRect, if sorted. Call isEmpty() to see if SkIRect may be invalid,
|
142
|
+
and sort() to reverse fTop and fBottom if needed.
|
143
|
+
|
144
|
+
@return fTop
|
145
|
+
*/
|
146
|
+
constexpr int32_t y() const { return fTop; }
|
147
|
+
|
148
|
+
// Experimental
|
149
|
+
constexpr SkIPoint topLeft() const { return {fLeft, fTop}; }
|
150
|
+
|
151
|
+
/** Returns span on the x-axis. This does not check if SkIRect is sorted, or if
|
152
|
+
result fits in 32-bit signed integer; result may be negative.
|
153
|
+
|
154
|
+
@return fRight minus fLeft
|
155
|
+
*/
|
156
|
+
constexpr int32_t width() const { return Sk32_can_overflow_sub(fRight, fLeft); }
|
157
|
+
|
158
|
+
/** Returns span on the y-axis. This does not check if SkIRect is sorted, or if
|
159
|
+
result fits in 32-bit signed integer; result may be negative.
|
160
|
+
|
161
|
+
@return fBottom minus fTop
|
162
|
+
*/
|
163
|
+
constexpr int32_t height() const { return Sk32_can_overflow_sub(fBottom, fTop); }
|
164
|
+
|
165
|
+
/** Returns spans on the x-axis and y-axis. This does not check if SkIRect is sorted,
|
166
|
+
or if result fits in 32-bit signed integer; result may be negative.
|
167
|
+
|
168
|
+
@return SkISize (width, height)
|
169
|
+
*/
|
170
|
+
constexpr SkISize size() const { return SkISize::Make(this->width(), this->height()); }
|
171
|
+
|
172
|
+
/** Returns span on the x-axis. This does not check if SkIRect is sorted, so the
|
173
|
+
result may be negative. This is safer than calling width() since width() might
|
174
|
+
overflow in its calculation.
|
175
|
+
|
176
|
+
@return fRight minus fLeft cast to int64_t
|
177
|
+
*/
|
178
|
+
constexpr int64_t width64() const { return (int64_t)fRight - (int64_t)fLeft; }
|
179
|
+
|
180
|
+
/** Returns span on the y-axis. This does not check if SkIRect is sorted, so the
|
181
|
+
result may be negative. This is safer than calling height() since height() might
|
182
|
+
overflow in its calculation.
|
183
|
+
|
184
|
+
@return fBottom minus fTop cast to int64_t
|
185
|
+
*/
|
186
|
+
constexpr int64_t height64() const { return (int64_t)fBottom - (int64_t)fTop; }
|
187
|
+
|
188
|
+
/** Returns true if fLeft is equal to or greater than fRight, or if fTop is equal
|
189
|
+
to or greater than fBottom. Call sort() to reverse rectangles with negative
|
190
|
+
width64() or height64().
|
191
|
+
|
192
|
+
@return true if width64() or height64() are zero or negative
|
193
|
+
*/
|
194
|
+
bool isEmpty64() const { return fRight <= fLeft || fBottom <= fTop; }
|
195
|
+
|
196
|
+
/** Returns true if width() or height() are zero or negative.
|
197
|
+
|
198
|
+
@return true if width() or height() are zero or negative
|
199
|
+
*/
|
200
|
+
bool isEmpty() const {
|
201
|
+
int64_t w = this->width64();
|
202
|
+
int64_t h = this->height64();
|
203
|
+
if (w <= 0 || h <= 0) {
|
204
|
+
return true;
|
205
|
+
}
|
206
|
+
// Return true if either exceeds int32_t
|
207
|
+
return !SkTFitsIn<int32_t>(w | h);
|
208
|
+
}
|
209
|
+
|
210
|
+
/** Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are
|
211
|
+
identical to corresponding members in b.
|
212
|
+
|
213
|
+
@param a SkIRect to compare
|
214
|
+
@param b SkIRect to compare
|
215
|
+
@return true if members are equal
|
216
|
+
*/
|
217
|
+
friend bool operator==(const SkIRect& a, const SkIRect& b) {
|
218
|
+
return !memcmp(&a, &b, sizeof(a));
|
219
|
+
}
|
220
|
+
|
221
|
+
/** Returns true if any member in a: fLeft, fTop, fRight, and fBottom; is not
|
222
|
+
identical to the corresponding member in b.
|
223
|
+
|
224
|
+
@param a SkIRect to compare
|
225
|
+
@param b SkIRect to compare
|
226
|
+
@return true if members are not equal
|
227
|
+
*/
|
228
|
+
friend bool operator!=(const SkIRect& a, const SkIRect& b) {
|
229
|
+
return !(a == b);
|
230
|
+
}
|
231
|
+
|
232
|
+
/** Sets SkIRect to (0, 0, 0, 0).
|
233
|
+
|
234
|
+
Many other rectangles are empty; if left is equal to or greater than right,
|
235
|
+
or if top is equal to or greater than bottom. Setting all members to zero
|
236
|
+
is a convenience, but does not designate a special empty rectangle.
|
237
|
+
*/
|
238
|
+
void setEmpty() { memset(this, 0, sizeof(*this)); }
|
239
|
+
|
240
|
+
/** Sets SkIRect to (left, top, right, bottom).
|
241
|
+
left and right are not sorted; left is not necessarily less than right.
|
242
|
+
top and bottom are not sorted; top is not necessarily less than bottom.
|
243
|
+
|
244
|
+
@param left stored in fLeft
|
245
|
+
@param top stored in fTop
|
246
|
+
@param right stored in fRight
|
247
|
+
@param bottom stored in fBottom
|
248
|
+
*/
|
249
|
+
void setLTRB(int32_t left, int32_t top, int32_t right, int32_t bottom) {
|
250
|
+
fLeft = left;
|
251
|
+
fTop = top;
|
252
|
+
fRight = right;
|
253
|
+
fBottom = bottom;
|
254
|
+
}
|
255
|
+
|
256
|
+
/** Sets SkIRect to: (x, y, x + width, y + height).
|
257
|
+
Does not validate input; width or height may be negative.
|
258
|
+
|
259
|
+
@param x stored in fLeft
|
260
|
+
@param y stored in fTop
|
261
|
+
@param width added to x and stored in fRight
|
262
|
+
@param height added to y and stored in fBottom
|
263
|
+
*/
|
264
|
+
void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height) {
|
265
|
+
fLeft = x;
|
266
|
+
fTop = y;
|
267
|
+
fRight = Sk32_sat_add(x, width);
|
268
|
+
fBottom = Sk32_sat_add(y, height);
|
269
|
+
}
|
270
|
+
|
271
|
+
void setWH(int32_t width, int32_t height) {
|
272
|
+
fLeft = 0;
|
273
|
+
fTop = 0;
|
274
|
+
fRight = width;
|
275
|
+
fBottom = height;
|
276
|
+
}
|
277
|
+
|
278
|
+
void setSize(SkISize size) {
|
279
|
+
fLeft = 0;
|
280
|
+
fTop = 0;
|
281
|
+
fRight = size.width();
|
282
|
+
fBottom = size.height();
|
283
|
+
}
|
284
|
+
|
285
|
+
/** Returns SkIRect offset by (dx, dy).
|
286
|
+
|
287
|
+
If dx is negative, SkIRect returned is moved to the left.
|
288
|
+
If dx is positive, SkIRect returned is moved to the right.
|
289
|
+
If dy is negative, SkIRect returned is moved upward.
|
290
|
+
If dy is positive, SkIRect returned is moved downward.
|
291
|
+
|
292
|
+
@param dx offset added to fLeft and fRight
|
293
|
+
@param dy offset added to fTop and fBottom
|
294
|
+
@return SkIRect offset by dx and dy, with original width and height
|
295
|
+
*/
|
296
|
+
constexpr SkIRect makeOffset(int32_t dx, int32_t dy) const {
|
297
|
+
return {
|
298
|
+
Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
|
299
|
+
Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
|
300
|
+
};
|
301
|
+
}
|
302
|
+
|
303
|
+
/** Returns SkIRect offset by (offset.x(), offset.y()).
|
304
|
+
|
305
|
+
If offset.x() is negative, SkIRect returned is moved to the left.
|
306
|
+
If offset.x() is positive, SkIRect returned is moved to the right.
|
307
|
+
If offset.y() is negative, SkIRect returned is moved upward.
|
308
|
+
If offset.y() is positive, SkIRect returned is moved downward.
|
309
|
+
|
310
|
+
@param offset translation vector
|
311
|
+
@return SkIRect translated by offset, with original width and height
|
312
|
+
*/
|
313
|
+
constexpr SkIRect makeOffset(SkIVector offset) const {
|
314
|
+
return this->makeOffset(offset.x(), offset.y());
|
315
|
+
}
|
316
|
+
|
317
|
+
/** Returns SkIRect, inset by (dx, dy).
|
318
|
+
|
319
|
+
If dx is negative, SkIRect returned is wider.
|
320
|
+
If dx is positive, SkIRect returned is narrower.
|
321
|
+
If dy is negative, SkIRect returned is taller.
|
322
|
+
If dy is positive, SkIRect returned is shorter.
|
323
|
+
|
324
|
+
@param dx offset added to fLeft and subtracted from fRight
|
325
|
+
@param dy offset added to fTop and subtracted from fBottom
|
326
|
+
@return SkIRect inset symmetrically left and right, top and bottom
|
327
|
+
*/
|
328
|
+
SkIRect makeInset(int32_t dx, int32_t dy) const {
|
329
|
+
return {
|
330
|
+
Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
|
331
|
+
Sk32_sat_sub(fRight, dx), Sk32_sat_sub(fBottom, dy),
|
332
|
+
};
|
333
|
+
}
|
334
|
+
|
335
|
+
/** Returns SkIRect, outset by (dx, dy).
|
336
|
+
|
337
|
+
If dx is negative, SkIRect returned is narrower.
|
338
|
+
If dx is positive, SkIRect returned is wider.
|
339
|
+
If dy is negative, SkIRect returned is shorter.
|
340
|
+
If dy is positive, SkIRect returned is taller.
|
341
|
+
|
342
|
+
@param dx offset subtracted to fLeft and added from fRight
|
343
|
+
@param dy offset subtracted to fTop and added from fBottom
|
344
|
+
@return SkIRect outset symmetrically left and right, top and bottom
|
345
|
+
*/
|
346
|
+
SkIRect makeOutset(int32_t dx, int32_t dy) const {
|
347
|
+
return {
|
348
|
+
Sk32_sat_sub(fLeft, dx), Sk32_sat_sub(fTop, dy),
|
349
|
+
Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
|
350
|
+
};
|
351
|
+
}
|
352
|
+
|
353
|
+
/** Offsets SkIRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
|
354
|
+
|
355
|
+
If dx is negative, moves SkIRect returned to the left.
|
356
|
+
If dx is positive, moves SkIRect returned to the right.
|
357
|
+
If dy is negative, moves SkIRect returned upward.
|
358
|
+
If dy is positive, moves SkIRect returned downward.
|
359
|
+
|
360
|
+
@param dx offset added to fLeft and fRight
|
361
|
+
@param dy offset added to fTop and fBottom
|
362
|
+
*/
|
363
|
+
void offset(int32_t dx, int32_t dy) {
|
364
|
+
fLeft = Sk32_sat_add(fLeft, dx);
|
365
|
+
fTop = Sk32_sat_add(fTop, dy);
|
366
|
+
fRight = Sk32_sat_add(fRight, dx);
|
367
|
+
fBottom = Sk32_sat_add(fBottom, dy);
|
368
|
+
}
|
369
|
+
|
370
|
+
/** Offsets SkIRect by adding delta.fX to fLeft, fRight; and by adding delta.fY to
|
371
|
+
fTop, fBottom.
|
372
|
+
|
373
|
+
If delta.fX is negative, moves SkIRect returned to the left.
|
374
|
+
If delta.fX is positive, moves SkIRect returned to the right.
|
375
|
+
If delta.fY is negative, moves SkIRect returned upward.
|
376
|
+
If delta.fY is positive, moves SkIRect returned downward.
|
377
|
+
|
378
|
+
@param delta offset added to SkIRect
|
379
|
+
*/
|
380
|
+
void offset(const SkIPoint& delta) {
|
381
|
+
this->offset(delta.fX, delta.fY);
|
382
|
+
}
|
383
|
+
|
384
|
+
/** Offsets SkIRect so that fLeft equals newX, and fTop equals newY. width and height
|
385
|
+
are unchanged.
|
386
|
+
|
387
|
+
@param newX stored in fLeft, preserving width()
|
388
|
+
@param newY stored in fTop, preserving height()
|
389
|
+
*/
|
390
|
+
void offsetTo(int32_t newX, int32_t newY) {
|
391
|
+
fRight = Sk64_pin_to_s32((int64_t)fRight + newX - fLeft);
|
392
|
+
fBottom = Sk64_pin_to_s32((int64_t)fBottom + newY - fTop);
|
393
|
+
fLeft = newX;
|
394
|
+
fTop = newY;
|
395
|
+
}
|
396
|
+
|
397
|
+
/** Insets SkIRect by (dx,dy).
|
398
|
+
|
399
|
+
If dx is positive, makes SkIRect narrower.
|
400
|
+
If dx is negative, makes SkIRect wider.
|
401
|
+
If dy is positive, makes SkIRect shorter.
|
402
|
+
If dy is negative, makes SkIRect taller.
|
403
|
+
|
404
|
+
@param dx offset added to fLeft and subtracted from fRight
|
405
|
+
@param dy offset added to fTop and subtracted from fBottom
|
406
|
+
*/
|
407
|
+
void inset(int32_t dx, int32_t dy) {
|
408
|
+
fLeft = Sk32_sat_add(fLeft, dx);
|
409
|
+
fTop = Sk32_sat_add(fTop, dy);
|
410
|
+
fRight = Sk32_sat_sub(fRight, dx);
|
411
|
+
fBottom = Sk32_sat_sub(fBottom, dy);
|
412
|
+
}
|
413
|
+
|
414
|
+
/** Outsets SkIRect by (dx, dy).
|
415
|
+
|
416
|
+
If dx is positive, makes SkIRect wider.
|
417
|
+
If dx is negative, makes SkIRect narrower.
|
418
|
+
If dy is positive, makes SkIRect taller.
|
419
|
+
If dy is negative, makes SkIRect shorter.
|
420
|
+
|
421
|
+
@param dx subtracted to fLeft and added from fRight
|
422
|
+
@param dy subtracted to fTop and added from fBottom
|
423
|
+
*/
|
424
|
+
void outset(int32_t dx, int32_t dy) { this->inset(-dx, -dy); }
|
425
|
+
|
426
|
+
/** Adjusts SkIRect by adding dL to fLeft, dT to fTop, dR to fRight, and dB to fBottom.
|
427
|
+
|
428
|
+
If dL is positive, narrows SkIRect on the left. If negative, widens it on the left.
|
429
|
+
If dT is positive, shrinks SkIRect on the top. If negative, lengthens it on the top.
|
430
|
+
If dR is positive, narrows SkIRect on the right. If negative, widens it on the right.
|
431
|
+
If dB is positive, shrinks SkIRect on the bottom. If negative, lengthens it on the bottom.
|
432
|
+
|
433
|
+
The resulting SkIRect is not checked for validity. Thus, if the resulting SkIRect left is
|
434
|
+
greater than right, the SkIRect will be considered empty. Call sort() after this call
|
435
|
+
if that is not the desired behavior.
|
436
|
+
|
437
|
+
@param dL offset added to fLeft
|
438
|
+
@param dT offset added to fTop
|
439
|
+
@param dR offset added to fRight
|
440
|
+
@param dB offset added to fBottom
|
441
|
+
*/
|
442
|
+
void adjust(int32_t dL, int32_t dT, int32_t dR, int32_t dB) {
|
443
|
+
fLeft = Sk32_sat_add(fLeft, dL);
|
444
|
+
fTop = Sk32_sat_add(fTop, dT);
|
445
|
+
fRight = Sk32_sat_add(fRight, dR);
|
446
|
+
fBottom = Sk32_sat_add(fBottom, dB);
|
447
|
+
}
|
448
|
+
|
449
|
+
/** Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
|
450
|
+
Returns false if SkIRect is empty.
|
451
|
+
|
452
|
+
Considers input to describe constructed SkIRect: (x, y, x + 1, y + 1) and
|
453
|
+
returns true if constructed area is completely enclosed by SkIRect area.
|
454
|
+
|
455
|
+
@param x test SkIPoint x-coordinate
|
456
|
+
@param y test SkIPoint y-coordinate
|
457
|
+
@return true if (x, y) is inside SkIRect
|
458
|
+
*/
|
459
|
+
bool contains(int32_t x, int32_t y) const {
|
460
|
+
return x >= fLeft && x < fRight && y >= fTop && y < fBottom;
|
461
|
+
}
|
462
|
+
|
463
|
+
/** Returns true if SkIRect contains r.
|
464
|
+
Returns false if SkIRect is empty or r is empty.
|
465
|
+
|
466
|
+
SkIRect contains r when SkIRect area completely includes r area.
|
467
|
+
|
468
|
+
@param r SkIRect contained
|
469
|
+
@return true if all sides of SkIRect are outside r
|
470
|
+
*/
|
471
|
+
bool contains(const SkIRect& r) const {
|
472
|
+
return !r.isEmpty() && !this->isEmpty() && // check for empties
|
473
|
+
fLeft <= r.fLeft && fTop <= r.fTop &&
|
474
|
+
fRight >= r.fRight && fBottom >= r.fBottom;
|
475
|
+
}
|
476
|
+
|
477
|
+
/** Returns true if SkIRect contains r.
|
478
|
+
Returns false if SkIRect is empty or r is empty.
|
479
|
+
|
480
|
+
SkIRect contains r when SkIRect area completely includes r area.
|
481
|
+
|
482
|
+
@param r SkRect contained
|
483
|
+
@return true if all sides of SkIRect are outside r
|
484
|
+
*/
|
485
|
+
inline bool contains(const SkRect& r) const;
|
486
|
+
|
487
|
+
/** Returns true if SkIRect contains construction.
|
488
|
+
Asserts if SkIRect is empty or construction is empty, and if SK_DEBUG is defined.
|
489
|
+
|
490
|
+
Return is undefined if SkIRect is empty or construction is empty.
|
491
|
+
|
492
|
+
@param r SkIRect contained
|
493
|
+
@return true if all sides of SkIRect are outside r
|
494
|
+
*/
|
495
|
+
bool containsNoEmptyCheck(const SkIRect& r) const {
|
496
|
+
SkASSERT(fLeft < fRight && fTop < fBottom);
|
497
|
+
SkASSERT(r.fLeft < r.fRight && r.fTop < r.fBottom);
|
498
|
+
return fLeft <= r.fLeft && fTop <= r.fTop && fRight >= r.fRight && fBottom >= r.fBottom;
|
499
|
+
}
|
500
|
+
|
501
|
+
/** Returns true if SkIRect intersects r, and sets SkIRect to intersection.
|
502
|
+
Returns false if SkIRect does not intersect r, and leaves SkIRect unchanged.
|
503
|
+
|
504
|
+
Returns false if either r or SkIRect is empty, leaving SkIRect unchanged.
|
505
|
+
|
506
|
+
@param r limit of result
|
507
|
+
@return true if r and SkIRect have area in common
|
508
|
+
*/
|
509
|
+
bool intersect(const SkIRect& r) {
|
510
|
+
return this->intersect(*this, r);
|
511
|
+
}
|
512
|
+
|
513
|
+
/** Returns true if a intersects b, and sets SkIRect to intersection.
|
514
|
+
Returns false if a does not intersect b, and leaves SkIRect unchanged.
|
515
|
+
|
516
|
+
Returns false if either a or b is empty, leaving SkIRect unchanged.
|
517
|
+
|
518
|
+
@param a SkIRect to intersect
|
519
|
+
@param b SkIRect to intersect
|
520
|
+
@return true if a and b have area in common
|
521
|
+
*/
|
522
|
+
bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& a, const SkIRect& b);
|
523
|
+
|
524
|
+
/** Returns true if a intersects b.
|
525
|
+
Returns false if either a or b is empty, or do not intersect.
|
526
|
+
|
527
|
+
@param a SkIRect to intersect
|
528
|
+
@param b SkIRect to intersect
|
529
|
+
@return true if a and b have area in common
|
530
|
+
*/
|
531
|
+
static bool Intersects(const SkIRect& a, const SkIRect& b) {
|
532
|
+
return SkIRect{}.intersect(a, b);
|
533
|
+
}
|
534
|
+
|
535
|
+
/** Sets SkIRect to the union of itself and r.
|
536
|
+
|
537
|
+
Has no effect if r is empty. Otherwise, if SkIRect is empty, sets SkIRect to r.
|
538
|
+
|
539
|
+
@param r expansion SkIRect
|
540
|
+
|
541
|
+
example: https://fiddle.skia.org/c/@IRect_join_2
|
542
|
+
*/
|
543
|
+
void join(const SkIRect& r);
|
544
|
+
|
545
|
+
/** Swaps fLeft and fRight if fLeft is greater than fRight; and swaps
|
546
|
+
fTop and fBottom if fTop is greater than fBottom. Result may be empty,
|
547
|
+
and width() and height() will be zero or positive.
|
548
|
+
*/
|
549
|
+
void sort() {
|
550
|
+
using std::swap;
|
551
|
+
if (fLeft > fRight) {
|
552
|
+
swap(fLeft, fRight);
|
553
|
+
}
|
554
|
+
if (fTop > fBottom) {
|
555
|
+
swap(fTop, fBottom);
|
556
|
+
}
|
557
|
+
}
|
558
|
+
|
559
|
+
/** Returns SkIRect with fLeft and fRight swapped if fLeft is greater than fRight; and
|
560
|
+
with fTop and fBottom swapped if fTop is greater than fBottom. Result may be empty;
|
561
|
+
and width() and height() will be zero or positive.
|
562
|
+
|
563
|
+
@return sorted SkIRect
|
564
|
+
*/
|
565
|
+
SkIRect makeSorted() const {
|
566
|
+
return MakeLTRB(std::min(fLeft, fRight), std::min(fTop, fBottom),
|
567
|
+
std::max(fLeft, fRight), std::max(fTop, fBottom));
|
568
|
+
}
|
569
|
+
};
|
570
|
+
|
571
|
+
/** \struct SkRect
|
572
|
+
SkRect holds four SkScalar coordinates describing the upper and
|
573
|
+
lower bounds of a rectangle. SkRect may be created from outer bounds or
|
574
|
+
from position, width, and height. SkRect describes an area; if its right
|
575
|
+
is less than or equal to its left, or if its bottom is less than or equal to
|
576
|
+
its top, it is considered empty.
|
577
|
+
*/
|
578
|
+
struct SK_API SkRect {
|
579
|
+
SkScalar fLeft; //!< smaller x-axis bounds
|
580
|
+
SkScalar fTop; //!< smaller y-axis bounds
|
581
|
+
SkScalar fRight; //!< larger x-axis bounds
|
582
|
+
SkScalar fBottom; //!< larger y-axis bounds
|
583
|
+
|
584
|
+
/** Returns constructed SkRect set to (0, 0, 0, 0).
|
585
|
+
Many other rectangles are empty; if left is equal to or greater than right,
|
586
|
+
or if top is equal to or greater than bottom. Setting all members to zero
|
587
|
+
is a convenience, but does not designate a special empty rectangle.
|
588
|
+
|
589
|
+
@return bounds (0, 0, 0, 0)
|
590
|
+
*/
|
591
|
+
static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty() {
|
592
|
+
return SkRect{0, 0, 0, 0};
|
593
|
+
}
|
594
|
+
|
595
|
+
/** Returns constructed SkRect set to SkScalar values (0, 0, w, h). Does not
|
596
|
+
validate input; w or h may be negative.
|
597
|
+
|
598
|
+
Passing integer values may generate a compiler warning since SkRect cannot
|
599
|
+
represent 32-bit integers exactly. Use SkIRect for an exact integer rectangle.
|
600
|
+
|
601
|
+
@param w SkScalar width of constructed SkRect
|
602
|
+
@param h SkScalar height of constructed SkRect
|
603
|
+
@return bounds (0, 0, w, h)
|
604
|
+
*/
|
605
|
+
static constexpr SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h) {
|
606
|
+
return SkRect{0, 0, w, h};
|
607
|
+
}
|
608
|
+
|
609
|
+
/** Returns constructed SkRect set to integer values (0, 0, w, h). Does not validate
|
610
|
+
input; w or h may be negative.
|
611
|
+
|
612
|
+
Use to avoid a compiler warning that input may lose precision when stored.
|
613
|
+
Use SkIRect for an exact integer rectangle.
|
614
|
+
|
615
|
+
@param w integer width of constructed SkRect
|
616
|
+
@param h integer height of constructed SkRect
|
617
|
+
@return bounds (0, 0, w, h)
|
618
|
+
*/
|
619
|
+
static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h) {
|
620
|
+
return {0, 0, SkIntToScalar(w), SkIntToScalar(h)};
|
621
|
+
}
|
622
|
+
|
623
|
+
/** Returns constructed SkRect set to (0, 0, size.width(), size.height()). Does not
|
624
|
+
validate input; size.width() or size.height() may be negative.
|
625
|
+
|
626
|
+
@param size SkScalar values for SkRect width and height
|
627
|
+
@return bounds (0, 0, size.width(), size.height())
|
628
|
+
*/
|
629
|
+
static constexpr SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size) {
|
630
|
+
return SkRect{0, 0, size.fWidth, size.fHeight};
|
631
|
+
}
|
632
|
+
|
633
|
+
/** Returns constructed SkRect set to (l, t, r, b). Does not sort input; SkRect may
|
634
|
+
result in fLeft greater than fRight, or fTop greater than fBottom.
|
635
|
+
|
636
|
+
@param l SkScalar stored in fLeft
|
637
|
+
@param t SkScalar stored in fTop
|
638
|
+
@param r SkScalar stored in fRight
|
639
|
+
@param b SkScalar stored in fBottom
|
640
|
+
@return bounds (l, t, r, b)
|
641
|
+
*/
|
642
|
+
static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r,
|
643
|
+
SkScalar b) {
|
644
|
+
return SkRect {l, t, r, b};
|
645
|
+
}
|
646
|
+
|
647
|
+
/** Returns constructed SkRect set to (x, y, x + w, y + h).
|
648
|
+
Does not validate input; w or h may be negative.
|
649
|
+
|
650
|
+
@param x stored in fLeft
|
651
|
+
@param y stored in fTop
|
652
|
+
@param w added to x and stored in fRight
|
653
|
+
@param h added to y and stored in fBottom
|
654
|
+
@return bounds at (x, y) with width w and height h
|
655
|
+
*/
|
656
|
+
static constexpr SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w,
|
657
|
+
SkScalar h) {
|
658
|
+
return SkRect {x, y, x + w, y + h};
|
659
|
+
}
|
660
|
+
|
661
|
+
/** Returns constructed SkIRect set to (0, 0, size.width(), size.height()).
|
662
|
+
Does not validate input; size.width() or size.height() may be negative.
|
663
|
+
|
664
|
+
@param size integer values for SkRect width and height
|
665
|
+
@return bounds (0, 0, size.width(), size.height())
|
666
|
+
*/
|
667
|
+
static SkRect Make(const SkISize& size) {
|
668
|
+
return MakeIWH(size.width(), size.height());
|
669
|
+
}
|
670
|
+
|
671
|
+
/** Returns constructed SkIRect set to irect, promoting integers to scalar.
|
672
|
+
Does not validate input; fLeft may be greater than fRight, fTop may be greater
|
673
|
+
than fBottom.
|
674
|
+
|
675
|
+
@param irect integer unsorted bounds
|
676
|
+
@return irect members converted to SkScalar
|
677
|
+
*/
|
678
|
+
static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) {
|
679
|
+
return {
|
680
|
+
SkIntToScalar(irect.fLeft), SkIntToScalar(irect.fTop),
|
681
|
+
SkIntToScalar(irect.fRight), SkIntToScalar(irect.fBottom)
|
682
|
+
};
|
683
|
+
}
|
684
|
+
|
685
|
+
/** Returns true if fLeft is equal to or greater than fRight, or if fTop is equal
|
686
|
+
to or greater than fBottom. Call sort() to reverse rectangles with negative
|
687
|
+
width() or height().
|
688
|
+
|
689
|
+
@return true if width() or height() are zero or negative
|
690
|
+
*/
|
691
|
+
bool isEmpty() const {
|
692
|
+
// We write it as the NOT of a non-empty rect, so we will return true if any values
|
693
|
+
// are NaN.
|
694
|
+
return !(fLeft < fRight && fTop < fBottom);
|
695
|
+
}
|
696
|
+
|
697
|
+
/** Returns true if fLeft is equal to or less than fRight, or if fTop is equal
|
698
|
+
to or less than fBottom. Call sort() to reverse rectangles with negative
|
699
|
+
width() or height().
|
700
|
+
|
701
|
+
@return true if width() or height() are zero or positive
|
702
|
+
*/
|
703
|
+
bool isSorted() const { return fLeft <= fRight && fTop <= fBottom; }
|
704
|
+
|
705
|
+
/** Returns true if all values in the rectangle are finite: SK_ScalarMin or larger,
|
706
|
+
and SK_ScalarMax or smaller.
|
707
|
+
|
708
|
+
@return true if no member is infinite or NaN
|
709
|
+
*/
|
710
|
+
bool isFinite() const {
|
711
|
+
float accum = 0;
|
712
|
+
accum *= fLeft;
|
713
|
+
accum *= fTop;
|
714
|
+
accum *= fRight;
|
715
|
+
accum *= fBottom;
|
716
|
+
|
717
|
+
// accum is either NaN or it is finite (zero).
|
718
|
+
SkASSERT(0 == accum || SkScalarIsNaN(accum));
|
719
|
+
|
720
|
+
// value==value will be true iff value is not NaN
|
721
|
+
// TODO: is it faster to say !accum or accum==accum?
|
722
|
+
return !SkScalarIsNaN(accum);
|
723
|
+
}
|
724
|
+
|
725
|
+
/** Returns left edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid.
|
726
|
+
Call sort() to reverse fLeft and fRight if needed.
|
727
|
+
|
728
|
+
@return fLeft
|
729
|
+
*/
|
730
|
+
constexpr SkScalar x() const { return fLeft; }
|
731
|
+
|
732
|
+
/** Returns top edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid,
|
733
|
+
and sort() to reverse fTop and fBottom if needed.
|
734
|
+
|
735
|
+
@return fTop
|
736
|
+
*/
|
737
|
+
constexpr SkScalar y() const { return fTop; }
|
738
|
+
|
739
|
+
/** Returns left edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid.
|
740
|
+
Call sort() to reverse fLeft and fRight if needed.
|
741
|
+
|
742
|
+
@return fLeft
|
743
|
+
*/
|
744
|
+
constexpr SkScalar left() const { return fLeft; }
|
745
|
+
|
746
|
+
/** Returns top edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid,
|
747
|
+
and sort() to reverse fTop and fBottom if needed.
|
748
|
+
|
749
|
+
@return fTop
|
750
|
+
*/
|
751
|
+
constexpr SkScalar top() const { return fTop; }
|
752
|
+
|
753
|
+
/** Returns right edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid.
|
754
|
+
Call sort() to reverse fLeft and fRight if needed.
|
755
|
+
|
756
|
+
@return fRight
|
757
|
+
*/
|
758
|
+
constexpr SkScalar right() const { return fRight; }
|
759
|
+
|
760
|
+
/** Returns bottom edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid,
|
761
|
+
and sort() to reverse fTop and fBottom if needed.
|
762
|
+
|
763
|
+
@return fBottom
|
764
|
+
*/
|
765
|
+
constexpr SkScalar bottom() const { return fBottom; }
|
766
|
+
|
767
|
+
/** Returns span on the x-axis. This does not check if SkRect is sorted, or if
|
768
|
+
result fits in 32-bit float; result may be negative or infinity.
|
769
|
+
|
770
|
+
@return fRight minus fLeft
|
771
|
+
*/
|
772
|
+
constexpr SkScalar width() const { return fRight - fLeft; }
|
773
|
+
|
774
|
+
/** Returns span on the y-axis. This does not check if SkRect is sorted, or if
|
775
|
+
result fits in 32-bit float; result may be negative or infinity.
|
776
|
+
|
777
|
+
@return fBottom minus fTop
|
778
|
+
*/
|
779
|
+
constexpr SkScalar height() const { return fBottom - fTop; }
|
780
|
+
|
781
|
+
/** Returns average of left edge and right edge. Result does not change if SkRect
|
782
|
+
is sorted. Result may overflow to infinity if SkRect is far from the origin.
|
783
|
+
|
784
|
+
@return midpoint on x-axis
|
785
|
+
*/
|
786
|
+
SkScalar centerX() const {
|
787
|
+
// don't use SkScalarHalf(fLeft + fBottom) as that might overflow before the 0.5
|
788
|
+
return SkScalarHalf(fLeft) + SkScalarHalf(fRight);
|
789
|
+
}
|
790
|
+
|
791
|
+
/** Returns average of top edge and bottom edge. Result does not change if SkRect
|
792
|
+
is sorted.
|
793
|
+
|
794
|
+
@return midpoint on y-axis
|
795
|
+
*/
|
796
|
+
SkScalar centerY() const {
|
797
|
+
// don't use SkScalarHalf(fTop + fBottom) as that might overflow before the 0.5
|
798
|
+
return SkScalarHalf(fTop) + SkScalarHalf(fBottom);
|
799
|
+
}
|
800
|
+
|
801
|
+
/** Returns true if all members in a: fLeft, fTop, fRight, and fBottom; are
|
802
|
+
equal to the corresponding members in b.
|
803
|
+
|
804
|
+
a and b are not equal if either contain NaN. a and b are equal if members
|
805
|
+
contain zeroes with different signs.
|
806
|
+
|
807
|
+
@param a SkRect to compare
|
808
|
+
@param b SkRect to compare
|
809
|
+
@return true if members are equal
|
810
|
+
*/
|
811
|
+
friend bool operator==(const SkRect& a, const SkRect& b) {
|
812
|
+
return SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4);
|
813
|
+
}
|
814
|
+
|
815
|
+
/** Returns true if any in a: fLeft, fTop, fRight, and fBottom; does not
|
816
|
+
equal the corresponding members in b.
|
817
|
+
|
818
|
+
a and b are not equal if either contain NaN. a and b are equal if members
|
819
|
+
contain zeroes with different signs.
|
820
|
+
|
821
|
+
@param a SkRect to compare
|
822
|
+
@param b SkRect to compare
|
823
|
+
@return true if members are not equal
|
824
|
+
*/
|
825
|
+
friend bool operator!=(const SkRect& a, const SkRect& b) {
|
826
|
+
return !SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4);
|
827
|
+
}
|
828
|
+
|
829
|
+
/** Returns four points in quad that enclose SkRect ordered as: top-left, top-right,
|
830
|
+
bottom-right, bottom-left.
|
831
|
+
|
832
|
+
TODO: Consider adding parameter to control whether quad is clockwise or counterclockwise.
|
833
|
+
|
834
|
+
@param quad storage for corners of SkRect
|
835
|
+
|
836
|
+
example: https://fiddle.skia.org/c/@Rect_toQuad
|
837
|
+
*/
|
838
|
+
void toQuad(SkPoint quad[4]) const;
|
839
|
+
|
840
|
+
/** Sets SkRect to (0, 0, 0, 0).
|
841
|
+
|
842
|
+
Many other rectangles are empty; if left is equal to or greater than right,
|
843
|
+
or if top is equal to or greater than bottom. Setting all members to zero
|
844
|
+
is a convenience, but does not designate a special empty rectangle.
|
845
|
+
*/
|
846
|
+
void setEmpty() { *this = MakeEmpty(); }
|
847
|
+
|
848
|
+
/** Sets SkRect to src, promoting src members from integer to scalar.
|
849
|
+
Very large values in src may lose precision.
|
850
|
+
|
851
|
+
@param src integer SkRect
|
852
|
+
*/
|
853
|
+
void set(const SkIRect& src) {
|
854
|
+
fLeft = SkIntToScalar(src.fLeft);
|
855
|
+
fTop = SkIntToScalar(src.fTop);
|
856
|
+
fRight = SkIntToScalar(src.fRight);
|
857
|
+
fBottom = SkIntToScalar(src.fBottom);
|
858
|
+
}
|
859
|
+
|
860
|
+
/** Sets SkRect to (left, top, right, bottom).
|
861
|
+
left and right are not sorted; left is not necessarily less than right.
|
862
|
+
top and bottom are not sorted; top is not necessarily less than bottom.
|
863
|
+
|
864
|
+
@param left stored in fLeft
|
865
|
+
@param top stored in fTop
|
866
|
+
@param right stored in fRight
|
867
|
+
@param bottom stored in fBottom
|
868
|
+
*/
|
869
|
+
void setLTRB(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) {
|
870
|
+
fLeft = left;
|
871
|
+
fTop = top;
|
872
|
+
fRight = right;
|
873
|
+
fBottom = bottom;
|
874
|
+
}
|
875
|
+
|
876
|
+
/** Sets to bounds of SkPoint array with count entries. If count is zero or smaller,
|
877
|
+
or if SkPoint array contains an infinity or NaN, sets to (0, 0, 0, 0).
|
878
|
+
|
879
|
+
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
880
|
+
fTop is less than or equal to fBottom.
|
881
|
+
|
882
|
+
@param pts SkPoint array
|
883
|
+
@param count entries in array
|
884
|
+
*/
|
885
|
+
void setBounds(const SkPoint pts[], int count) {
|
886
|
+
(void)this->setBoundsCheck(pts, count);
|
887
|
+
}
|
888
|
+
|
889
|
+
/** Sets to bounds of SkPoint array with count entries. Returns false if count is
|
890
|
+
zero or smaller, or if SkPoint array contains an infinity or NaN; in these cases
|
891
|
+
sets SkRect to (0, 0, 0, 0).
|
892
|
+
|
893
|
+
Result is either empty or sorted: fLeft is less than or equal to fRight, and
|
894
|
+
fTop is less than or equal to fBottom.
|
895
|
+
|
896
|
+
@param pts SkPoint array
|
897
|
+
@param count entries in array
|
898
|
+
@return true if all SkPoint values are finite
|
899
|
+
|
900
|
+
example: https://fiddle.skia.org/c/@Rect_setBoundsCheck
|
901
|
+
*/
|
902
|
+
bool setBoundsCheck(const SkPoint pts[], int count);
|
903
|
+
|
904
|
+
/** Sets to bounds of SkPoint pts array with count entries. If any SkPoint in pts
|
905
|
+
contains infinity or NaN, all SkRect dimensions are set to NaN.
|
906
|
+
|
907
|
+
@param pts SkPoint array
|
908
|
+
@param count entries in array
|
909
|
+
|
910
|
+
example: https://fiddle.skia.org/c/@Rect_setBoundsNoCheck
|
911
|
+
*/
|
912
|
+
void setBoundsNoCheck(const SkPoint pts[], int count);
|
913
|
+
|
914
|
+
/** Sets bounds to the smallest SkRect enclosing SkPoint p0 and p1. The result is
|
915
|
+
sorted and may be empty. Does not check to see if values are finite.
|
916
|
+
|
917
|
+
@param p0 corner to include
|
918
|
+
@param p1 corner to include
|
919
|
+
*/
|
920
|
+
void set(const SkPoint& p0, const SkPoint& p1) {
|
921
|
+
fLeft = std::min(p0.fX, p1.fX);
|
922
|
+
fRight = std::max(p0.fX, p1.fX);
|
923
|
+
fTop = std::min(p0.fY, p1.fY);
|
924
|
+
fBottom = std::max(p0.fY, p1.fY);
|
925
|
+
}
|
926
|
+
|
927
|
+
/** Sets SkRect to (x, y, x + width, y + height).
|
928
|
+
Does not validate input; width or height may be negative.
|
929
|
+
|
930
|
+
@param x stored in fLeft
|
931
|
+
@param y stored in fTop
|
932
|
+
@param width added to x and stored in fRight
|
933
|
+
@param height added to y and stored in fBottom
|
934
|
+
*/
|
935
|
+
void setXYWH(SkScalar x, SkScalar y, SkScalar width, SkScalar height) {
|
936
|
+
fLeft = x;
|
937
|
+
fTop = y;
|
938
|
+
fRight = x + width;
|
939
|
+
fBottom = y + height;
|
940
|
+
}
|
941
|
+
|
942
|
+
/** Sets SkRect to (0, 0, width, height). Does not validate input;
|
943
|
+
width or height may be negative.
|
944
|
+
|
945
|
+
@param width stored in fRight
|
946
|
+
@param height stored in fBottom
|
947
|
+
*/
|
948
|
+
void setWH(SkScalar width, SkScalar height) {
|
949
|
+
fLeft = 0;
|
950
|
+
fTop = 0;
|
951
|
+
fRight = width;
|
952
|
+
fBottom = height;
|
953
|
+
}
|
954
|
+
void setIWH(int32_t width, int32_t height) {
|
955
|
+
this->setWH(SkIntToScalar(width), SkIntToScalar(height));
|
956
|
+
}
|
957
|
+
|
958
|
+
/** Returns SkRect offset by (dx, dy).
|
959
|
+
|
960
|
+
If dx is negative, SkRect returned is moved to the left.
|
961
|
+
If dx is positive, SkRect returned is moved to the right.
|
962
|
+
If dy is negative, SkRect returned is moved upward.
|
963
|
+
If dy is positive, SkRect returned is moved downward.
|
964
|
+
|
965
|
+
@param dx added to fLeft and fRight
|
966
|
+
@param dy added to fTop and fBottom
|
967
|
+
@return SkRect offset on axes, with original width and height
|
968
|
+
*/
|
969
|
+
constexpr SkRect makeOffset(SkScalar dx, SkScalar dy) const {
|
970
|
+
return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
|
971
|
+
}
|
972
|
+
|
973
|
+
/** Returns SkRect offset by v.
|
974
|
+
|
975
|
+
@param v added to rect
|
976
|
+
@return SkRect offset on axes, with original width and height
|
977
|
+
*/
|
978
|
+
constexpr SkRect makeOffset(SkVector v) const { return this->makeOffset(v.x(), v.y()); }
|
979
|
+
|
980
|
+
/** Returns SkRect, inset by (dx, dy).
|
981
|
+
|
982
|
+
If dx is negative, SkRect returned is wider.
|
983
|
+
If dx is positive, SkRect returned is narrower.
|
984
|
+
If dy is negative, SkRect returned is taller.
|
985
|
+
If dy is positive, SkRect returned is shorter.
|
986
|
+
|
987
|
+
@param dx added to fLeft and subtracted from fRight
|
988
|
+
@param dy added to fTop and subtracted from fBottom
|
989
|
+
@return SkRect inset symmetrically left and right, top and bottom
|
990
|
+
*/
|
991
|
+
SkRect makeInset(SkScalar dx, SkScalar dy) const {
|
992
|
+
return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);
|
993
|
+
}
|
994
|
+
|
995
|
+
/** Returns SkRect, outset by (dx, dy).
|
996
|
+
|
997
|
+
If dx is negative, SkRect returned is narrower.
|
998
|
+
If dx is positive, SkRect returned is wider.
|
999
|
+
If dy is negative, SkRect returned is shorter.
|
1000
|
+
If dy is positive, SkRect returned is taller.
|
1001
|
+
|
1002
|
+
@param dx subtracted to fLeft and added from fRight
|
1003
|
+
@param dy subtracted to fTop and added from fBottom
|
1004
|
+
@return SkRect outset symmetrically left and right, top and bottom
|
1005
|
+
*/
|
1006
|
+
SkRect makeOutset(SkScalar dx, SkScalar dy) const {
|
1007
|
+
return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
/** Offsets SkRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
|
1011
|
+
|
1012
|
+
If dx is negative, moves SkRect to the left.
|
1013
|
+
If dx is positive, moves SkRect to the right.
|
1014
|
+
If dy is negative, moves SkRect upward.
|
1015
|
+
If dy is positive, moves SkRect downward.
|
1016
|
+
|
1017
|
+
@param dx offset added to fLeft and fRight
|
1018
|
+
@param dy offset added to fTop and fBottom
|
1019
|
+
*/
|
1020
|
+
void offset(SkScalar dx, SkScalar dy) {
|
1021
|
+
fLeft += dx;
|
1022
|
+
fTop += dy;
|
1023
|
+
fRight += dx;
|
1024
|
+
fBottom += dy;
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
/** Offsets SkRect by adding delta.fX to fLeft, fRight; and by adding delta.fY to
|
1028
|
+
fTop, fBottom.
|
1029
|
+
|
1030
|
+
If delta.fX is negative, moves SkRect to the left.
|
1031
|
+
If delta.fX is positive, moves SkRect to the right.
|
1032
|
+
If delta.fY is negative, moves SkRect upward.
|
1033
|
+
If delta.fY is positive, moves SkRect downward.
|
1034
|
+
|
1035
|
+
@param delta added to SkRect
|
1036
|
+
*/
|
1037
|
+
void offset(const SkPoint& delta) {
|
1038
|
+
this->offset(delta.fX, delta.fY);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
/** Offsets SkRect so that fLeft equals newX, and fTop equals newY. width and height
|
1042
|
+
are unchanged.
|
1043
|
+
|
1044
|
+
@param newX stored in fLeft, preserving width()
|
1045
|
+
@param newY stored in fTop, preserving height()
|
1046
|
+
*/
|
1047
|
+
void offsetTo(SkScalar newX, SkScalar newY) {
|
1048
|
+
fRight += newX - fLeft;
|
1049
|
+
fBottom += newY - fTop;
|
1050
|
+
fLeft = newX;
|
1051
|
+
fTop = newY;
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
/** Insets SkRect by (dx, dy).
|
1055
|
+
|
1056
|
+
If dx is positive, makes SkRect narrower.
|
1057
|
+
If dx is negative, makes SkRect wider.
|
1058
|
+
If dy is positive, makes SkRect shorter.
|
1059
|
+
If dy is negative, makes SkRect taller.
|
1060
|
+
|
1061
|
+
@param dx added to fLeft and subtracted from fRight
|
1062
|
+
@param dy added to fTop and subtracted from fBottom
|
1063
|
+
*/
|
1064
|
+
void inset(SkScalar dx, SkScalar dy) {
|
1065
|
+
fLeft += dx;
|
1066
|
+
fTop += dy;
|
1067
|
+
fRight -= dx;
|
1068
|
+
fBottom -= dy;
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
/** Outsets SkRect by (dx, dy).
|
1072
|
+
|
1073
|
+
If dx is positive, makes SkRect wider.
|
1074
|
+
If dx is negative, makes SkRect narrower.
|
1075
|
+
If dy is positive, makes SkRect taller.
|
1076
|
+
If dy is negative, makes SkRect shorter.
|
1077
|
+
|
1078
|
+
@param dx subtracted to fLeft and added from fRight
|
1079
|
+
@param dy subtracted to fTop and added from fBottom
|
1080
|
+
*/
|
1081
|
+
void outset(SkScalar dx, SkScalar dy) { this->inset(-dx, -dy); }
|
1082
|
+
|
1083
|
+
/** Returns true if SkRect intersects r, and sets SkRect to intersection.
|
1084
|
+
Returns false if SkRect does not intersect r, and leaves SkRect unchanged.
|
1085
|
+
|
1086
|
+
Returns false if either r or SkRect is empty, leaving SkRect unchanged.
|
1087
|
+
|
1088
|
+
@param r limit of result
|
1089
|
+
@return true if r and SkRect have area in common
|
1090
|
+
|
1091
|
+
example: https://fiddle.skia.org/c/@Rect_intersect
|
1092
|
+
*/
|
1093
|
+
bool intersect(const SkRect& r);
|
1094
|
+
|
1095
|
+
/** Returns true if a intersects b, and sets SkRect to intersection.
|
1096
|
+
Returns false if a does not intersect b, and leaves SkRect unchanged.
|
1097
|
+
|
1098
|
+
Returns false if either a or b is empty, leaving SkRect unchanged.
|
1099
|
+
|
1100
|
+
@param a SkRect to intersect
|
1101
|
+
@param b SkRect to intersect
|
1102
|
+
@return true if a and b have area in common
|
1103
|
+
*/
|
1104
|
+
bool SK_WARN_UNUSED_RESULT intersect(const SkRect& a, const SkRect& b);
|
1105
|
+
|
1106
|
+
|
1107
|
+
private:
|
1108
|
+
static bool Intersects(SkScalar al, SkScalar at, SkScalar ar, SkScalar ab,
|
1109
|
+
SkScalar bl, SkScalar bt, SkScalar br, SkScalar bb) {
|
1110
|
+
SkScalar L = std::max(al, bl);
|
1111
|
+
SkScalar R = std::min(ar, br);
|
1112
|
+
SkScalar T = std::max(at, bt);
|
1113
|
+
SkScalar B = std::min(ab, bb);
|
1114
|
+
return L < R && T < B;
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
public:
|
1118
|
+
|
1119
|
+
/** Returns true if SkRect intersects r.
|
1120
|
+
Returns false if either r or SkRect is empty, or do not intersect.
|
1121
|
+
|
1122
|
+
@param r SkRect to intersect
|
1123
|
+
@return true if r and SkRect have area in common
|
1124
|
+
*/
|
1125
|
+
bool intersects(const SkRect& r) const {
|
1126
|
+
return Intersects(fLeft, fTop, fRight, fBottom,
|
1127
|
+
r.fLeft, r.fTop, r.fRight, r.fBottom);
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
/** Returns true if a intersects b.
|
1131
|
+
Returns false if either a or b is empty, or do not intersect.
|
1132
|
+
|
1133
|
+
@param a SkRect to intersect
|
1134
|
+
@param b SkRect to intersect
|
1135
|
+
@return true if a and b have area in common
|
1136
|
+
*/
|
1137
|
+
static bool Intersects(const SkRect& a, const SkRect& b) {
|
1138
|
+
return Intersects(a.fLeft, a.fTop, a.fRight, a.fBottom,
|
1139
|
+
b.fLeft, b.fTop, b.fRight, b.fBottom);
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
/** Sets SkRect to the union of itself and r.
|
1143
|
+
|
1144
|
+
Has no effect if r is empty. Otherwise, if SkRect is empty, sets
|
1145
|
+
SkRect to r.
|
1146
|
+
|
1147
|
+
@param r expansion SkRect
|
1148
|
+
|
1149
|
+
example: https://fiddle.skia.org/c/@Rect_join_2
|
1150
|
+
*/
|
1151
|
+
void join(const SkRect& r);
|
1152
|
+
|
1153
|
+
/** Sets SkRect to the union of itself and r.
|
1154
|
+
|
1155
|
+
Asserts if r is empty and SK_DEBUG is defined.
|
1156
|
+
If SkRect is empty, sets SkRect to r.
|
1157
|
+
|
1158
|
+
May produce incorrect results if r is empty.
|
1159
|
+
|
1160
|
+
@param r expansion SkRect
|
1161
|
+
*/
|
1162
|
+
void joinNonEmptyArg(const SkRect& r) {
|
1163
|
+
SkASSERT(!r.isEmpty());
|
1164
|
+
// if we are empty, just assign
|
1165
|
+
if (fLeft >= fRight || fTop >= fBottom) {
|
1166
|
+
*this = r;
|
1167
|
+
} else {
|
1168
|
+
this->joinPossiblyEmptyRect(r);
|
1169
|
+
}
|
1170
|
+
}
|
1171
|
+
|
1172
|
+
/** Sets SkRect to the union of itself and the construction.
|
1173
|
+
|
1174
|
+
May produce incorrect results if SkRect or r is empty.
|
1175
|
+
|
1176
|
+
@param r expansion SkRect
|
1177
|
+
*/
|
1178
|
+
void joinPossiblyEmptyRect(const SkRect& r) {
|
1179
|
+
fLeft = std::min(fLeft, r.left());
|
1180
|
+
fTop = std::min(fTop, r.top());
|
1181
|
+
fRight = std::max(fRight, r.right());
|
1182
|
+
fBottom = std::max(fBottom, r.bottom());
|
1183
|
+
}
|
1184
|
+
|
1185
|
+
/** Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
|
1186
|
+
Returns false if SkRect is empty.
|
1187
|
+
|
1188
|
+
@param x test SkPoint x-coordinate
|
1189
|
+
@param y test SkPoint y-coordinate
|
1190
|
+
@return true if (x, y) is inside SkRect
|
1191
|
+
*/
|
1192
|
+
bool contains(SkScalar x, SkScalar y) const {
|
1193
|
+
return x >= fLeft && x < fRight && y >= fTop && y < fBottom;
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
/** Returns true if SkRect contains r.
|
1197
|
+
Returns false if SkRect is empty or r is empty.
|
1198
|
+
|
1199
|
+
SkRect contains r when SkRect area completely includes r area.
|
1200
|
+
|
1201
|
+
@param r SkRect contained
|
1202
|
+
@return true if all sides of SkRect are outside r
|
1203
|
+
*/
|
1204
|
+
bool contains(const SkRect& r) const {
|
1205
|
+
// todo: can we eliminate the this->isEmpty check?
|
1206
|
+
return !r.isEmpty() && !this->isEmpty() &&
|
1207
|
+
fLeft <= r.fLeft && fTop <= r.fTop &&
|
1208
|
+
fRight >= r.fRight && fBottom >= r.fBottom;
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
/** Returns true if SkRect contains r.
|
1212
|
+
Returns false if SkRect is empty or r is empty.
|
1213
|
+
|
1214
|
+
SkRect contains r when SkRect area completely includes r area.
|
1215
|
+
|
1216
|
+
@param r SkIRect contained
|
1217
|
+
@return true if all sides of SkRect are outside r
|
1218
|
+
*/
|
1219
|
+
bool contains(const SkIRect& r) const {
|
1220
|
+
// todo: can we eliminate the this->isEmpty check?
|
1221
|
+
return !r.isEmpty() && !this->isEmpty() &&
|
1222
|
+
fLeft <= SkIntToScalar(r.fLeft) && fTop <= SkIntToScalar(r.fTop) &&
|
1223
|
+
fRight >= SkIntToScalar(r.fRight) && fBottom >= SkIntToScalar(r.fBottom);
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
/** Sets SkIRect by adding 0.5 and discarding the fractional portion of SkRect
|
1227
|
+
members, using (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
|
1228
|
+
SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)).
|
1229
|
+
|
1230
|
+
@param dst storage for SkIRect
|
1231
|
+
*/
|
1232
|
+
void round(SkIRect* dst) const {
|
1233
|
+
SkASSERT(dst);
|
1234
|
+
dst->setLTRB(SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
|
1235
|
+
SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom));
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
/** Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding
|
1239
|
+
up fRight and fBottom, using
|
1240
|
+
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
|
1241
|
+
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)).
|
1242
|
+
|
1243
|
+
@param dst storage for SkIRect
|
1244
|
+
*/
|
1245
|
+
void roundOut(SkIRect* dst) const {
|
1246
|
+
SkASSERT(dst);
|
1247
|
+
dst->setLTRB(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
|
1248
|
+
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom));
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
/** Sets SkRect by discarding the fractional portion of fLeft and fTop; and rounding
|
1252
|
+
up fRight and fBottom, using
|
1253
|
+
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
|
1254
|
+
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)).
|
1255
|
+
|
1256
|
+
@param dst storage for SkRect
|
1257
|
+
*/
|
1258
|
+
void roundOut(SkRect* dst) const {
|
1259
|
+
dst->setLTRB(SkScalarFloorToScalar(fLeft), SkScalarFloorToScalar(fTop),
|
1260
|
+
SkScalarCeilToScalar(fRight), SkScalarCeilToScalar(fBottom));
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
/** Sets SkRect by rounding up fLeft and fTop; and discarding the fractional portion
|
1264
|
+
of fRight and fBottom, using
|
1265
|
+
(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
|
1266
|
+
SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)).
|
1267
|
+
|
1268
|
+
@param dst storage for SkIRect
|
1269
|
+
*/
|
1270
|
+
void roundIn(SkIRect* dst) const {
|
1271
|
+
SkASSERT(dst);
|
1272
|
+
dst->setLTRB(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
|
1273
|
+
SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom));
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
/** Returns SkIRect by adding 0.5 and discarding the fractional portion of SkRect
|
1277
|
+
members, using (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop),
|
1278
|
+
SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)).
|
1279
|
+
|
1280
|
+
@return rounded SkIRect
|
1281
|
+
*/
|
1282
|
+
SkIRect round() const {
|
1283
|
+
SkIRect ir;
|
1284
|
+
this->round(&ir);
|
1285
|
+
return ir;
|
1286
|
+
}
|
1287
|
+
|
1288
|
+
/** Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding
|
1289
|
+
up fRight and fBottom, using
|
1290
|
+
(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop),
|
1291
|
+
SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)).
|
1292
|
+
|
1293
|
+
@return rounded SkIRect
|
1294
|
+
*/
|
1295
|
+
SkIRect roundOut() const {
|
1296
|
+
SkIRect ir;
|
1297
|
+
this->roundOut(&ir);
|
1298
|
+
return ir;
|
1299
|
+
}
|
1300
|
+
/** Sets SkIRect by rounding up fLeft and fTop; and discarding the fractional portion
|
1301
|
+
of fRight and fBottom, using
|
1302
|
+
(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop),
|
1303
|
+
SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)).
|
1304
|
+
|
1305
|
+
@return rounded SkIRect
|
1306
|
+
*/
|
1307
|
+
SkIRect roundIn() const {
|
1308
|
+
SkIRect ir;
|
1309
|
+
this->roundIn(&ir);
|
1310
|
+
return ir;
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
/** Swaps fLeft and fRight if fLeft is greater than fRight; and swaps
|
1314
|
+
fTop and fBottom if fTop is greater than fBottom. Result may be empty;
|
1315
|
+
and width() and height() will be zero or positive.
|
1316
|
+
*/
|
1317
|
+
void sort() {
|
1318
|
+
using std::swap;
|
1319
|
+
if (fLeft > fRight) {
|
1320
|
+
swap(fLeft, fRight);
|
1321
|
+
}
|
1322
|
+
|
1323
|
+
if (fTop > fBottom) {
|
1324
|
+
swap(fTop, fBottom);
|
1325
|
+
}
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
/** Returns SkRect with fLeft and fRight swapped if fLeft is greater than fRight; and
|
1329
|
+
with fTop and fBottom swapped if fTop is greater than fBottom. Result may be empty;
|
1330
|
+
and width() and height() will be zero or positive.
|
1331
|
+
|
1332
|
+
@return sorted SkRect
|
1333
|
+
*/
|
1334
|
+
SkRect makeSorted() const {
|
1335
|
+
return MakeLTRB(std::min(fLeft, fRight), std::min(fTop, fBottom),
|
1336
|
+
std::max(fLeft, fRight), std::max(fTop, fBottom));
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
/** Returns pointer to first scalar in SkRect, to treat it as an array with four
|
1340
|
+
entries.
|
1341
|
+
|
1342
|
+
@return pointer to fLeft
|
1343
|
+
*/
|
1344
|
+
const SkScalar* asScalars() const { return &fLeft; }
|
1345
|
+
|
1346
|
+
/** Writes text representation of SkRect to standard output. Set asHex to true to
|
1347
|
+
generate exact binary representations of floating point numbers.
|
1348
|
+
|
1349
|
+
@param asHex true if SkScalar values are written as hexadecimal
|
1350
|
+
|
1351
|
+
example: https://fiddle.skia.org/c/@Rect_dump
|
1352
|
+
*/
|
1353
|
+
void dump(bool asHex) const;
|
1354
|
+
|
1355
|
+
/** Writes text representation of SkRect to standard output. The representation may be
|
1356
|
+
directly compiled as C++ code. Floating point values are written
|
1357
|
+
with limited precision; it may not be possible to reconstruct original SkRect
|
1358
|
+
from output.
|
1359
|
+
*/
|
1360
|
+
void dump() const { this->dump(false); }
|
1361
|
+
|
1362
|
+
/** Writes text representation of SkRect to standard output. The representation may be
|
1363
|
+
directly compiled as C++ code. Floating point values are written
|
1364
|
+
in hexadecimal to preserve their exact bit pattern. The output reconstructs the
|
1365
|
+
original SkRect.
|
1366
|
+
|
1367
|
+
Use instead of dump() when submitting
|
1368
|
+
*/
|
1369
|
+
void dumpHex() const { this->dump(true); }
|
1370
|
+
};
|
1371
|
+
|
1372
|
+
inline bool SkIRect::contains(const SkRect& r) const {
|
1373
|
+
return !r.isEmpty() && !this->isEmpty() && // check for empties
|
1374
|
+
(SkScalar)fLeft <= r.fLeft && (SkScalar)fTop <= r.fTop &&
|
1375
|
+
(SkScalar)fRight >= r.fRight && (SkScalar)fBottom >= r.fBottom;
|
1376
|
+
}
|
1377
|
+
|
1378
|
+
#endif
|