@nativescript/canvas 2.0.0-beta.7 → 2.0.0-beta.8
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 +3 -0
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.ios.js +0 -1
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +12 -0
- package/Canvas2D/CanvasRenderingContext2D/index.js +170 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Dom/Group.d.ts +5 -1
- package/Dom/Group.js +14 -1
- package/Dom/Group.js.map +1 -1
- package/Dom/Paint.js +3 -2
- package/Dom/Paint.js.map +1 -1
- 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/index.d.ts +12 -0
- package/Dom/shapes/index.js +27 -0
- package/Dom/shapes/index.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/canvas_native.h +34 -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 +171 -168
- 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/canvas_native.h +34 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +2 -2
- 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 +663 -663
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +642 -642
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +22 -3
- package/platforms/ios/src/cpp/ImageAssetImpl.h +5 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +154 -9
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +47 -0
package/Dom/Paint.js
CHANGED
|
@@ -55,7 +55,8 @@ export class Paint extends LayoutBase {
|
|
|
55
55
|
const color = this._getColor();
|
|
56
56
|
const context = this._canvas.getContext('2d');
|
|
57
57
|
const style = this._getPaintStyle();
|
|
58
|
-
context.closePath();
|
|
58
|
+
//context.closePath();
|
|
59
|
+
context.globalAlpha = this.opacity;
|
|
59
60
|
if (style === 'fill') {
|
|
60
61
|
context.fillStyle = color;
|
|
61
62
|
context.fill();
|
|
@@ -65,7 +66,7 @@ export class Paint extends LayoutBase {
|
|
|
65
66
|
context.strokeStyle = color;
|
|
66
67
|
context.stroke();
|
|
67
68
|
}
|
|
68
|
-
context.beginPath();
|
|
69
|
+
//context.beginPath();
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
paintStyleProperty.register(Paint);
|
package/Dom/Paint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paint.js","sourceRoot":"","sources":["../../../../packages/canvas/Dom/Paint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,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;QAEpC,sBAAsB;QAEtB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;QAEnC,IAAI,KAAK,KAAK,MAAM,EAAE;YACrB,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;YAC1B,OAAO,CAAC,IAAI,EAAE,CAAC;SACf;aAAM,IAAI,KAAK,KAAK,QAAQ,EAAE;YAC9B,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3C,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC;YAC5B,OAAO,CAAC,MAAM,EAAE,CAAC;SACjB;QAED,sBAAsB;IACvB,CAAC;CACD;AAED,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACnC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ViewBase } from '@nativescript/core';
|
|
2
|
+
import { Paint } from '../Paint';
|
|
3
|
+
export declare class Atlas extends Paint {
|
|
4
|
+
image: any;
|
|
5
|
+
sprites: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}[];
|
|
11
|
+
transforms: {
|
|
12
|
+
scos: number;
|
|
13
|
+
ssin: number;
|
|
14
|
+
tx: number;
|
|
15
|
+
ty: number;
|
|
16
|
+
}[];
|
|
17
|
+
colors: string[];
|
|
18
|
+
blendMode: GlobalCompositeOperation;
|
|
19
|
+
_children: Paint[];
|
|
20
|
+
draw(): void;
|
|
21
|
+
_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Property } from '@nativescript/core';
|
|
2
|
+
import { Paint } from '../Paint';
|
|
3
|
+
const imageProperty = new Property({
|
|
4
|
+
name: 'image',
|
|
5
|
+
valueChanged(target, oldValue, newValue) {
|
|
6
|
+
target.invalidate();
|
|
7
|
+
},
|
|
8
|
+
});
|
|
9
|
+
const spritesProperty = new Property({
|
|
10
|
+
name: 'sprites',
|
|
11
|
+
valueChanged(target, oldValue, newValue) {
|
|
12
|
+
target.invalidate();
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
const transformsProperty = new Property({
|
|
16
|
+
name: 'transforms',
|
|
17
|
+
valueChanged(target, oldValue, newValue) {
|
|
18
|
+
target.invalidate();
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const colorsProperty = new Property({
|
|
22
|
+
name: 'colors',
|
|
23
|
+
valueChanged(target, oldValue, newValue) {
|
|
24
|
+
target.invalidate();
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const blendModeProperty = new Property({
|
|
28
|
+
name: 'blendMode',
|
|
29
|
+
defaultValue: 'destination-over',
|
|
30
|
+
valueChanged(target, oldValue, newValue) {
|
|
31
|
+
target.invalidate();
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
export class Atlas extends Paint {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this._children = [];
|
|
38
|
+
}
|
|
39
|
+
draw() {
|
|
40
|
+
const context = this._canvas.getContext('2d');
|
|
41
|
+
context.drawAtlas(this.image, this.transforms, this.sprites, this.colors ?? null, this.blendMode);
|
|
42
|
+
}
|
|
43
|
+
_addViewToNativeVisualTree(view, atIndex) {
|
|
44
|
+
if (view === this._canvas) {
|
|
45
|
+
this.nativeView.addView(this._canvas.nativeView);
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
else if (view instanceof Paint) {
|
|
49
|
+
view._canvas = this._canvas;
|
|
50
|
+
this._children.push(view);
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
imageProperty.register(Atlas);
|
|
56
|
+
spritesProperty.register(Atlas);
|
|
57
|
+
transformsProperty.register(Atlas);
|
|
58
|
+
colorsProperty.register(Atlas);
|
|
59
|
+
blendModeProperty.register(Atlas);
|
|
60
|
+
//# sourceMappingURL=Atlas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Atlas.js","sourceRoot":"","sources":["../../../../../packages/canvas/Dom/shapes/Atlas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,MAAM,aAAa,GAAG,IAAI,QAAQ,CAAa;IAC9C,IAAI,EAAE,OAAO;IACb,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;QACtC,MAAM,CAAC,UAAU,EAAE,CAAC;IACrB,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,IAAI,QAAQ,CAAmE;IACtG,IAAI,EAAE,SAAS;IACf,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;QACtC,MAAM,CAAC,UAAU,EAAE,CAAC;IACrB,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,IAAI,QAAQ,CAAkE;IACxG,IAAI,EAAE,YAAY;IAClB,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;QACtC,MAAM,CAAC,UAAU,EAAE,CAAC;IACrB,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAI,QAAQ,CAAkB;IACpD,IAAI,EAAE,QAAQ;IACd,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;QACtC,MAAM,CAAC,UAAU,EAAE,CAAC;IACrB,CAAC;CACD,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,IAAI,QAAQ,CAAkC;IACvE,IAAI,EAAE,WAAW;IACjB,YAAY,EAAE,kBAAkB;IAChC,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ;QACtC,MAAM,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7 +6,18 @@ export * from './RoundedRect';
|
|
|
5
6
|
export * from './Line';
|
|
6
7
|
export * from './Points';
|
|
7
8
|
export * from './Oval';
|
|
9
|
+
export * from './Atlas';
|
|
8
10
|
export declare function vec(x: number, y: number): {
|
|
9
11
|
x: number;
|
|
10
12
|
y: number;
|
|
11
13
|
};
|
|
14
|
+
export declare function rect(x: number, y: number, width: number, height: number): {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function drawAsImage(elements: Paint[], size?: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}): any;
|
package/Dom/shapes/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Canvas } from '../../Canvas';
|
|
1
2
|
export * from './Rect';
|
|
2
3
|
export * from './Path';
|
|
3
4
|
export * from './Circle';
|
|
@@ -5,7 +6,33 @@ export * from './RoundedRect';
|
|
|
5
6
|
export * from './Line';
|
|
6
7
|
export * from './Points';
|
|
7
8
|
export * from './Oval';
|
|
9
|
+
export * from './Atlas';
|
|
8
10
|
export function vec(x, y) {
|
|
9
11
|
return { x, y };
|
|
10
12
|
}
|
|
13
|
+
export function rect(x, y, width, height) {
|
|
14
|
+
return { x, y, width, height };
|
|
15
|
+
}
|
|
16
|
+
export function drawAsImage(elements, size = { width: 300, height: 150 }) {
|
|
17
|
+
const canvas = Canvas.createCustomView();
|
|
18
|
+
if (size.width !== 300 && size.height !== 150) {
|
|
19
|
+
canvas._isBatch = true;
|
|
20
|
+
canvas.width = size.width;
|
|
21
|
+
canvas.height = size.height;
|
|
22
|
+
canvas._isBatch = false;
|
|
23
|
+
canvas._layoutNative();
|
|
24
|
+
}
|
|
25
|
+
for (const element of elements) {
|
|
26
|
+
element._addCanvas(canvas);
|
|
27
|
+
element.draw();
|
|
28
|
+
}
|
|
29
|
+
// const asset = new ImageAsset() as any;
|
|
30
|
+
const snapshot = canvas.snapshot();
|
|
31
|
+
// if (global.isAndroid) {
|
|
32
|
+
// const value = new java.lang.Long(asset.native.__addr);
|
|
33
|
+
// console.log(value);
|
|
34
|
+
// (org as any).nativescript.canvas.NSCImageAsset.loadImageFromBitmap(new java.lang.Long(asset.native.__addr), snapshot.android);
|
|
35
|
+
// }
|
|
36
|
+
return snapshot;
|
|
37
|
+
}
|
|
11
38
|
//# sourceMappingURL=index.js.map
|
package/Dom/shapes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/canvas/Dom/shapes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/canvas/Dom/shapes/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AAExB,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,CAAS;IACvC,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,MAAc;IACvE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAiB,EAAE,OAA0C,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACnH,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAEzC,IAAI,IAAI,CAAC,KAAK,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,GAAG,EAAE;QAC7C,MAAc,CAAC,QAAQ,GAAG,IAAI,CAAC;QAChC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;QAChC,MAAc,CAAC,aAAa,EAAE,CAAC;KAChC;IAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC/B,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,EAAE,CAAC;KACf;IACD,yCAAyC;IAEzC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAEnC,0BAA0B;IAC1B,0DAA0D;IAC1D,uBAAuB;IACvB,kIAAkI;IAClI,IAAI;IAEJ,OAAO,QAAQ,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -10,18 +10,15 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>CanvasNative.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
-
<string>x86_64</string>
|
|
20
19
|
</array>
|
|
21
20
|
<key>SupportedPlatform</key>
|
|
22
21
|
<string>ios</string>
|
|
23
|
-
<key>SupportedPlatformVariant</key>
|
|
24
|
-
<string>simulator</string>
|
|
25
22
|
</dict>
|
|
26
23
|
<dict>
|
|
27
24
|
<key>BinaryPath</key>
|
|
@@ -29,15 +26,18 @@
|
|
|
29
26
|
<key>DebugSymbolsPath</key>
|
|
30
27
|
<string>dSYMs</string>
|
|
31
28
|
<key>LibraryIdentifier</key>
|
|
32
|
-
<string>ios-
|
|
29
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
33
30
|
<key>LibraryPath</key>
|
|
34
31
|
<string>CanvasNative.framework</string>
|
|
35
32
|
<key>SupportedArchitectures</key>
|
|
36
33
|
<array>
|
|
37
34
|
<string>arm64</string>
|
|
35
|
+
<string>x86_64</string>
|
|
38
36
|
</array>
|
|
39
37
|
<key>SupportedPlatform</key>
|
|
40
38
|
<string>ios</string>
|
|
39
|
+
<key>SupportedPlatformVariant</key>
|
|
40
|
+
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|
package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative
CHANGED
|
Binary file
|
|
@@ -670,6 +670,40 @@ 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_atlas(struct CanvasRenderingContext2D *context,
|
|
674
|
+
const uint8_t *data,
|
|
675
|
+
uintptr_t size,
|
|
676
|
+
float width,
|
|
677
|
+
float height,
|
|
678
|
+
const float *xform,
|
|
679
|
+
uintptr_t xform_size,
|
|
680
|
+
const float *tex,
|
|
681
|
+
uintptr_t tex_size,
|
|
682
|
+
const char *const *colors,
|
|
683
|
+
uintptr_t colors_size,
|
|
684
|
+
int32_t blend_mode);
|
|
685
|
+
|
|
686
|
+
void canvas_native_context_draw_atlas_encoded(struct CanvasRenderingContext2D *context,
|
|
687
|
+
const uint8_t *data,
|
|
688
|
+
uintptr_t size,
|
|
689
|
+
const float *xform,
|
|
690
|
+
uintptr_t xform_size,
|
|
691
|
+
const float *tex,
|
|
692
|
+
uintptr_t tex_size,
|
|
693
|
+
const char *const *colors,
|
|
694
|
+
uintptr_t colors_size,
|
|
695
|
+
int32_t blend_mode);
|
|
696
|
+
|
|
697
|
+
void canvas_native_context_draw_atlas_asset(struct CanvasRenderingContext2D *context,
|
|
698
|
+
struct ImageAsset *asset,
|
|
699
|
+
const float *xform,
|
|
700
|
+
uintptr_t xform_size,
|
|
701
|
+
const float *tex,
|
|
702
|
+
uintptr_t tex_size,
|
|
703
|
+
const char *const *colors,
|
|
704
|
+
uintptr_t colors_size,
|
|
705
|
+
int32_t blend_mode);
|
|
706
|
+
|
|
673
707
|
void canvas_native_context_ellipse(struct CanvasRenderingContext2D *context,
|
|
674
708
|
float x,
|
|
675
709
|
float y,
|