AreaPath
A stroked and/or filled path.
The path to be stroked and/or filled.
The fill brush. By default it is inherited by the parent AreaGroup. If not specified, the path is not filled.
The stroke brush. By default it is inherited by the parent AreaGroup. If not specified, the path is not stroked.
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.
<template>
<Area>
<AreaPath v-bind:path="circlePath" v-bind:fill="redBrush"/>
</Area>
</template>
<script>
import libui from 'libui-node'
export default {
computed: {
cicrlePath() {
const path = new libui.UiDrawPath( libui.fillMode.winding );
path.newFigureWithArc( 100, 100, 50, 0, Math.PI * 2, false );
path.end();
return path;
},
redBrush() {
const brush = new libui.DrawBrush();
brush.color = new libui.Color( 1, 0, 0, 1 );
brush.type = libui.brushType.solid;
return brush;
}
}
}
</script>
Last modified 5yr ago