Vuido
Search…
AreaText
A paragraph of text with formatting.

Attributes

x

type: Number
The horizontal position of the text.

y

type: Number
The vertical position of the text.

layout

The content and layout of the text paragraph.

Example

1
<template>
2
<Area>
3
<AreaText x="100" y="100" v-bind:layout="textLayout"/>
4
</Area>
5
</template>
6
7
<script>
8
import libui from 'libui-node'
9
10
export default {
11
computed: {
12
textLayout() {
13
const str = new libui.AttributedString( 'Hello, world!' );
14
const font = new libui.FontDescriptor( 'Arial', 10, libui.textWeight.normal,
15
libui.textItalic.normal, libui.textStretch.normal );
16
return new libui.DrawTextLayout( str, font, 200, libui.textAlign.left );
17
}
18
}
19
}
20
</script>
Copied!
Last modified 3yr ago
Copy link