Skip to content

Commit 71896d2

Browse files
committed
Merge branch 'master' of github.com:nativescript-community/ui-canvas
2 parents 1ef84ec + 9501dc8 commit 71896d2

File tree

70 files changed

+3343
-5858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3343
-5858
lines changed

demo-snippets/vue/Simple.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { Component } from 'vue-property-decorator';
1515
import { Canvas, Paint, Style, createRect } from '@nativescript-community/ui-canvas';
1616
import { Color } from '@nativescript/core';
1717
import { Screen } from '@nativescript/core/platform';
18+
import { Path } from '@nativescript-community/ui-canvas';
19+
import { Direction } from '@nativescript-community/ui-canvas';
1820
1921
@Component
2022
export default class Simple extends Vue {
@@ -48,6 +50,13 @@ export default class Simple extends Vue {
4850
bgPaint.setStyle(Style.FILL);
4951
bgPaint.setColor(new Color(255, 0, 0, 0));
5052
canvas.drawText('test', 0, 20, bgPaint);
53+
54+
55+
const path = new Path();
56+
const rect = createRect(10, 10, 40, 60);
57+
console.log('rect', rect)
58+
path.addRoundRect(rect.left, rect.top, rect.right, rect.bottom, [5, 5, 5, 5, 5,5, 0,0], Direction.CW)
59+
canvas.drawPath(path, bgPaint);
5160
}
5261
}
5362
</script>

docs/assets/icons.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)