Vuido
Search…
AreaPath
A stroked and/or filled path.

Attributes

path

The path to be stroked and/or filled.

fill

The fill brush. By default it is inherited by the parent AreaGroup. If not specified, the path is not filled.

stroke

The stroke brush. By default it is inherited by the parent AreaGroup. If not specified, the path is not stroked.

line

The style of line for the stroke. By default it is inherited by the parent AreaGroup. If not specified, a solid one-pixel line is used.

Example

1
<template>
2
<Area>
3
<AreaPath v-bind:path="circlePath" v-bind:fill="redBrush"/>
4
</Area>
5
</template>
6
7
<script>
8
import libui from 'libui-node'
9
10
export default {
11
computed: {
12
cicrlePath() {
13
const path = new libui.UiDrawPath( libui.fillMode.winding );
14
path.newFigureWithArc( 100, 100, 50, 0, Math.PI * 2, false );
15
path.end();
16
return path;
17
},
18
redBrush() {
19
const brush = new libui.DrawBrush();
20
brush.color = new libui.Color( 1, 0, 0, 1 );
21
brush.type = libui.brushType.solid;
22
return brush;
23
}
24
}
25
}
26
</script>
Copied!
Last modified 3yr ago