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:
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user