stbtt_GetCodepointBitmapSubpixel function
- @Native<Pointer<
ma_uint8> Function(Pointer<stbtt_fontinfo> , Float, Float, Float, Float, Int, Pointer<Int> , Pointer<Int> , Pointer<Int> , Pointer<Int> )>(ffi.Pointer<stbtt_fontinfo>, ffi.Float, ffi.Float, ffi.Float, ffi.Float, ffi.Int, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>()
allocates a large-enough single-channel 8bpp bitmap and renders the specified character/glyph at the specified scale into it, with antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque). *width & *height are filled out with the width & height of the bitmap, which is stored left-to-right, top-to-bottom.
xoff/yoff are the offset it pixel space from the glyph origin to the top-left of the bitmap
Implementation
@ffi.Native<
ffi.Pointer<ffi.UnsignedChar> Function(
ffi.Pointer<stbtt_fontinfo>,
ffi.Float,
ffi.Float,
ffi.Float,
ffi.Float,
ffi.Int,
ffi.Pointer<ffi.Int>,
ffi.Pointer<ffi.Int>,
ffi.Pointer<ffi.Int>,
ffi.Pointer<ffi.Int>,
)
>()
external ffi.Pointer<ffi.UnsignedChar> stbtt_GetCodepointBitmapSubpixel(
ffi.Pointer<stbtt_fontinfo> info,
double scale_x,
double scale_y,
double shift_x,
double shift_y,
int codepoint,
ffi.Pointer<ffi.Int> width,
ffi.Pointer<ffi.Int> height,
ffi.Pointer<ffi.Int> xoff,
ffi.Pointer<ffi.Int> yoff,
);