@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,2594 @@
|
|
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 SkCanvas_DEFINED
|
9
|
+
#define SkCanvas_DEFINED
|
10
|
+
|
11
|
+
#include "include/core/SkBlendMode.h"
|
12
|
+
#include "include/core/SkClipOp.h"
|
13
|
+
#include "include/core/SkColor.h"
|
14
|
+
#include "include/core/SkFontTypes.h"
|
15
|
+
#include "include/core/SkImageInfo.h"
|
16
|
+
#include "include/core/SkM44.h"
|
17
|
+
#include "include/core/SkMatrix.h"
|
18
|
+
#include "include/core/SkPaint.h"
|
19
|
+
#include "include/core/SkPoint.h"
|
20
|
+
#include "include/core/SkRasterHandleAllocator.h"
|
21
|
+
#include "include/core/SkRect.h"
|
22
|
+
#include "include/core/SkRefCnt.h"
|
23
|
+
#include "include/core/SkSamplingOptions.h"
|
24
|
+
#include "include/core/SkScalar.h"
|
25
|
+
#include "include/core/SkSize.h"
|
26
|
+
#include "include/core/SkString.h"
|
27
|
+
#include "include/core/SkSurfaceProps.h"
|
28
|
+
#include "include/core/SkTypes.h"
|
29
|
+
#include "include/private/SkDeque.h"
|
30
|
+
#include "include/private/SkMacros.h"
|
31
|
+
|
32
|
+
#include <cstring>
|
33
|
+
#include <memory>
|
34
|
+
#include <optional>
|
35
|
+
#include <vector>
|
36
|
+
|
37
|
+
#ifndef SK_SUPPORT_LEGACY_GETTOTALMATRIX
|
38
|
+
#define SK_SUPPORT_LEGACY_GETTOTALMATRIX
|
39
|
+
#endif
|
40
|
+
|
41
|
+
class AutoLayerForImageFilter;
|
42
|
+
class GrBackendRenderTarget;
|
43
|
+
class GrRecordingContext;
|
44
|
+
class GrSlug;
|
45
|
+
class SkBaseDevice;
|
46
|
+
class SkBitmap;
|
47
|
+
class SkData;
|
48
|
+
class SkDrawable;
|
49
|
+
struct SkDrawShadowRec;
|
50
|
+
class SkFont;
|
51
|
+
class SkGlyphRunBuilder;
|
52
|
+
class SkGlyphRunList;
|
53
|
+
class SkImage;
|
54
|
+
class SkImageFilter;
|
55
|
+
class SkPaintFilterCanvas;
|
56
|
+
class SkPath;
|
57
|
+
class SkPicture;
|
58
|
+
class SkPixmap;
|
59
|
+
class SkRegion;
|
60
|
+
class SkRRect;
|
61
|
+
struct SkRSXform;
|
62
|
+
class SkMesh;
|
63
|
+
class SkSpecialImage;
|
64
|
+
class SkSurface;
|
65
|
+
class SkSurface_Base;
|
66
|
+
class SkTextBlob;
|
67
|
+
class SkVertices;
|
68
|
+
|
69
|
+
namespace skgpu::graphite { class Recorder; }
|
70
|
+
namespace SkRecords { class Draw; }
|
71
|
+
|
72
|
+
/** \class SkCanvas
|
73
|
+
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
|
74
|
+
SkCanvas contains a stack of SkMatrix and clip values.
|
75
|
+
|
76
|
+
SkCanvas and SkPaint together provide the state to draw into SkSurface or SkBaseDevice.
|
77
|
+
Each SkCanvas draw call transforms the geometry of the object by the concatenation of all
|
78
|
+
SkMatrix values in the stack. The transformed geometry is clipped by the intersection
|
79
|
+
of all of clip values in the stack. The SkCanvas draw calls use SkPaint to supply drawing
|
80
|
+
state such as color, SkTypeface, text size, stroke width, SkShader and so on.
|
81
|
+
|
82
|
+
To draw to a pixel-based destination, create raster surface or GPU surface.
|
83
|
+
Request SkCanvas from SkSurface to obtain the interface to draw.
|
84
|
+
SkCanvas generated by raster surface draws to memory visible to the CPU.
|
85
|
+
SkCanvas generated by GPU surface uses Vulkan or OpenGL to draw to the GPU.
|
86
|
+
|
87
|
+
To draw to a document, obtain SkCanvas from SVG canvas, document PDF, or SkPictureRecorder.
|
88
|
+
SkDocument based SkCanvas and other SkCanvas subclasses reference SkBaseDevice describing the
|
89
|
+
destination.
|
90
|
+
|
91
|
+
SkCanvas can be constructed to draw to SkBitmap without first creating raster surface.
|
92
|
+
This approach may be deprecated in the future.
|
93
|
+
*/
|
94
|
+
class SK_API SkCanvas {
|
95
|
+
public:
|
96
|
+
|
97
|
+
/** Allocates raster SkCanvas that will draw directly into pixels.
|
98
|
+
|
99
|
+
SkCanvas is returned if all parameters are valid.
|
100
|
+
Valid parameters include:
|
101
|
+
info dimensions are zero or positive;
|
102
|
+
info contains SkColorType and SkAlphaType supported by raster surface;
|
103
|
+
pixels is not nullptr;
|
104
|
+
rowBytes is zero or large enough to contain info width pixels of SkColorType.
|
105
|
+
|
106
|
+
Pass zero for rowBytes to compute rowBytes from info width and size of pixel.
|
107
|
+
If rowBytes is greater than zero, it must be equal to or greater than
|
108
|
+
info width times bytes required for SkColorType.
|
109
|
+
|
110
|
+
Pixel buffer size should be info height times computed rowBytes.
|
111
|
+
Pixels are not initialized.
|
112
|
+
To access pixels after drawing, call flush() or peekPixels().
|
113
|
+
|
114
|
+
@param info width, height, SkColorType, SkAlphaType, SkColorSpace, of raster surface;
|
115
|
+
width, or height, or both, may be zero
|
116
|
+
@param pixels pointer to destination pixels buffer
|
117
|
+
@param rowBytes interval from one SkSurface row to the next, or zero
|
118
|
+
@param props LCD striping orientation and setting for device independent fonts;
|
119
|
+
may be nullptr
|
120
|
+
@return SkCanvas if all parameters are valid; otherwise, nullptr
|
121
|
+
*/
|
122
|
+
static std::unique_ptr<SkCanvas> MakeRasterDirect(const SkImageInfo& info, void* pixels,
|
123
|
+
size_t rowBytes,
|
124
|
+
const SkSurfaceProps* props = nullptr);
|
125
|
+
|
126
|
+
/** Allocates raster SkCanvas specified by inline image specification. Subsequent SkCanvas
|
127
|
+
calls draw into pixels.
|
128
|
+
SkColorType is set to kN32_SkColorType.
|
129
|
+
SkAlphaType is set to kPremul_SkAlphaType.
|
130
|
+
To access pixels after drawing, call flush() or peekPixels().
|
131
|
+
|
132
|
+
SkCanvas is returned if all parameters are valid.
|
133
|
+
Valid parameters include:
|
134
|
+
width and height are zero or positive;
|
135
|
+
pixels is not nullptr;
|
136
|
+
rowBytes is zero or large enough to contain width pixels of kN32_SkColorType.
|
137
|
+
|
138
|
+
Pass zero for rowBytes to compute rowBytes from width and size of pixel.
|
139
|
+
If rowBytes is greater than zero, it must be equal to or greater than
|
140
|
+
width times bytes required for SkColorType.
|
141
|
+
|
142
|
+
Pixel buffer size should be height times rowBytes.
|
143
|
+
|
144
|
+
@param width pixel column count on raster surface created; must be zero or greater
|
145
|
+
@param height pixel row count on raster surface created; must be zero or greater
|
146
|
+
@param pixels pointer to destination pixels buffer; buffer size should be height
|
147
|
+
times rowBytes
|
148
|
+
@param rowBytes interval from one SkSurface row to the next, or zero
|
149
|
+
@return SkCanvas if all parameters are valid; otherwise, nullptr
|
150
|
+
*/
|
151
|
+
static std::unique_ptr<SkCanvas> MakeRasterDirectN32(int width, int height, SkPMColor* pixels,
|
152
|
+
size_t rowBytes) {
|
153
|
+
return MakeRasterDirect(SkImageInfo::MakeN32Premul(width, height), pixels, rowBytes);
|
154
|
+
}
|
155
|
+
|
156
|
+
/** Creates an empty SkCanvas with no backing device or pixels, with
|
157
|
+
a width and height of zero.
|
158
|
+
|
159
|
+
@return empty SkCanvas
|
160
|
+
|
161
|
+
example: https://fiddle.skia.org/c/@Canvas_empty_constructor
|
162
|
+
*/
|
163
|
+
SkCanvas();
|
164
|
+
|
165
|
+
/** Creates SkCanvas of the specified dimensions without a SkSurface.
|
166
|
+
Used by subclasses with custom implementations for draw member functions.
|
167
|
+
|
168
|
+
If props equals nullptr, SkSurfaceProps are created with
|
169
|
+
SkSurfaceProps::InitType settings, which choose the pixel striping
|
170
|
+
direction and order. Since a platform may dynamically change its direction when
|
171
|
+
the device is rotated, and since a platform may have multiple monitors with
|
172
|
+
different characteristics, it is best not to rely on this legacy behavior.
|
173
|
+
|
174
|
+
@param width zero or greater
|
175
|
+
@param height zero or greater
|
176
|
+
@param props LCD striping orientation and setting for device independent fonts;
|
177
|
+
may be nullptr
|
178
|
+
@return SkCanvas placeholder with dimensions
|
179
|
+
|
180
|
+
example: https://fiddle.skia.org/c/@Canvas_int_int_const_SkSurfaceProps_star
|
181
|
+
*/
|
182
|
+
SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr);
|
183
|
+
|
184
|
+
/** Private. For internal use only.
|
185
|
+
*/
|
186
|
+
explicit SkCanvas(sk_sp<SkBaseDevice> device);
|
187
|
+
|
188
|
+
/** Constructs a canvas that draws into bitmap.
|
189
|
+
Sets kUnknown_SkPixelGeometry in constructed SkSurface.
|
190
|
+
|
191
|
+
SkBitmap is copied so that subsequently editing bitmap will not affect
|
192
|
+
constructed SkCanvas.
|
193
|
+
|
194
|
+
May be deprecated in the future.
|
195
|
+
|
196
|
+
@param bitmap width, height, SkColorType, SkAlphaType, and pixel
|
197
|
+
storage of raster surface
|
198
|
+
@return SkCanvas that can be used to draw into bitmap
|
199
|
+
|
200
|
+
example: https://fiddle.skia.org/c/@Canvas_copy_const_SkBitmap
|
201
|
+
*/
|
202
|
+
explicit SkCanvas(const SkBitmap& bitmap);
|
203
|
+
|
204
|
+
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
|
205
|
+
/** Private.
|
206
|
+
*/
|
207
|
+
enum class ColorBehavior {
|
208
|
+
kLegacy, //!< placeholder
|
209
|
+
};
|
210
|
+
|
211
|
+
/** Private. For use by Android framework only.
|
212
|
+
|
213
|
+
@param bitmap specifies a bitmap for the canvas to draw into
|
214
|
+
@param behavior specializes this constructor; value is unused
|
215
|
+
@return SkCanvas that can be used to draw into bitmap
|
216
|
+
*/
|
217
|
+
SkCanvas(const SkBitmap& bitmap, ColorBehavior behavior);
|
218
|
+
#endif
|
219
|
+
|
220
|
+
/** Constructs a canvas that draws into bitmap.
|
221
|
+
Use props to match the device characteristics, like LCD striping.
|
222
|
+
|
223
|
+
bitmap is copied so that subsequently editing bitmap will not affect
|
224
|
+
constructed SkCanvas.
|
225
|
+
|
226
|
+
@param bitmap width, height, SkColorType, SkAlphaType,
|
227
|
+
and pixel storage of raster surface
|
228
|
+
@param props order and orientation of RGB striping; and whether to use
|
229
|
+
device independent fonts
|
230
|
+
@return SkCanvas that can be used to draw into bitmap
|
231
|
+
|
232
|
+
example: https://fiddle.skia.org/c/@Canvas_const_SkBitmap_const_SkSurfaceProps
|
233
|
+
*/
|
234
|
+
SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props);
|
235
|
+
|
236
|
+
/** Draws saved layers, if any.
|
237
|
+
Frees up resources used by SkCanvas.
|
238
|
+
|
239
|
+
example: https://fiddle.skia.org/c/@Canvas_destructor
|
240
|
+
*/
|
241
|
+
virtual ~SkCanvas();
|
242
|
+
|
243
|
+
/** Returns SkImageInfo for SkCanvas. If SkCanvas is not associated with raster surface or
|
244
|
+
GPU surface, returned SkColorType is set to kUnknown_SkColorType.
|
245
|
+
|
246
|
+
@return dimensions and SkColorType of SkCanvas
|
247
|
+
|
248
|
+
example: https://fiddle.skia.org/c/@Canvas_imageInfo
|
249
|
+
*/
|
250
|
+
SkImageInfo imageInfo() const;
|
251
|
+
|
252
|
+
/** Copies SkSurfaceProps, if SkCanvas is associated with raster surface or
|
253
|
+
GPU surface, and returns true. Otherwise, returns false and leave props unchanged.
|
254
|
+
|
255
|
+
@param props storage for writable SkSurfaceProps
|
256
|
+
@return true if SkSurfaceProps was copied
|
257
|
+
|
258
|
+
example: https://fiddle.skia.org/c/@Canvas_getProps
|
259
|
+
*/
|
260
|
+
bool getProps(SkSurfaceProps* props) const;
|
261
|
+
|
262
|
+
/** Triggers the immediate execution of all pending draw operations.
|
263
|
+
If SkCanvas is associated with GPU surface, resolves all pending GPU operations.
|
264
|
+
If SkCanvas is associated with raster surface, has no effect; raster draw
|
265
|
+
operations are never deferred.
|
266
|
+
|
267
|
+
DEPRECATED: Replace usage with GrDirectContext::flush()
|
268
|
+
*/
|
269
|
+
void flush();
|
270
|
+
|
271
|
+
/** Gets the size of the base or root layer in global canvas coordinates. The
|
272
|
+
origin of the base layer is always (0,0). The area available for drawing may be
|
273
|
+
smaller (due to clipping or saveLayer).
|
274
|
+
|
275
|
+
@return integral width and height of base layer
|
276
|
+
|
277
|
+
example: https://fiddle.skia.org/c/@Canvas_getBaseLayerSize
|
278
|
+
*/
|
279
|
+
virtual SkISize getBaseLayerSize() const;
|
280
|
+
|
281
|
+
/** Creates SkSurface matching info and props, and associates it with SkCanvas.
|
282
|
+
Returns nullptr if no match found.
|
283
|
+
|
284
|
+
If props is nullptr, matches SkSurfaceProps in SkCanvas. If props is nullptr and SkCanvas
|
285
|
+
does not have SkSurfaceProps, creates SkSurface with default SkSurfaceProps.
|
286
|
+
|
287
|
+
@param info width, height, SkColorType, SkAlphaType, and SkColorSpace
|
288
|
+
@param props SkSurfaceProps to match; may be nullptr to match SkCanvas
|
289
|
+
@return SkSurface matching info and props, or nullptr if no match is available
|
290
|
+
|
291
|
+
example: https://fiddle.skia.org/c/@Canvas_makeSurface
|
292
|
+
*/
|
293
|
+
sk_sp<SkSurface> makeSurface(const SkImageInfo& info, const SkSurfaceProps* props = nullptr);
|
294
|
+
|
295
|
+
/** Returns GPU context of the GPU surface associated with SkCanvas.
|
296
|
+
|
297
|
+
@return GPU context, if available; nullptr otherwise
|
298
|
+
|
299
|
+
example: https://fiddle.skia.org/c/@Canvas_recordingContext
|
300
|
+
*/
|
301
|
+
virtual GrRecordingContext* recordingContext();
|
302
|
+
|
303
|
+
/** Returns Recorder for the GPU surface associated with SkCanvas.
|
304
|
+
|
305
|
+
@return Recorder, if available; nullptr otherwise
|
306
|
+
*/
|
307
|
+
virtual skgpu::graphite::Recorder* recorder();
|
308
|
+
|
309
|
+
/** Sometimes a canvas is owned by a surface. If it is, getSurface() will return a bare
|
310
|
+
* pointer to that surface, else this will return nullptr.
|
311
|
+
*/
|
312
|
+
SkSurface* getSurface() const;
|
313
|
+
|
314
|
+
/** Returns the pixel base address, SkImageInfo, rowBytes, and origin if the pixels
|
315
|
+
can be read directly. The returned address is only valid
|
316
|
+
while SkCanvas is in scope and unchanged. Any SkCanvas call or SkSurface call
|
317
|
+
may invalidate the returned address and other returned values.
|
318
|
+
|
319
|
+
If pixels are inaccessible, info, rowBytes, and origin are unchanged.
|
320
|
+
|
321
|
+
@param info storage for writable pixels' SkImageInfo; may be nullptr
|
322
|
+
@param rowBytes storage for writable pixels' row bytes; may be nullptr
|
323
|
+
@param origin storage for SkCanvas top layer origin, its top-left corner;
|
324
|
+
may be nullptr
|
325
|
+
@return address of pixels, or nullptr if inaccessible
|
326
|
+
|
327
|
+
example: https://fiddle.skia.org/c/@Canvas_accessTopLayerPixels_a
|
328
|
+
example: https://fiddle.skia.org/c/@Canvas_accessTopLayerPixels_b
|
329
|
+
*/
|
330
|
+
void* accessTopLayerPixels(SkImageInfo* info, size_t* rowBytes, SkIPoint* origin = nullptr);
|
331
|
+
|
332
|
+
/** Returns custom context that tracks the SkMatrix and clip.
|
333
|
+
|
334
|
+
Use SkRasterHandleAllocator to blend Skia drawing with custom drawing, typically performed
|
335
|
+
by the host platform user interface. The custom context returned is generated by
|
336
|
+
SkRasterHandleAllocator::MakeCanvas, which creates a custom canvas with raster storage for
|
337
|
+
the drawing destination.
|
338
|
+
|
339
|
+
@return context of custom allocation
|
340
|
+
|
341
|
+
example: https://fiddle.skia.org/c/@Canvas_accessTopRasterHandle
|
342
|
+
*/
|
343
|
+
SkRasterHandleAllocator::Handle accessTopRasterHandle() const;
|
344
|
+
|
345
|
+
/** Returns true if SkCanvas has direct access to its pixels.
|
346
|
+
|
347
|
+
Pixels are readable when SkBaseDevice is raster. Pixels are not readable when SkCanvas
|
348
|
+
is returned from GPU surface, returned by SkDocument::beginPage, returned by
|
349
|
+
SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility class
|
350
|
+
like DebugCanvas.
|
351
|
+
|
352
|
+
pixmap is valid only while SkCanvas is in scope and unchanged. Any
|
353
|
+
SkCanvas or SkSurface call may invalidate the pixmap values.
|
354
|
+
|
355
|
+
@param pixmap storage for pixel state if pixels are readable; otherwise, ignored
|
356
|
+
@return true if SkCanvas has direct access to pixels
|
357
|
+
|
358
|
+
example: https://fiddle.skia.org/c/@Canvas_peekPixels
|
359
|
+
*/
|
360
|
+
bool peekPixels(SkPixmap* pixmap);
|
361
|
+
|
362
|
+
/** Copies SkRect of pixels from SkCanvas into dstPixels. SkMatrix and clip are
|
363
|
+
ignored.
|
364
|
+
|
365
|
+
Source SkRect corners are (srcX, srcY) and (imageInfo().width(), imageInfo().height()).
|
366
|
+
Destination SkRect corners are (0, 0) and (dstInfo.width(), dstInfo.height()).
|
367
|
+
Copies each readable pixel intersecting both rectangles, without scaling,
|
368
|
+
converting to dstInfo.colorType() and dstInfo.alphaType() if required.
|
369
|
+
|
370
|
+
Pixels are readable when SkBaseDevice is raster, or backed by a GPU.
|
371
|
+
Pixels are not readable when SkCanvas is returned by SkDocument::beginPage,
|
372
|
+
returned by SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility
|
373
|
+
class like DebugCanvas.
|
374
|
+
|
375
|
+
The destination pixel storage must be allocated by the caller.
|
376
|
+
|
377
|
+
Pixel values are converted only if SkColorType and SkAlphaType
|
378
|
+
do not match. Only pixels within both source and destination rectangles
|
379
|
+
are copied. dstPixels contents outside SkRect intersection are unchanged.
|
380
|
+
|
381
|
+
Pass negative values for srcX or srcY to offset pixels across or down destination.
|
382
|
+
|
383
|
+
Does not copy, and returns false if:
|
384
|
+
- Source and destination rectangles do not intersect.
|
385
|
+
- SkCanvas pixels could not be converted to dstInfo.colorType() or dstInfo.alphaType().
|
386
|
+
- SkCanvas pixels are not readable; for instance, SkCanvas is document-based.
|
387
|
+
- dstRowBytes is too small to contain one row of pixels.
|
388
|
+
|
389
|
+
@param dstInfo width, height, SkColorType, and SkAlphaType of dstPixels
|
390
|
+
@param dstPixels storage for pixels; dstInfo.height() times dstRowBytes, or larger
|
391
|
+
@param dstRowBytes size of one destination row; dstInfo.width() times pixel size, or larger
|
392
|
+
@param srcX offset into readable pixels on x-axis; may be negative
|
393
|
+
@param srcY offset into readable pixels on y-axis; may be negative
|
394
|
+
@return true if pixels were copied
|
395
|
+
*/
|
396
|
+
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
|
397
|
+
int srcX, int srcY);
|
398
|
+
|
399
|
+
/** Copies SkRect of pixels from SkCanvas into pixmap. SkMatrix and clip are
|
400
|
+
ignored.
|
401
|
+
|
402
|
+
Source SkRect corners are (srcX, srcY) and (imageInfo().width(), imageInfo().height()).
|
403
|
+
Destination SkRect corners are (0, 0) and (pixmap.width(), pixmap.height()).
|
404
|
+
Copies each readable pixel intersecting both rectangles, without scaling,
|
405
|
+
converting to pixmap.colorType() and pixmap.alphaType() if required.
|
406
|
+
|
407
|
+
Pixels are readable when SkBaseDevice is raster, or backed by a GPU.
|
408
|
+
Pixels are not readable when SkCanvas is returned by SkDocument::beginPage,
|
409
|
+
returned by SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility
|
410
|
+
class like DebugCanvas.
|
411
|
+
|
412
|
+
Caller must allocate pixel storage in pixmap if needed.
|
413
|
+
|
414
|
+
Pixel values are converted only if SkColorType and SkAlphaType
|
415
|
+
do not match. Only pixels within both source and destination SkRect
|
416
|
+
are copied. pixmap pixels contents outside SkRect intersection are unchanged.
|
417
|
+
|
418
|
+
Pass negative values for srcX or srcY to offset pixels across or down pixmap.
|
419
|
+
|
420
|
+
Does not copy, and returns false if:
|
421
|
+
- Source and destination rectangles do not intersect.
|
422
|
+
- SkCanvas pixels could not be converted to pixmap.colorType() or pixmap.alphaType().
|
423
|
+
- SkCanvas pixels are not readable; for instance, SkCanvas is document-based.
|
424
|
+
- SkPixmap pixels could not be allocated.
|
425
|
+
- pixmap.rowBytes() is too small to contain one row of pixels.
|
426
|
+
|
427
|
+
@param pixmap storage for pixels copied from SkCanvas
|
428
|
+
@param srcX offset into readable pixels on x-axis; may be negative
|
429
|
+
@param srcY offset into readable pixels on y-axis; may be negative
|
430
|
+
@return true if pixels were copied
|
431
|
+
|
432
|
+
example: https://fiddle.skia.org/c/@Canvas_readPixels_2
|
433
|
+
*/
|
434
|
+
bool readPixels(const SkPixmap& pixmap, int srcX, int srcY);
|
435
|
+
|
436
|
+
/** Copies SkRect of pixels from SkCanvas into bitmap. SkMatrix and clip are
|
437
|
+
ignored.
|
438
|
+
|
439
|
+
Source SkRect corners are (srcX, srcY) and (imageInfo().width(), imageInfo().height()).
|
440
|
+
Destination SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
441
|
+
Copies each readable pixel intersecting both rectangles, without scaling,
|
442
|
+
converting to bitmap.colorType() and bitmap.alphaType() if required.
|
443
|
+
|
444
|
+
Pixels are readable when SkBaseDevice is raster, or backed by a GPU.
|
445
|
+
Pixels are not readable when SkCanvas is returned by SkDocument::beginPage,
|
446
|
+
returned by SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility
|
447
|
+
class like DebugCanvas.
|
448
|
+
|
449
|
+
Caller must allocate pixel storage in bitmap if needed.
|
450
|
+
|
451
|
+
SkBitmap values are converted only if SkColorType and SkAlphaType
|
452
|
+
do not match. Only pixels within both source and destination rectangles
|
453
|
+
are copied. SkBitmap pixels outside SkRect intersection are unchanged.
|
454
|
+
|
455
|
+
Pass negative values for srcX or srcY to offset pixels across or down bitmap.
|
456
|
+
|
457
|
+
Does not copy, and returns false if:
|
458
|
+
- Source and destination rectangles do not intersect.
|
459
|
+
- SkCanvas pixels could not be converted to bitmap.colorType() or bitmap.alphaType().
|
460
|
+
- SkCanvas pixels are not readable; for instance, SkCanvas is document-based.
|
461
|
+
- bitmap pixels could not be allocated.
|
462
|
+
- bitmap.rowBytes() is too small to contain one row of pixels.
|
463
|
+
|
464
|
+
@param bitmap storage for pixels copied from SkCanvas
|
465
|
+
@param srcX offset into readable pixels on x-axis; may be negative
|
466
|
+
@param srcY offset into readable pixels on y-axis; may be negative
|
467
|
+
@return true if pixels were copied
|
468
|
+
|
469
|
+
example: https://fiddle.skia.org/c/@Canvas_readPixels_3
|
470
|
+
*/
|
471
|
+
bool readPixels(const SkBitmap& bitmap, int srcX, int srcY);
|
472
|
+
|
473
|
+
/** Copies SkRect from pixels to SkCanvas. SkMatrix and clip are ignored.
|
474
|
+
Source SkRect corners are (0, 0) and (info.width(), info.height()).
|
475
|
+
Destination SkRect corners are (x, y) and
|
476
|
+
(imageInfo().width(), imageInfo().height()).
|
477
|
+
|
478
|
+
Copies each readable pixel intersecting both rectangles, without scaling,
|
479
|
+
converting to imageInfo().colorType() and imageInfo().alphaType() if required.
|
480
|
+
|
481
|
+
Pixels are writable when SkBaseDevice is raster, or backed by a GPU.
|
482
|
+
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
483
|
+
returned by SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility
|
484
|
+
class like DebugCanvas.
|
485
|
+
|
486
|
+
Pixel values are converted only if SkColorType and SkAlphaType
|
487
|
+
do not match. Only pixels within both source and destination rectangles
|
488
|
+
are copied. SkCanvas pixels outside SkRect intersection are unchanged.
|
489
|
+
|
490
|
+
Pass negative values for x or y to offset pixels to the left or
|
491
|
+
above SkCanvas pixels.
|
492
|
+
|
493
|
+
Does not copy, and returns false if:
|
494
|
+
- Source and destination rectangles do not intersect.
|
495
|
+
- pixels could not be converted to SkCanvas imageInfo().colorType() or
|
496
|
+
imageInfo().alphaType().
|
497
|
+
- SkCanvas pixels are not writable; for instance, SkCanvas is document-based.
|
498
|
+
- rowBytes is too small to contain one row of pixels.
|
499
|
+
|
500
|
+
@param info width, height, SkColorType, and SkAlphaType of pixels
|
501
|
+
@param pixels pixels to copy, of size info.height() times rowBytes, or larger
|
502
|
+
@param rowBytes size of one row of pixels; info.width() times pixel size, or larger
|
503
|
+
@param x offset into SkCanvas writable pixels on x-axis; may be negative
|
504
|
+
@param y offset into SkCanvas writable pixels on y-axis; may be negative
|
505
|
+
@return true if pixels were written to SkCanvas
|
506
|
+
|
507
|
+
example: https://fiddle.skia.org/c/@Canvas_writePixels
|
508
|
+
*/
|
509
|
+
bool writePixels(const SkImageInfo& info, const void* pixels, size_t rowBytes, int x, int y);
|
510
|
+
|
511
|
+
/** Copies SkRect from pixels to SkCanvas. SkMatrix and clip are ignored.
|
512
|
+
Source SkRect corners are (0, 0) and (bitmap.width(), bitmap.height()).
|
513
|
+
|
514
|
+
Destination SkRect corners are (x, y) and
|
515
|
+
(imageInfo().width(), imageInfo().height()).
|
516
|
+
|
517
|
+
Copies each readable pixel intersecting both rectangles, without scaling,
|
518
|
+
converting to imageInfo().colorType() and imageInfo().alphaType() if required.
|
519
|
+
|
520
|
+
Pixels are writable when SkBaseDevice is raster, or backed by a GPU.
|
521
|
+
Pixels are not writable when SkCanvas is returned by SkDocument::beginPage,
|
522
|
+
returned by SkPictureRecorder::beginRecording, or SkCanvas is the base of a utility
|
523
|
+
class like DebugCanvas.
|
524
|
+
|
525
|
+
Pixel values are converted only if SkColorType and SkAlphaType
|
526
|
+
do not match. Only pixels within both source and destination rectangles
|
527
|
+
are copied. SkCanvas pixels outside SkRect intersection are unchanged.
|
528
|
+
|
529
|
+
Pass negative values for x or y to offset pixels to the left or
|
530
|
+
above SkCanvas pixels.
|
531
|
+
|
532
|
+
Does not copy, and returns false if:
|
533
|
+
- Source and destination rectangles do not intersect.
|
534
|
+
- bitmap does not have allocated pixels.
|
535
|
+
- bitmap pixels could not be converted to SkCanvas imageInfo().colorType() or
|
536
|
+
imageInfo().alphaType().
|
537
|
+
- SkCanvas pixels are not writable; for instance, SkCanvas is document based.
|
538
|
+
- bitmap pixels are inaccessible; for instance, bitmap wraps a texture.
|
539
|
+
|
540
|
+
@param bitmap contains pixels copied to SkCanvas
|
541
|
+
@param x offset into SkCanvas writable pixels on x-axis; may be negative
|
542
|
+
@param y offset into SkCanvas writable pixels on y-axis; may be negative
|
543
|
+
@return true if pixels were written to SkCanvas
|
544
|
+
|
545
|
+
example: https://fiddle.skia.org/c/@Canvas_writePixels_2
|
546
|
+
example: https://fiddle.skia.org/c/@State_Stack_a
|
547
|
+
example: https://fiddle.skia.org/c/@State_Stack_b
|
548
|
+
*/
|
549
|
+
bool writePixels(const SkBitmap& bitmap, int x, int y);
|
550
|
+
|
551
|
+
/** Saves SkMatrix and clip.
|
552
|
+
Calling restore() discards changes to SkMatrix and clip,
|
553
|
+
restoring the SkMatrix and clip to their state when save() was called.
|
554
|
+
|
555
|
+
SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix(),
|
556
|
+
and resetMatrix(). Clip may be changed by clipRect(), clipRRect(), clipPath(), clipRegion().
|
557
|
+
|
558
|
+
Saved SkCanvas state is put on a stack; multiple calls to save() should be balance
|
559
|
+
by an equal number of calls to restore().
|
560
|
+
|
561
|
+
Call restoreToCount() with result to restore this and subsequent saves.
|
562
|
+
|
563
|
+
@return depth of saved stack
|
564
|
+
|
565
|
+
example: https://fiddle.skia.org/c/@Canvas_save
|
566
|
+
*/
|
567
|
+
int save();
|
568
|
+
|
569
|
+
/** Saves SkMatrix and clip, and allocates a SkBitmap for subsequent drawing.
|
570
|
+
Calling restore() discards changes to SkMatrix and clip, and draws the SkBitmap.
|
571
|
+
|
572
|
+
SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(),
|
573
|
+
setMatrix(), and resetMatrix(). Clip may be changed by clipRect(), clipRRect(),
|
574
|
+
clipPath(), clipRegion().
|
575
|
+
|
576
|
+
SkRect bounds suggests but does not define the SkBitmap size. To clip drawing to
|
577
|
+
a specific rectangle, use clipRect().
|
578
|
+
|
579
|
+
Optional SkPaint paint applies alpha, SkColorFilter, SkImageFilter, and
|
580
|
+
SkBlendMode when restore() is called.
|
581
|
+
|
582
|
+
Call restoreToCount() with returned value to restore this and subsequent saves.
|
583
|
+
|
584
|
+
@param bounds hint to limit the size of the layer; may be nullptr
|
585
|
+
@param paint graphics state for layer; may be nullptr
|
586
|
+
@return depth of saved stack
|
587
|
+
|
588
|
+
example: https://fiddle.skia.org/c/@Canvas_saveLayer
|
589
|
+
example: https://fiddle.skia.org/c/@Canvas_saveLayer_4
|
590
|
+
*/
|
591
|
+
int saveLayer(const SkRect* bounds, const SkPaint* paint);
|
592
|
+
|
593
|
+
/** Saves SkMatrix and clip, and allocates a SkBitmap for subsequent drawing.
|
594
|
+
Calling restore() discards changes to SkMatrix and clip, and draws the SkBitmap.
|
595
|
+
|
596
|
+
SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(),
|
597
|
+
setMatrix(), and resetMatrix(). Clip may be changed by clipRect(), clipRRect(),
|
598
|
+
clipPath(), clipRegion().
|
599
|
+
|
600
|
+
SkRect bounds suggests but does not define the layer size. To clip drawing to
|
601
|
+
a specific rectangle, use clipRect().
|
602
|
+
|
603
|
+
Optional SkPaint paint applies alpha, SkColorFilter, SkImageFilter, and
|
604
|
+
SkBlendMode when restore() is called.
|
605
|
+
|
606
|
+
Call restoreToCount() with returned value to restore this and subsequent saves.
|
607
|
+
|
608
|
+
@param bounds hint to limit the size of layer; may be nullptr
|
609
|
+
@param paint graphics state for layer; may be nullptr
|
610
|
+
@return depth of saved stack
|
611
|
+
*/
|
612
|
+
int saveLayer(const SkRect& bounds, const SkPaint* paint) {
|
613
|
+
return this->saveLayer(&bounds, paint);
|
614
|
+
}
|
615
|
+
|
616
|
+
/** Saves SkMatrix and clip, and allocates SkBitmap for subsequent drawing.
|
617
|
+
|
618
|
+
Calling restore() discards changes to SkMatrix and clip,
|
619
|
+
and blends layer with alpha opacity onto prior layer.
|
620
|
+
|
621
|
+
SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(),
|
622
|
+
setMatrix(), and resetMatrix(). Clip may be changed by clipRect(), clipRRect(),
|
623
|
+
clipPath(), clipRegion().
|
624
|
+
|
625
|
+
SkRect bounds suggests but does not define layer size. To clip drawing to
|
626
|
+
a specific rectangle, use clipRect().
|
627
|
+
|
628
|
+
alpha of zero is fully transparent, 255 is fully opaque.
|
629
|
+
|
630
|
+
Call restoreToCount() with returned value to restore this and subsequent saves.
|
631
|
+
|
632
|
+
@param bounds hint to limit the size of layer; may be nullptr
|
633
|
+
@param alpha opacity of layer
|
634
|
+
@return depth of saved stack
|
635
|
+
|
636
|
+
example: https://fiddle.skia.org/c/@Canvas_saveLayerAlpha
|
637
|
+
*/
|
638
|
+
int saveLayerAlpha(const SkRect* bounds, U8CPU alpha);
|
639
|
+
|
640
|
+
/** \enum SkCanvas::SaveLayerFlagsSet
|
641
|
+
SaveLayerFlags provides options that may be used in any combination in SaveLayerRec,
|
642
|
+
defining how layer allocated by saveLayer() operates. It may be set to zero,
|
643
|
+
kPreserveLCDText_SaveLayerFlag, kInitWithPrevious_SaveLayerFlag, or both flags.
|
644
|
+
*/
|
645
|
+
enum SaveLayerFlagsSet {
|
646
|
+
kPreserveLCDText_SaveLayerFlag = 1 << 1,
|
647
|
+
kInitWithPrevious_SaveLayerFlag = 1 << 2, //!< initializes with previous contents
|
648
|
+
// instead of matching previous layer's colortype, use F16
|
649
|
+
kF16ColorType = 1 << 4,
|
650
|
+
};
|
651
|
+
|
652
|
+
typedef uint32_t SaveLayerFlags;
|
653
|
+
|
654
|
+
/** \struct SkCanvas::SaveLayerRec
|
655
|
+
SaveLayerRec contains the state used to create the layer.
|
656
|
+
*/
|
657
|
+
struct SaveLayerRec {
|
658
|
+
/** Sets fBounds, fPaint, and fBackdrop to nullptr. Clears fSaveLayerFlags.
|
659
|
+
|
660
|
+
@return empty SaveLayerRec
|
661
|
+
*/
|
662
|
+
SaveLayerRec() {}
|
663
|
+
|
664
|
+
/** Sets fBounds, fPaint, and fSaveLayerFlags; sets fBackdrop to nullptr.
|
665
|
+
|
666
|
+
@param bounds layer dimensions; may be nullptr
|
667
|
+
@param paint applied to layer when overlaying prior layer; may be nullptr
|
668
|
+
@param saveLayerFlags SaveLayerRec options to modify layer
|
669
|
+
@return SaveLayerRec with empty fBackdrop
|
670
|
+
*/
|
671
|
+
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
|
672
|
+
: SaveLayerRec(bounds, paint, nullptr, 1.f, saveLayerFlags) {}
|
673
|
+
|
674
|
+
/** Sets fBounds, fPaint, fBackdrop, and fSaveLayerFlags.
|
675
|
+
|
676
|
+
@param bounds layer dimensions; may be nullptr
|
677
|
+
@param paint applied to layer when overlaying prior layer;
|
678
|
+
may be nullptr
|
679
|
+
@param backdrop If not null, this causes the current layer to be filtered by
|
680
|
+
backdrop, and then drawn into the new layer
|
681
|
+
(respecting the current clip).
|
682
|
+
If null, the new layer is initialized with transparent-black.
|
683
|
+
@param saveLayerFlags SaveLayerRec options to modify layer
|
684
|
+
@return SaveLayerRec fully specified
|
685
|
+
*/
|
686
|
+
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
|
687
|
+
SaveLayerFlags saveLayerFlags)
|
688
|
+
: SaveLayerRec(bounds, paint, backdrop, 1.f, saveLayerFlags) {}
|
689
|
+
|
690
|
+
/** hints at layer size limit */
|
691
|
+
const SkRect* fBounds = nullptr;
|
692
|
+
|
693
|
+
/** modifies overlay */
|
694
|
+
const SkPaint* fPaint = nullptr;
|
695
|
+
|
696
|
+
/**
|
697
|
+
* If not null, this triggers the same initialization behavior as setting
|
698
|
+
* kInitWithPrevious_SaveLayerFlag on fSaveLayerFlags: the current layer is copied into
|
699
|
+
* the new layer, rather than initializing the new layer with transparent-black.
|
700
|
+
* This is then filtered by fBackdrop (respecting the current clip).
|
701
|
+
*/
|
702
|
+
const SkImageFilter* fBackdrop = nullptr;
|
703
|
+
|
704
|
+
/** preserves LCD text, creates with prior layer contents */
|
705
|
+
SaveLayerFlags fSaveLayerFlags = 0;
|
706
|
+
|
707
|
+
private:
|
708
|
+
friend class SkCanvas;
|
709
|
+
friend class SkCanvasPriv;
|
710
|
+
|
711
|
+
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
|
712
|
+
SkScalar backdropScale, SaveLayerFlags saveLayerFlags)
|
713
|
+
: fBounds(bounds)
|
714
|
+
, fPaint(paint)
|
715
|
+
, fBackdrop(backdrop)
|
716
|
+
, fSaveLayerFlags(saveLayerFlags)
|
717
|
+
, fExperimentalBackdropScale(backdropScale) {}
|
718
|
+
|
719
|
+
// Relative scale factor that the image content used to initialize the layer when the
|
720
|
+
// kInitFromPrevious flag or a backdrop filter is used.
|
721
|
+
SkScalar fExperimentalBackdropScale = 1.f;
|
722
|
+
};
|
723
|
+
|
724
|
+
/** Saves SkMatrix and clip, and allocates SkBitmap for subsequent drawing.
|
725
|
+
|
726
|
+
Calling restore() discards changes to SkMatrix and clip,
|
727
|
+
and blends SkBitmap with alpha opacity onto the prior layer.
|
728
|
+
|
729
|
+
SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(),
|
730
|
+
setMatrix(), and resetMatrix(). Clip may be changed by clipRect(), clipRRect(),
|
731
|
+
clipPath(), clipRegion().
|
732
|
+
|
733
|
+
SaveLayerRec contains the state used to create the layer.
|
734
|
+
|
735
|
+
Call restoreToCount() with returned value to restore this and subsequent saves.
|
736
|
+
|
737
|
+
@param layerRec layer state
|
738
|
+
@return depth of save state stack before this call was made.
|
739
|
+
|
740
|
+
example: https://fiddle.skia.org/c/@Canvas_saveLayer_3
|
741
|
+
*/
|
742
|
+
int saveLayer(const SaveLayerRec& layerRec);
|
743
|
+
|
744
|
+
/** Removes changes to SkMatrix and clip since SkCanvas state was
|
745
|
+
last saved. The state is removed from the stack.
|
746
|
+
|
747
|
+
Does nothing if the stack is empty.
|
748
|
+
|
749
|
+
example: https://fiddle.skia.org/c/@AutoCanvasRestore_restore
|
750
|
+
|
751
|
+
example: https://fiddle.skia.org/c/@Canvas_restore
|
752
|
+
*/
|
753
|
+
void restore();
|
754
|
+
|
755
|
+
/** Returns the number of saved states, each containing: SkMatrix and clip.
|
756
|
+
Equals the number of save() calls less the number of restore() calls plus one.
|
757
|
+
The save count of a new canvas is one.
|
758
|
+
|
759
|
+
@return depth of save state stack
|
760
|
+
|
761
|
+
example: https://fiddle.skia.org/c/@Canvas_getSaveCount
|
762
|
+
*/
|
763
|
+
int getSaveCount() const;
|
764
|
+
|
765
|
+
/** Restores state to SkMatrix and clip values when save(), saveLayer(),
|
766
|
+
saveLayerPreserveLCDTextRequests(), or saveLayerAlpha() returned saveCount.
|
767
|
+
|
768
|
+
Does nothing if saveCount is greater than state stack count.
|
769
|
+
Restores state to initial values if saveCount is less than or equal to one.
|
770
|
+
|
771
|
+
@param saveCount depth of state stack to restore
|
772
|
+
|
773
|
+
example: https://fiddle.skia.org/c/@Canvas_restoreToCount
|
774
|
+
*/
|
775
|
+
void restoreToCount(int saveCount);
|
776
|
+
|
777
|
+
/** Translates SkMatrix by dx along the x-axis and dy along the y-axis.
|
778
|
+
|
779
|
+
Mathematically, replaces SkMatrix with a translation matrix
|
780
|
+
premultiplied with SkMatrix.
|
781
|
+
|
782
|
+
This has the effect of moving the drawing by (dx, dy) before transforming
|
783
|
+
the result with SkMatrix.
|
784
|
+
|
785
|
+
@param dx distance to translate on x-axis
|
786
|
+
@param dy distance to translate on y-axis
|
787
|
+
|
788
|
+
example: https://fiddle.skia.org/c/@Canvas_translate
|
789
|
+
*/
|
790
|
+
void translate(SkScalar dx, SkScalar dy);
|
791
|
+
|
792
|
+
/** Scales SkMatrix by sx on the x-axis and sy on the y-axis.
|
793
|
+
|
794
|
+
Mathematically, replaces SkMatrix with a scale matrix
|
795
|
+
premultiplied with SkMatrix.
|
796
|
+
|
797
|
+
This has the effect of scaling the drawing by (sx, sy) before transforming
|
798
|
+
the result with SkMatrix.
|
799
|
+
|
800
|
+
@param sx amount to scale on x-axis
|
801
|
+
@param sy amount to scale on y-axis
|
802
|
+
|
803
|
+
example: https://fiddle.skia.org/c/@Canvas_scale
|
804
|
+
*/
|
805
|
+
void scale(SkScalar sx, SkScalar sy);
|
806
|
+
|
807
|
+
/** Rotates SkMatrix by degrees. Positive degrees rotates clockwise.
|
808
|
+
|
809
|
+
Mathematically, replaces SkMatrix with a rotation matrix
|
810
|
+
premultiplied with SkMatrix.
|
811
|
+
|
812
|
+
This has the effect of rotating the drawing by degrees before transforming
|
813
|
+
the result with SkMatrix.
|
814
|
+
|
815
|
+
@param degrees amount to rotate, in degrees
|
816
|
+
|
817
|
+
example: https://fiddle.skia.org/c/@Canvas_rotate
|
818
|
+
*/
|
819
|
+
void rotate(SkScalar degrees);
|
820
|
+
|
821
|
+
/** Rotates SkMatrix by degrees about a point at (px, py). Positive degrees rotates
|
822
|
+
clockwise.
|
823
|
+
|
824
|
+
Mathematically, constructs a rotation matrix; premultiplies the rotation matrix by
|
825
|
+
a translation matrix; then replaces SkMatrix with the resulting matrix
|
826
|
+
premultiplied with SkMatrix.
|
827
|
+
|
828
|
+
This has the effect of rotating the drawing about a given point before
|
829
|
+
transforming the result with SkMatrix.
|
830
|
+
|
831
|
+
@param degrees amount to rotate, in degrees
|
832
|
+
@param px x-axis value of the point to rotate about
|
833
|
+
@param py y-axis value of the point to rotate about
|
834
|
+
|
835
|
+
example: https://fiddle.skia.org/c/@Canvas_rotate_2
|
836
|
+
*/
|
837
|
+
void rotate(SkScalar degrees, SkScalar px, SkScalar py);
|
838
|
+
|
839
|
+
/** Skews SkMatrix by sx on the x-axis and sy on the y-axis. A positive value of sx
|
840
|
+
skews the drawing right as y-axis values increase; a positive value of sy skews
|
841
|
+
the drawing down as x-axis values increase.
|
842
|
+
|
843
|
+
Mathematically, replaces SkMatrix with a skew matrix premultiplied with SkMatrix.
|
844
|
+
|
845
|
+
This has the effect of skewing the drawing by (sx, sy) before transforming
|
846
|
+
the result with SkMatrix.
|
847
|
+
|
848
|
+
@param sx amount to skew on x-axis
|
849
|
+
@param sy amount to skew on y-axis
|
850
|
+
|
851
|
+
example: https://fiddle.skia.org/c/@Canvas_skew
|
852
|
+
*/
|
853
|
+
void skew(SkScalar sx, SkScalar sy);
|
854
|
+
|
855
|
+
/** Replaces SkMatrix with matrix premultiplied with existing SkMatrix.
|
856
|
+
|
857
|
+
This has the effect of transforming the drawn geometry by matrix, before
|
858
|
+
transforming the result with existing SkMatrix.
|
859
|
+
|
860
|
+
@param matrix matrix to premultiply with existing SkMatrix
|
861
|
+
|
862
|
+
example: https://fiddle.skia.org/c/@Canvas_concat
|
863
|
+
*/
|
864
|
+
void concat(const SkMatrix& matrix);
|
865
|
+
void concat(const SkM44&);
|
866
|
+
|
867
|
+
/** Replaces SkMatrix with matrix.
|
868
|
+
Unlike concat(), any prior matrix state is overwritten.
|
869
|
+
|
870
|
+
@param matrix matrix to copy, replacing existing SkMatrix
|
871
|
+
|
872
|
+
example: https://fiddle.skia.org/c/@Canvas_setMatrix
|
873
|
+
*/
|
874
|
+
void setMatrix(const SkM44& matrix);
|
875
|
+
|
876
|
+
// DEPRECATED -- use SkM44 version
|
877
|
+
void setMatrix(const SkMatrix& matrix);
|
878
|
+
|
879
|
+
/** Sets SkMatrix to the identity matrix.
|
880
|
+
Any prior matrix state is overwritten.
|
881
|
+
|
882
|
+
example: https://fiddle.skia.org/c/@Canvas_resetMatrix
|
883
|
+
*/
|
884
|
+
void resetMatrix();
|
885
|
+
|
886
|
+
/** Replaces clip with the intersection or difference of clip and rect,
|
887
|
+
with an aliased or anti-aliased clip edge. rect is transformed by SkMatrix
|
888
|
+
before it is combined with clip.
|
889
|
+
|
890
|
+
@param rect SkRect to combine with clip
|
891
|
+
@param op SkClipOp to apply to clip
|
892
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
893
|
+
|
894
|
+
example: https://fiddle.skia.org/c/@Canvas_clipRect
|
895
|
+
*/
|
896
|
+
void clipRect(const SkRect& rect, SkClipOp op, bool doAntiAlias);
|
897
|
+
|
898
|
+
/** Replaces clip with the intersection or difference of clip and rect.
|
899
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
900
|
+
rect is transformed by SkMatrix before it is combined with clip.
|
901
|
+
|
902
|
+
@param rect SkRect to combine with clip
|
903
|
+
@param op SkClipOp to apply to clip
|
904
|
+
*/
|
905
|
+
void clipRect(const SkRect& rect, SkClipOp op) {
|
906
|
+
this->clipRect(rect, op, false);
|
907
|
+
}
|
908
|
+
|
909
|
+
/** Replaces clip with the intersection of clip and rect.
|
910
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
911
|
+
rect is transformed by SkMatrix
|
912
|
+
before it is combined with clip.
|
913
|
+
|
914
|
+
@param rect SkRect to combine with clip
|
915
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
916
|
+
*/
|
917
|
+
void clipRect(const SkRect& rect, bool doAntiAlias = false) {
|
918
|
+
this->clipRect(rect, SkClipOp::kIntersect, doAntiAlias);
|
919
|
+
}
|
920
|
+
|
921
|
+
void clipIRect(const SkIRect& irect, SkClipOp op = SkClipOp::kIntersect) {
|
922
|
+
this->clipRect(SkRect::Make(irect), op, false);
|
923
|
+
}
|
924
|
+
|
925
|
+
/** Sets the maximum clip rectangle, which can be set by clipRect(), clipRRect() and
|
926
|
+
clipPath() and intersect the current clip with the specified rect.
|
927
|
+
The maximum clip affects only future clipping operations; it is not retroactive.
|
928
|
+
The clip restriction is not recorded in pictures.
|
929
|
+
|
930
|
+
Pass an empty rect to disable maximum clip.
|
931
|
+
This private API is for use by Android framework only.
|
932
|
+
|
933
|
+
DEPRECATED: Replace usage with SkAndroidFrameworkUtils::replaceClip()
|
934
|
+
|
935
|
+
@param rect maximum allowed clip in device coordinates
|
936
|
+
*/
|
937
|
+
void androidFramework_setDeviceClipRestriction(const SkIRect& rect);
|
938
|
+
|
939
|
+
/** Replaces clip with the intersection or difference of clip and rrect,
|
940
|
+
with an aliased or anti-aliased clip edge.
|
941
|
+
rrect is transformed by SkMatrix
|
942
|
+
before it is combined with clip.
|
943
|
+
|
944
|
+
@param rrect SkRRect to combine with clip
|
945
|
+
@param op SkClipOp to apply to clip
|
946
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
947
|
+
|
948
|
+
example: https://fiddle.skia.org/c/@Canvas_clipRRect
|
949
|
+
*/
|
950
|
+
void clipRRect(const SkRRect& rrect, SkClipOp op, bool doAntiAlias);
|
951
|
+
|
952
|
+
/** Replaces clip with the intersection or difference of clip and rrect.
|
953
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
954
|
+
rrect is transformed by SkMatrix before it is combined with clip.
|
955
|
+
|
956
|
+
@param rrect SkRRect to combine with clip
|
957
|
+
@param op SkClipOp to apply to clip
|
958
|
+
*/
|
959
|
+
void clipRRect(const SkRRect& rrect, SkClipOp op) {
|
960
|
+
this->clipRRect(rrect, op, false);
|
961
|
+
}
|
962
|
+
|
963
|
+
/** Replaces clip with the intersection of clip and rrect,
|
964
|
+
with an aliased or anti-aliased clip edge.
|
965
|
+
rrect is transformed by SkMatrix before it is combined with clip.
|
966
|
+
|
967
|
+
@param rrect SkRRect to combine with clip
|
968
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
969
|
+
*/
|
970
|
+
void clipRRect(const SkRRect& rrect, bool doAntiAlias = false) {
|
971
|
+
this->clipRRect(rrect, SkClipOp::kIntersect, doAntiAlias);
|
972
|
+
}
|
973
|
+
|
974
|
+
/** Replaces clip with the intersection or difference of clip and path,
|
975
|
+
with an aliased or anti-aliased clip edge. SkPath::FillType determines if path
|
976
|
+
describes the area inside or outside its contours; and if path contour overlaps
|
977
|
+
itself or another path contour, whether the overlaps form part of the area.
|
978
|
+
path is transformed by SkMatrix before it is combined with clip.
|
979
|
+
|
980
|
+
@param path SkPath to combine with clip
|
981
|
+
@param op SkClipOp to apply to clip
|
982
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
983
|
+
|
984
|
+
example: https://fiddle.skia.org/c/@Canvas_clipPath
|
985
|
+
*/
|
986
|
+
void clipPath(const SkPath& path, SkClipOp op, bool doAntiAlias);
|
987
|
+
|
988
|
+
/** Replaces clip with the intersection or difference of clip and path.
|
989
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
990
|
+
SkPath::FillType determines if path
|
991
|
+
describes the area inside or outside its contours; and if path contour overlaps
|
992
|
+
itself or another path contour, whether the overlaps form part of the area.
|
993
|
+
path is transformed by SkMatrix
|
994
|
+
before it is combined with clip.
|
995
|
+
|
996
|
+
@param path SkPath to combine with clip
|
997
|
+
@param op SkClipOp to apply to clip
|
998
|
+
*/
|
999
|
+
void clipPath(const SkPath& path, SkClipOp op) {
|
1000
|
+
this->clipPath(path, op, false);
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
/** Replaces clip with the intersection of clip and path.
|
1004
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
1005
|
+
SkPath::FillType determines if path
|
1006
|
+
describes the area inside or outside its contours; and if path contour overlaps
|
1007
|
+
itself or another path contour, whether the overlaps form part of the area.
|
1008
|
+
path is transformed by SkMatrix before it is combined with clip.
|
1009
|
+
|
1010
|
+
@param path SkPath to combine with clip
|
1011
|
+
@param doAntiAlias true if clip is to be anti-aliased
|
1012
|
+
*/
|
1013
|
+
void clipPath(const SkPath& path, bool doAntiAlias = false) {
|
1014
|
+
this->clipPath(path, SkClipOp::kIntersect, doAntiAlias);
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
void clipShader(sk_sp<SkShader>, SkClipOp = SkClipOp::kIntersect);
|
1018
|
+
|
1019
|
+
/** Replaces clip with the intersection or difference of clip and SkRegion deviceRgn.
|
1020
|
+
Resulting clip is aliased; pixels are fully contained by the clip.
|
1021
|
+
deviceRgn is unaffected by SkMatrix.
|
1022
|
+
|
1023
|
+
@param deviceRgn SkRegion to combine with clip
|
1024
|
+
@param op SkClipOp to apply to clip
|
1025
|
+
|
1026
|
+
example: https://fiddle.skia.org/c/@Canvas_clipRegion
|
1027
|
+
*/
|
1028
|
+
void clipRegion(const SkRegion& deviceRgn, SkClipOp op = SkClipOp::kIntersect);
|
1029
|
+
|
1030
|
+
/** Returns true if SkRect rect, transformed by SkMatrix, can be quickly determined to be
|
1031
|
+
outside of clip. May return false even though rect is outside of clip.
|
1032
|
+
|
1033
|
+
Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
|
1034
|
+
|
1035
|
+
@param rect SkRect to compare with clip
|
1036
|
+
@return true if rect, transformed by SkMatrix, does not intersect clip
|
1037
|
+
|
1038
|
+
example: https://fiddle.skia.org/c/@Canvas_quickReject
|
1039
|
+
*/
|
1040
|
+
bool quickReject(const SkRect& rect) const;
|
1041
|
+
|
1042
|
+
/** Returns true if path, transformed by SkMatrix, can be quickly determined to be
|
1043
|
+
outside of clip. May return false even though path is outside of clip.
|
1044
|
+
|
1045
|
+
Use to check if an area to be drawn is clipped out, to skip subsequent draw calls.
|
1046
|
+
|
1047
|
+
@param path SkPath to compare with clip
|
1048
|
+
@return true if path, transformed by SkMatrix, does not intersect clip
|
1049
|
+
|
1050
|
+
example: https://fiddle.skia.org/c/@Canvas_quickReject_2
|
1051
|
+
*/
|
1052
|
+
bool quickReject(const SkPath& path) const;
|
1053
|
+
|
1054
|
+
/** Returns bounds of clip, transformed by inverse of SkMatrix. If clip is empty,
|
1055
|
+
return SkRect::MakeEmpty, where all SkRect sides equal zero.
|
1056
|
+
|
1057
|
+
SkRect returned is outset by one to account for partial pixel coverage if clip
|
1058
|
+
is anti-aliased.
|
1059
|
+
|
1060
|
+
@return bounds of clip in local coordinates
|
1061
|
+
|
1062
|
+
example: https://fiddle.skia.org/c/@Canvas_getLocalClipBounds
|
1063
|
+
*/
|
1064
|
+
SkRect getLocalClipBounds() const;
|
1065
|
+
|
1066
|
+
/** Returns bounds of clip, transformed by inverse of SkMatrix. If clip is empty,
|
1067
|
+
return false, and set bounds to SkRect::MakeEmpty, where all SkRect sides equal zero.
|
1068
|
+
|
1069
|
+
bounds is outset by one to account for partial pixel coverage if clip
|
1070
|
+
is anti-aliased.
|
1071
|
+
|
1072
|
+
@param bounds SkRect of clip in local coordinates
|
1073
|
+
@return true if clip bounds is not empty
|
1074
|
+
*/
|
1075
|
+
bool getLocalClipBounds(SkRect* bounds) const {
|
1076
|
+
*bounds = this->getLocalClipBounds();
|
1077
|
+
return !bounds->isEmpty();
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
/** Returns SkIRect bounds of clip, unaffected by SkMatrix. If clip is empty,
|
1081
|
+
return SkRect::MakeEmpty, where all SkRect sides equal zero.
|
1082
|
+
|
1083
|
+
Unlike getLocalClipBounds(), returned SkIRect is not outset.
|
1084
|
+
|
1085
|
+
@return bounds of clip in SkBaseDevice coordinates
|
1086
|
+
|
1087
|
+
example: https://fiddle.skia.org/c/@Canvas_getDeviceClipBounds
|
1088
|
+
*/
|
1089
|
+
SkIRect getDeviceClipBounds() const;
|
1090
|
+
|
1091
|
+
/** Returns SkIRect bounds of clip, unaffected by SkMatrix. If clip is empty,
|
1092
|
+
return false, and set bounds to SkRect::MakeEmpty, where all SkRect sides equal zero.
|
1093
|
+
|
1094
|
+
Unlike getLocalClipBounds(), bounds is not outset.
|
1095
|
+
|
1096
|
+
@param bounds SkRect of clip in device coordinates
|
1097
|
+
@return true if clip bounds is not empty
|
1098
|
+
*/
|
1099
|
+
bool getDeviceClipBounds(SkIRect* bounds) const {
|
1100
|
+
*bounds = this->getDeviceClipBounds();
|
1101
|
+
return !bounds->isEmpty();
|
1102
|
+
}
|
1103
|
+
|
1104
|
+
/** Fills clip with color color.
|
1105
|
+
mode determines how ARGB is combined with destination.
|
1106
|
+
|
1107
|
+
@param color unpremultiplied ARGB
|
1108
|
+
@param mode SkBlendMode used to combine source color and destination
|
1109
|
+
|
1110
|
+
example: https://fiddle.skia.org/c/@Canvas_drawColor
|
1111
|
+
*/
|
1112
|
+
void drawColor(SkColor color, SkBlendMode mode = SkBlendMode::kSrcOver) {
|
1113
|
+
this->drawColor(SkColor4f::FromColor(color), mode);
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
/** Fills clip with color color.
|
1117
|
+
mode determines how ARGB is combined with destination.
|
1118
|
+
|
1119
|
+
@param color SkColor4f representing unpremultiplied color.
|
1120
|
+
@param mode SkBlendMode used to combine source color and destination
|
1121
|
+
*/
|
1122
|
+
void drawColor(const SkColor4f& color, SkBlendMode mode = SkBlendMode::kSrcOver);
|
1123
|
+
|
1124
|
+
/** Fills clip with color color using SkBlendMode::kSrc.
|
1125
|
+
This has the effect of replacing all pixels contained by clip with color.
|
1126
|
+
|
1127
|
+
@param color unpremultiplied ARGB
|
1128
|
+
*/
|
1129
|
+
void clear(SkColor color) {
|
1130
|
+
this->clear(SkColor4f::FromColor(color));
|
1131
|
+
}
|
1132
|
+
|
1133
|
+
/** Fills clip with color color using SkBlendMode::kSrc.
|
1134
|
+
This has the effect of replacing all pixels contained by clip with color.
|
1135
|
+
|
1136
|
+
@param color SkColor4f representing unpremultiplied color.
|
1137
|
+
*/
|
1138
|
+
void clear(const SkColor4f& color) {
|
1139
|
+
this->drawColor(color, SkBlendMode::kSrc);
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
/** Makes SkCanvas contents undefined. Subsequent calls that read SkCanvas pixels,
|
1143
|
+
such as drawing with SkBlendMode, return undefined results. discard() does
|
1144
|
+
not change clip or SkMatrix.
|
1145
|
+
|
1146
|
+
discard() may do nothing, depending on the implementation of SkSurface or SkBaseDevice
|
1147
|
+
that created SkCanvas.
|
1148
|
+
|
1149
|
+
discard() allows optimized performance on subsequent draws by removing
|
1150
|
+
cached data associated with SkSurface or SkBaseDevice.
|
1151
|
+
It is not necessary to call discard() once done with SkCanvas;
|
1152
|
+
any cached data is deleted when owning SkSurface or SkBaseDevice is deleted.
|
1153
|
+
*/
|
1154
|
+
void discard() { this->onDiscard(); }
|
1155
|
+
|
1156
|
+
/** Fills clip with SkPaint paint. SkPaint components, SkShader,
|
1157
|
+
SkColorFilter, SkImageFilter, and SkBlendMode affect drawing;
|
1158
|
+
SkMaskFilter and SkPathEffect in paint are ignored.
|
1159
|
+
|
1160
|
+
@param paint graphics state used to fill SkCanvas
|
1161
|
+
|
1162
|
+
example: https://fiddle.skia.org/c/@Canvas_drawPaint
|
1163
|
+
*/
|
1164
|
+
void drawPaint(const SkPaint& paint);
|
1165
|
+
|
1166
|
+
/** \enum SkCanvas::PointMode
|
1167
|
+
Selects if an array of points are drawn as discrete points, as lines, or as
|
1168
|
+
an open polygon.
|
1169
|
+
*/
|
1170
|
+
enum PointMode {
|
1171
|
+
kPoints_PointMode, //!< draw each point separately
|
1172
|
+
kLines_PointMode, //!< draw each pair of points as a line segment
|
1173
|
+
kPolygon_PointMode, //!< draw the array of points as a open polygon
|
1174
|
+
};
|
1175
|
+
|
1176
|
+
/** Draws pts using clip, SkMatrix and SkPaint paint.
|
1177
|
+
count is the number of points; if count is less than one, has no effect.
|
1178
|
+
mode may be one of: kPoints_PointMode, kLines_PointMode, or kPolygon_PointMode.
|
1179
|
+
|
1180
|
+
If mode is kPoints_PointMode, the shape of point drawn depends on paint
|
1181
|
+
SkPaint::Cap. If paint is set to SkPaint::kRound_Cap, each point draws a
|
1182
|
+
circle of diameter SkPaint stroke width. If paint is set to SkPaint::kSquare_Cap
|
1183
|
+
or SkPaint::kButt_Cap, each point draws a square of width and height
|
1184
|
+
SkPaint stroke width.
|
1185
|
+
|
1186
|
+
If mode is kLines_PointMode, each pair of points draws a line segment.
|
1187
|
+
One line is drawn for every two points; each point is used once. If count is odd,
|
1188
|
+
the final point is ignored.
|
1189
|
+
|
1190
|
+
If mode is kPolygon_PointMode, each adjacent pair of points draws a line segment.
|
1191
|
+
count minus one lines are drawn; the first and last point are used once.
|
1192
|
+
|
1193
|
+
Each line segment respects paint SkPaint::Cap and SkPaint stroke width.
|
1194
|
+
SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.
|
1195
|
+
|
1196
|
+
Always draws each element one at a time; is not affected by
|
1197
|
+
SkPaint::Join, and unlike drawPath(), does not create a mask from all points
|
1198
|
+
and lines before drawing.
|
1199
|
+
|
1200
|
+
@param mode whether pts draws points or lines
|
1201
|
+
@param count number of points in the array
|
1202
|
+
@param pts array of points to draw
|
1203
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1204
|
+
|
1205
|
+
example: https://fiddle.skia.org/c/@Canvas_drawPoints
|
1206
|
+
*/
|
1207
|
+
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint& paint);
|
1208
|
+
|
1209
|
+
/** Draws point at (x, y) using clip, SkMatrix and SkPaint paint.
|
1210
|
+
|
1211
|
+
The shape of point drawn depends on paint SkPaint::Cap.
|
1212
|
+
If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
|
1213
|
+
SkPaint stroke width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
|
1214
|
+
draw a square of width and height SkPaint stroke width.
|
1215
|
+
SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.
|
1216
|
+
|
1217
|
+
@param x left edge of circle or square
|
1218
|
+
@param y top edge of circle or square
|
1219
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1220
|
+
|
1221
|
+
example: https://fiddle.skia.org/c/@Canvas_drawPoint
|
1222
|
+
*/
|
1223
|
+
void drawPoint(SkScalar x, SkScalar y, const SkPaint& paint);
|
1224
|
+
|
1225
|
+
/** Draws point p using clip, SkMatrix and SkPaint paint.
|
1226
|
+
|
1227
|
+
The shape of point drawn depends on paint SkPaint::Cap.
|
1228
|
+
If paint is set to SkPaint::kRound_Cap, draw a circle of diameter
|
1229
|
+
SkPaint stroke width. If paint is set to SkPaint::kSquare_Cap or SkPaint::kButt_Cap,
|
1230
|
+
draw a square of width and height SkPaint stroke width.
|
1231
|
+
SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.
|
1232
|
+
|
1233
|
+
@param p top-left edge of circle or square
|
1234
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1235
|
+
*/
|
1236
|
+
void drawPoint(SkPoint p, const SkPaint& paint) {
|
1237
|
+
this->drawPoint(p.x(), p.y(), paint);
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
/** Draws line segment from (x0, y0) to (x1, y1) using clip, SkMatrix, and SkPaint paint.
|
1241
|
+
In paint: SkPaint stroke width describes the line thickness;
|
1242
|
+
SkPaint::Cap draws the end rounded or square;
|
1243
|
+
SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.
|
1244
|
+
|
1245
|
+
@param x0 start of line segment on x-axis
|
1246
|
+
@param y0 start of line segment on y-axis
|
1247
|
+
@param x1 end of line segment on x-axis
|
1248
|
+
@param y1 end of line segment on y-axis
|
1249
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1250
|
+
|
1251
|
+
example: https://fiddle.skia.org/c/@Canvas_drawLine
|
1252
|
+
*/
|
1253
|
+
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint& paint);
|
1254
|
+
|
1255
|
+
/** Draws line segment from p0 to p1 using clip, SkMatrix, and SkPaint paint.
|
1256
|
+
In paint: SkPaint stroke width describes the line thickness;
|
1257
|
+
SkPaint::Cap draws the end rounded or square;
|
1258
|
+
SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.
|
1259
|
+
|
1260
|
+
@param p0 start of line segment
|
1261
|
+
@param p1 end of line segment
|
1262
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1263
|
+
*/
|
1264
|
+
void drawLine(SkPoint p0, SkPoint p1, const SkPaint& paint) {
|
1265
|
+
this->drawLine(p0.x(), p0.y(), p1.x(), p1.y(), paint);
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
/** Draws SkRect rect using clip, SkMatrix, and SkPaint paint.
|
1269
|
+
In paint: SkPaint::Style determines if rectangle is stroked or filled;
|
1270
|
+
if stroked, SkPaint stroke width describes the line thickness, and
|
1271
|
+
SkPaint::Join draws the corners rounded or square.
|
1272
|
+
|
1273
|
+
@param rect rectangle to draw
|
1274
|
+
@param paint stroke or fill, blend, color, and so on, used to draw
|
1275
|
+
|
1276
|
+
example: https://fiddle.skia.org/c/@Canvas_drawRect
|
1277
|
+
*/
|
1278
|
+
void drawRect(const SkRect& rect, const SkPaint& paint);
|
1279
|
+
|
1280
|
+
/** Draws SkIRect rect using clip, SkMatrix, and SkPaint paint.
|
1281
|
+
In paint: SkPaint::Style determines if rectangle is stroked or filled;
|
1282
|
+
if stroked, SkPaint stroke width describes the line thickness, and
|
1283
|
+
SkPaint::Join draws the corners rounded or square.
|
1284
|
+
|
1285
|
+
@param rect rectangle to draw
|
1286
|
+
@param paint stroke or fill, blend, color, and so on, used to draw
|
1287
|
+
*/
|
1288
|
+
void drawIRect(const SkIRect& rect, const SkPaint& paint) {
|
1289
|
+
SkRect r;
|
1290
|
+
r.set(rect); // promotes the ints to scalars
|
1291
|
+
this->drawRect(r, paint);
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
/** Draws SkRegion region using clip, SkMatrix, and SkPaint paint.
|
1295
|
+
In paint: SkPaint::Style determines if rectangle is stroked or filled;
|
1296
|
+
if stroked, SkPaint stroke width describes the line thickness, and
|
1297
|
+
SkPaint::Join draws the corners rounded or square.
|
1298
|
+
|
1299
|
+
@param region region to draw
|
1300
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1301
|
+
|
1302
|
+
example: https://fiddle.skia.org/c/@Canvas_drawRegion
|
1303
|
+
*/
|
1304
|
+
void drawRegion(const SkRegion& region, const SkPaint& paint);
|
1305
|
+
|
1306
|
+
/** Draws oval oval using clip, SkMatrix, and SkPaint.
|
1307
|
+
In paint: SkPaint::Style determines if oval is stroked or filled;
|
1308
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1309
|
+
|
1310
|
+
@param oval SkRect bounds of oval
|
1311
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1312
|
+
|
1313
|
+
example: https://fiddle.skia.org/c/@Canvas_drawOval
|
1314
|
+
*/
|
1315
|
+
void drawOval(const SkRect& oval, const SkPaint& paint);
|
1316
|
+
|
1317
|
+
/** Draws SkRRect rrect using clip, SkMatrix, and SkPaint paint.
|
1318
|
+
In paint: SkPaint::Style determines if rrect is stroked or filled;
|
1319
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1320
|
+
|
1321
|
+
rrect may represent a rectangle, circle, oval, uniformly rounded rectangle, or
|
1322
|
+
may have any combination of positive non-square radii for the four corners.
|
1323
|
+
|
1324
|
+
@param rrect SkRRect with up to eight corner radii to draw
|
1325
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1326
|
+
|
1327
|
+
example: https://fiddle.skia.org/c/@Canvas_drawRRect
|
1328
|
+
*/
|
1329
|
+
void drawRRect(const SkRRect& rrect, const SkPaint& paint);
|
1330
|
+
|
1331
|
+
/** Draws SkRRect outer and inner
|
1332
|
+
using clip, SkMatrix, and SkPaint paint.
|
1333
|
+
outer must contain inner or the drawing is undefined.
|
1334
|
+
In paint: SkPaint::Style determines if SkRRect is stroked or filled;
|
1335
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1336
|
+
If stroked and SkRRect corner has zero length radii, SkPaint::Join can
|
1337
|
+
draw corners rounded or square.
|
1338
|
+
|
1339
|
+
GPU-backed platforms optimize drawing when both outer and inner are
|
1340
|
+
concave and outer contains inner. These platforms may not be able to draw
|
1341
|
+
SkPath built with identical data as fast.
|
1342
|
+
|
1343
|
+
@param outer SkRRect outer bounds to draw
|
1344
|
+
@param inner SkRRect inner bounds to draw
|
1345
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1346
|
+
|
1347
|
+
example: https://fiddle.skia.org/c/@Canvas_drawDRRect_a
|
1348
|
+
example: https://fiddle.skia.org/c/@Canvas_drawDRRect_b
|
1349
|
+
*/
|
1350
|
+
void drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint);
|
1351
|
+
|
1352
|
+
/** Draws circle at (cx, cy) with radius using clip, SkMatrix, and SkPaint paint.
|
1353
|
+
If radius is zero or less, nothing is drawn.
|
1354
|
+
In paint: SkPaint::Style determines if circle is stroked or filled;
|
1355
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1356
|
+
|
1357
|
+
@param cx circle center on the x-axis
|
1358
|
+
@param cy circle center on the y-axis
|
1359
|
+
@param radius half the diameter of circle
|
1360
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1361
|
+
|
1362
|
+
example: https://fiddle.skia.org/c/@Canvas_drawCircle
|
1363
|
+
*/
|
1364
|
+
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint& paint);
|
1365
|
+
|
1366
|
+
/** Draws circle at center with radius using clip, SkMatrix, and SkPaint paint.
|
1367
|
+
If radius is zero or less, nothing is drawn.
|
1368
|
+
In paint: SkPaint::Style determines if circle is stroked or filled;
|
1369
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1370
|
+
|
1371
|
+
@param center circle center
|
1372
|
+
@param radius half the diameter of circle
|
1373
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1374
|
+
*/
|
1375
|
+
void drawCircle(SkPoint center, SkScalar radius, const SkPaint& paint) {
|
1376
|
+
this->drawCircle(center.x(), center.y(), radius, paint);
|
1377
|
+
}
|
1378
|
+
|
1379
|
+
/** Draws arc using clip, SkMatrix, and SkPaint paint.
|
1380
|
+
|
1381
|
+
Arc is part of oval bounded by oval, sweeping from startAngle to startAngle plus
|
1382
|
+
sweepAngle. startAngle and sweepAngle are in degrees.
|
1383
|
+
|
1384
|
+
startAngle of zero places start point at the right middle edge of oval.
|
1385
|
+
A positive sweepAngle places arc end point clockwise from start point;
|
1386
|
+
a negative sweepAngle places arc end point counterclockwise from start point.
|
1387
|
+
sweepAngle may exceed 360 degrees, a full circle.
|
1388
|
+
If useCenter is true, draw a wedge that includes lines from oval
|
1389
|
+
center to arc end points. If useCenter is false, draw arc between end points.
|
1390
|
+
|
1391
|
+
If SkRect oval is empty or sweepAngle is zero, nothing is drawn.
|
1392
|
+
|
1393
|
+
@param oval SkRect bounds of oval containing arc to draw
|
1394
|
+
@param startAngle angle in degrees where arc begins
|
1395
|
+
@param sweepAngle sweep angle in degrees; positive is clockwise
|
1396
|
+
@param useCenter if true, include the center of the oval
|
1397
|
+
@param paint SkPaint stroke or fill, blend, color, and so on, used to draw
|
1398
|
+
*/
|
1399
|
+
void drawArc(const SkRect& oval, SkScalar startAngle, SkScalar sweepAngle,
|
1400
|
+
bool useCenter, const SkPaint& paint);
|
1401
|
+
|
1402
|
+
/** Draws SkRRect bounded by SkRect rect, with corner radii (rx, ry) using clip,
|
1403
|
+
SkMatrix, and SkPaint paint.
|
1404
|
+
|
1405
|
+
In paint: SkPaint::Style determines if SkRRect is stroked or filled;
|
1406
|
+
if stroked, SkPaint stroke width describes the line thickness.
|
1407
|
+
If rx or ry are less than zero, they are treated as if they are zero.
|
1408
|
+
If rx plus ry exceeds rect width or rect height, radii are scaled down to fit.
|
1409
|
+
If rx and ry are zero, SkRRect is drawn as SkRect and if stroked is affected by
|
1410
|
+
SkPaint::Join.
|
1411
|
+
|
1412
|
+
@param rect SkRect bounds of SkRRect to draw
|
1413
|
+
@param rx axis length on x-axis of oval describing rounded corners
|
1414
|
+
@param ry axis length on y-axis of oval describing rounded corners
|
1415
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1416
|
+
|
1417
|
+
example: https://fiddle.skia.org/c/@Canvas_drawRoundRect
|
1418
|
+
*/
|
1419
|
+
void drawRoundRect(const SkRect& rect, SkScalar rx, SkScalar ry, const SkPaint& paint);
|
1420
|
+
|
1421
|
+
/** Draws SkPath path using clip, SkMatrix, and SkPaint paint.
|
1422
|
+
SkPath contains an array of path contour, each of which may be open or closed.
|
1423
|
+
|
1424
|
+
In paint: SkPaint::Style determines if SkRRect is stroked or filled:
|
1425
|
+
if filled, SkPath::FillType determines whether path contour describes inside or
|
1426
|
+
outside of fill; if stroked, SkPaint stroke width describes the line thickness,
|
1427
|
+
SkPaint::Cap describes line ends, and SkPaint::Join describes how
|
1428
|
+
corners are drawn.
|
1429
|
+
|
1430
|
+
@param path SkPath to draw
|
1431
|
+
@param paint stroke, blend, color, and so on, used to draw
|
1432
|
+
|
1433
|
+
example: https://fiddle.skia.org/c/@Canvas_drawPath
|
1434
|
+
*/
|
1435
|
+
void drawPath(const SkPath& path, const SkPaint& paint);
|
1436
|
+
|
1437
|
+
void drawImage(const SkImage* image, SkScalar left, SkScalar top) {
|
1438
|
+
this->drawImage(image, left, top, SkSamplingOptions(), nullptr);
|
1439
|
+
}
|
1440
|
+
void drawImage(const sk_sp<SkImage>& image, SkScalar left, SkScalar top) {
|
1441
|
+
this->drawImage(image.get(), left, top, SkSamplingOptions(), nullptr);
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
/** \enum SkCanvas::SrcRectConstraint
|
1445
|
+
SrcRectConstraint controls the behavior at the edge of source SkRect,
|
1446
|
+
provided to drawImageRect() when there is any filtering. If kStrict is set,
|
1447
|
+
then extra code is used to ensure it never samples outside of the src-rect.
|
1448
|
+
kStrict_SrcRectConstraint disables the use of mipmaps and anisotropic filtering.
|
1449
|
+
*/
|
1450
|
+
enum SrcRectConstraint {
|
1451
|
+
kStrict_SrcRectConstraint, //!< sample only inside bounds; slower
|
1452
|
+
kFast_SrcRectConstraint, //!< sample outside bounds; faster
|
1453
|
+
};
|
1454
|
+
|
1455
|
+
void drawImage(const SkImage*, SkScalar x, SkScalar y, const SkSamplingOptions&,
|
1456
|
+
const SkPaint* = nullptr);
|
1457
|
+
void drawImage(const sk_sp<SkImage>& image, SkScalar x, SkScalar y,
|
1458
|
+
const SkSamplingOptions& sampling, const SkPaint* paint = nullptr) {
|
1459
|
+
this->drawImage(image.get(), x, y, sampling, paint);
|
1460
|
+
}
|
1461
|
+
void drawImageRect(const SkImage*, const SkRect& src, const SkRect& dst,
|
1462
|
+
const SkSamplingOptions&, const SkPaint*, SrcRectConstraint);
|
1463
|
+
void drawImageRect(const SkImage*, const SkRect& dst, const SkSamplingOptions&,
|
1464
|
+
const SkPaint* = nullptr);
|
1465
|
+
void drawImageRect(const sk_sp<SkImage>& image, const SkRect& src, const SkRect& dst,
|
1466
|
+
const SkSamplingOptions& sampling, const SkPaint* paint,
|
1467
|
+
SrcRectConstraint constraint) {
|
1468
|
+
this->drawImageRect(image.get(), src, dst, sampling, paint, constraint);
|
1469
|
+
}
|
1470
|
+
void drawImageRect(const sk_sp<SkImage>& image, const SkRect& dst,
|
1471
|
+
const SkSamplingOptions& sampling, const SkPaint* paint = nullptr) {
|
1472
|
+
this->drawImageRect(image.get(), dst, sampling, paint);
|
1473
|
+
}
|
1474
|
+
|
1475
|
+
/** Draws SkImage image stretched proportionally to fit into SkRect dst.
|
1476
|
+
SkIRect center divides the image into nine sections: four sides, four corners, and
|
1477
|
+
the center. Corners are unmodified or scaled down proportionately if their sides
|
1478
|
+
are larger than dst; center and four sides are scaled to fit remaining space, if any.
|
1479
|
+
|
1480
|
+
Additionally transform draw using clip, SkMatrix, and optional SkPaint paint.
|
1481
|
+
|
1482
|
+
If SkPaint paint is supplied, apply SkColorFilter, alpha, SkImageFilter, and
|
1483
|
+
SkBlendMode. If image is kAlpha_8_SkColorType, apply SkShader.
|
1484
|
+
If paint contains SkMaskFilter, generate mask from image bounds.
|
1485
|
+
Any SkMaskFilter on paint is ignored as is paint anti-aliasing state.
|
1486
|
+
|
1487
|
+
If generated mask extends beyond image bounds, replicate image edge colors, just
|
1488
|
+
as SkShader made from SkImage::makeShader with SkShader::kClamp_TileMode set
|
1489
|
+
replicates the image edge color when it samples outside of its bounds.
|
1490
|
+
|
1491
|
+
@param image SkImage containing pixels, dimensions, and format
|
1492
|
+
@param center SkIRect edge of image corners and sides
|
1493
|
+
@param dst destination SkRect of image to draw to
|
1494
|
+
@param filter what technique to use when sampling the image
|
1495
|
+
@param paint SkPaint containing SkBlendMode, SkColorFilter, SkImageFilter,
|
1496
|
+
and so on; or nullptr
|
1497
|
+
*/
|
1498
|
+
void drawImageNine(const SkImage* image, const SkIRect& center, const SkRect& dst,
|
1499
|
+
SkFilterMode filter, const SkPaint* paint = nullptr);
|
1500
|
+
|
1501
|
+
/** \struct SkCanvas::Lattice
|
1502
|
+
SkCanvas::Lattice divides SkBitmap or SkImage into a rectangular grid.
|
1503
|
+
Grid entries on even columns and even rows are fixed; these entries are
|
1504
|
+
always drawn at their original size if the destination is large enough.
|
1505
|
+
If the destination side is too small to hold the fixed entries, all fixed
|
1506
|
+
entries are proportionately scaled down to fit.
|
1507
|
+
The grid entries not on even columns and rows are scaled to fit the
|
1508
|
+
remaining space, if any.
|
1509
|
+
*/
|
1510
|
+
struct Lattice {
|
1511
|
+
|
1512
|
+
/** \enum SkCanvas::Lattice::RectType
|
1513
|
+
Optional setting per rectangular grid entry to make it transparent,
|
1514
|
+
or to fill the grid entry with a color.
|
1515
|
+
*/
|
1516
|
+
enum RectType : uint8_t {
|
1517
|
+
kDefault = 0, //!< draws SkBitmap into lattice rectangle
|
1518
|
+
kTransparent, //!< skips lattice rectangle by making it transparent
|
1519
|
+
kFixedColor, //!< draws one of fColors into lattice rectangle
|
1520
|
+
};
|
1521
|
+
|
1522
|
+
const int* fXDivs; //!< x-axis values dividing bitmap
|
1523
|
+
const int* fYDivs; //!< y-axis values dividing bitmap
|
1524
|
+
const RectType* fRectTypes; //!< array of fill types
|
1525
|
+
int fXCount; //!< number of x-coordinates
|
1526
|
+
int fYCount; //!< number of y-coordinates
|
1527
|
+
const SkIRect* fBounds; //!< source bounds to draw from
|
1528
|
+
const SkColor* fColors; //!< array of colors
|
1529
|
+
};
|
1530
|
+
|
1531
|
+
/** Draws SkImage image stretched proportionally to fit into SkRect dst.
|
1532
|
+
|
1533
|
+
SkCanvas::Lattice lattice divides image into a rectangular grid.
|
1534
|
+
Each intersection of an even-numbered row and column is fixed;
|
1535
|
+
fixed lattice elements never scale larger than their initial
|
1536
|
+
size and shrink proportionately when all fixed elements exceed the bitmap
|
1537
|
+
dimension. All other grid elements scale to fill the available space, if any.
|
1538
|
+
|
1539
|
+
Additionally transform draw using clip, SkMatrix, and optional SkPaint paint.
|
1540
|
+
|
1541
|
+
If SkPaint paint is supplied, apply SkColorFilter, alpha, SkImageFilter, and
|
1542
|
+
SkBlendMode. If image is kAlpha_8_SkColorType, apply SkShader.
|
1543
|
+
If paint contains SkMaskFilter, generate mask from image bounds.
|
1544
|
+
Any SkMaskFilter on paint is ignored as is paint anti-aliasing state.
|
1545
|
+
|
1546
|
+
If generated mask extends beyond bitmap bounds, replicate bitmap edge colors,
|
1547
|
+
just as SkShader made from SkShader::MakeBitmapShader with
|
1548
|
+
SkShader::kClamp_TileMode set replicates the bitmap edge color when it samples
|
1549
|
+
outside of its bounds.
|
1550
|
+
|
1551
|
+
@param image SkImage containing pixels, dimensions, and format
|
1552
|
+
@param lattice division of bitmap into fixed and variable rectangles
|
1553
|
+
@param dst destination SkRect of image to draw to
|
1554
|
+
@param filter what technique to use when sampling the image
|
1555
|
+
@param paint SkPaint containing SkBlendMode, SkColorFilter, SkImageFilter,
|
1556
|
+
and so on; or nullptr
|
1557
|
+
*/
|
1558
|
+
void drawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst,
|
1559
|
+
SkFilterMode filter, const SkPaint* paint = nullptr);
|
1560
|
+
void drawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& dst) {
|
1561
|
+
this->drawImageLattice(image, lattice, dst, SkFilterMode::kNearest, nullptr);
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
/**
|
1565
|
+
* Experimental. Controls anti-aliasing of each edge of images in an image-set.
|
1566
|
+
*/
|
1567
|
+
enum QuadAAFlags : unsigned {
|
1568
|
+
kLeft_QuadAAFlag = 0b0001,
|
1569
|
+
kTop_QuadAAFlag = 0b0010,
|
1570
|
+
kRight_QuadAAFlag = 0b0100,
|
1571
|
+
kBottom_QuadAAFlag = 0b1000,
|
1572
|
+
|
1573
|
+
kNone_QuadAAFlags = 0b0000,
|
1574
|
+
kAll_QuadAAFlags = 0b1111,
|
1575
|
+
};
|
1576
|
+
|
1577
|
+
/** This is used by the experimental API below. */
|
1578
|
+
struct SK_API ImageSetEntry {
|
1579
|
+
ImageSetEntry(sk_sp<const SkImage> image, const SkRect& srcRect, const SkRect& dstRect,
|
1580
|
+
int matrixIndex, float alpha, unsigned aaFlags, bool hasClip);
|
1581
|
+
|
1582
|
+
ImageSetEntry(sk_sp<const SkImage> image, const SkRect& srcRect, const SkRect& dstRect,
|
1583
|
+
float alpha, unsigned aaFlags);
|
1584
|
+
|
1585
|
+
ImageSetEntry();
|
1586
|
+
~ImageSetEntry();
|
1587
|
+
ImageSetEntry(const ImageSetEntry&);
|
1588
|
+
ImageSetEntry& operator=(const ImageSetEntry&);
|
1589
|
+
|
1590
|
+
sk_sp<const SkImage> fImage;
|
1591
|
+
SkRect fSrcRect;
|
1592
|
+
SkRect fDstRect;
|
1593
|
+
int fMatrixIndex = -1; // Index into the preViewMatrices arg, or < 0
|
1594
|
+
float fAlpha = 1.f;
|
1595
|
+
unsigned fAAFlags = kNone_QuadAAFlags; // QuadAAFlags
|
1596
|
+
bool fHasClip = false; // True to use next 4 points in dstClip arg as quad
|
1597
|
+
};
|
1598
|
+
|
1599
|
+
/**
|
1600
|
+
* This is an experimental API for the SkiaRenderer Chromium project, and its API will surely
|
1601
|
+
* evolve if it is not removed outright.
|
1602
|
+
*
|
1603
|
+
* This behaves very similarly to drawRect() combined with a clipPath() formed by clip
|
1604
|
+
* quadrilateral. 'rect' and 'clip' are in the same coordinate space. If 'clip' is null, then it
|
1605
|
+
* is as if the rectangle was not clipped (or, alternatively, clipped to itself). If not null,
|
1606
|
+
* then it must provide 4 points.
|
1607
|
+
*
|
1608
|
+
* In addition to combining the draw and clipping into one operation, this function adds the
|
1609
|
+
* additional capability of controlling each of the rectangle's edges anti-aliasing
|
1610
|
+
* independently. The edges of the clip will respect the per-edge AA flags. It is required that
|
1611
|
+
* 'clip' be contained inside 'rect'. In terms of mapping to edge labels, the 'clip' points
|
1612
|
+
* should be ordered top-left, top-right, bottom-right, bottom-left so that the edge between [0]
|
1613
|
+
* and [1] is "top", [1] and [2] is "right", [2] and [3] is "bottom", and [3] and [0] is "left".
|
1614
|
+
* This ordering matches SkRect::toQuad().
|
1615
|
+
*
|
1616
|
+
* This API only draws solid color, filled rectangles so it does not accept a full SkPaint.
|
1617
|
+
*/
|
1618
|
+
void experimental_DrawEdgeAAQuad(const SkRect& rect, const SkPoint clip[4], QuadAAFlags aaFlags,
|
1619
|
+
const SkColor4f& color, SkBlendMode mode);
|
1620
|
+
void experimental_DrawEdgeAAQuad(const SkRect& rect, const SkPoint clip[4], QuadAAFlags aaFlags,
|
1621
|
+
SkColor color, SkBlendMode mode) {
|
1622
|
+
this->experimental_DrawEdgeAAQuad(rect, clip, aaFlags, SkColor4f::FromColor(color), mode);
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
/**
|
1626
|
+
* This is an bulk variant of experimental_DrawEdgeAAQuad() that renders 'cnt' textured quads.
|
1627
|
+
* For each entry, 'fDstRect' is rendered with its clip (determined by entry's 'fHasClip' and
|
1628
|
+
* the current index in 'dstClip'). The entry's fImage is applied to the destination rectangle
|
1629
|
+
* by sampling from 'fSrcRect' sub-image. The corners of 'fSrcRect' map to the corners of
|
1630
|
+
* 'fDstRect', just like in drawImageRect(), and they will be properly interpolated when
|
1631
|
+
* applying a clip.
|
1632
|
+
*
|
1633
|
+
* Like experimental_DrawEdgeAAQuad(), each entry can specify edge AA flags that apply to both
|
1634
|
+
* the destination rect and its clip.
|
1635
|
+
*
|
1636
|
+
* If provided, the 'dstClips' array must have length equal 4 * the number of entries with
|
1637
|
+
* fHasClip true. If 'dstClips' is null, every entry must have 'fHasClip' set to false. The
|
1638
|
+
* destination clip coordinates will be read consecutively with the image set entries, advancing
|
1639
|
+
* by 4 points every time an entry with fHasClip is passed.
|
1640
|
+
*
|
1641
|
+
* This entry point supports per-entry manipulations to the canvas's current matrix. If an
|
1642
|
+
* entry provides 'fMatrixIndex' >= 0, it will be drawn as if the canvas's CTM was
|
1643
|
+
* canvas->getTotalMatrix() * preViewMatrices[fMatrixIndex]. If 'fMatrixIndex' is less than 0,
|
1644
|
+
* the pre-view matrix transform is implicitly the identity, so it will be drawn using just the
|
1645
|
+
* current canvas matrix. The pre-view matrix modifies the canvas's view matrix, it does not
|
1646
|
+
* affect the local coordinates of each entry.
|
1647
|
+
*
|
1648
|
+
* An optional paint may be provided, which supports the same subset of features usable with
|
1649
|
+
* drawImageRect (i.e. assumed to be filled and no path effects). When a paint is provided, the
|
1650
|
+
* image set is drawn as if each image used the applied paint independently, so each is affected
|
1651
|
+
* by the image, color, and/or mask filter.
|
1652
|
+
*/
|
1653
|
+
void experimental_DrawEdgeAAImageSet(const ImageSetEntry imageSet[], int cnt,
|
1654
|
+
const SkPoint dstClips[], const SkMatrix preViewMatrices[],
|
1655
|
+
const SkSamplingOptions&, const SkPaint* paint = nullptr,
|
1656
|
+
SrcRectConstraint constraint = kStrict_SrcRectConstraint);
|
1657
|
+
|
1658
|
+
/** Draws text, with origin at (x, y), using clip, SkMatrix, SkFont font,
|
1659
|
+
and SkPaint paint.
|
1660
|
+
|
1661
|
+
When encoding is SkTextEncoding::kUTF8, SkTextEncoding::kUTF16, or
|
1662
|
+
SkTextEncoding::kUTF32, this function uses the default
|
1663
|
+
character-to-glyph mapping from the SkTypeface in font. It does not
|
1664
|
+
perform typeface fallback for characters not found in the SkTypeface.
|
1665
|
+
It does not perform kerning or other complex shaping; glyphs are
|
1666
|
+
positioned based on their default advances.
|
1667
|
+
|
1668
|
+
Text meaning depends on SkTextEncoding.
|
1669
|
+
|
1670
|
+
Text size is affected by SkMatrix and SkFont text size. Default text
|
1671
|
+
size is 12 point.
|
1672
|
+
|
1673
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1674
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1675
|
+
default, draws filled black glyphs.
|
1676
|
+
|
1677
|
+
@param text character code points or glyphs drawn
|
1678
|
+
@param byteLength byte length of text array
|
1679
|
+
@param encoding text encoding used in the text array
|
1680
|
+
@param x start of text on x-axis
|
1681
|
+
@param y start of text on y-axis
|
1682
|
+
@param font typeface, text size and so, used to describe the text
|
1683
|
+
@param paint blend, color, and so on, used to draw
|
1684
|
+
*/
|
1685
|
+
void drawSimpleText(const void* text, size_t byteLength, SkTextEncoding encoding,
|
1686
|
+
SkScalar x, SkScalar y, const SkFont& font, const SkPaint& paint);
|
1687
|
+
|
1688
|
+
/** Draws null terminated string, with origin at (x, y), using clip, SkMatrix,
|
1689
|
+
SkFont font, and SkPaint paint.
|
1690
|
+
|
1691
|
+
This function uses the default character-to-glyph mapping from the
|
1692
|
+
SkTypeface in font. It does not perform typeface fallback for
|
1693
|
+
characters not found in the SkTypeface. It does not perform kerning;
|
1694
|
+
glyphs are positioned based on their default advances.
|
1695
|
+
|
1696
|
+
String str is encoded as UTF-8.
|
1697
|
+
|
1698
|
+
Text size is affected by SkMatrix and font text size. Default text
|
1699
|
+
size is 12 point.
|
1700
|
+
|
1701
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1702
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1703
|
+
default, draws filled black glyphs.
|
1704
|
+
|
1705
|
+
@param str character code points drawn,
|
1706
|
+
ending with a char value of zero
|
1707
|
+
@param x start of string on x-axis
|
1708
|
+
@param y start of string on y-axis
|
1709
|
+
@param font typeface, text size and so, used to describe the text
|
1710
|
+
@param paint blend, color, and so on, used to draw
|
1711
|
+
*/
|
1712
|
+
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont& font,
|
1713
|
+
const SkPaint& paint) {
|
1714
|
+
this->drawSimpleText(str, strlen(str), SkTextEncoding::kUTF8, x, y, font, paint);
|
1715
|
+
}
|
1716
|
+
|
1717
|
+
/** Draws SkString, with origin at (x, y), using clip, SkMatrix, SkFont font,
|
1718
|
+
and SkPaint paint.
|
1719
|
+
|
1720
|
+
This function uses the default character-to-glyph mapping from the
|
1721
|
+
SkTypeface in font. It does not perform typeface fallback for
|
1722
|
+
characters not found in the SkTypeface. It does not perform kerning;
|
1723
|
+
glyphs are positioned based on their default advances.
|
1724
|
+
|
1725
|
+
SkString str is encoded as UTF-8.
|
1726
|
+
|
1727
|
+
Text size is affected by SkMatrix and SkFont text size. Default text
|
1728
|
+
size is 12 point.
|
1729
|
+
|
1730
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1731
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1732
|
+
default, draws filled black glyphs.
|
1733
|
+
|
1734
|
+
@param str character code points drawn,
|
1735
|
+
ending with a char value of zero
|
1736
|
+
@param x start of string on x-axis
|
1737
|
+
@param y start of string on y-axis
|
1738
|
+
@param font typeface, text size and so, used to describe the text
|
1739
|
+
@param paint blend, color, and so on, used to draw
|
1740
|
+
*/
|
1741
|
+
void drawString(const SkString& str, SkScalar x, SkScalar y, const SkFont& font,
|
1742
|
+
const SkPaint& paint) {
|
1743
|
+
this->drawSimpleText(str.c_str(), str.size(), SkTextEncoding::kUTF8, x, y, font, paint);
|
1744
|
+
}
|
1745
|
+
|
1746
|
+
/** Draws count glyphs, at positions relative to origin styled with font and paint with
|
1747
|
+
supporting utf8 and cluster information.
|
1748
|
+
|
1749
|
+
This function draw glyphs at the given positions relative to the given origin.
|
1750
|
+
It does not perform typeface fallback for glyphs not found in the SkTypeface in font.
|
1751
|
+
|
1752
|
+
The drawing obeys the current transform matrix and clipping.
|
1753
|
+
|
1754
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1755
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1756
|
+
default, draws filled black glyphs.
|
1757
|
+
|
1758
|
+
@param count number of glyphs to draw
|
1759
|
+
@param glyphs the array of glyphIDs to draw
|
1760
|
+
@param positions where to draw each glyph relative to origin
|
1761
|
+
@param clusters array of size count of cluster information
|
1762
|
+
@param textByteCount size of the utf8text
|
1763
|
+
@param utf8text utf8text supporting information for the glyphs
|
1764
|
+
@param origin the origin of all the positions
|
1765
|
+
@param font typeface, text size and so, used to describe the text
|
1766
|
+
@param paint blend, color, and so on, used to draw
|
1767
|
+
*/
|
1768
|
+
void drawGlyphs(int count, const SkGlyphID glyphs[], const SkPoint positions[],
|
1769
|
+
const uint32_t clusters[], int textByteCount, const char utf8text[],
|
1770
|
+
SkPoint origin, const SkFont& font, const SkPaint& paint);
|
1771
|
+
|
1772
|
+
/** Draws count glyphs, at positions relative to origin styled with font and paint.
|
1773
|
+
|
1774
|
+
This function draw glyphs at the given positions relative to the given origin.
|
1775
|
+
It does not perform typeface fallback for glyphs not found in the SkTypeface in font.
|
1776
|
+
|
1777
|
+
The drawing obeys the current transform matrix and clipping.
|
1778
|
+
|
1779
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1780
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1781
|
+
default, draws filled black glyphs.
|
1782
|
+
|
1783
|
+
@param count number of glyphs to draw
|
1784
|
+
@param glyphs the array of glyphIDs to draw
|
1785
|
+
@param positions where to draw each glyph relative to origin
|
1786
|
+
@param origin the origin of all the positions
|
1787
|
+
@param font typeface, text size and so, used to describe the text
|
1788
|
+
@param paint blend, color, and so on, used to draw
|
1789
|
+
*/
|
1790
|
+
void drawGlyphs(int count, const SkGlyphID glyphs[], const SkPoint positions[],
|
1791
|
+
SkPoint origin, const SkFont& font, const SkPaint& paint);
|
1792
|
+
|
1793
|
+
/** Draws count glyphs, at positions relative to origin styled with font and paint.
|
1794
|
+
|
1795
|
+
This function draw glyphs using the given scaling and rotations. They are positioned
|
1796
|
+
relative to the given origin. It does not perform typeface fallback for glyphs not found
|
1797
|
+
in the SkTypeface in font.
|
1798
|
+
|
1799
|
+
The drawing obeys the current transform matrix and clipping.
|
1800
|
+
|
1801
|
+
All elements of paint: SkPathEffect, SkMaskFilter, SkShader,
|
1802
|
+
SkColorFilter, and SkImageFilter; apply to text. By
|
1803
|
+
default, draws filled black glyphs.
|
1804
|
+
|
1805
|
+
@param count number of glyphs to draw
|
1806
|
+
@param glyphs the array of glyphIDs to draw
|
1807
|
+
@param xforms where to draw and orient each glyph
|
1808
|
+
@param origin the origin of all the positions
|
1809
|
+
@param font typeface, text size and so, used to describe the text
|
1810
|
+
@param paint blend, color, and so on, used to draw
|
1811
|
+
*/
|
1812
|
+
void drawGlyphs(int count, const SkGlyphID glyphs[], const SkRSXform xforms[],
|
1813
|
+
SkPoint origin, const SkFont& font, const SkPaint& paint);
|
1814
|
+
|
1815
|
+
/** Draws SkTextBlob blob at (x, y), using clip, SkMatrix, and SkPaint paint.
|
1816
|
+
|
1817
|
+
blob contains glyphs, their positions, and paint attributes specific to text:
|
1818
|
+
SkTypeface, SkPaint text size, SkPaint text scale x,
|
1819
|
+
SkPaint text skew x, SkPaint::Align, SkPaint::Hinting, anti-alias, SkPaint fake bold,
|
1820
|
+
SkPaint font embedded bitmaps, SkPaint full hinting spacing, LCD text, SkPaint linear text,
|
1821
|
+
and SkPaint subpixel text.
|
1822
|
+
|
1823
|
+
SkTextEncoding must be set to SkTextEncoding::kGlyphID.
|
1824
|
+
|
1825
|
+
Elements of paint: anti-alias, SkBlendMode, color including alpha,
|
1826
|
+
SkColorFilter, SkPaint dither, SkMaskFilter, SkPathEffect, SkShader, and
|
1827
|
+
SkPaint::Style; apply to blob. If SkPaint contains SkPaint::kStroke_Style:
|
1828
|
+
SkPaint miter limit, SkPaint::Cap, SkPaint::Join, and SkPaint stroke width;
|
1829
|
+
apply to SkPath created from blob.
|
1830
|
+
|
1831
|
+
@param blob glyphs, positions, and their paints' text size, typeface, and so on
|
1832
|
+
@param x horizontal offset applied to blob
|
1833
|
+
@param y vertical offset applied to blob
|
1834
|
+
@param paint blend, color, stroking, and so on, used to draw
|
1835
|
+
|
1836
|
+
example: https://fiddle.skia.org/c/@Canvas_drawTextBlob
|
1837
|
+
*/
|
1838
|
+
void drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint);
|
1839
|
+
|
1840
|
+
/** Draws SkTextBlob blob at (x, y), using clip, SkMatrix, and SkPaint paint.
|
1841
|
+
|
1842
|
+
blob contains glyphs, their positions, and paint attributes specific to text:
|
1843
|
+
SkTypeface, SkPaint text size, SkPaint text scale x,
|
1844
|
+
SkPaint text skew x, SkPaint::Align, SkPaint::Hinting, anti-alias, SkPaint fake bold,
|
1845
|
+
SkPaint font embedded bitmaps, SkPaint full hinting spacing, LCD text, SkPaint linear text,
|
1846
|
+
and SkPaint subpixel text.
|
1847
|
+
|
1848
|
+
SkTextEncoding must be set to SkTextEncoding::kGlyphID.
|
1849
|
+
|
1850
|
+
Elements of paint: SkPathEffect, SkMaskFilter, SkShader, SkColorFilter,
|
1851
|
+
and SkImageFilter; apply to blob.
|
1852
|
+
|
1853
|
+
@param blob glyphs, positions, and their paints' text size, typeface, and so on
|
1854
|
+
@param x horizontal offset applied to blob
|
1855
|
+
@param y vertical offset applied to blob
|
1856
|
+
@param paint blend, color, stroking, and so on, used to draw
|
1857
|
+
*/
|
1858
|
+
void drawTextBlob(const sk_sp<SkTextBlob>& blob, SkScalar x, SkScalar y, const SkPaint& paint) {
|
1859
|
+
this->drawTextBlob(blob.get(), x, y, paint);
|
1860
|
+
}
|
1861
|
+
|
1862
|
+
/** Draws SkPicture picture, using clip and SkMatrix.
|
1863
|
+
Clip and SkMatrix are unchanged by picture contents, as if
|
1864
|
+
save() was called before and restore() was called after drawPicture().
|
1865
|
+
|
1866
|
+
SkPicture records a series of draw commands for later playback.
|
1867
|
+
|
1868
|
+
@param picture recorded drawing commands to play
|
1869
|
+
*/
|
1870
|
+
void drawPicture(const SkPicture* picture) {
|
1871
|
+
this->drawPicture(picture, nullptr, nullptr);
|
1872
|
+
}
|
1873
|
+
|
1874
|
+
/** Draws SkPicture picture, using clip and SkMatrix.
|
1875
|
+
Clip and SkMatrix are unchanged by picture contents, as if
|
1876
|
+
save() was called before and restore() was called after drawPicture().
|
1877
|
+
|
1878
|
+
SkPicture records a series of draw commands for later playback.
|
1879
|
+
|
1880
|
+
@param picture recorded drawing commands to play
|
1881
|
+
*/
|
1882
|
+
void drawPicture(const sk_sp<SkPicture>& picture) {
|
1883
|
+
this->drawPicture(picture.get());
|
1884
|
+
}
|
1885
|
+
|
1886
|
+
/** Draws SkPicture picture, using clip and SkMatrix; transforming picture with
|
1887
|
+
SkMatrix matrix, if provided; and use SkPaint paint alpha, SkColorFilter,
|
1888
|
+
SkImageFilter, and SkBlendMode, if provided.
|
1889
|
+
|
1890
|
+
If paint is non-null, then the picture is always drawn into a temporary layer before
|
1891
|
+
actually landing on the canvas. Note that drawing into a layer can also change its
|
1892
|
+
appearance if there are any non-associative blendModes inside any of the pictures elements.
|
1893
|
+
|
1894
|
+
@param picture recorded drawing commands to play
|
1895
|
+
@param matrix SkMatrix to rotate, scale, translate, and so on; may be nullptr
|
1896
|
+
@param paint SkPaint to apply transparency, filtering, and so on; may be nullptr
|
1897
|
+
|
1898
|
+
example: https://fiddle.skia.org/c/@Canvas_drawPicture_3
|
1899
|
+
*/
|
1900
|
+
void drawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint);
|
1901
|
+
|
1902
|
+
/** Draws SkPicture picture, using clip and SkMatrix; transforming picture with
|
1903
|
+
SkMatrix matrix, if provided; and use SkPaint paint alpha, SkColorFilter,
|
1904
|
+
SkImageFilter, and SkBlendMode, if provided.
|
1905
|
+
|
1906
|
+
If paint is non-null, then the picture is always drawn into a temporary layer before
|
1907
|
+
actually landing on the canvas. Note that drawing into a layer can also change its
|
1908
|
+
appearance if there are any non-associative blendModes inside any of the pictures elements.
|
1909
|
+
|
1910
|
+
@param picture recorded drawing commands to play
|
1911
|
+
@param matrix SkMatrix to rotate, scale, translate, and so on; may be nullptr
|
1912
|
+
@param paint SkPaint to apply transparency, filtering, and so on; may be nullptr
|
1913
|
+
*/
|
1914
|
+
void drawPicture(const sk_sp<SkPicture>& picture, const SkMatrix* matrix,
|
1915
|
+
const SkPaint* paint) {
|
1916
|
+
this->drawPicture(picture.get(), matrix, paint);
|
1917
|
+
}
|
1918
|
+
|
1919
|
+
/** Draws SkVertices vertices, a triangle mesh, using clip and SkMatrix.
|
1920
|
+
If paint contains an SkShader and vertices does not contain texCoords, the shader
|
1921
|
+
is mapped using the vertices' positions.
|
1922
|
+
|
1923
|
+
SkBlendMode is ignored if SkVertices does not have colors. Otherwise, it combines
|
1924
|
+
- the SkShader if SkPaint contains SkShader
|
1925
|
+
- or the opaque SkPaint color if SkPaint does not contain SkShader
|
1926
|
+
as the src of the blend and the interpolated vertex colors as the dst.
|
1927
|
+
|
1928
|
+
SkMaskFilter, SkPathEffect, and antialiasing on SkPaint are ignored.
|
1929
|
+
|
1930
|
+
@param vertices triangle mesh to draw
|
1931
|
+
@param mode combines vertices' colors with SkShader if present or SkPaint opaque color
|
1932
|
+
if not. Ignored if the vertices do not contain color.
|
1933
|
+
@param paint specifies the SkShader, used as SkVertices texture, and SkColorFilter.
|
1934
|
+
|
1935
|
+
example: https://fiddle.skia.org/c/@Canvas_drawVertices
|
1936
|
+
*/
|
1937
|
+
void drawVertices(const SkVertices* vertices, SkBlendMode mode, const SkPaint& paint);
|
1938
|
+
|
1939
|
+
/** Draws SkVertices vertices, a triangle mesh, using clip and SkMatrix.
|
1940
|
+
If paint contains an SkShader and vertices does not contain texCoords, the shader
|
1941
|
+
is mapped using the vertices' positions.
|
1942
|
+
|
1943
|
+
SkBlendMode is ignored if SkVertices does not have colors. Otherwise, it combines
|
1944
|
+
- the SkShader if SkPaint contains SkShader
|
1945
|
+
- or the opaque SkPaint color if SkPaint does not contain SkShader
|
1946
|
+
as the src of the blend and the interpolated vertex colors as the dst.
|
1947
|
+
|
1948
|
+
SkMaskFilter, SkPathEffect, and antialiasing on SkPaint are ignored.
|
1949
|
+
|
1950
|
+
@param vertices triangle mesh to draw
|
1951
|
+
@param mode combines vertices' colors with SkShader if present or SkPaint opaque color
|
1952
|
+
if not. Ignored if the vertices do not contain color.
|
1953
|
+
@param paint specifies the SkShader, used as SkVertices texture, may be nullptr
|
1954
|
+
|
1955
|
+
example: https://fiddle.skia.org/c/@Canvas_drawVertices_2
|
1956
|
+
*/
|
1957
|
+
void drawVertices(const sk_sp<SkVertices>& vertices, SkBlendMode mode, const SkPaint& paint);
|
1958
|
+
|
1959
|
+
#if defined(SK_ENABLE_EXPERIMENTAL_CUSTOM_MESH) && defined(SK_ENABLE_SKSL)
|
1960
|
+
/**
|
1961
|
+
Experimental, under active development, and subject to change without notice.
|
1962
|
+
|
1963
|
+
Draws a mesh using a user-defined specification (see SkMeshSpecification).
|
1964
|
+
|
1965
|
+
SkBlender is ignored if SkMesh's specification does not output fragment shader color.
|
1966
|
+
Otherwise, it combines
|
1967
|
+
- the SkShader if SkPaint contains SkShader
|
1968
|
+
- or the opaque SkPaint color if SkPaint does not contain SkShader
|
1969
|
+
as the src of the blend and the mesh's fragment color as the dst.
|
1970
|
+
|
1971
|
+
SkMaskFilter, SkPathEffect, and antialiasing on SkPaint are ignored.
|
1972
|
+
|
1973
|
+
@param mesh the mesh vertices and compatible specification.
|
1974
|
+
@param blender combines vertices colors with SkShader if present or SkPaint opaque color
|
1975
|
+
if not. Ignored if the custom mesh does not output color. Defaults to
|
1976
|
+
SkBlendMode::kModulate if nullptr.
|
1977
|
+
@param paint specifies the SkShader, used as SkVertices texture, may be nullptr
|
1978
|
+
*/
|
1979
|
+
void drawMesh(const SkMesh& mesh, sk_sp<SkBlender> blender, const SkPaint& paint);
|
1980
|
+
#endif
|
1981
|
+
|
1982
|
+
/** Draws a Coons patch: the interpolation of four cubics with shared corners,
|
1983
|
+
associating a color, and optionally a texture SkPoint, with each corner.
|
1984
|
+
|
1985
|
+
SkPoint array cubics specifies four SkPath cubic starting at the top-left corner,
|
1986
|
+
in clockwise order, sharing every fourth point. The last SkPath cubic ends at the
|
1987
|
+
first point.
|
1988
|
+
|
1989
|
+
Color array color associates colors with corners in top-left, top-right,
|
1990
|
+
bottom-right, bottom-left order.
|
1991
|
+
|
1992
|
+
If paint contains SkShader, SkPoint array texCoords maps SkShader as texture to
|
1993
|
+
corners in top-left, top-right, bottom-right, bottom-left order. If texCoords is
|
1994
|
+
nullptr, SkShader is mapped using positions (derived from cubics).
|
1995
|
+
|
1996
|
+
SkBlendMode is ignored if colors is null. Otherwise, it combines
|
1997
|
+
- the SkShader if SkPaint contains SkShader
|
1998
|
+
- or the opaque SkPaint color if SkPaint does not contain SkShader
|
1999
|
+
as the src of the blend and the interpolated patch colors as the dst.
|
2000
|
+
|
2001
|
+
SkMaskFilter, SkPathEffect, and antialiasing on SkPaint are ignored.
|
2002
|
+
|
2003
|
+
@param cubics SkPath cubic array, sharing common points
|
2004
|
+
@param colors color array, one for each corner
|
2005
|
+
@param texCoords SkPoint array of texture coordinates, mapping SkShader to corners;
|
2006
|
+
may be nullptr
|
2007
|
+
@param mode combines patch's colors with SkShader if present or SkPaint opaque color
|
2008
|
+
if not. Ignored if colors is null.
|
2009
|
+
@param paint SkShader, SkColorFilter, SkBlendMode, used to draw
|
2010
|
+
*/
|
2011
|
+
void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
|
2012
|
+
const SkPoint texCoords[4], SkBlendMode mode, const SkPaint& paint);
|
2013
|
+
|
2014
|
+
/** Draws a set of sprites from atlas, using clip, SkMatrix, and optional SkPaint paint.
|
2015
|
+
paint uses anti-alias, alpha, SkColorFilter, SkImageFilter, and SkBlendMode
|
2016
|
+
to draw, if present. For each entry in the array, SkRect tex locates sprite in
|
2017
|
+
atlas, and SkRSXform xform transforms it into destination space.
|
2018
|
+
|
2019
|
+
SkMaskFilter and SkPathEffect on paint are ignored.
|
2020
|
+
|
2021
|
+
xform, tex, and colors if present, must contain count entries.
|
2022
|
+
Optional colors are applied for each sprite using SkBlendMode mode, treating
|
2023
|
+
sprite as source and colors as destination.
|
2024
|
+
Optional cullRect is a conservative bounds of all transformed sprites.
|
2025
|
+
If cullRect is outside of clip, canvas can skip drawing.
|
2026
|
+
|
2027
|
+
If atlas is nullptr, this draws nothing.
|
2028
|
+
|
2029
|
+
@param atlas SkImage containing sprites
|
2030
|
+
@param xform SkRSXform mappings for sprites in atlas
|
2031
|
+
@param tex SkRect locations of sprites in atlas
|
2032
|
+
@param colors one per sprite, blended with sprite using SkBlendMode; may be nullptr
|
2033
|
+
@param count number of sprites to draw
|
2034
|
+
@param mode SkBlendMode combining colors and sprites
|
2035
|
+
@param sampling SkSamplingOptions used when sampling from the atlas image
|
2036
|
+
@param cullRect bounds of transformed sprites for efficient clipping; may be nullptr
|
2037
|
+
@param paint SkColorFilter, SkImageFilter, SkBlendMode, and so on; may be nullptr
|
2038
|
+
*/
|
2039
|
+
void drawAtlas(const SkImage* atlas, const SkRSXform xform[], const SkRect tex[],
|
2040
|
+
const SkColor colors[], int count, SkBlendMode mode,
|
2041
|
+
const SkSamplingOptions& sampling, const SkRect* cullRect, const SkPaint* paint);
|
2042
|
+
|
2043
|
+
/** Draws SkDrawable drawable using clip and SkMatrix, concatenated with
|
2044
|
+
optional matrix.
|
2045
|
+
|
2046
|
+
If SkCanvas has an asynchronous implementation, as is the case
|
2047
|
+
when it is recording into SkPicture, then drawable will be referenced,
|
2048
|
+
so that SkDrawable::draw() can be called when the operation is finalized. To force
|
2049
|
+
immediate drawing, call SkDrawable::draw() instead.
|
2050
|
+
|
2051
|
+
@param drawable custom struct encapsulating drawing commands
|
2052
|
+
@param matrix transformation applied to drawing; may be nullptr
|
2053
|
+
|
2054
|
+
example: https://fiddle.skia.org/c/@Canvas_drawDrawable
|
2055
|
+
*/
|
2056
|
+
void drawDrawable(SkDrawable* drawable, const SkMatrix* matrix = nullptr);
|
2057
|
+
|
2058
|
+
/** Draws SkDrawable drawable using clip and SkMatrix, offset by (x, y).
|
2059
|
+
|
2060
|
+
If SkCanvas has an asynchronous implementation, as is the case
|
2061
|
+
when it is recording into SkPicture, then drawable will be referenced,
|
2062
|
+
so that SkDrawable::draw() can be called when the operation is finalized. To force
|
2063
|
+
immediate drawing, call SkDrawable::draw() instead.
|
2064
|
+
|
2065
|
+
@param drawable custom struct encapsulating drawing commands
|
2066
|
+
@param x offset into SkCanvas writable pixels on x-axis
|
2067
|
+
@param y offset into SkCanvas writable pixels on y-axis
|
2068
|
+
|
2069
|
+
example: https://fiddle.skia.org/c/@Canvas_drawDrawable_2
|
2070
|
+
*/
|
2071
|
+
void drawDrawable(SkDrawable* drawable, SkScalar x, SkScalar y);
|
2072
|
+
|
2073
|
+
/** Associates SkRect on SkCanvas with an annotation; a key-value pair, where the key is
|
2074
|
+
a null-terminated UTF-8 string, and optional value is stored as SkData.
|
2075
|
+
|
2076
|
+
Only some canvas implementations, such as recording to SkPicture, or drawing to
|
2077
|
+
document PDF, use annotations.
|
2078
|
+
|
2079
|
+
@param rect SkRect extent of canvas to annotate
|
2080
|
+
@param key string used for lookup
|
2081
|
+
@param value data holding value stored in annotation
|
2082
|
+
|
2083
|
+
example: https://fiddle.skia.org/c/@Canvas_drawAnnotation_2
|
2084
|
+
*/
|
2085
|
+
void drawAnnotation(const SkRect& rect, const char key[], SkData* value);
|
2086
|
+
|
2087
|
+
/** Associates SkRect on SkCanvas when an annotation; a key-value pair, where the key is
|
2088
|
+
a null-terminated UTF-8 string, and optional value is stored as SkData.
|
2089
|
+
|
2090
|
+
Only some canvas implementations, such as recording to SkPicture, or drawing to
|
2091
|
+
document PDF, use annotations.
|
2092
|
+
|
2093
|
+
@param rect SkRect extent of canvas to annotate
|
2094
|
+
@param key string used for lookup
|
2095
|
+
@param value data holding value stored in annotation
|
2096
|
+
*/
|
2097
|
+
void drawAnnotation(const SkRect& rect, const char key[], const sk_sp<SkData>& value) {
|
2098
|
+
this->drawAnnotation(rect, key, value.get());
|
2099
|
+
}
|
2100
|
+
|
2101
|
+
/** Returns true if clip is empty; that is, nothing will draw.
|
2102
|
+
|
2103
|
+
May do work when called; it should not be called
|
2104
|
+
more often than needed. However, once called, subsequent calls perform no
|
2105
|
+
work until clip changes.
|
2106
|
+
|
2107
|
+
@return true if clip is empty
|
2108
|
+
|
2109
|
+
example: https://fiddle.skia.org/c/@Canvas_isClipEmpty
|
2110
|
+
*/
|
2111
|
+
virtual bool isClipEmpty() const;
|
2112
|
+
|
2113
|
+
/** Returns true if clip is SkRect and not empty.
|
2114
|
+
Returns false if the clip is empty, or if it is not SkRect.
|
2115
|
+
|
2116
|
+
@return true if clip is SkRect and not empty
|
2117
|
+
|
2118
|
+
example: https://fiddle.skia.org/c/@Canvas_isClipRect
|
2119
|
+
*/
|
2120
|
+
virtual bool isClipRect() const;
|
2121
|
+
|
2122
|
+
/** Returns the current transform from local coordinates to the 'device', which for most
|
2123
|
+
* purposes means pixels.
|
2124
|
+
*
|
2125
|
+
* @return transformation from local coordinates to device / pixels.
|
2126
|
+
*/
|
2127
|
+
SkM44 getLocalToDevice() const;
|
2128
|
+
|
2129
|
+
/**
|
2130
|
+
* Throws away the 3rd row and column in the matrix, so be warned.
|
2131
|
+
*/
|
2132
|
+
SkMatrix getLocalToDeviceAs3x3() const {
|
2133
|
+
return this->getLocalToDevice().asM33();
|
2134
|
+
}
|
2135
|
+
|
2136
|
+
#ifdef SK_SUPPORT_LEGACY_GETTOTALMATRIX
|
2137
|
+
/** DEPRECATED
|
2138
|
+
* Legacy version of getLocalToDevice(), which strips away any Z information, and
|
2139
|
+
* just returns a 3x3 version.
|
2140
|
+
*
|
2141
|
+
* @return 3x3 version of getLocalToDevice()
|
2142
|
+
*
|
2143
|
+
* example: https://fiddle.skia.org/c/@Canvas_getTotalMatrix
|
2144
|
+
* example: https://fiddle.skia.org/c/@Clip
|
2145
|
+
*/
|
2146
|
+
SkMatrix getTotalMatrix() const;
|
2147
|
+
#endif
|
2148
|
+
|
2149
|
+
///////////////////////////////////////////////////////////////////////////
|
2150
|
+
|
2151
|
+
#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && SK_SUPPORT_GPU
|
2152
|
+
// These methods exist to support WebView in Android Framework.
|
2153
|
+
SkIRect topLayerBounds() const;
|
2154
|
+
GrBackendRenderTarget topLayerBackendRenderTarget() const;
|
2155
|
+
#endif
|
2156
|
+
|
2157
|
+
/**
|
2158
|
+
* Returns the global clip as a region. If the clip contains AA, then only the bounds
|
2159
|
+
* of the clip may be returned.
|
2160
|
+
*/
|
2161
|
+
void temporary_internal_getRgnClip(SkRegion* region);
|
2162
|
+
|
2163
|
+
void private_draw_shadow_rec(const SkPath&, const SkDrawShadowRec&);
|
2164
|
+
|
2165
|
+
|
2166
|
+
protected:
|
2167
|
+
// default impl defers to getDevice()->newSurface(info)
|
2168
|
+
virtual sk_sp<SkSurface> onNewSurface(const SkImageInfo& info, const SkSurfaceProps& props);
|
2169
|
+
|
2170
|
+
// default impl defers to its device
|
2171
|
+
virtual bool onPeekPixels(SkPixmap* pixmap);
|
2172
|
+
virtual bool onAccessTopLayerPixels(SkPixmap* pixmap);
|
2173
|
+
virtual SkImageInfo onImageInfo() const;
|
2174
|
+
virtual bool onGetProps(SkSurfaceProps* props) const;
|
2175
|
+
virtual void onFlush();
|
2176
|
+
|
2177
|
+
// Subclass save/restore notifiers.
|
2178
|
+
// Overriders should call the corresponding INHERITED method up the inheritance chain.
|
2179
|
+
// getSaveLayerStrategy()'s return value may suppress full layer allocation.
|
2180
|
+
enum SaveLayerStrategy {
|
2181
|
+
kFullLayer_SaveLayerStrategy,
|
2182
|
+
kNoLayer_SaveLayerStrategy,
|
2183
|
+
};
|
2184
|
+
|
2185
|
+
virtual void willSave() {}
|
2186
|
+
// Overriders should call the corresponding INHERITED method up the inheritance chain.
|
2187
|
+
virtual SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec& ) {
|
2188
|
+
return kFullLayer_SaveLayerStrategy;
|
2189
|
+
}
|
2190
|
+
|
2191
|
+
// returns true if we should actually perform the saveBehind, or false if we should just save.
|
2192
|
+
virtual bool onDoSaveBehind(const SkRect*) { return true; }
|
2193
|
+
virtual void willRestore() {}
|
2194
|
+
virtual void didRestore() {}
|
2195
|
+
|
2196
|
+
virtual void didConcat44(const SkM44&) {}
|
2197
|
+
virtual void didSetM44(const SkM44&) {}
|
2198
|
+
virtual void didTranslate(SkScalar, SkScalar) {}
|
2199
|
+
virtual void didScale(SkScalar, SkScalar) {}
|
2200
|
+
|
2201
|
+
#ifndef SK_ENABLE_EXPERIMENTAL_CUSTOM_MESH
|
2202
|
+
// Define this in protected so we can still access internally for testing.
|
2203
|
+
void drawMesh(const SkMesh& mesh, sk_sp<SkBlender> blender, const SkPaint& paint);
|
2204
|
+
#endif
|
2205
|
+
|
2206
|
+
// NOTE: If you are adding a new onDraw virtual to SkCanvas, PLEASE add an override to
|
2207
|
+
// SkCanvasVirtualEnforcer (in SkCanvasVirtualEnforcer.h). This ensures that subclasses using
|
2208
|
+
// that mechanism will be required to implement the new function.
|
2209
|
+
virtual void onDrawPaint(const SkPaint& paint);
|
2210
|
+
virtual void onDrawBehind(const SkPaint& paint);
|
2211
|
+
virtual void onDrawRect(const SkRect& rect, const SkPaint& paint);
|
2212
|
+
virtual void onDrawRRect(const SkRRect& rrect, const SkPaint& paint);
|
2213
|
+
virtual void onDrawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint);
|
2214
|
+
virtual void onDrawOval(const SkRect& rect, const SkPaint& paint);
|
2215
|
+
virtual void onDrawArc(const SkRect& rect, SkScalar startAngle, SkScalar sweepAngle,
|
2216
|
+
bool useCenter, const SkPaint& paint);
|
2217
|
+
virtual void onDrawPath(const SkPath& path, const SkPaint& paint);
|
2218
|
+
virtual void onDrawRegion(const SkRegion& region, const SkPaint& paint);
|
2219
|
+
|
2220
|
+
virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
|
2221
|
+
const SkPaint& paint);
|
2222
|
+
|
2223
|
+
virtual void onDrawGlyphRunList(const SkGlyphRunList& glyphRunList, const SkPaint& paint);
|
2224
|
+
|
2225
|
+
virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
|
2226
|
+
const SkPoint texCoords[4], SkBlendMode mode, const SkPaint& paint);
|
2227
|
+
virtual void onDrawPoints(PointMode mode, size_t count, const SkPoint pts[],
|
2228
|
+
const SkPaint& paint);
|
2229
|
+
|
2230
|
+
virtual void onDrawImage2(const SkImage*, SkScalar dx, SkScalar dy, const SkSamplingOptions&,
|
2231
|
+
const SkPaint*);
|
2232
|
+
virtual void onDrawImageRect2(const SkImage*, const SkRect& src, const SkRect& dst,
|
2233
|
+
const SkSamplingOptions&, const SkPaint*, SrcRectConstraint);
|
2234
|
+
virtual void onDrawImageLattice2(const SkImage*, const Lattice&, const SkRect& dst,
|
2235
|
+
SkFilterMode, const SkPaint*);
|
2236
|
+
virtual void onDrawAtlas2(const SkImage*, const SkRSXform[], const SkRect src[],
|
2237
|
+
const SkColor[], int count, SkBlendMode, const SkSamplingOptions&,
|
2238
|
+
const SkRect* cull, const SkPaint*);
|
2239
|
+
virtual void onDrawEdgeAAImageSet2(const ImageSetEntry imageSet[], int count,
|
2240
|
+
const SkPoint dstClips[], const SkMatrix preViewMatrices[],
|
2241
|
+
const SkSamplingOptions&, const SkPaint*,
|
2242
|
+
SrcRectConstraint);
|
2243
|
+
|
2244
|
+
virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode,
|
2245
|
+
const SkPaint& paint);
|
2246
|
+
#ifdef SK_ENABLE_SKSL
|
2247
|
+
virtual void onDrawMesh(const SkMesh&, sk_sp<SkBlender>, const SkPaint&);
|
2248
|
+
#endif
|
2249
|
+
virtual void onDrawAnnotation(const SkRect& rect, const char key[], SkData* value);
|
2250
|
+
virtual void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&);
|
2251
|
+
|
2252
|
+
virtual void onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix);
|
2253
|
+
virtual void onDrawPicture(const SkPicture* picture, const SkMatrix* matrix,
|
2254
|
+
const SkPaint* paint);
|
2255
|
+
|
2256
|
+
virtual void onDrawEdgeAAQuad(const SkRect& rect, const SkPoint clip[4], QuadAAFlags aaFlags,
|
2257
|
+
const SkColor4f& color, SkBlendMode mode);
|
2258
|
+
|
2259
|
+
enum ClipEdgeStyle {
|
2260
|
+
kHard_ClipEdgeStyle,
|
2261
|
+
kSoft_ClipEdgeStyle
|
2262
|
+
};
|
2263
|
+
|
2264
|
+
virtual void onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeStyle);
|
2265
|
+
virtual void onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edgeStyle);
|
2266
|
+
virtual void onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeStyle);
|
2267
|
+
virtual void onClipShader(sk_sp<SkShader>, SkClipOp);
|
2268
|
+
virtual void onClipRegion(const SkRegion& deviceRgn, SkClipOp op);
|
2269
|
+
virtual void onResetClip();
|
2270
|
+
|
2271
|
+
virtual void onDiscard();
|
2272
|
+
|
2273
|
+
#if SK_SUPPORT_GPU
|
2274
|
+
/** Experimental
|
2275
|
+
*/
|
2276
|
+
virtual sk_sp<GrSlug> onConvertGlyphRunListToSlug(
|
2277
|
+
const SkGlyphRunList& glyphRunList, const SkPaint& paint);
|
2278
|
+
|
2279
|
+
/** Experimental
|
2280
|
+
*/
|
2281
|
+
virtual void onDrawSlug(const GrSlug* slug);
|
2282
|
+
#endif
|
2283
|
+
|
2284
|
+
private:
|
2285
|
+
|
2286
|
+
enum ShaderOverrideOpacity {
|
2287
|
+
kNone_ShaderOverrideOpacity, //!< there is no overriding shader (bitmap or image)
|
2288
|
+
kOpaque_ShaderOverrideOpacity, //!< the overriding shader is opaque
|
2289
|
+
kNotOpaque_ShaderOverrideOpacity, //!< the overriding shader may not be opaque
|
2290
|
+
};
|
2291
|
+
|
2292
|
+
// notify our surface (if we have one) that we are about to draw, so it
|
2293
|
+
// can perform copy-on-write or invalidate any cached images
|
2294
|
+
// returns false if the copy failed
|
2295
|
+
bool SK_WARN_UNUSED_RESULT predrawNotify(bool willOverwritesEntireSurface = false);
|
2296
|
+
bool SK_WARN_UNUSED_RESULT predrawNotify(const SkRect*, const SkPaint*, ShaderOverrideOpacity);
|
2297
|
+
|
2298
|
+
enum class CheckForOverwrite : bool {
|
2299
|
+
kNo = false,
|
2300
|
+
kYes = true
|
2301
|
+
};
|
2302
|
+
// call the appropriate predrawNotify and create a layer if needed.
|
2303
|
+
std::optional<AutoLayerForImageFilter> aboutToDraw(
|
2304
|
+
SkCanvas* canvas,
|
2305
|
+
const SkPaint& paint,
|
2306
|
+
const SkRect* rawBounds = nullptr,
|
2307
|
+
CheckForOverwrite = CheckForOverwrite::kNo,
|
2308
|
+
ShaderOverrideOpacity = kNone_ShaderOverrideOpacity);
|
2309
|
+
|
2310
|
+
// The bottom-most device in the stack, only changed by init(). Image properties and the final
|
2311
|
+
// canvas pixels are determined by this device.
|
2312
|
+
SkBaseDevice* baseDevice() const {
|
2313
|
+
SkASSERT(fBaseDevice);
|
2314
|
+
return fBaseDevice.get();
|
2315
|
+
}
|
2316
|
+
|
2317
|
+
// The top-most device in the stack, will change within saveLayer()'s. All drawing and clipping
|
2318
|
+
// operations should route to this device.
|
2319
|
+
SkBaseDevice* topDevice() const;
|
2320
|
+
|
2321
|
+
// Canvases maintain a sparse stack of layers, where the top-most layer receives the drawing,
|
2322
|
+
// clip, and matrix commands. There is a layer per call to saveLayer() using the
|
2323
|
+
// kFullLayer_SaveLayerStrategy.
|
2324
|
+
struct Layer {
|
2325
|
+
sk_sp<SkBaseDevice> fDevice;
|
2326
|
+
sk_sp<SkImageFilter> fImageFilter; // applied to layer *before* being drawn by paint
|
2327
|
+
SkPaint fPaint;
|
2328
|
+
bool fDiscard;
|
2329
|
+
|
2330
|
+
Layer(sk_sp<SkBaseDevice> device, sk_sp<SkImageFilter> imageFilter, const SkPaint& paint);
|
2331
|
+
};
|
2332
|
+
|
2333
|
+
// Encapsulate state needed to restore from saveBehind()
|
2334
|
+
struct BackImage {
|
2335
|
+
sk_sp<SkSpecialImage> fImage;
|
2336
|
+
SkIPoint fLoc;
|
2337
|
+
};
|
2338
|
+
|
2339
|
+
class MCRec {
|
2340
|
+
public:
|
2341
|
+
// If not null, this MCRec corresponds with the saveLayer() record that made the layer.
|
2342
|
+
// The base "layer" is not stored here, since it is stored inline in SkCanvas and has no
|
2343
|
+
// restoration behavior.
|
2344
|
+
std::unique_ptr<Layer> fLayer;
|
2345
|
+
|
2346
|
+
// This points to the device of the top-most layer (which may be lower in the stack), or
|
2347
|
+
// to the canvas's fBaseDevice. The MCRec does not own the device.
|
2348
|
+
SkBaseDevice* fDevice;
|
2349
|
+
|
2350
|
+
std::unique_ptr<BackImage> fBackImage;
|
2351
|
+
SkM44 fMatrix;
|
2352
|
+
int fDeferredSaveCount = 0;
|
2353
|
+
|
2354
|
+
MCRec(SkBaseDevice* device);
|
2355
|
+
MCRec(const MCRec* prev);
|
2356
|
+
~MCRec();
|
2357
|
+
|
2358
|
+
void newLayer(sk_sp<SkBaseDevice> layerDevice,
|
2359
|
+
sk_sp<SkImageFilter> filter,
|
2360
|
+
const SkPaint& restorePaint);
|
2361
|
+
|
2362
|
+
void reset(SkBaseDevice* device);
|
2363
|
+
};
|
2364
|
+
|
2365
|
+
// the first N recs that can fit here mean we won't call malloc
|
2366
|
+
static constexpr int kMCRecSize = 96; // most recent measurement
|
2367
|
+
static constexpr int kMCRecCount = 32; // common depth for save/restores
|
2368
|
+
|
2369
|
+
intptr_t fMCRecStorage[kMCRecSize * kMCRecCount / sizeof(intptr_t)];
|
2370
|
+
|
2371
|
+
SkDeque fMCStack;
|
2372
|
+
// points to top of stack
|
2373
|
+
MCRec* fMCRec;
|
2374
|
+
|
2375
|
+
// Installed via init()
|
2376
|
+
sk_sp<SkBaseDevice> fBaseDevice;
|
2377
|
+
const SkSurfaceProps fProps;
|
2378
|
+
|
2379
|
+
int fSaveCount; // value returned by getSaveCount()
|
2380
|
+
|
2381
|
+
std::unique_ptr<SkRasterHandleAllocator> fAllocator;
|
2382
|
+
|
2383
|
+
SkSurface_Base* fSurfaceBase;
|
2384
|
+
SkSurface_Base* getSurfaceBase() const { return fSurfaceBase; }
|
2385
|
+
void setSurfaceBase(SkSurface_Base* sb) {
|
2386
|
+
fSurfaceBase = sb;
|
2387
|
+
}
|
2388
|
+
friend class SkSurface_Base;
|
2389
|
+
friend class SkSurface_Gpu;
|
2390
|
+
|
2391
|
+
SkIRect fClipRestrictionRect = SkIRect::MakeEmpty();
|
2392
|
+
int fClipRestrictionSaveCount = -1;
|
2393
|
+
|
2394
|
+
void doSave();
|
2395
|
+
void checkForDeferredSave();
|
2396
|
+
void internalSetMatrix(const SkM44&);
|
2397
|
+
|
2398
|
+
friend class SkAndroidFrameworkUtils;
|
2399
|
+
friend class SkCanvasPriv; // needs to expose android functions for testing outside android
|
2400
|
+
friend class AutoLayerForImageFilter;
|
2401
|
+
friend class SkSurface_Raster; // needs getDevice()
|
2402
|
+
friend class SkNoDrawCanvas; // needs resetForNextPicture()
|
2403
|
+
friend class SkNWayCanvas;
|
2404
|
+
friend class SkPictureRecord; // predrawNotify (why does it need it? <reed>)
|
2405
|
+
friend class SkOverdrawCanvas;
|
2406
|
+
friend class SkRasterHandleAllocator;
|
2407
|
+
friend class SkRecords::Draw;
|
2408
|
+
template <typename Key>
|
2409
|
+
friend class SkTestCanvas;
|
2410
|
+
|
2411
|
+
protected:
|
2412
|
+
// For use by SkNoDrawCanvas (via SkCanvasVirtualEnforcer, which can't be a friend)
|
2413
|
+
SkCanvas(const SkIRect& bounds);
|
2414
|
+
private:
|
2415
|
+
SkCanvas(const SkBitmap&, std::unique_ptr<SkRasterHandleAllocator>,
|
2416
|
+
SkRasterHandleAllocator::Handle);
|
2417
|
+
|
2418
|
+
SkCanvas(SkCanvas&&) = delete;
|
2419
|
+
SkCanvas(const SkCanvas&) = delete;
|
2420
|
+
SkCanvas& operator=(SkCanvas&&) = delete;
|
2421
|
+
SkCanvas& operator=(const SkCanvas&) = delete;
|
2422
|
+
|
2423
|
+
#if SK_SUPPORT_GPU
|
2424
|
+
friend class GrSlug;
|
2425
|
+
/** Experimental
|
2426
|
+
* Convert a SkTextBlob to a GrSlug using the current canvas state.
|
2427
|
+
*/
|
2428
|
+
sk_sp<GrSlug> convertBlobToSlug(const SkTextBlob& blob, SkPoint origin, const SkPaint& paint);
|
2429
|
+
|
2430
|
+
/** Experimental
|
2431
|
+
* Draw an GrSlug given the current canvas state.
|
2432
|
+
*/
|
2433
|
+
void drawSlug(const GrSlug* slug);
|
2434
|
+
#endif
|
2435
|
+
|
2436
|
+
/** Experimental
|
2437
|
+
* Saves the specified subset of the current pixels in the current layer,
|
2438
|
+
* and then clears those pixels to transparent black.
|
2439
|
+
* Restores the pixels on restore() by drawing them in SkBlendMode::kDstOver.
|
2440
|
+
*
|
2441
|
+
* @param subset conservative bounds of the area to be saved / restored.
|
2442
|
+
* @return depth of save state stack before this call was made.
|
2443
|
+
*/
|
2444
|
+
int only_axis_aligned_saveBehind(const SkRect* subset);
|
2445
|
+
|
2446
|
+
/**
|
2447
|
+
* Like drawPaint, but magically clipped to the most recent saveBehind buffer rectangle.
|
2448
|
+
* If there is no active saveBehind, then this draws nothing.
|
2449
|
+
*/
|
2450
|
+
void drawClippedToSaveBehind(const SkPaint&);
|
2451
|
+
|
2452
|
+
void resetForNextPicture(const SkIRect& bounds);
|
2453
|
+
|
2454
|
+
// needs gettotalclip()
|
2455
|
+
friend class SkCanvasStateUtils;
|
2456
|
+
|
2457
|
+
void init(sk_sp<SkBaseDevice>);
|
2458
|
+
|
2459
|
+
// All base onDrawX() functions should call this and skip drawing if it returns true.
|
2460
|
+
// If 'matrix' is non-null, it maps the paint's fast bounds before checking for quick rejection
|
2461
|
+
bool internalQuickReject(const SkRect& bounds, const SkPaint& paint,
|
2462
|
+
const SkMatrix* matrix = nullptr);
|
2463
|
+
|
2464
|
+
void internalDrawPaint(const SkPaint& paint);
|
2465
|
+
void internalSaveLayer(const SaveLayerRec&, SaveLayerStrategy);
|
2466
|
+
void internalSaveBehind(const SkRect*);
|
2467
|
+
|
2468
|
+
void internalConcat44(const SkM44&);
|
2469
|
+
|
2470
|
+
// shared by save() and saveLayer()
|
2471
|
+
void internalSave();
|
2472
|
+
void internalRestore();
|
2473
|
+
|
2474
|
+
enum class DeviceCompatibleWithFilter : bool {
|
2475
|
+
// Check the src device's local-to-device matrix for compatibility with the filter, and if
|
2476
|
+
// it is not compatible, introduce an intermediate image and transformation that allows the
|
2477
|
+
// filter to be evaluated on the modified src content.
|
2478
|
+
kUnknown = false,
|
2479
|
+
// Assume that the src device's local-to-device matrix is compatible with the filter.
|
2480
|
+
kYes = true
|
2481
|
+
};
|
2482
|
+
/**
|
2483
|
+
* Filters the contents of 'src' and draws the result into 'dst'. The filter is evaluated
|
2484
|
+
* relative to the current canvas matrix, and src is drawn to dst using their relative transform
|
2485
|
+
* 'paint' is applied after the filter and must not have a mask or image filter of its own.
|
2486
|
+
* A null 'filter' behaves as if the identity filter were used.
|
2487
|
+
*
|
2488
|
+
* 'scaleFactor' is an extra uniform scale transform applied to downscale the 'src' image
|
2489
|
+
* before any filtering, or as part of the copy, and is then drawn with 1/scaleFactor to 'dst'.
|
2490
|
+
* Must be 1.0 if 'compat' is kYes (i.e. any scale factor has already been baked into the
|
2491
|
+
* relative transforms between the devices).
|
2492
|
+
*/
|
2493
|
+
void internalDrawDeviceWithFilter(SkBaseDevice* src, SkBaseDevice* dst,
|
2494
|
+
const SkImageFilter* filter, const SkPaint& paint,
|
2495
|
+
DeviceCompatibleWithFilter compat,
|
2496
|
+
SkScalar scaleFactor = 1.f);
|
2497
|
+
|
2498
|
+
/*
|
2499
|
+
* Returns true if drawing the specified rect (or all if it is null) with the specified
|
2500
|
+
* paint (or default if null) would overwrite the entire root device of the canvas
|
2501
|
+
* (i.e. the canvas' surface if it had one).
|
2502
|
+
*/
|
2503
|
+
bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*, ShaderOverrideOpacity) const;
|
2504
|
+
|
2505
|
+
/**
|
2506
|
+
* Returns true if the paint's imagefilter can be invoked directly, without needed a layer.
|
2507
|
+
*/
|
2508
|
+
bool canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const SkSamplingOptions&,
|
2509
|
+
const SkPaint&);
|
2510
|
+
|
2511
|
+
/**
|
2512
|
+
* Returns true if the clip (for any active layer) contains antialiasing.
|
2513
|
+
* If the clip is empty, this will return false.
|
2514
|
+
*/
|
2515
|
+
bool androidFramework_isClipAA() const;
|
2516
|
+
|
2517
|
+
/**
|
2518
|
+
* Reset the clip to be wide-open (modulo any separately specified device clip restriction).
|
2519
|
+
* This operate within the save/restore clip stack so it can be undone by restoring to an
|
2520
|
+
* earlier save point.
|
2521
|
+
*/
|
2522
|
+
void internal_private_resetClip();
|
2523
|
+
|
2524
|
+
virtual SkPaintFilterCanvas* internal_private_asPaintFilterCanvas() const { return nullptr; }
|
2525
|
+
|
2526
|
+
// Keep track of the device clip bounds in the canvas' global space to reject draws before
|
2527
|
+
// invoking the top-level device.
|
2528
|
+
SkRect fQuickRejectBounds;
|
2529
|
+
|
2530
|
+
// Compute the clip's bounds based on all clipped SkDevice's reported device bounds transformed
|
2531
|
+
// into the canvas' global space.
|
2532
|
+
SkRect computeDeviceClipBounds(bool outsetForAA=true) const;
|
2533
|
+
|
2534
|
+
class AutoUpdateQRBounds;
|
2535
|
+
void validateClip() const;
|
2536
|
+
|
2537
|
+
std::unique_ptr<SkGlyphRunBuilder> fScratchGlyphRunBuilder;
|
2538
|
+
|
2539
|
+
using INHERITED = SkRefCnt;
|
2540
|
+
};
|
2541
|
+
|
2542
|
+
/** \class SkAutoCanvasRestore
|
2543
|
+
Stack helper class calls SkCanvas::restoreToCount when SkAutoCanvasRestore
|
2544
|
+
goes out of scope. Use this to guarantee that the canvas is restored to a known
|
2545
|
+
state.
|
2546
|
+
*/
|
2547
|
+
class SkAutoCanvasRestore {
|
2548
|
+
public:
|
2549
|
+
|
2550
|
+
/** Preserves SkCanvas::save() count. Optionally saves SkCanvas clip and SkCanvas matrix.
|
2551
|
+
|
2552
|
+
@param canvas SkCanvas to guard
|
2553
|
+
@param doSave call SkCanvas::save()
|
2554
|
+
@return utility to restore SkCanvas state on destructor
|
2555
|
+
*/
|
2556
|
+
SkAutoCanvasRestore(SkCanvas* canvas, bool doSave) : fCanvas(canvas), fSaveCount(0) {
|
2557
|
+
if (fCanvas) {
|
2558
|
+
fSaveCount = canvas->getSaveCount();
|
2559
|
+
if (doSave) {
|
2560
|
+
canvas->save();
|
2561
|
+
}
|
2562
|
+
}
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
/** Restores SkCanvas to saved state. Destructor is called when container goes out of
|
2566
|
+
scope.
|
2567
|
+
*/
|
2568
|
+
~SkAutoCanvasRestore() {
|
2569
|
+
if (fCanvas) {
|
2570
|
+
fCanvas->restoreToCount(fSaveCount);
|
2571
|
+
}
|
2572
|
+
}
|
2573
|
+
|
2574
|
+
/** Restores SkCanvas to saved state immediately. Subsequent calls and
|
2575
|
+
~SkAutoCanvasRestore() have no effect.
|
2576
|
+
*/
|
2577
|
+
void restore() {
|
2578
|
+
if (fCanvas) {
|
2579
|
+
fCanvas->restoreToCount(fSaveCount);
|
2580
|
+
fCanvas = nullptr;
|
2581
|
+
}
|
2582
|
+
}
|
2583
|
+
|
2584
|
+
private:
|
2585
|
+
SkCanvas* fCanvas;
|
2586
|
+
int fSaveCount;
|
2587
|
+
|
2588
|
+
SkAutoCanvasRestore(SkAutoCanvasRestore&&) = delete;
|
2589
|
+
SkAutoCanvasRestore(const SkAutoCanvasRestore&) = delete;
|
2590
|
+
SkAutoCanvasRestore& operator=(SkAutoCanvasRestore&&) = delete;
|
2591
|
+
SkAutoCanvasRestore& operator=(const SkAutoCanvasRestore&) = delete;
|
2592
|
+
};
|
2593
|
+
|
2594
|
+
#endif
|