GenImageFontAtlas method
(ImageD, List<RectangleD> )
GenImageFontAtlas(
- List<
GlyphInfoD> glyphs, - num fontSize,
- num padding,
- num packMethod,
Implementation
(ImageD image, List<RectangleD> glyphRecs) GenImageFontAtlas(
List<GlyphInfoD> glyphs,
num fontSize,
num padding,
num packMethod,
) => run(
() => 'GenImageFontAtlas(glyphs: ${glyphs.length}, $fontSize, $padding, $packMethod)',
() {
final recsPtr = rl.Temp.Ptr$Rectangle$.Raw();
try {
final image = _refCaptureImage(
'GenImageFontAtlas_${glyphs.length}_${fontSize}_$padding',
rl.Core.GenImageFontAtlas(
_refListGlyphInfo(glyphs),
recsPtr,
glyphs.length,
fontSize.toInt(),
padding.toInt(),
packMethod.toInt(),
),
);
final recs = List.generate(glyphs.length,
(i) => (recsPtr.value + i).ref.toD()
);
return (image, recs);
} finally {
calloc.free(recsPtr);
}
},
);