@nativescript/canvas 2.0.0-alpha.28 → 2.0.0-alpha.29
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.js +12 -11
- package/Canvas/common.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +1 -0
- package/Canvas2D/CanvasRenderingContext2D/index.js +3 -0
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +0 -1
- package/WebGL/WebGLProgram.js +0 -3
- package/WebGL/WebGLProgram.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -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 +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +5 -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 +161 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +3 -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 +6 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +5 -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 +161 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +161 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +24 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +36 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +3 -0
- package/typings/objc!CanvasNative.d.ts +2038 -0
- package/typings/objc!CanvasNative.js +1 -0
- package/typings/objc!CanvasNative.js.map +1 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -20
- package/utils.js.map +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Headers/CanvasNative-Swift.h</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
sJx+D16h1gIfzbfYPRKuXqB1NgE=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/CanvasNative.h</key>
|
|
12
12
|
<data>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</data>
|
|
19
19
|
<key>Headers/canvas_native.h</key>
|
|
20
20
|
<data>
|
|
21
|
-
|
|
21
|
+
z51bTEcRfKIDeM3+EAyvWKTpt40=
|
|
22
22
|
</data>
|
|
23
23
|
<key>Info.plist</key>
|
|
24
24
|
<data>
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
</data>
|
|
27
27
|
<key>Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
eSWvO6kg+mhIJLEj+xj4vAXskuQ=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
dcNH2qco5t7qn0NRH3AO0vOkecA=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
3LvGAHj4UsSkh0UPGr+qh+SHrKU=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
rUssBShz7IWJNX4CSmzc1EHTprc=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
44
44
|
<data>
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
rUssBShz7IWJNX4CSmzc1EHTprc=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
CjjxdSPby80gKxTrDhQrwKPizLo=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
3LvGAHj4UsSkh0UPGr+qh+SHrKU=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
Pxu2QUoWj33Ft4+6JDvwUxX6dNA=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
64
64
|
<data>
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
</data>
|
|
67
67
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
Pxu2QUoWj33Ft4+6JDvwUxX6dNA=
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
72
72
|
<data>
|
|
73
|
-
|
|
73
|
+
6tZGhw/pELdQ6rca8WFCIDa+4I8=
|
|
74
74
|
</data>
|
|
75
75
|
<key>Modules/module.modulemap</key>
|
|
76
76
|
<data>
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
<dict>
|
|
88
88
|
<key>hash2</key>
|
|
89
89
|
<data>
|
|
90
|
-
|
|
90
|
+
9bww+fPX3BFEIsBUHvRJpPdYwTxfwLTDFso2WGZs/s0=
|
|
91
91
|
</data>
|
|
92
92
|
</dict>
|
|
93
93
|
<key>Headers/CanvasNative.h</key>
|
|
@@ -108,35 +108,35 @@
|
|
|
108
108
|
<dict>
|
|
109
109
|
<key>hash2</key>
|
|
110
110
|
<data>
|
|
111
|
-
|
|
111
|
+
S+LxlpeMFZnlf06BBxLXdlVJrObDCyk2+WdyrOHT4Og=
|
|
112
112
|
</data>
|
|
113
113
|
</dict>
|
|
114
114
|
<key>Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
|
|
115
115
|
<dict>
|
|
116
116
|
<key>hash2</key>
|
|
117
117
|
<data>
|
|
118
|
-
|
|
118
|
+
xmuMhBW27cWR7axitKkkuEAgx3/0vQGB1XeP3pZ1nxc=
|
|
119
119
|
</data>
|
|
120
120
|
</dict>
|
|
121
121
|
<key>Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
|
|
122
122
|
<dict>
|
|
123
123
|
<key>hash2</key>
|
|
124
124
|
<data>
|
|
125
|
-
|
|
125
|
+
9wRmFzgapp1mRLnRo42xMoSAcTPjyRKRK9sBr1mK7Ko=
|
|
126
126
|
</data>
|
|
127
127
|
</dict>
|
|
128
128
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
129
129
|
<dict>
|
|
130
130
|
<key>hash2</key>
|
|
131
131
|
<data>
|
|
132
|
-
|
|
132
|
+
fcYuzkzpPUScaTjEYQlw70HDyhq0GLRHr3Bozr82RdY=
|
|
133
133
|
</data>
|
|
134
134
|
</dict>
|
|
135
135
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
136
136
|
<dict>
|
|
137
137
|
<key>hash2</key>
|
|
138
138
|
<data>
|
|
139
|
-
|
|
139
|
+
fdKvHFLiqHG6Fp8pYonUVXAwb5bCn2yMtnkoGsbytbM=
|
|
140
140
|
</data>
|
|
141
141
|
</dict>
|
|
142
142
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -150,28 +150,28 @@
|
|
|
150
150
|
<dict>
|
|
151
151
|
<key>hash2</key>
|
|
152
152
|
<data>
|
|
153
|
-
|
|
153
|
+
fdKvHFLiqHG6Fp8pYonUVXAwb5bCn2yMtnkoGsbytbM=
|
|
154
154
|
</data>
|
|
155
155
|
</dict>
|
|
156
156
|
<key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
157
157
|
<dict>
|
|
158
158
|
<key>hash2</key>
|
|
159
159
|
<data>
|
|
160
|
-
|
|
160
|
+
t4EusGFjo37ZRltOZNrXwSStvbtEhC6PU0qSGc8BtEs=
|
|
161
161
|
</data>
|
|
162
162
|
</dict>
|
|
163
163
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
164
164
|
<dict>
|
|
165
165
|
<key>hash2</key>
|
|
166
166
|
<data>
|
|
167
|
-
|
|
167
|
+
fcYuzkzpPUScaTjEYQlw70HDyhq0GLRHr3Bozr82RdY=
|
|
168
168
|
</data>
|
|
169
169
|
</dict>
|
|
170
170
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
171
171
|
<dict>
|
|
172
172
|
<key>hash2</key>
|
|
173
173
|
<data>
|
|
174
|
-
|
|
174
|
+
TsKS6teXKsAKWwfW1GjkiuK6qZdrYXE2cZDEle+dUGs=
|
|
175
175
|
</data>
|
|
176
176
|
</dict>
|
|
177
177
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
@@ -185,14 +185,14 @@
|
|
|
185
185
|
<dict>
|
|
186
186
|
<key>hash2</key>
|
|
187
187
|
<data>
|
|
188
|
-
|
|
188
|
+
TsKS6teXKsAKWwfW1GjkiuK6qZdrYXE2cZDEle+dUGs=
|
|
189
189
|
</data>
|
|
190
190
|
</dict>
|
|
191
191
|
<key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
192
192
|
<dict>
|
|
193
193
|
<key>hash2</key>
|
|
194
194
|
<data>
|
|
195
|
-
|
|
195
|
+
x9q1j4AakvNLh8GggtNfapPGs200oGkBppryUMbRuzw=
|
|
196
196
|
</data>
|
|
197
197
|
</dict>
|
|
198
198
|
<key>Modules/module.modulemap</key>
|
|
Binary file
|
|
@@ -122,6 +122,8 @@ v8::Local<v8::FunctionTemplate> CanvasRenderingContext2DImpl::GetCtor(v8::Isolat
|
|
|
122
122
|
v8::FunctionTemplate::New(isolate, &CreatePattern));
|
|
123
123
|
tmpl->Set(ConvertToV8String(isolate, "createLinearGradient"),
|
|
124
124
|
v8::FunctionTemplate::New(isolate, &CreateLinearGradient));
|
|
125
|
+
tmpl->Set(ConvertToV8String(isolate, "createConicGradient"),
|
|
126
|
+
v8::FunctionTemplate::New(isolate, &CreateConicGradient));
|
|
125
127
|
tmpl->Set(ConvertToV8String(isolate, "__createPatternWithNative"),
|
|
126
128
|
v8::FunctionTemplate::New(isolate, &__CreatePatternWithNative));
|
|
127
129
|
tmpl->Set(ConvertToV8String(isolate, "createRadialGradient"),
|
|
@@ -1306,6 +1308,40 @@ CanvasRenderingContext2DImpl::CreateLinearGradient(
|
|
|
1306
1308
|
args.GetReturnValue().SetNull();
|
|
1307
1309
|
}
|
|
1308
1310
|
|
|
1311
|
+
|
|
1312
|
+
void CanvasRenderingContext2DImpl::CreateConicGradient(
|
|
1313
|
+
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
1314
|
+
|
|
1315
|
+
CanvasRenderingContext2DImpl *ptr = GetPointer(args.This());
|
|
1316
|
+
if (ptr == nullptr) {
|
|
1317
|
+
args.GetReturnValue().SetUndefined();
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
auto isolate = args.GetIsolate();
|
|
1322
|
+
auto context = isolate->GetCurrentContext();
|
|
1323
|
+
|
|
1324
|
+
if (args.Length() == 3) {
|
|
1325
|
+
|
|
1326
|
+
auto startAngle = static_cast<float>(args[0]->NumberValue(context).ToChecked());
|
|
1327
|
+
auto x = static_cast<float>(args[1]->NumberValue(context).ToChecked());
|
|
1328
|
+
auto y = static_cast<float>(args[2]->NumberValue(context).ToChecked());
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
auto gradient = canvas_native_context_create_conic_gradient(
|
|
1332
|
+
ptr->GetContext(), startAngle, x, y);
|
|
1333
|
+
|
|
1334
|
+
auto data = CanvasGradient::NewInstance(isolate, new CanvasGradient(
|
|
1335
|
+
gradient));
|
|
1336
|
+
|
|
1337
|
+
args.GetReturnValue().Set(data);
|
|
1338
|
+
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
args.GetReturnValue().SetNull();
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1309
1345
|
void
|
|
1310
1346
|
CanvasRenderingContext2DImpl::__CreatePatternWithNative(
|
|
1311
1347
|
const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
@@ -218,6 +218,9 @@ public:
|
|
|
218
218
|
static void CreateLinearGradient(
|
|
219
219
|
const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
220
220
|
|
|
221
|
+
static void CreateConicGradient(
|
|
222
|
+
const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
223
|
+
|
|
221
224
|
static void __CreatePatternWithNative(
|
|
222
225
|
const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
223
226
|
|