1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: use fontstash wrapper calls (#12718)

This commit is contained in:
Larpon
2021-12-06 21:39:43 +01:00
committed by GitHub
parent 1cd703d96b
commit 047f059fb8
7 changed files with 145 additions and 143 deletions

View File

@ -6,12 +6,12 @@ import fontstash
const used_import = fontstash.used_import + 1
[inline]
pub fn create(width int, height int, flags int) &C.FONScontext {
pub fn create(width int, height int, flags int) &fontstash.Context {
return C.sfons_create(width, height, flags)
}
[inline]
pub fn destroy(ctx &C.FONScontext) {
pub fn destroy(ctx &fontstash.Context) {
C.sfons_destroy(ctx)
}
@ -21,6 +21,6 @@ pub fn rgba(r byte, g byte, b byte, a byte) u32 {
}
[inline]
pub fn flush(ctx &C.FONScontext) {
pub fn flush(ctx &fontstash.Context) {
C.sfons_flush(ctx)
}

View File

@ -1,6 +1,8 @@
module sfons
fn C.sfons_create(width int, height int, flags int) &C.FONScontext
fn C.sfons_destroy(ctx &C.FONScontext)
import fontstash
fn C.sfons_create(width int, height int, flags int) &fontstash.Context
fn C.sfons_destroy(ctx &fontstash.Context)
fn C.sfons_rgba(r byte, g byte, b byte, a byte) u32
fn C.sfons_flush(ctx &C.FONScontext)
fn C.sfons_flush(ctx &fontstash.Context)