@nativescript/canvas 2.0.0-beta.11 → 2.0.0-beta.12

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.
Files changed (56) hide show
  1. package/Canvas/common.d.ts +8 -5
  2. package/Canvas/common.js +64 -40
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.js +33 -70
  5. package/Canvas/index.android.js.map +1 -1
  6. package/Canvas/index.ios.d.ts +1 -0
  7. package/Canvas/index.ios.js +43 -48
  8. package/Canvas/index.ios.js.map +1 -1
  9. package/Canvas2D/CanvasRenderingContext2D/index.js +1 -10
  10. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  11. package/Canvas2D/ImageData/index.js +4 -6
  12. package/Canvas2D/ImageData/index.js.map +1 -1
  13. package/WebGL/WebGLRenderingContext/index.js +43 -26
  14. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  15. package/WebGL2/WebGL2RenderingContext/index.js +0 -2
  16. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/platforms/android/canvas-release.aar +0 -0
  19. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  20. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +8 -10
  21. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +4 -4
  22. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +35 -16
  23. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  24. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  25. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +286 -316
  26. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +8 -10
  27. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +8 -10
  28. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  29. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +640 -644
  30. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  31. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +16 -20
  32. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +4 -4
  33. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +35 -16
  34. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  35. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  36. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  37. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +286 -316
  38. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +8 -10
  39. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +8 -10
  40. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +286 -316
  41. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +8 -10
  42. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +8 -10
  43. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +27 -27
  44. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  45. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +661 -662
  46. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +646 -641
  47. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +297 -397
  48. package/platforms/ios/src/cpp/Helpers.h +3 -4
  49. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +8 -27
  50. package/platforms/ios/src/cpp/ImageAssetImpl.h +3 -3
  51. package/platforms/ios/src/cpp/URLImpl.cpp +73 -0
  52. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +4 -4
  53. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +101 -120
  54. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +1766 -1659
  55. package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
  56. package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
@@ -323,8 +323,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
323
323
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
324
324
  - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
325
325
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
326
- - (void)setNeedsDisplay;
327
- - (void)setNeedsDisplayInRect:(CGRect)rect;
328
326
  - (void)bindDrawable;
329
327
  - (void)deleteDrawable;
330
328
  - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE;
@@ -344,10 +342,10 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
344
342
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy;
345
343
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
346
344
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image sx:(float)sx sy:(float)sy sw:(float)sw sh:(float)sh dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
347
- + (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
348
- + (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
349
- + (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
350
- + (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
345
+ + (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
346
+ + (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
347
+ + (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
348
+ + (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
351
349
  + (void)resize2DContext:(int64_t)context :(float)width :(float)height;
352
350
  + (void)flush2DContext:(int64_t)context;
353
351
  + (BOOL)flushGL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
@@ -380,15 +378,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
380
378
  + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT;
381
379
  + (NSMapTable<NSString *, NSCCanvas *> * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT;
382
380
  - (void * _Nonnull)getViewPtr SWIFT_WARN_UNUSED_RESULT;
383
- @property (nonatomic) BOOL ignorePixelScaling;
381
+ @property (nonatomic) BOOL autoScale;
384
382
  @property (nonatomic, readonly) int64_t nativeGL;
385
383
  @property (nonatomic, readonly) int64_t nativeContext;
386
384
  @property (nonatomic, readonly) NSInteger drawingBufferWidth;
387
385
  @property (nonatomic, readonly) NSInteger drawingBufferHeight;
388
386
  @property (nonatomic, readonly) float width;
389
387
  @property (nonatomic, readonly) float height;
390
- - (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(NSString * _Nonnull)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible SWIFT_METHOD_FAMILY(none);
391
- - (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(NSString * _Nonnull)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible :(int32_t)fontColor SWIFT_WARN_UNUSED_RESULT;
388
+ - (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(int32_t)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible SWIFT_METHOD_FAMILY(none);
389
+ - (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(int32_t)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible :(int32_t)fontColor SWIFT_WARN_UNUSED_RESULT;
392
390
  - (void)forceLayout:(CGFloat)width :(CGFloat)height;
393
391
  - (UIImage * _Nullable)snapshot:(BOOL)flip SWIFT_WARN_UNUSED_RESULT;
394
392
  - (BOOL)render;
@@ -451,7 +449,7 @@ SWIFT_CLASS_NAMED("NSCRender")
451
449
 
452
450
  SWIFT_CLASS_NAMED("NSCSVG")
453
451
  @interface TNSSVG : UIView
454
- @property (nonatomic) BOOL ignorePixelScaling;
452
+ @property (nonatomic) BOOL autoScale;
455
453
  @property (nonatomic, copy) NSString * _Nullable src;
456
454
  @property (nonatomic, copy) NSString * _Nullable srcPath;
457
455
  - (void)layoutSubviews;
@@ -808,8 +806,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
808
806
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
809
807
  - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
810
808
  - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
811
- - (void)setNeedsDisplay;
812
- - (void)setNeedsDisplayInRect:(CGRect)rect;
813
809
  - (void)bindDrawable;
814
810
  - (void)deleteDrawable;
815
811
  - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE;
@@ -829,10 +825,10 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
829
825
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy;
830
826
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
831
827
  + (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image sx:(float)sx sy:(float)sy sw:(float)sw sh:(float)sh dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
832
- + (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
833
- + (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
834
- + (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
835
- + (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(NSString * _Nonnull)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
828
+ + (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
829
+ + (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
830
+ + (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
831
+ + (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
836
832
  + (void)resize2DContext:(int64_t)context :(float)width :(float)height;
837
833
  + (void)flush2DContext:(int64_t)context;
838
834
  + (BOOL)flushGL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
@@ -865,15 +861,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
865
861
  + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT;
866
862
  + (NSMapTable<NSString *, NSCCanvas *> * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT;
867
863
  - (void * _Nonnull)getViewPtr SWIFT_WARN_UNUSED_RESULT;
868
- @property (nonatomic) BOOL ignorePixelScaling;
864
+ @property (nonatomic) BOOL autoScale;
869
865
  @property (nonatomic, readonly) int64_t nativeGL;
870
866
  @property (nonatomic, readonly) int64_t nativeContext;
871
867
  @property (nonatomic, readonly) NSInteger drawingBufferWidth;
872
868
  @property (nonatomic, readonly) NSInteger drawingBufferHeight;
873
869
  @property (nonatomic, readonly) float width;
874
870
  @property (nonatomic, readonly) float height;
875
- - (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(NSString * _Nonnull)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible SWIFT_METHOD_FAMILY(none);
876
- - (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(NSString * _Nonnull)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible :(int32_t)fontColor SWIFT_WARN_UNUSED_RESULT;
871
+ - (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(int32_t)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible SWIFT_METHOD_FAMILY(none);
872
+ - (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(int32_t)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible :(int32_t)fontColor SWIFT_WARN_UNUSED_RESULT;
877
873
  - (void)forceLayout:(CGFloat)width :(CGFloat)height;
878
874
  - (UIImage * _Nullable)snapshot:(BOOL)flip SWIFT_WARN_UNUSED_RESULT;
879
875
  - (BOOL)render;
@@ -936,7 +932,7 @@ SWIFT_CLASS_NAMED("NSCRender")
936
932
 
937
933
  SWIFT_CLASS_NAMED("NSCSVG")
938
934
  @interface TNSSVG : UIView
939
- @property (nonatomic) BOOL ignorePixelScaling;
935
+ @property (nonatomic) BOOL autoScale;
940
936
  @property (nonatomic, copy) NSString * _Nullable src;
941
937
  @property (nonatomic, copy) NSString * _Nullable srcPath;
942
938
  - (void)layoutSubviews;
@@ -13,7 +13,7 @@ long long canvas_native_init_ios_gl(int64_t view,
13
13
  bool antialias,
14
14
  bool depth,
15
15
  bool fail_if_major_performance_caveat,
16
- const char *power_preference,
16
+ int32_t power_preference,
17
17
  bool premultiplied_alpha,
18
18
  bool preserve_drawing_buffer,
19
19
  bool stencil,
@@ -27,7 +27,7 @@ long long canvas_native_init_ios_gl_with_shared_gl(int64_t view,
27
27
  bool antialias,
28
28
  bool depth,
29
29
  bool fail_if_major_performance_caveat,
30
- const char *power_preference,
30
+ int32_t power_preference,
31
31
  bool premultiplied_alpha,
32
32
  bool preserve_drawing_buffer,
33
33
  bool stencil,
@@ -43,7 +43,7 @@ long long canvas_native_init_offscreen_ios_gl(int32_t width,
43
43
  bool antialias,
44
44
  bool depth,
45
45
  bool fail_if_major_performance_caveat,
46
- const char *power_preference,
46
+ int32_t power_preference,
47
47
  bool premultiplied_alpha,
48
48
  bool preserve_drawing_buffer,
49
49
  bool stencil,
@@ -58,7 +58,7 @@ long long canvas_native_init_offscreen_ios_gl_with_shared_gl(int32_t width,
58
58
  bool antialias,
59
59
  bool depth,
60
60
  bool fail_if_major_performance_caveat,
61
- const char *power_preference,
61
+ int32_t power_preference,
62
62
  bool premultiplied_alpha,
63
63
  bool preserve_drawing_buffer,
64
64
  bool stencil,
@@ -1172,12 +1172,6 @@ const char *canvas_native_image_asset_get_error(struct ImageAsset *asset);
1172
1172
 
1173
1173
  bool canvas_native_image_asset_has_error(struct ImageAsset *asset);
1174
1174
 
1175
- bool canvas_native_image_asset_scale(struct ImageAsset *asset, uint32_t x, uint32_t y);
1176
-
1177
- bool canvas_native_image_asset_save_path(struct ImageAsset *asset,
1178
- const char *path,
1179
- uint32_t format);
1180
-
1181
1175
  float canvas_native_text_metrics_get_width(const struct TextMetrics *metrics);
1182
1176
 
1183
1177
  float canvas_native_text_metrics_get_actual_bounding_box_left(const struct TextMetrics *metrics);
@@ -1353,7 +1347,7 @@ bool canvas_native_webgl_context_attribute_get_get_depth(const struct ContextAtt
1353
1347
 
1354
1348
  bool canvas_native_webgl_context_attribute_get_get_fail_if_major_performance_caveat(const struct ContextAttributes *attr);
1355
1349
 
1356
- const char *canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr);
1350
+ int32_t canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr);
1357
1351
 
1358
1352
  bool canvas_native_webgl_context_attribute_get_get_premultiplied_alpha(const struct ContextAttributes *attr);
1359
1353
 
@@ -1475,12 +1469,12 @@ void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t
1475
1469
  const struct OES_vertex_array_object *object);
1476
1470
 
1477
1471
  struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
1478
- const char *version,
1472
+ int32_t version,
1479
1473
  bool alpha,
1480
1474
  bool antialias,
1481
1475
  bool depth,
1482
1476
  bool fail_if_major_performance_caveat,
1483
- const char *power_preference,
1477
+ int32_t power_preference,
1484
1478
  bool premultiplied_alpha,
1485
1479
  bool preserve_drawing_buffer,
1486
1480
  bool stencil,
@@ -1489,12 +1483,12 @@ struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
1489
1483
 
1490
1484
  struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
1491
1485
  int32_t height,
1492
- const char *version,
1486
+ int32_t version,
1493
1487
  bool alpha,
1494
1488
  bool antialias,
1495
1489
  bool depth,
1496
1490
  bool fail_if_major_performance_caveat,
1497
- const char *power_preference,
1491
+ int32_t power_preference,
1498
1492
  bool premultiplied_alpha,
1499
1493
  bool preserve_drawing_buffer,
1500
1494
  bool stencil,
@@ -1999,9 +1993,9 @@ void canvas_native_webgl_tex_image2d_canvas2d(int32_t target,
1999
1993
 
2000
1994
  void canvas_native_webgl_tex_image2d_webgl(int32_t target,
2001
1995
  int32_t level,
2002
- int32_t _internalformat,
2003
- int32_t _format,
2004
- int32_t _image_type,
1996
+ int32_t internalformat,
1997
+ int32_t format,
1998
+ int32_t image_type,
2005
1999
  struct WebGLState *webgl,
2006
2000
  struct WebGLState *state);
2007
2001
 
@@ -2067,8 +2061,8 @@ void canvas_native_webgl_tex_sub_image2d_webgl(uint32_t target,
2067
2061
  int32_t level,
2068
2062
  int32_t xoffset,
2069
2063
  int32_t yoffset,
2070
- uint32_t _format,
2071
- int32_t _image_type,
2064
+ uint32_t format,
2065
+ int32_t image_type,
2072
2066
  struct WebGLState *webgl,
2073
2067
  struct WebGLState *state);
2074
2068
 
@@ -2555,6 +2549,18 @@ void canvas_native_webgl2_tex_image3d_asset(uint32_t target,
2555
2549
  const struct ImageAsset *asset,
2556
2550
  struct WebGLState *state);
2557
2551
 
2552
+ void canvas_native_webgl2_tex_image3d_canvas2d(uint32_t target,
2553
+ int32_t level,
2554
+ int32_t internalformat,
2555
+ int32_t _width,
2556
+ int32_t _height,
2557
+ int32_t depth,
2558
+ int32_t border,
2559
+ uint32_t format,
2560
+ uint32_t type_,
2561
+ struct CanvasRenderingContext2D *canvas,
2562
+ struct WebGLState *state);
2563
+
2558
2564
  void canvas_native_webgl2_tex_image3d(uint32_t target,
2559
2565
  int32_t level,
2560
2566
  int32_t internalformat,
@@ -2637,6 +2643,19 @@ void canvas_native_webgl2_tex_sub_image3d_asset(uint32_t target,
2637
2643
  const struct ImageAsset *asset,
2638
2644
  struct WebGLState *state);
2639
2645
 
2646
+ void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
2647
+ int32_t level,
2648
+ int32_t xoffset,
2649
+ int32_t yoffset,
2650
+ int32_t zoffset,
2651
+ int32_t width,
2652
+ int32_t height,
2653
+ int32_t depth,
2654
+ uint32_t format,
2655
+ uint32_t type_,
2656
+ struct CanvasRenderingContext2D *canvas,
2657
+ struct WebGLState *state);
2658
+
2640
2659
  void canvas_native_webgl2_tex_sub_image3d_offset(uint32_t target,
2641
2660
  int32_t level,
2642
2661
  int32_t xoffset,