@nativescript/canvas 2.0.0-beta.2 → 2.0.0-beta.20
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 +23 -15
- package/Canvas/common.js +127 -55
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +1 -0
- package/Canvas/index.android.js +53 -88
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +2 -0
- package/Canvas/index.ios.d.ts +4 -1
- package/Canvas/index.ios.js +58 -52
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +14 -0
- package/Canvas2D/CanvasRenderingContext2D/index.js +207 -19
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.d.ts +14 -0
- package/Canvas2D/DOMMatrix/index.js +62 -0
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +4 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +2 -1
- package/Canvas2D/Path2D/index.js +3 -12
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Dom.d.ts +20 -1
- package/Dom/Dom.js +78 -10
- package/Dom/Dom.js.map +1 -1
- package/Dom/Group.d.ts +5 -0
- package/Dom/Group.js +15 -0
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.d.ts +1 -0
- package/Dom/Image.js +20 -0
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.d.ts +4 -0
- package/Dom/Paint.js +19 -7
- package/Dom/Paint.js.map +1 -1
- package/Dom/Shadow.js +9 -0
- package/Dom/Shadow.js.map +1 -1
- package/Dom/Text.js +11 -1
- package/Dom/Text.js.map +1 -1
- package/Dom/index.d.ts +1 -0
- package/Dom/index.js +1 -0
- package/Dom/index.js.map +1 -1
- package/Dom/shaders/Gradients.d.ts +3 -0
- package/Dom/shaders/Gradients.js +4 -0
- package/Dom/shaders/Gradients.js.map +1 -0
- package/Dom/shaders/LinearGradient.d.ts +14 -0
- package/Dom/shaders/LinearGradient.js +44 -0
- package/Dom/shaders/LinearGradient.js.map +1 -0
- package/Dom/shaders/TwoPointConicalGradient.d.ts +16 -0
- package/Dom/shaders/TwoPointConicalGradient.js +60 -0
- package/Dom/shaders/TwoPointConicalGradient.js.map +1 -0
- package/Dom/shaders/index.d.ts +2 -0
- package/Dom/shaders/index.js +3 -0
- package/Dom/shaders/index.js.map +1 -0
- package/Dom/shapes/Atlas.d.ts +22 -0
- package/Dom/shapes/Atlas.js +60 -0
- package/Dom/shapes/Atlas.js.map +1 -0
- package/Dom/shapes/Circle.js +11 -0
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Line.d.ts +16 -4
- package/Dom/shapes/Line.js +13 -8
- package/Dom/shapes/Line.js.map +1 -1
- package/Dom/shapes/Oval.d.ts +12 -0
- package/Dom/shapes/Oval.js +87 -0
- package/Dom/shapes/Oval.js.map +1 -0
- package/Dom/shapes/Path.d.ts +19 -2
- package/Dom/shapes/Path.js +68 -4
- package/Dom/shapes/Path.js.map +1 -1
- package/Dom/shapes/Points.js +9 -1
- package/Dom/shapes/Points.js.map +1 -1
- package/Dom/shapes/Rect.js +27 -5
- package/Dom/shapes/Rect.js.map +1 -1
- package/Dom/shapes/RoundedRect.d.ts +2 -1
- package/Dom/shapes/RoundedRect.js +13 -2
- package/Dom/shapes/RoundedRect.js.map +1 -1
- package/Dom/shapes/index.d.ts +17 -0
- package/Dom/shapes/index.js +31 -0
- package/Dom/shapes/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +1 -0
- package/WebGL/WebGLRenderingContext/index.js +104 -14
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -0
- package/WebGL2/WebGL2RenderingContext/index.js +2 -3
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +14 -15
- package/index.js.map +1 -1
- package/package.json +1 -4
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +4 -0
- 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 +35 -25
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +50 -4
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +139 -16
- 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 +982 -3319
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +18 -33
- 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 +18 -33
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/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/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +622 -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 +70 -50
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +50 -4
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +139 -16
- 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 +982 -3319
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +18 -33
- 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 +18 -33
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +982 -3319
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +18 -33
- 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 +18 -33
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/module.modulemap +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/NSCCanvas.nib +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +35 -35
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +624 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +624 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +297 -397
- package/platforms/ios/src/cpp/Helpers.h +3 -4
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +30 -30
- package/platforms/ios/src/cpp/ImageAssetImpl.h +8 -5
- package/platforms/ios/src/cpp/URLImpl.cpp +73 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +339 -33
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +150 -55
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +409 -3
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +27 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +19 -48
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +19 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +105 -119
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +37 -7
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +10 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +1766 -1659
- package/src-native/ios/NativeScript.podspec +1 -1
- package/SVG/Circle.d.ts +0 -11
- package/SVG/Circle.js +0 -21
- package/SVG/Circle.js.map +0 -1
- package/SVG/ClipPath.d.ts +0 -4
- package/SVG/ClipPath.js +0 -9
- package/SVG/ClipPath.js.map +0 -1
- package/SVG/Defs.d.ts +0 -4
- package/SVG/Defs.js +0 -9
- package/SVG/Defs.js.map +0 -1
- package/SVG/Ellipse.d.ts +0 -13
- package/SVG/Ellipse.js +0 -26
- package/SVG/Ellipse.js.map +0 -1
- package/SVG/G.d.ts +0 -7
- package/SVG/G.js +0 -9
- package/SVG/G.js.map +0 -1
- package/SVG/Image.d.ts +0 -11
- package/SVG/Image.js +0 -40
- package/SVG/Image.js.map +0 -1
- package/SVG/Line.d.ts +0 -13
- package/SVG/Line.js +0 -26
- package/SVG/Line.js.map +0 -1
- package/SVG/LinearGradient.d.ts +0 -10
- package/SVG/LinearGradient.js +0 -13
- package/SVG/LinearGradient.js.map +0 -1
- package/SVG/Path.d.ts +0 -7
- package/SVG/Path.js +0 -14
- package/SVG/Path.js.map +0 -1
- package/SVG/Pattern.d.ts +0 -4
- package/SVG/Pattern.js +0 -9
- package/SVG/Pattern.js.map +0 -1
- package/SVG/Polygon.d.ts +0 -7
- package/SVG/Polygon.js +0 -14
- package/SVG/Polygon.js.map +0 -1
- package/SVG/Polyline.d.ts +0 -7
- package/SVG/Polyline.js +0 -14
- package/SVG/Polyline.js.map +0 -1
- package/SVG/Rect.d.ts +0 -8
- package/SVG/Rect.js +0 -13
- package/SVG/Rect.js.map +0 -1
- package/SVG/SVG.d.ts +0 -31
- package/SVG/SVG.js +0 -190
- package/SVG/SVG.js.map +0 -1
- package/SVG/SVGItem.d.ts +0 -5
- package/SVG/SVGItem.js +0 -8
- package/SVG/SVGItem.js.map +0 -1
- package/SVG/Stop.d.ts +0 -5
- package/SVG/Stop.js +0 -9
- package/SVG/Stop.js.map +0 -1
- package/SVG/Symbol.d.ts +0 -4
- package/SVG/Symbol.js +0 -9
- package/SVG/Symbol.js.map +0 -1
- package/SVG/Text.d.ts +0 -14
- package/SVG/Text.js +0 -26
- package/SVG/Text.js.map +0 -1
- package/SVG/Use.d.ts +0 -4
- package/SVG/Use.js +0 -9
- package/SVG/Use.js.map +0 -1
- package/SVG/index.d.ts +0 -18
- package/SVG/index.js +0 -19
- package/SVG/index.js.map +0 -1
- package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
- package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#if 0
|
|
2
2
|
#elif defined(__arm64__) && __arm64__
|
|
3
|
-
// Generated by Apple Swift version 5.
|
|
3
|
+
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
|
|
4
4
|
#ifndef CANVASNATIVE_SWIFT_H
|
|
5
5
|
#define CANVASNATIVE_SWIFT_H
|
|
6
6
|
#pragma clang diagnostic push
|
|
@@ -42,12 +42,18 @@
|
|
|
42
42
|
#include <string.h>
|
|
43
43
|
#endif
|
|
44
44
|
#if defined(__cplusplus)
|
|
45
|
-
#if __has_include(<ptrauth.h>)
|
|
45
|
+
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
|
46
46
|
# include <ptrauth.h>
|
|
47
47
|
#else
|
|
48
|
+
#pragma clang diagnostic push
|
|
49
|
+
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
|
48
50
|
# ifndef __ptrauth_swift_value_witness_function_pointer
|
|
49
51
|
# define __ptrauth_swift_value_witness_function_pointer(x)
|
|
50
52
|
# endif
|
|
53
|
+
# ifndef __ptrauth_swift_class_method_pointer
|
|
54
|
+
# define __ptrauth_swift_class_method_pointer(x)
|
|
55
|
+
# endif
|
|
56
|
+
#pragma clang diagnostic pop
|
|
51
57
|
#endif
|
|
52
58
|
#endif
|
|
53
59
|
|
|
@@ -246,6 +252,17 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
246
252
|
#else
|
|
247
253
|
# define SWIFT_NOEXCEPT
|
|
248
254
|
#endif
|
|
255
|
+
#if !defined(SWIFT_C_INLINE_THUNK)
|
|
256
|
+
# if __has_attribute(always_inline)
|
|
257
|
+
# if __has_attribute(nodebug)
|
|
258
|
+
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
|
259
|
+
# else
|
|
260
|
+
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
|
261
|
+
# endif
|
|
262
|
+
# else
|
|
263
|
+
# define SWIFT_C_INLINE_THUNK inline
|
|
264
|
+
# endif
|
|
265
|
+
#endif
|
|
249
266
|
#if defined(_WIN32)
|
|
250
267
|
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
|
251
268
|
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
|
@@ -306,8 +323,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
|
306
323
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
307
324
|
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
308
325
|
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
309
|
-
- (void)setNeedsDisplay;
|
|
310
|
-
- (void)setNeedsDisplayInRect:(CGRect)rect;
|
|
311
326
|
- (void)bindDrawable;
|
|
312
327
|
- (void)deleteDrawable;
|
|
313
328
|
- (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE;
|
|
@@ -327,10 +342,10 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
327
342
|
+ (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy;
|
|
328
343
|
+ (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
|
|
329
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;
|
|
330
|
-
+ (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
331
|
-
+ (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
332
|
-
+ (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
333
|
-
+ (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
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;
|
|
334
349
|
+ (void)resize2DContext:(int64_t)context :(float)width :(float)height;
|
|
335
350
|
+ (void)flush2DContext:(int64_t)context;
|
|
336
351
|
+ (BOOL)flushGL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -345,6 +360,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
345
360
|
+ (void)readFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSString * _Nullable, NSData * _Nullable))callback;
|
|
346
361
|
+ (void)deleteFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSError * _Nullable, BOOL))callback;
|
|
347
362
|
+ (void)handleBase64Image:(NSString * _Nonnull)mime :(NSString * _Nonnull)dir :(NSString * _Nonnull)base64 :(void (^ _Nonnull)(NSString * _Nullable, NSString * _Nullable))callback;
|
|
363
|
+
+ (NSString * _Nonnull)getPixelsPerInchForCurrentDevice SWIFT_WARN_UNUSED_RESULT;
|
|
348
364
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
349
365
|
@end
|
|
350
366
|
|
|
@@ -363,15 +379,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
|
|
|
363
379
|
+ (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT;
|
|
364
380
|
+ (NSMapTable<NSString *, NSCCanvas *> * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT;
|
|
365
381
|
- (void * _Nonnull)getViewPtr SWIFT_WARN_UNUSED_RESULT;
|
|
366
|
-
@property (nonatomic) BOOL
|
|
382
|
+
@property (nonatomic) BOOL autoScale;
|
|
367
383
|
@property (nonatomic, readonly) int64_t nativeGL;
|
|
368
384
|
@property (nonatomic, readonly) int64_t nativeContext;
|
|
369
385
|
@property (nonatomic, readonly) NSInteger drawingBufferWidth;
|
|
370
386
|
@property (nonatomic, readonly) NSInteger drawingBufferHeight;
|
|
371
387
|
@property (nonatomic, readonly) float width;
|
|
372
388
|
@property (nonatomic, readonly) float height;
|
|
373
|
-
- (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(
|
|
374
|
-
- (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(
|
|
389
|
+
- (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);
|
|
390
|
+
- (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;
|
|
375
391
|
- (void)forceLayout:(CGFloat)width :(CGFloat)height;
|
|
376
392
|
- (UIImage * _Nullable)snapshot:(BOOL)flip SWIFT_WARN_UNUSED_RESULT;
|
|
377
393
|
- (BOOL)render;
|
|
@@ -382,7 +398,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
|
|
|
382
398
|
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
383
399
|
- (void)setListener:(id <NSCCanvasListener> _Nullable)listener;
|
|
384
400
|
- (void)layoutSubviews;
|
|
385
|
-
+ (void)getBoundingClientRect:(
|
|
401
|
+
+ (void)getBoundingClientRect:(UIView * _Nonnull)view :(void * _Nonnull)buffer;
|
|
386
402
|
@end
|
|
387
403
|
|
|
388
404
|
|
|
@@ -432,17 +448,11 @@ SWIFT_CLASS_NAMED("NSCRender")
|
|
|
432
448
|
@end
|
|
433
449
|
|
|
434
450
|
|
|
435
|
-
SWIFT_CLASS_NAMED("
|
|
436
|
-
@interface
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
- (void)layoutSubviews;
|
|
441
|
-
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
442
|
-
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
443
|
-
- (void)drawRect:(CGRect)rect;
|
|
444
|
-
- (UIImage * _Nullable)toImage SWIFT_WARN_UNUSED_RESULT;
|
|
445
|
-
- (NSData * _Nullable)toData SWIFT_WARN_UNUSED_RESULT;
|
|
451
|
+
SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
452
|
+
@interface NSCWebGLRenderingContext : NSObject
|
|
453
|
+
+ (void)texImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
454
|
+
+ (void)texSubImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)xoffset :(int32_t)yoffset :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
455
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
446
456
|
@end
|
|
447
457
|
|
|
448
458
|
@class AVPlayer;
|
|
@@ -458,17 +468,17 @@ SWIFT_CLASS_NAMED("Utils")
|
|
|
458
468
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
459
469
|
@end
|
|
460
470
|
|
|
461
|
-
#endif
|
|
462
|
-
#if defined(__cplusplus)
|
|
463
471
|
#endif
|
|
464
472
|
#if __has_attribute(external_source_symbol)
|
|
465
473
|
# pragma clang attribute pop
|
|
466
474
|
#endif
|
|
475
|
+
#if defined(__cplusplus)
|
|
476
|
+
#endif
|
|
467
477
|
#pragma clang diagnostic pop
|
|
468
478
|
#endif
|
|
469
479
|
|
|
470
480
|
#elif defined(__x86_64__) && __x86_64__
|
|
471
|
-
// Generated by Apple Swift version 5.
|
|
481
|
+
// Generated by Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
|
|
472
482
|
#ifndef CANVASNATIVE_SWIFT_H
|
|
473
483
|
#define CANVASNATIVE_SWIFT_H
|
|
474
484
|
#pragma clang diagnostic push
|
|
@@ -510,12 +520,18 @@ SWIFT_CLASS_NAMED("Utils")
|
|
|
510
520
|
#include <string.h>
|
|
511
521
|
#endif
|
|
512
522
|
#if defined(__cplusplus)
|
|
513
|
-
#if __has_include(<ptrauth.h>)
|
|
523
|
+
#if defined(__arm64e__) && __has_include(<ptrauth.h>)
|
|
514
524
|
# include <ptrauth.h>
|
|
515
525
|
#else
|
|
526
|
+
#pragma clang diagnostic push
|
|
527
|
+
#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
|
|
516
528
|
# ifndef __ptrauth_swift_value_witness_function_pointer
|
|
517
529
|
# define __ptrauth_swift_value_witness_function_pointer(x)
|
|
518
530
|
# endif
|
|
531
|
+
# ifndef __ptrauth_swift_class_method_pointer
|
|
532
|
+
# define __ptrauth_swift_class_method_pointer(x)
|
|
533
|
+
# endif
|
|
534
|
+
#pragma clang diagnostic pop
|
|
519
535
|
#endif
|
|
520
536
|
#endif
|
|
521
537
|
|
|
@@ -714,6 +730,17 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
|
|
|
714
730
|
#else
|
|
715
731
|
# define SWIFT_NOEXCEPT
|
|
716
732
|
#endif
|
|
733
|
+
#if !defined(SWIFT_C_INLINE_THUNK)
|
|
734
|
+
# if __has_attribute(always_inline)
|
|
735
|
+
# if __has_attribute(nodebug)
|
|
736
|
+
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline)) __attribute__((nodebug))
|
|
737
|
+
# else
|
|
738
|
+
# define SWIFT_C_INLINE_THUNK inline __attribute__((always_inline))
|
|
739
|
+
# endif
|
|
740
|
+
# else
|
|
741
|
+
# define SWIFT_C_INLINE_THUNK inline
|
|
742
|
+
# endif
|
|
743
|
+
#endif
|
|
717
744
|
#if defined(_WIN32)
|
|
718
745
|
#if !defined(SWIFT_IMPORT_STDLIB_SYMBOL)
|
|
719
746
|
# define SWIFT_IMPORT_STDLIB_SYMBOL __declspec(dllimport)
|
|
@@ -774,8 +801,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
|
|
|
774
801
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
775
802
|
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
776
803
|
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
777
|
-
- (void)setNeedsDisplay;
|
|
778
|
-
- (void)setNeedsDisplayInRect:(CGRect)rect;
|
|
779
804
|
- (void)bindDrawable;
|
|
780
805
|
- (void)deleteDrawable;
|
|
781
806
|
- (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE;
|
|
@@ -795,10 +820,10 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
795
820
|
+ (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy;
|
|
796
821
|
+ (void)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh;
|
|
797
822
|
+ (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;
|
|
798
|
-
+ (int64_t)initGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
799
|
-
+ (int64_t)initSharedGLWithView:(int64_t)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
800
|
-
+ (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
801
|
-
+ (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(
|
|
823
|
+
+ (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;
|
|
824
|
+
+ (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;
|
|
825
|
+
+ (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;
|
|
826
|
+
+ (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;
|
|
802
827
|
+ (void)resize2DContext:(int64_t)context :(float)width :(float)height;
|
|
803
828
|
+ (void)flush2DContext:(int64_t)context;
|
|
804
829
|
+ (BOOL)flushGL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
|
|
@@ -813,6 +838,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
813
838
|
+ (void)readFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSString * _Nullable, NSData * _Nullable))callback;
|
|
814
839
|
+ (void)deleteFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSError * _Nullable, BOOL))callback;
|
|
815
840
|
+ (void)handleBase64Image:(NSString * _Nonnull)mime :(NSString * _Nonnull)dir :(NSString * _Nonnull)base64 :(void (^ _Nonnull)(NSString * _Nullable, NSString * _Nullable))callback;
|
|
841
|
+
+ (NSString * _Nonnull)getPixelsPerInchForCurrentDevice SWIFT_WARN_UNUSED_RESULT;
|
|
816
842
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
817
843
|
@end
|
|
818
844
|
|
|
@@ -831,15 +857,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
|
|
|
831
857
|
+ (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT;
|
|
832
858
|
+ (NSMapTable<NSString *, NSCCanvas *> * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT;
|
|
833
859
|
- (void * _Nonnull)getViewPtr SWIFT_WARN_UNUSED_RESULT;
|
|
834
|
-
@property (nonatomic) BOOL
|
|
860
|
+
@property (nonatomic) BOOL autoScale;
|
|
835
861
|
@property (nonatomic, readonly) int64_t nativeGL;
|
|
836
862
|
@property (nonatomic, readonly) int64_t nativeContext;
|
|
837
863
|
@property (nonatomic, readonly) NSInteger drawingBufferWidth;
|
|
838
864
|
@property (nonatomic, readonly) NSInteger drawingBufferHeight;
|
|
839
865
|
@property (nonatomic, readonly) float width;
|
|
840
866
|
@property (nonatomic, readonly) float height;
|
|
841
|
-
- (void)initContext:(NSString * _Nonnull)type :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(
|
|
842
|
-
- (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(
|
|
867
|
+
- (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);
|
|
868
|
+
- (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;
|
|
843
869
|
- (void)forceLayout:(CGFloat)width :(CGFloat)height;
|
|
844
870
|
- (UIImage * _Nullable)snapshot:(BOOL)flip SWIFT_WARN_UNUSED_RESULT;
|
|
845
871
|
- (BOOL)render;
|
|
@@ -850,7 +876,7 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
|
|
|
850
876
|
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
851
877
|
- (void)setListener:(id <NSCCanvasListener> _Nullable)listener;
|
|
852
878
|
- (void)layoutSubviews;
|
|
853
|
-
+ (void)getBoundingClientRect:(
|
|
879
|
+
+ (void)getBoundingClientRect:(UIView * _Nonnull)view :(void * _Nonnull)buffer;
|
|
854
880
|
@end
|
|
855
881
|
|
|
856
882
|
|
|
@@ -900,17 +926,11 @@ SWIFT_CLASS_NAMED("NSCRender")
|
|
|
900
926
|
@end
|
|
901
927
|
|
|
902
928
|
|
|
903
|
-
SWIFT_CLASS_NAMED("
|
|
904
|
-
@interface
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
- (void)layoutSubviews;
|
|
909
|
-
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
910
|
-
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
911
|
-
- (void)drawRect:(CGRect)rect;
|
|
912
|
-
- (UIImage * _Nullable)toImage SWIFT_WARN_UNUSED_RESULT;
|
|
913
|
-
- (NSData * _Nullable)toData SWIFT_WARN_UNUSED_RESULT;
|
|
929
|
+
SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
|
|
930
|
+
@interface NSCWebGLRenderingContext : NSObject
|
|
931
|
+
+ (void)texImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
932
|
+
+ (void)texSubImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)xoffset :(int32_t)yoffset :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
|
|
933
|
+
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
914
934
|
@end
|
|
915
935
|
|
|
916
936
|
@class AVPlayer;
|
|
@@ -926,12 +946,12 @@ SWIFT_CLASS_NAMED("Utils")
|
|
|
926
946
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
927
947
|
@end
|
|
928
948
|
|
|
929
|
-
#endif
|
|
930
|
-
#if defined(__cplusplus)
|
|
931
949
|
#endif
|
|
932
950
|
#if __has_attribute(external_source_symbol)
|
|
933
951
|
# pragma clang attribute pop
|
|
934
952
|
#endif
|
|
953
|
+
#if defined(__cplusplus)
|
|
954
|
+
#endif
|
|
935
955
|
#pragma clang diagnostic pop
|
|
936
956
|
#endif
|
|
937
957
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
61
|
+
int32_t power_preference,
|
|
62
62
|
bool premultiplied_alpha,
|
|
63
63
|
bool preserve_drawing_buffer,
|
|
64
64
|
bool stencil,
|
|
@@ -141,4 +141,50 @@ bool canvas_native_context_draw_image_with_bytes(int64_t context,
|
|
|
141
141
|
float d_width,
|
|
142
142
|
float d_height);
|
|
143
143
|
|
|
144
|
+
void canvas_native_context_custom_with_buffer_flush(int64_t context,
|
|
145
|
+
uint8_t *bytes,
|
|
146
|
+
uintptr_t size,
|
|
147
|
+
float width,
|
|
148
|
+
float height,
|
|
149
|
+
bool alpha);
|
|
150
|
+
|
|
151
|
+
long long canvas_native_context_init_context_with_custom_surface(float width,
|
|
152
|
+
float height,
|
|
153
|
+
float density,
|
|
154
|
+
bool alpha,
|
|
155
|
+
int font_color,
|
|
156
|
+
float ppi,
|
|
157
|
+
int direction);
|
|
158
|
+
|
|
159
|
+
int64_t canvas_native_context_get_texture_from_2d(int64_t context);
|
|
160
|
+
|
|
161
|
+
uint32_t canvas_native_context_backend_texture_get_id(int64_t texture);
|
|
162
|
+
|
|
163
|
+
void canvas_native_context_backend_texture_destroy(int64_t texture);
|
|
164
|
+
|
|
165
|
+
void canvas_native_webgl_tex_image_2d(int64_t context,
|
|
166
|
+
int32_t target,
|
|
167
|
+
int32_t level,
|
|
168
|
+
int32_t internalformat,
|
|
169
|
+
int32_t format,
|
|
170
|
+
int32_t type_,
|
|
171
|
+
uint8_t *bytes,
|
|
172
|
+
uintptr_t size,
|
|
173
|
+
float width,
|
|
174
|
+
float height,
|
|
175
|
+
bool flip_y);
|
|
176
|
+
|
|
177
|
+
void canvas_native_webgl_tex_sub_image_2d(int64_t context,
|
|
178
|
+
int32_t target,
|
|
179
|
+
int32_t level,
|
|
180
|
+
int32_t xoffset,
|
|
181
|
+
int32_t yoffset,
|
|
182
|
+
int32_t format,
|
|
183
|
+
int32_t type_,
|
|
184
|
+
uint8_t *bytes,
|
|
185
|
+
uintptr_t size,
|
|
186
|
+
float width,
|
|
187
|
+
float height,
|
|
188
|
+
bool flip_y);
|
|
189
|
+
|
|
144
190
|
#endif /* CANVAS_IOS_H */
|
|
@@ -670,6 +670,63 @@ void canvas_native_context_draw_image_context(struct CanvasRenderingContext2D *c
|
|
|
670
670
|
float d_width,
|
|
671
671
|
float d_height);
|
|
672
672
|
|
|
673
|
+
void canvas_native_context_draw_image_dx_dy_webgl(struct CanvasRenderingContext2D *context,
|
|
674
|
+
struct WebGLState *source,
|
|
675
|
+
float dx,
|
|
676
|
+
float dy);
|
|
677
|
+
|
|
678
|
+
void canvas_native_context_draw_image_dx_dy_dw_dh_webgl(struct CanvasRenderingContext2D *context,
|
|
679
|
+
struct WebGLState *source,
|
|
680
|
+
float dx,
|
|
681
|
+
float dy,
|
|
682
|
+
float d_width,
|
|
683
|
+
float d_height);
|
|
684
|
+
|
|
685
|
+
void canvas_native_context_draw_image_webgl(struct CanvasRenderingContext2D *context,
|
|
686
|
+
struct WebGLState *source,
|
|
687
|
+
float sx,
|
|
688
|
+
float sy,
|
|
689
|
+
float s_width,
|
|
690
|
+
float s_height,
|
|
691
|
+
float dx,
|
|
692
|
+
float dy,
|
|
693
|
+
float d_width,
|
|
694
|
+
float d_height);
|
|
695
|
+
|
|
696
|
+
void canvas_native_context_draw_atlas(struct CanvasRenderingContext2D *context,
|
|
697
|
+
const uint8_t *data,
|
|
698
|
+
uintptr_t size,
|
|
699
|
+
float width,
|
|
700
|
+
float height,
|
|
701
|
+
const float *xform,
|
|
702
|
+
uintptr_t xform_size,
|
|
703
|
+
const float *tex,
|
|
704
|
+
uintptr_t tex_size,
|
|
705
|
+
const char *const *colors,
|
|
706
|
+
uintptr_t colors_size,
|
|
707
|
+
int32_t blend_mode);
|
|
708
|
+
|
|
709
|
+
void canvas_native_context_draw_atlas_encoded(struct CanvasRenderingContext2D *context,
|
|
710
|
+
const uint8_t *data,
|
|
711
|
+
uintptr_t size,
|
|
712
|
+
const float *xform,
|
|
713
|
+
uintptr_t xform_size,
|
|
714
|
+
const float *tex,
|
|
715
|
+
uintptr_t tex_size,
|
|
716
|
+
const char *const *colors,
|
|
717
|
+
uintptr_t colors_size,
|
|
718
|
+
int32_t blend_mode);
|
|
719
|
+
|
|
720
|
+
void canvas_native_context_draw_atlas_asset(struct CanvasRenderingContext2D *context,
|
|
721
|
+
struct ImageAsset *asset,
|
|
722
|
+
const float *xform,
|
|
723
|
+
uintptr_t xform_size,
|
|
724
|
+
const float *tex,
|
|
725
|
+
uintptr_t tex_size,
|
|
726
|
+
const char *const *colors,
|
|
727
|
+
uintptr_t colors_size,
|
|
728
|
+
int32_t blend_mode);
|
|
729
|
+
|
|
673
730
|
void canvas_native_context_ellipse(struct CanvasRenderingContext2D *context,
|
|
674
731
|
float x,
|
|
675
732
|
float y,
|
|
@@ -709,6 +766,12 @@ void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *cont
|
|
|
709
766
|
float y,
|
|
710
767
|
float width);
|
|
711
768
|
|
|
769
|
+
void canvas_native_context_fill_oval(struct CanvasRenderingContext2D *context,
|
|
770
|
+
float x,
|
|
771
|
+
float y,
|
|
772
|
+
float width,
|
|
773
|
+
float height);
|
|
774
|
+
|
|
712
775
|
struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context,
|
|
713
776
|
float sx,
|
|
714
777
|
float sy,
|
|
@@ -837,6 +900,12 @@ void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *co
|
|
|
837
900
|
float y,
|
|
838
901
|
float width);
|
|
839
902
|
|
|
903
|
+
void canvas_native_context_stroke_oval(struct CanvasRenderingContext2D *context,
|
|
904
|
+
float x,
|
|
905
|
+
float y,
|
|
906
|
+
float width,
|
|
907
|
+
float height);
|
|
908
|
+
|
|
840
909
|
void canvas_native_context_transform(struct CanvasRenderingContext2D *context,
|
|
841
910
|
float a,
|
|
842
911
|
float b,
|
|
@@ -921,6 +990,8 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(c
|
|
|
921
990
|
float resize_height,
|
|
922
991
|
struct ImageAsset *output);
|
|
923
992
|
|
|
993
|
+
void canvas_native_path_trim(struct Path *path, float start, float end);
|
|
994
|
+
|
|
924
995
|
void canvas_native_path_add_path(struct Path *path, const struct Path *path_to_add);
|
|
925
996
|
|
|
926
997
|
struct Path *canvas_native_path_create(void);
|
|
@@ -1090,6 +1161,37 @@ float canvas_native_matrix_get_m44(const struct Matrix *matrix);
|
|
|
1090
1161
|
|
|
1091
1162
|
void canvas_native_matrix_set_m44(struct Matrix *matrix, float m44);
|
|
1092
1163
|
|
|
1164
|
+
struct Matrix *canvas_native_matrix_translate(float x, float y, const struct Matrix *matrix);
|
|
1165
|
+
|
|
1166
|
+
void canvas_native_matrix_translate_self(struct Matrix *matrix, float x, float y);
|
|
1167
|
+
|
|
1168
|
+
void canvas_native_matrix_multiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
1169
|
+
|
|
1170
|
+
void canvas_native_matrix_premultiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
1171
|
+
|
|
1172
|
+
struct Matrix *canvas_native_matrix_scale_non_uniform(float sx,
|
|
1173
|
+
float sy,
|
|
1174
|
+
const struct Matrix *matrix);
|
|
1175
|
+
|
|
1176
|
+
void canvas_native_matrix_scale_non_uniform_self(struct Matrix *matrix, float sx, float sy);
|
|
1177
|
+
|
|
1178
|
+
struct Matrix *canvas_native_matrix_rotate(float angle,
|
|
1179
|
+
float cx,
|
|
1180
|
+
float cy,
|
|
1181
|
+
const struct Matrix *matrix);
|
|
1182
|
+
|
|
1183
|
+
void canvas_native_matrix_rotate_self(struct Matrix *matrix, float angle, float cx, float cy);
|
|
1184
|
+
|
|
1185
|
+
struct Matrix *canvas_native_matrix_skew_x(float angle, const struct Matrix *matrix);
|
|
1186
|
+
|
|
1187
|
+
void canvas_native_matrix_skew_x_self(struct Matrix *matrix, float angle);
|
|
1188
|
+
|
|
1189
|
+
struct Matrix *canvas_native_matrix_skew_y(float angle, const struct Matrix *matrix);
|
|
1190
|
+
|
|
1191
|
+
void canvas_native_matrix_skew_y_self(struct Matrix *matrix, float angle);
|
|
1192
|
+
|
|
1193
|
+
struct Matrix *canvas_native_matrix_clone(const struct Matrix *matrix);
|
|
1194
|
+
|
|
1093
1195
|
struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height);
|
|
1094
1196
|
|
|
1095
1197
|
int32_t canvas_native_image_data_get_width(const struct ImageData *image_data);
|
|
@@ -1124,12 +1226,6 @@ const char *canvas_native_image_asset_get_error(struct ImageAsset *asset);
|
|
|
1124
1226
|
|
|
1125
1227
|
bool canvas_native_image_asset_has_error(struct ImageAsset *asset);
|
|
1126
1228
|
|
|
1127
|
-
bool canvas_native_image_asset_scale(struct ImageAsset *asset, uint32_t x, uint32_t y);
|
|
1128
|
-
|
|
1129
|
-
bool canvas_native_image_asset_save_path(struct ImageAsset *asset,
|
|
1130
|
-
const char *path,
|
|
1131
|
-
uint32_t format);
|
|
1132
|
-
|
|
1133
1229
|
float canvas_native_text_metrics_get_width(const struct TextMetrics *metrics);
|
|
1134
1230
|
|
|
1135
1231
|
float canvas_native_text_metrics_get_actual_bounding_box_left(const struct TextMetrics *metrics);
|
|
@@ -1213,6 +1309,8 @@ bool canvas_native_webgl_make_current(struct WebGLState *state);
|
|
|
1213
1309
|
|
|
1214
1310
|
bool canvas_native_webgl_swap_buffers(struct WebGLState *state);
|
|
1215
1311
|
|
|
1312
|
+
bool canvas_native_webgl_make_current_and_swap_buffers(struct WebGLState *state);
|
|
1313
|
+
|
|
1216
1314
|
void canvas_native_webgl_resized(struct WebGLState *_state);
|
|
1217
1315
|
|
|
1218
1316
|
const char *canvas_native_webgl_to_data_url(struct WebGLState *state,
|
|
@@ -1303,7 +1401,7 @@ bool canvas_native_webgl_context_attribute_get_get_depth(const struct ContextAtt
|
|
|
1303
1401
|
|
|
1304
1402
|
bool canvas_native_webgl_context_attribute_get_get_fail_if_major_performance_caveat(const struct ContextAttributes *attr);
|
|
1305
1403
|
|
|
1306
|
-
|
|
1404
|
+
int32_t canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr);
|
|
1307
1405
|
|
|
1308
1406
|
bool canvas_native_webgl_context_attribute_get_get_premultiplied_alpha(const struct ContextAttributes *attr);
|
|
1309
1407
|
|
|
@@ -1425,12 +1523,12 @@ void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t
|
|
|
1425
1523
|
const struct OES_vertex_array_object *object);
|
|
1426
1524
|
|
|
1427
1525
|
struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
1428
|
-
|
|
1526
|
+
int32_t version,
|
|
1429
1527
|
bool alpha,
|
|
1430
1528
|
bool antialias,
|
|
1431
1529
|
bool depth,
|
|
1432
1530
|
bool fail_if_major_performance_caveat,
|
|
1433
|
-
|
|
1531
|
+
int32_t power_preference,
|
|
1434
1532
|
bool premultiplied_alpha,
|
|
1435
1533
|
bool preserve_drawing_buffer,
|
|
1436
1534
|
bool stencil,
|
|
@@ -1439,12 +1537,12 @@ struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
|
1439
1537
|
|
|
1440
1538
|
struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
|
|
1441
1539
|
int32_t height,
|
|
1442
|
-
|
|
1540
|
+
int32_t version,
|
|
1443
1541
|
bool alpha,
|
|
1444
1542
|
bool antialias,
|
|
1445
1543
|
bool depth,
|
|
1446
1544
|
bool fail_if_major_performance_caveat,
|
|
1447
|
-
|
|
1545
|
+
int32_t power_preference,
|
|
1448
1546
|
bool premultiplied_alpha,
|
|
1449
1547
|
bool preserve_drawing_buffer,
|
|
1450
1548
|
bool stencil,
|
|
@@ -1949,9 +2047,9 @@ void canvas_native_webgl_tex_image2d_canvas2d(int32_t target,
|
|
|
1949
2047
|
|
|
1950
2048
|
void canvas_native_webgl_tex_image2d_webgl(int32_t target,
|
|
1951
2049
|
int32_t level,
|
|
1952
|
-
int32_t
|
|
1953
|
-
int32_t
|
|
1954
|
-
int32_t
|
|
2050
|
+
int32_t internalformat,
|
|
2051
|
+
int32_t format,
|
|
2052
|
+
int32_t image_type,
|
|
1955
2053
|
struct WebGLState *webgl,
|
|
1956
2054
|
struct WebGLState *state);
|
|
1957
2055
|
|
|
@@ -2017,8 +2115,8 @@ void canvas_native_webgl_tex_sub_image2d_webgl(uint32_t target,
|
|
|
2017
2115
|
int32_t level,
|
|
2018
2116
|
int32_t xoffset,
|
|
2019
2117
|
int32_t yoffset,
|
|
2020
|
-
uint32_t
|
|
2021
|
-
int32_t
|
|
2118
|
+
uint32_t format,
|
|
2119
|
+
int32_t image_type,
|
|
2022
2120
|
struct WebGLState *webgl,
|
|
2023
2121
|
struct WebGLState *state);
|
|
2024
2122
|
|
|
@@ -2505,6 +2603,18 @@ void canvas_native_webgl2_tex_image3d_asset(uint32_t target,
|
|
|
2505
2603
|
const struct ImageAsset *asset,
|
|
2506
2604
|
struct WebGLState *state);
|
|
2507
2605
|
|
|
2606
|
+
void canvas_native_webgl2_tex_image3d_canvas2d(uint32_t target,
|
|
2607
|
+
int32_t level,
|
|
2608
|
+
int32_t internalformat,
|
|
2609
|
+
int32_t _width,
|
|
2610
|
+
int32_t _height,
|
|
2611
|
+
int32_t depth,
|
|
2612
|
+
int32_t border,
|
|
2613
|
+
uint32_t format,
|
|
2614
|
+
uint32_t type_,
|
|
2615
|
+
struct CanvasRenderingContext2D *canvas,
|
|
2616
|
+
struct WebGLState *state);
|
|
2617
|
+
|
|
2508
2618
|
void canvas_native_webgl2_tex_image3d(uint32_t target,
|
|
2509
2619
|
int32_t level,
|
|
2510
2620
|
int32_t internalformat,
|
|
@@ -2587,6 +2697,19 @@ void canvas_native_webgl2_tex_sub_image3d_asset(uint32_t target,
|
|
|
2587
2697
|
const struct ImageAsset *asset,
|
|
2588
2698
|
struct WebGLState *state);
|
|
2589
2699
|
|
|
2700
|
+
void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
|
|
2701
|
+
int32_t level,
|
|
2702
|
+
int32_t xoffset,
|
|
2703
|
+
int32_t yoffset,
|
|
2704
|
+
int32_t zoffset,
|
|
2705
|
+
int32_t width,
|
|
2706
|
+
int32_t height,
|
|
2707
|
+
int32_t depth,
|
|
2708
|
+
uint32_t format,
|
|
2709
|
+
uint32_t type_,
|
|
2710
|
+
struct CanvasRenderingContext2D *canvas,
|
|
2711
|
+
struct WebGLState *state);
|
|
2712
|
+
|
|
2590
2713
|
void canvas_native_webgl2_tex_sub_image3d_offset(uint32_t target,
|
|
2591
2714
|
int32_t level,
|
|
2592
2715
|
int32_t xoffset,
|
|
Binary file
|
|
Binary file
|