@nativescript/canvas 2.0.0-alpha.2 → 2.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +2 -0
- package/Canvas/common.js +69 -32
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +8 -0
- package/Canvas/index.android.js +76 -29
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +12 -0
- package/Canvas/index.ios.d.ts +8 -2
- package/Canvas/index.ios.js +129 -77
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/index.d.ts +7 -2
- package/Canvas2D/CanvasGradient/index.js +14 -2
- package/Canvas2D/CanvasGradient/index.js.map +1 -1
- package/Canvas2D/CanvasPattern/index.d.ts +7 -2
- package/Canvas2D/CanvasPattern/index.js +11 -2
- package/Canvas2D/CanvasPattern/index.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +118 -132
- package/Canvas2D/CanvasRenderingContext2D/{index.android.js → index.js} +229 -238
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -0
- package/Canvas2D/DOMMatrix/index.d.ts +74 -2
- package/Canvas2D/DOMMatrix/index.js +180 -2
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.d.ts +15 -2
- package/Canvas2D/ImageData/index.js +66 -2
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +19 -2
- package/Canvas2D/Path2D/index.js +82 -2
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Canvas2D/TextMetrics/index.d.ts +17 -2
- package/Canvas2D/TextMetrics/index.js +44 -2
- package/Canvas2D/TextMetrics/index.js.map +1 -1
- package/Dom/Dom.d.ts +10 -0
- package/Dom/Dom.js +36 -0
- package/Dom/Dom.js.map +1 -0
- package/Dom/Fill.d.ts +4 -0
- package/Dom/Fill.js +8 -0
- package/Dom/Fill.js.map +1 -0
- package/Dom/Group.d.ts +21 -0
- package/Dom/Group.js +179 -0
- package/Dom/Group.js.map +1 -0
- package/Dom/Image.d.ts +12 -0
- package/Dom/Image.js +33 -0
- package/Dom/Image.js.map +1 -0
- package/Dom/Paint.d.ts +15 -0
- package/Dom/Paint.js +57 -0
- package/Dom/Paint.js.map +1 -0
- package/Dom/Shadow.d.ts +10 -0
- package/Dom/Shadow.js +26 -0
- package/Dom/Shadow.js.map +1 -0
- package/Dom/Text.d.ts +9 -0
- package/Dom/Text.js +50 -0
- package/Dom/Text.js.map +1 -0
- package/Dom/index.d.ts +8 -0
- package/Dom/index.js +9 -0
- package/Dom/index.js.map +1 -0
- package/Dom/shapes/Circle.d.ts +21 -0
- package/Dom/shapes/Circle.js +98 -0
- package/Dom/shapes/Circle.js.map +1 -0
- package/Dom/shapes/Line.d.ts +9 -0
- package/Dom/shapes/Line.js +37 -0
- package/Dom/shapes/Line.js.map +1 -0
- package/Dom/shapes/Path.d.ts +8 -0
- package/Dom/shapes/Path.js +31 -0
- package/Dom/shapes/Path.js.map +1 -0
- package/Dom/shapes/Points.d.ts +15 -0
- package/Dom/shapes/Points.js +20 -0
- package/Dom/shapes/Points.js.map +1 -0
- package/Dom/shapes/Rect.d.ts +15 -0
- package/Dom/shapes/Rect.js +63 -0
- package/Dom/shapes/Rect.js.map +1 -0
- package/Dom/shapes/RoundedRect.d.ts +12 -0
- package/Dom/shapes/RoundedRect.js +96 -0
- package/Dom/shapes/RoundedRect.js.map +1 -0
- package/Dom/shapes/index.d.ts +6 -0
- package/Dom/shapes/index.js +7 -0
- package/Dom/shapes/index.js.map +1 -0
- package/ImageAsset/index.d.ts +28 -2
- package/ImageAsset/index.js +154 -2
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/{index.ios.d.ts → index.d.ts} +3 -4
- package/ImageBitmap/{index.android.js → index.js} +52 -36
- package/ImageBitmap/index.js.map +1 -0
- package/LICENSE +201 -0
- package/SVG/SVG.js +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/index.d.ts +7 -2
- package/TextDecoder/index.js +44 -2
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.d.ts +7 -2
- package/TextEncoder/index.js +42 -2
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +150 -242
- package/WebGL/WebGLExtensions/{index.android.js → index.js} +18 -75
- package/WebGL/WebGLExtensions/index.js.map +1 -0
- package/WebGL/WebGLRenderingContext/common.d.ts +0 -2
- package/WebGL/WebGLRenderingContext/common.js +0 -10
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +153 -293
- package/WebGL/WebGLRenderingContext/{index.android.js → index.js} +193 -309
- package/WebGL/WebGLRenderingContext/index.js.map +1 -0
- package/WebGL2/WebGL2RenderingContext/common.d.ts +1 -0
- package/WebGL2/WebGL2RenderingContext/common.js +3 -0
- package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +101 -455
- package/WebGL2/WebGL2RenderingContext/{index.android.js → index.js} +125 -201
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -0
- package/angular/esm2020/index.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/package.json +2 -2
- package/helpers.js +3 -0
- package/helpers.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +15 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +209 -1767
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +142 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2621 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +6571 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +153 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +91 -3202
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap +2 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/{TNSCanvas.nib → NSCCanvas.nib} +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +408 -3534
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +142 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2621 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +6571 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +153 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +91 -3202
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +6571 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +153 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +91 -3202
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/module.modulemap +2 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/{TNSCanvas.nib → NSCCanvas.nib} +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +58 -91
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/Podfile +5 -1
- package/platforms/ios/build.xcconfig +5 -0
- package/platforms/ios/src/CanvasModule.h +8 -0
- package/platforms/ios/src/CanvasModule.mm +14 -0
- package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
- package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
- package/platforms/ios/src/cpp/Caches.cpp +35 -0
- package/platforms/ios/src/cpp/Caches.h +186 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1582 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.h +33 -0
- package/platforms/ios/src/cpp/Common.h +30 -0
- package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
- package/platforms/ios/src/cpp/Helpers.h +329 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.h +62 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +47 -0
- package/platforms/ios/src/cpp/JSICallback.h +71 -0
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +96 -0
- package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
- package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
- package/platforms/ios/src/cpp/OnRafCallback.cpp +25 -0
- package/platforms/ios/src/cpp/OnRafCallback.h +24 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +25 -0
- package/platforms/ios/src/cpp/OneByteStringResource.h +21 -0
- package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
- package/platforms/ios/src/cpp/RafImpl.h +30 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +188 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.h +34 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.h +37 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +42 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +42 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2402 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +318 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +203 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +43 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +800 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +188 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +449 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +56 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +67 -0
- package/platforms/ios/src/cpp/gl.h +79 -0
- package/platforms/ios/src/cpp/gl3stub.c +425 -0
- package/platforms/ios/src/cpp/gl3stub.h +665 -0
- package/platforms/ios/src/cpp/gles3jni.h +37 -0
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +93 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +48 -0
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +59 -0
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +60 -0
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +59 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +58 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6691 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +388 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +119 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +69 -0
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +58 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +83 -0
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +57 -0
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +64 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +36 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +37 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +323 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +62 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +61 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +51 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +59 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +61 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +51 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +56 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +53 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +52 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +53 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +54 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +87 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +63 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +61 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +59 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +88 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +69 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +65 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +72 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +59 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +43 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +143 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +80 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4517 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +227 -0
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +57 -0
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +60 -0
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +57 -0
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +59 -0
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +60 -0
- package/platforms/ios/src/module.modulemap +5 -0
- package/Canvas2D/CanvasGradient/CanvasGradient.android.d.ts +0 -10
- package/Canvas2D/CanvasGradient/CanvasGradient.android.js +0 -26
- package/Canvas2D/CanvasGradient/CanvasGradient.android.js.map +0 -1
- package/Canvas2D/CanvasGradient/CanvasGradient.d.ts +0 -12
- package/Canvas2D/CanvasGradient/CanvasGradient.ios.d.ts +0 -8
- package/Canvas2D/CanvasGradient/CanvasGradient.ios.js +0 -19
- package/Canvas2D/CanvasGradient/CanvasGradient.ios.js.map +0 -1
- package/Canvas2D/CanvasGradient/common.d.ts +0 -3
- package/Canvas2D/CanvasGradient/common.js +0 -3
- package/Canvas2D/CanvasGradient/common.js.map +0 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.android.d.ts +0 -8
- package/Canvas2D/CanvasPattern/CanvasPattern.android.js +0 -20
- package/Canvas2D/CanvasPattern/CanvasPattern.android.js.map +0 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.d.ts +0 -8
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.d.ts +0 -6
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.js +0 -10
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.js.map +0 -1
- package/Canvas2D/CanvasPattern/common.d.ts +0 -7
- package/Canvas2D/CanvasPattern/common.js +0 -9
- package/Canvas2D/CanvasPattern/common.js.map +0 -1
- package/Canvas2D/CanvasRenderingContext2D/common.d.ts +0 -87
- package/Canvas2D/CanvasRenderingContext2D/common.js +0 -12
- package/Canvas2D/CanvasRenderingContext2D/common.js.map +0 -1
- package/Canvas2D/CanvasRenderingContext2D/index.android.d.ts +0 -112
- package/Canvas2D/CanvasRenderingContext2D/index.android.js.map +0 -1
- package/Canvas2D/CanvasRenderingContext2D/index.ios.d.ts +0 -110
- package/Canvas2D/CanvasRenderingContext2D/index.ios.js +0 -897
- package/Canvas2D/CanvasRenderingContext2D/index.ios.js.map +0 -1
- package/Canvas2D/DOMMatrix/DOMMatrix.android.d.ts +0 -72
- package/Canvas2D/DOMMatrix/DOMMatrix.android.js +0 -177
- package/Canvas2D/DOMMatrix/DOMMatrix.android.js.map +0 -1
- package/Canvas2D/DOMMatrix/DOMMatrix.d.ts +0 -30
- package/Canvas2D/DOMMatrix/DOMMatrix.ios.d.ts +0 -48
- package/Canvas2D/DOMMatrix/DOMMatrix.ios.js +0 -142
- package/Canvas2D/DOMMatrix/DOMMatrix.ios.js.map +0 -1
- package/Canvas2D/DOMMatrix/common.d.ts +0 -27
- package/Canvas2D/DOMMatrix/common.js +0 -9
- package/Canvas2D/DOMMatrix/common.js.map +0 -1
- package/Canvas2D/ImageData/ImageData.android.d.ts +0 -9
- package/Canvas2D/ImageData/ImageData.android.js +0 -65
- package/Canvas2D/ImageData/ImageData.android.js.map +0 -1
- package/Canvas2D/ImageData/ImageData.d.ts +0 -11
- package/Canvas2D/ImageData/ImageData.ios.d.ts +0 -10
- package/Canvas2D/ImageData/ImageData.ios.js +0 -45
- package/Canvas2D/ImageData/ImageData.ios.js.map +0 -1
- package/Canvas2D/ImageData/common.d.ts +0 -9
- package/Canvas2D/ImageData/common.js +0 -13
- package/Canvas2D/ImageData/common.js.map +0 -1
- package/Canvas2D/Path2D/Path2D.android.d.ts +0 -18
- package/Canvas2D/Path2D/Path2D.android.js +0 -83
- package/Canvas2D/Path2D/Path2D.android.js.map +0 -1
- package/Canvas2D/Path2D/Path2D.d.ts +0 -26
- package/Canvas2D/Path2D/Path2D.ios.d.ts +0 -15
- package/Canvas2D/Path2D/Path2D.ios.js +0 -55
- package/Canvas2D/Path2D/Path2D.ios.js.map +0 -1
- package/Canvas2D/Path2D/common.d.ts +0 -17
- package/Canvas2D/Path2D/common.js +0 -12
- package/Canvas2D/Path2D/common.js.map +0 -1
- package/Canvas2D/TextMetrics/TextMetrics.android.d.ts +0 -16
- package/Canvas2D/TextMetrics/TextMetrics.android.js +0 -43
- package/Canvas2D/TextMetrics/TextMetrics.android.js.map +0 -1
- package/Canvas2D/TextMetrics/TextMetrics.d.ts +0 -7
- package/Canvas2D/TextMetrics/TextMetrics.ios.d.ts +0 -16
- package/Canvas2D/TextMetrics/TextMetrics.ios.js +0 -43
- package/Canvas2D/TextMetrics/TextMetrics.ios.js.map +0 -1
- package/Canvas2D/TextMetrics/common.d.ts +0 -18
- package/Canvas2D/TextMetrics/common.js +0 -13
- package/Canvas2D/TextMetrics/common.js.map +0 -1
- package/ImageAsset/ImageAsset.android.d.ts +0 -20
- package/ImageAsset/ImageAsset.android.js +0 -149
- package/ImageAsset/ImageAsset.android.js.map +0 -1
- package/ImageAsset/ImageAsset.d.ts +0 -31
- package/ImageAsset/ImageAsset.ios.d.ts +0 -22
- package/ImageAsset/ImageAsset.ios.js +0 -114
- package/ImageAsset/ImageAsset.ios.js.map +0 -1
- package/ImageAsset/common.d.ts +0 -13
- package/ImageAsset/common.js +0 -21
- package/ImageAsset/common.js.map +0 -1
- package/ImageBitmap/common.d.ts +0 -8
- package/ImageBitmap/common.js +0 -9
- package/ImageBitmap/common.js.map +0 -1
- package/ImageBitmap/index.android.d.ts +0 -12
- package/ImageBitmap/index.android.js.map +0 -1
- package/ImageBitmap/index.ios.js +0 -283
- package/ImageBitmap/index.ios.js.map +0 -1
- package/TextDecoder/TextDecoder.android.d.ts +0 -8
- package/TextDecoder/TextDecoder.android.js +0 -52
- package/TextDecoder/TextDecoder.android.js.map +0 -1
- package/TextDecoder/TextDecoder.d.ts +0 -10
- package/TextDecoder/TextDecoder.ios.d.ts +0 -6
- package/TextDecoder/TextDecoder.ios.js +0 -37
- package/TextDecoder/TextDecoder.ios.js.map +0 -1
- package/TextDecoder/common.d.ts +0 -8
- package/TextDecoder/common.js +0 -13
- package/TextDecoder/common.js.map +0 -1
- package/TextEncoder/TextEncoder.android.d.ts +0 -8
- package/TextEncoder/TextEncoder.android.js +0 -50
- package/TextEncoder/TextEncoder.android.js.map +0 -1
- package/TextEncoder/TextEncoder.d.ts +0 -10
- package/TextEncoder/TextEncoder.ios.d.ts +0 -6
- package/TextEncoder/TextEncoder.ios.js +0 -14
- package/TextEncoder/TextEncoder.ios.js.map +0 -1
- package/TextEncoder/common.d.ts +0 -7
- package/TextEncoder/common.js +0 -9
- package/TextEncoder/common.js.map +0 -1
- package/WebGL/WebGLExtensions/index.android.d.ts +0 -209
- package/WebGL/WebGLExtensions/index.android.js.map +0 -1
- package/WebGL/WebGLExtensions/index.ios.d.ts +0 -192
- package/WebGL/WebGLExtensions/index.ios.js +0 -250
- package/WebGL/WebGLExtensions/index.ios.js.map +0 -1
- package/WebGL/WebGLRenderingContext/index.android.d.ts +0 -165
- package/WebGL/WebGLRenderingContext/index.android.js.map +0 -1
- package/WebGL/WebGLRenderingContext/index.ios.d.ts +0 -163
- package/WebGL/WebGLRenderingContext/index.ios.js +0 -1168
- package/WebGL/WebGLRenderingContext/index.ios.js.map +0 -1
- package/WebGL2/WebGL2RenderingContext/index.android.d.ts +0 -103
- package/WebGL2/WebGL2RenderingContext/index.android.js.map +0 -1
- package/WebGL2/WebGL2RenderingContext/index.ios.d.ts +0 -102
- package/WebGL2/WebGL2RenderingContext/index.ios.js +0 -618
- package/WebGL2/WebGL2RenderingContext/index.ios.js.map +0 -1
- package/angular/nativescript-canvas-angular.d.ts +0 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/Utils.h +0 -26
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface +0 -3264
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/Utils.h +0 -26
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface +0 -3264
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface +0 -3264
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Osei Fortune on 03/04/2022.
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
#include <array>
|
|
6
|
+
#include "MatrixImpl.h"
|
|
7
|
+
#include "Caches.h"
|
|
8
|
+
|
|
9
|
+
MatrixImpl::MatrixImpl(Matrix* matrix) : matrix_(matrix) {}
|
|
10
|
+
|
|
11
|
+
void MatrixImpl::Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate) {
|
|
12
|
+
v8::Locker locker(isolate);
|
|
13
|
+
v8::Isolate::Scope isolate_scope(isolate);
|
|
14
|
+
v8::HandleScope handle_scope(isolate);
|
|
15
|
+
|
|
16
|
+
auto ctor = GetCtor(isolate);
|
|
17
|
+
auto context = isolate->GetCurrentContext();
|
|
18
|
+
auto func = ctor->GetFunction(context).ToLocalChecked();
|
|
19
|
+
|
|
20
|
+
canvasModule->Set(context, ConvertToV8String(isolate, "DOMMatrix"), func);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
MatrixImpl *MatrixImpl::GetPointer(v8::Local<v8::Object> object) {
|
|
24
|
+
auto ptr = object->GetInternalField(0).As<v8::External>()->Value();
|
|
25
|
+
if (ptr == nullptr) {
|
|
26
|
+
return nullptr;
|
|
27
|
+
}
|
|
28
|
+
return static_cast<MatrixImpl *>(ptr);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
v8::Local<v8::FunctionTemplate> MatrixImpl::GetCtor(v8::Isolate *isolate) {
|
|
32
|
+
auto cache = Caches::Get(isolate);
|
|
33
|
+
auto ctor = cache->MatrixTmpl.get();
|
|
34
|
+
if (ctor != nullptr) {
|
|
35
|
+
return ctor->Get(isolate);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate, Ctor);
|
|
39
|
+
ctorTmpl->InstanceTemplate()->SetInternalFieldCount(1);
|
|
40
|
+
ctorTmpl->SetClassName(ConvertToV8String(isolate, "DOMMatrix"));
|
|
41
|
+
|
|
42
|
+
auto tmpl = ctorTmpl->InstanceTemplate();
|
|
43
|
+
tmpl->SetInternalFieldCount(1);
|
|
44
|
+
|
|
45
|
+
tmpl->SetAccessor(
|
|
46
|
+
ConvertToV8String(isolate, "a"),
|
|
47
|
+
GetA,
|
|
48
|
+
SetA
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
tmpl->SetAccessor(
|
|
52
|
+
ConvertToV8String(isolate, "b"),
|
|
53
|
+
GetB,
|
|
54
|
+
SetB
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
tmpl->SetAccessor(
|
|
58
|
+
ConvertToV8String(isolate, "c"),
|
|
59
|
+
GetC,
|
|
60
|
+
SetC
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
tmpl->SetAccessor(
|
|
64
|
+
ConvertToV8String(isolate, "d"),
|
|
65
|
+
GetD,
|
|
66
|
+
SetD
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
tmpl->SetAccessor(
|
|
70
|
+
ConvertToV8String(isolate, "e"),
|
|
71
|
+
GetE,
|
|
72
|
+
SetE
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
tmpl->SetAccessor(
|
|
76
|
+
ConvertToV8String(isolate, "f"),
|
|
77
|
+
GetF,
|
|
78
|
+
SetF
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
tmpl->SetAccessor(
|
|
83
|
+
ConvertToV8String(isolate, "m11"),
|
|
84
|
+
GetM11,
|
|
85
|
+
SetM11
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
tmpl->SetAccessor(
|
|
89
|
+
ConvertToV8String(isolate, "m12"),
|
|
90
|
+
GetM12,
|
|
91
|
+
SetM12
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
tmpl->SetAccessor(
|
|
96
|
+
ConvertToV8String(isolate, "m13"),
|
|
97
|
+
GetM13,
|
|
98
|
+
SetM13
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
tmpl->SetAccessor(
|
|
102
|
+
ConvertToV8String(isolate, "m14"),
|
|
103
|
+
GetM14,
|
|
104
|
+
SetM14
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
tmpl->SetAccessor(
|
|
109
|
+
ConvertToV8String(isolate, "m21"),
|
|
110
|
+
GetM21,
|
|
111
|
+
SetM21
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
tmpl->SetAccessor(
|
|
115
|
+
ConvertToV8String(isolate, "m22"),
|
|
116
|
+
GetM22,
|
|
117
|
+
SetM22
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
tmpl->SetAccessor(
|
|
122
|
+
ConvertToV8String(isolate, "m23"),
|
|
123
|
+
GetM23,
|
|
124
|
+
SetM23
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
tmpl->SetAccessor(
|
|
128
|
+
ConvertToV8String(isolate, "m24"),
|
|
129
|
+
GetM24,
|
|
130
|
+
SetM24
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
tmpl->SetAccessor(
|
|
135
|
+
ConvertToV8String(isolate, "m31"),
|
|
136
|
+
GetM31,
|
|
137
|
+
SetM31
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
tmpl->SetAccessor(
|
|
141
|
+
ConvertToV8String(isolate, "m32"),
|
|
142
|
+
GetM32,
|
|
143
|
+
SetM32
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
tmpl->SetAccessor(
|
|
148
|
+
ConvertToV8String(isolate, "m33"),
|
|
149
|
+
GetM33,
|
|
150
|
+
SetM33
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
tmpl->SetAccessor(
|
|
154
|
+
ConvertToV8String(isolate, "m34"),
|
|
155
|
+
GetM34,
|
|
156
|
+
SetM34
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
tmpl->SetAccessor(
|
|
161
|
+
ConvertToV8String(isolate, "m41"),
|
|
162
|
+
GetM41,
|
|
163
|
+
SetM41
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
tmpl->SetAccessor(
|
|
167
|
+
ConvertToV8String(isolate, "m42"),
|
|
168
|
+
GetM42,
|
|
169
|
+
SetM42
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
tmpl->SetAccessor(
|
|
174
|
+
ConvertToV8String(isolate, "m43"),
|
|
175
|
+
GetM43,
|
|
176
|
+
SetM43
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
tmpl->SetAccessor(
|
|
180
|
+
ConvertToV8String(isolate, "m44"),
|
|
181
|
+
GetM44,
|
|
182
|
+
SetM44
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
cache->MatrixTmpl =
|
|
187
|
+
std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
|
|
188
|
+
return ctorTmpl;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
void MatrixImpl::Ctor(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
192
|
+
auto count = args.Length();
|
|
193
|
+
auto isolate = args.GetIsolate();
|
|
194
|
+
|
|
195
|
+
auto ret = args.This();
|
|
196
|
+
|
|
197
|
+
if (count > 0) {
|
|
198
|
+
auto context = isolate->GetCurrentContext();
|
|
199
|
+
auto value = args[0];
|
|
200
|
+
if (value->IsArray()) {
|
|
201
|
+
auto array = value.As<v8::Array>();
|
|
202
|
+
auto size = array->Length();
|
|
203
|
+
|
|
204
|
+
if (size == 6) {
|
|
205
|
+
auto matrix = canvas_native_matrix_create();
|
|
206
|
+
std::array<float, 6> buf{};
|
|
207
|
+
for (int i = 0; i < size; i++) {
|
|
208
|
+
auto item = array->Get(context, i).ToLocalChecked()->NumberValue(
|
|
209
|
+
context).ToChecked();
|
|
210
|
+
buf[i] = (float) item;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
canvas_native_matrix_update(matrix, buf.data(), buf.size());
|
|
214
|
+
|
|
215
|
+
auto object = new MatrixImpl(matrix);
|
|
216
|
+
|
|
217
|
+
auto ext = v8::External::New(isolate, object);
|
|
218
|
+
|
|
219
|
+
ret->SetInternalField(0, ext);
|
|
220
|
+
|
|
221
|
+
args.GetReturnValue().Set(ret);
|
|
222
|
+
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (size == 16) {
|
|
227
|
+
auto matrix = canvas_native_matrix_create();
|
|
228
|
+
std::array<float, 16> buf{};
|
|
229
|
+
|
|
230
|
+
for (int i = 0; i < size; i++) {
|
|
231
|
+
auto item = array->Get(context, i).ToLocalChecked()->NumberValue(
|
|
232
|
+
context).ToChecked();
|
|
233
|
+
buf[i] = (float) item;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
canvas_native_matrix_update_3d(matrix, buf.data(), buf.size());
|
|
237
|
+
|
|
238
|
+
auto object = new MatrixImpl(matrix);
|
|
239
|
+
|
|
240
|
+
auto ext = v8::External::New(isolate, object);
|
|
241
|
+
|
|
242
|
+
ret->SetInternalField(0, ext);
|
|
243
|
+
|
|
244
|
+
args.GetReturnValue().Set(ret);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
auto matrix = canvas_native_matrix_create();
|
|
251
|
+
auto object = new MatrixImpl(matrix);
|
|
252
|
+
|
|
253
|
+
auto ext = v8::External::New(isolate, object);
|
|
254
|
+
|
|
255
|
+
ret->SetInternalField(0, ext);
|
|
256
|
+
|
|
257
|
+
args.GetReturnValue().Set(ret);
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
args.GetReturnValue().SetUndefined();
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
void MatrixImpl::GetA(v8::Local<v8::String> property,
|
|
265
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
266
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
267
|
+
if (ptr == nullptr) {
|
|
268
|
+
info.GetReturnValue().SetUndefined();
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_a(ptr->GetMatrix()));
|
|
273
|
+
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
void MatrixImpl::SetA(v8::Local<v8::String> property,
|
|
277
|
+
v8::Local<v8::Value> value,
|
|
278
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
279
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
280
|
+
if (ptr == nullptr) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
auto isolate = info.GetIsolate();
|
|
284
|
+
auto context = isolate->GetCurrentContext();
|
|
285
|
+
canvas_native_matrix_set_a(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
void MatrixImpl::GetB(v8::Local<v8::String> property,
|
|
290
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
291
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
292
|
+
if (ptr == nullptr) {
|
|
293
|
+
info.GetReturnValue().SetUndefined();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_b(ptr->GetMatrix()));
|
|
298
|
+
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
void MatrixImpl::SetB(v8::Local<v8::String> property,
|
|
302
|
+
v8::Local<v8::Value> value,
|
|
303
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
304
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
305
|
+
if (ptr == nullptr) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
auto isolate = info.GetIsolate();
|
|
309
|
+
auto context = isolate->GetCurrentContext();
|
|
310
|
+
canvas_native_matrix_set_b(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
void MatrixImpl::GetC(v8::Local<v8::String> property,
|
|
315
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
316
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
317
|
+
if (ptr == nullptr) {
|
|
318
|
+
info.GetReturnValue().SetUndefined();
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_c(ptr->GetMatrix()));
|
|
323
|
+
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
void MatrixImpl::SetC(v8::Local<v8::String> property,
|
|
327
|
+
v8::Local<v8::Value> value,
|
|
328
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
329
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
330
|
+
if (ptr == nullptr) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
auto isolate = info.GetIsolate();
|
|
334
|
+
auto context = isolate->GetCurrentContext();
|
|
335
|
+
canvas_native_matrix_set_c(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
void MatrixImpl::GetD(v8::Local<v8::String> property,
|
|
340
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
341
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
342
|
+
if (ptr == nullptr) {
|
|
343
|
+
info.GetReturnValue().SetUndefined();
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_d(ptr->GetMatrix()));
|
|
348
|
+
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
void MatrixImpl::SetD(v8::Local<v8::String> property,
|
|
352
|
+
v8::Local<v8::Value> value,
|
|
353
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
354
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
355
|
+
if (ptr == nullptr) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
auto isolate = info.GetIsolate();
|
|
359
|
+
auto context = isolate->GetCurrentContext();
|
|
360
|
+
canvas_native_matrix_set_d(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
void MatrixImpl::GetE(v8::Local<v8::String> property,
|
|
365
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
366
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
367
|
+
if (ptr == nullptr) {
|
|
368
|
+
info.GetReturnValue().SetUndefined();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_e(ptr->GetMatrix()));
|
|
373
|
+
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
void MatrixImpl::SetE(v8::Local<v8::String> property,
|
|
377
|
+
v8::Local<v8::Value> value,
|
|
378
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
379
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
380
|
+
if (ptr == nullptr) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
auto isolate = info.GetIsolate();
|
|
384
|
+
auto context = isolate->GetCurrentContext();
|
|
385
|
+
canvas_native_matrix_set_e(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
void MatrixImpl::GetF(v8::Local<v8::String> property,
|
|
390
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
391
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
392
|
+
if (ptr == nullptr) {
|
|
393
|
+
info.GetReturnValue().SetUndefined();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_f(ptr->GetMatrix()));
|
|
398
|
+
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
void MatrixImpl::SetF(v8::Local<v8::String> property,
|
|
402
|
+
v8::Local<v8::Value> value,
|
|
403
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
404
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
405
|
+
if (ptr == nullptr) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
auto isolate = info.GetIsolate();
|
|
409
|
+
auto context = isolate->GetCurrentContext();
|
|
410
|
+
canvas_native_matrix_set_f(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
void MatrixImpl::GetM11(v8::Local<v8::String> property,
|
|
414
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
415
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
416
|
+
if (ptr == nullptr) {
|
|
417
|
+
info.GetReturnValue().SetUndefined();
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m11(ptr->GetMatrix()));
|
|
422
|
+
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
void MatrixImpl::SetM11(v8::Local<v8::String> property,
|
|
426
|
+
v8::Local<v8::Value> value,
|
|
427
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
428
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
429
|
+
if (ptr == nullptr) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
auto isolate = info.GetIsolate();
|
|
433
|
+
auto context = isolate->GetCurrentContext();
|
|
434
|
+
canvas_native_matrix_set_m11(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
void MatrixImpl::GetM12(v8::Local<v8::String> property,
|
|
438
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
439
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
440
|
+
if (ptr == nullptr) {
|
|
441
|
+
info.GetReturnValue().SetUndefined();
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m12(ptr->GetMatrix()));
|
|
446
|
+
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
void MatrixImpl::SetM12(v8::Local<v8::String> property,
|
|
450
|
+
v8::Local<v8::Value> value,
|
|
451
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
452
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
453
|
+
if (ptr == nullptr) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
auto isolate = info.GetIsolate();
|
|
457
|
+
auto context = isolate->GetCurrentContext();
|
|
458
|
+
canvas_native_matrix_set_m12(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
void MatrixImpl::GetM13(v8::Local<v8::String> property,
|
|
462
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
463
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
464
|
+
if (ptr == nullptr) {
|
|
465
|
+
info.GetReturnValue().SetUndefined();
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m13(ptr->GetMatrix()));
|
|
470
|
+
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
void MatrixImpl::SetM13(v8::Local<v8::String> property,
|
|
474
|
+
v8::Local<v8::Value> value,
|
|
475
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
476
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
477
|
+
if (ptr == nullptr) {
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
auto isolate = info.GetIsolate();
|
|
481
|
+
auto context = isolate->GetCurrentContext();
|
|
482
|
+
canvas_native_matrix_set_m13(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
void MatrixImpl::GetM14(v8::Local<v8::String> property,
|
|
486
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
487
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
488
|
+
if (ptr == nullptr) {
|
|
489
|
+
info.GetReturnValue().SetUndefined();
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m14(ptr->GetMatrix()));
|
|
494
|
+
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
void MatrixImpl::SetM14(v8::Local<v8::String> property,
|
|
498
|
+
v8::Local<v8::Value> value,
|
|
499
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
500
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
501
|
+
if (ptr == nullptr) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
auto isolate = info.GetIsolate();
|
|
505
|
+
auto context = isolate->GetCurrentContext();
|
|
506
|
+
canvas_native_matrix_set_m14(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
void MatrixImpl::GetM21(v8::Local<v8::String> property,
|
|
510
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
511
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
512
|
+
if (ptr == nullptr) {
|
|
513
|
+
info.GetReturnValue().SetUndefined();
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m21(ptr->GetMatrix()));
|
|
518
|
+
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
void MatrixImpl::SetM21(v8::Local<v8::String> property,
|
|
522
|
+
v8::Local<v8::Value> value,
|
|
523
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
524
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
525
|
+
if (ptr == nullptr) {
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
auto isolate = info.GetIsolate();
|
|
529
|
+
auto context = isolate->GetCurrentContext();
|
|
530
|
+
canvas_native_matrix_set_m21(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
void MatrixImpl::GetM22(v8::Local<v8::String> property,
|
|
534
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
535
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
536
|
+
if (ptr == nullptr) {
|
|
537
|
+
info.GetReturnValue().SetUndefined();
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m22(ptr->GetMatrix()));
|
|
542
|
+
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
void MatrixImpl::SetM22(v8::Local<v8::String> property,
|
|
546
|
+
v8::Local<v8::Value> value,
|
|
547
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
548
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
549
|
+
if (ptr == nullptr) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
auto isolate = info.GetIsolate();
|
|
553
|
+
auto context = isolate->GetCurrentContext();
|
|
554
|
+
canvas_native_matrix_set_m22(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
void MatrixImpl::GetM23(v8::Local<v8::String> property,
|
|
558
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
559
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
560
|
+
if (ptr == nullptr) {
|
|
561
|
+
info.GetReturnValue().SetUndefined();
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m23(ptr->GetMatrix()));
|
|
566
|
+
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
void MatrixImpl::SetM23(v8::Local<v8::String> property,
|
|
570
|
+
v8::Local<v8::Value> value,
|
|
571
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
572
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
573
|
+
if (ptr == nullptr) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
auto isolate = info.GetIsolate();
|
|
577
|
+
auto context = isolate->GetCurrentContext();
|
|
578
|
+
canvas_native_matrix_set_m23(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
void MatrixImpl::GetM24(v8::Local<v8::String> property,
|
|
582
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
583
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
584
|
+
if (ptr == nullptr) {
|
|
585
|
+
info.GetReturnValue().SetUndefined();
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m24(ptr->GetMatrix()));
|
|
590
|
+
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
void MatrixImpl::SetM24(v8::Local<v8::String> property,
|
|
594
|
+
v8::Local<v8::Value> value,
|
|
595
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
596
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
597
|
+
if (ptr == nullptr) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
auto isolate = info.GetIsolate();
|
|
601
|
+
auto context = isolate->GetCurrentContext();
|
|
602
|
+
canvas_native_matrix_set_m24(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
void MatrixImpl::GetM31(v8::Local<v8::String> property,
|
|
607
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
608
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
609
|
+
if (ptr == nullptr) {
|
|
610
|
+
info.GetReturnValue().SetUndefined();
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m31(ptr->GetMatrix()));
|
|
615
|
+
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
void MatrixImpl::SetM31(v8::Local<v8::String> property,
|
|
619
|
+
v8::Local<v8::Value> value,
|
|
620
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
621
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
622
|
+
if (ptr == nullptr) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
auto isolate = info.GetIsolate();
|
|
626
|
+
auto context = isolate->GetCurrentContext();
|
|
627
|
+
canvas_native_matrix_set_m31(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
void MatrixImpl::GetM32(v8::Local<v8::String> property,
|
|
631
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
632
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
633
|
+
if (ptr == nullptr) {
|
|
634
|
+
info.GetReturnValue().SetUndefined();
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m32(ptr->GetMatrix()));
|
|
639
|
+
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
void MatrixImpl::SetM32(v8::Local<v8::String> property,
|
|
643
|
+
v8::Local<v8::Value> value,
|
|
644
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
645
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
646
|
+
if (ptr == nullptr) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
auto isolate = info.GetIsolate();
|
|
650
|
+
auto context = isolate->GetCurrentContext();
|
|
651
|
+
canvas_native_matrix_set_m32(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
void MatrixImpl::GetM33(v8::Local<v8::String> property,
|
|
655
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
656
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
657
|
+
if (ptr == nullptr) {
|
|
658
|
+
info.GetReturnValue().SetUndefined();
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m33(ptr->GetMatrix()));
|
|
663
|
+
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
void MatrixImpl::SetM33(v8::Local<v8::String> property,
|
|
667
|
+
v8::Local<v8::Value> value,
|
|
668
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
669
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
670
|
+
if (ptr == nullptr) {
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
auto isolate = info.GetIsolate();
|
|
674
|
+
auto context = isolate->GetCurrentContext();
|
|
675
|
+
canvas_native_matrix_set_m33(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
void MatrixImpl::GetM34(v8::Local<v8::String> property,
|
|
679
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
680
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
681
|
+
if (ptr == nullptr) {
|
|
682
|
+
info.GetReturnValue().SetUndefined();
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m34(ptr->GetMatrix()));
|
|
687
|
+
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
void MatrixImpl::SetM34(v8::Local<v8::String> property,
|
|
691
|
+
v8::Local<v8::Value> value,
|
|
692
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
693
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
694
|
+
if (ptr == nullptr) {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
auto isolate = info.GetIsolate();
|
|
698
|
+
auto context = isolate->GetCurrentContext();
|
|
699
|
+
canvas_native_matrix_set_m34(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
void MatrixImpl::GetM41(v8::Local<v8::String> property,
|
|
703
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
704
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
705
|
+
if (ptr == nullptr) {
|
|
706
|
+
info.GetReturnValue().SetUndefined();
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m41(ptr->GetMatrix()));
|
|
711
|
+
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
void MatrixImpl::SetM41(v8::Local<v8::String> property,
|
|
715
|
+
v8::Local<v8::Value> value,
|
|
716
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
717
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
718
|
+
if (ptr == nullptr) {
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
auto isolate = info.GetIsolate();
|
|
722
|
+
auto context = isolate->GetCurrentContext();
|
|
723
|
+
canvas_native_matrix_set_m41(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
void MatrixImpl::GetM42(v8::Local<v8::String> property,
|
|
727
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
728
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
729
|
+
if (ptr == nullptr) {
|
|
730
|
+
info.GetReturnValue().SetUndefined();
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m42(ptr->GetMatrix()));
|
|
735
|
+
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
void MatrixImpl::SetM42(v8::Local<v8::String> property,
|
|
739
|
+
v8::Local<v8::Value> value,
|
|
740
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
741
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
742
|
+
if (ptr == nullptr) {
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
auto isolate = info.GetIsolate();
|
|
746
|
+
auto context = isolate->GetCurrentContext();
|
|
747
|
+
canvas_native_matrix_set_m42(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
void MatrixImpl::GetM43(v8::Local<v8::String> property,
|
|
751
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
752
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
753
|
+
if (ptr == nullptr) {
|
|
754
|
+
info.GetReturnValue().SetUndefined();
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m43(ptr->GetMatrix()));
|
|
759
|
+
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
void MatrixImpl::SetM43(v8::Local<v8::String> property,
|
|
763
|
+
v8::Local<v8::Value> value,
|
|
764
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
765
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
766
|
+
if (ptr == nullptr) {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
auto isolate = info.GetIsolate();
|
|
770
|
+
auto context = isolate->GetCurrentContext();
|
|
771
|
+
canvas_native_matrix_set_m43(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
void MatrixImpl::GetM44(v8::Local<v8::String> property,
|
|
775
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
776
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
777
|
+
if (ptr == nullptr) {
|
|
778
|
+
info.GetReturnValue().SetUndefined();
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
info.GetReturnValue().Set((double) canvas_native_matrix_get_m44(ptr->GetMatrix()));
|
|
783
|
+
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
void MatrixImpl::SetM44(v8::Local<v8::String> property,
|
|
787
|
+
v8::Local<v8::Value> value,
|
|
788
|
+
const v8::PropertyCallbackInfo<void> &info) {
|
|
789
|
+
MatrixImpl *ptr = GetPointer(info.This());
|
|
790
|
+
if (ptr == nullptr) {
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
auto isolate = info.GetIsolate();
|
|
794
|
+
auto context = isolate->GetCurrentContext();
|
|
795
|
+
canvas_native_matrix_set_m44(ptr->GetMatrix(), (float) value->NumberValue(context).ToChecked());
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
Matrix* MatrixImpl::GetMatrix() {
|
|
799
|
+
return this->matrix_;
|
|
800
|
+
}
|