C++: Generate image texture data for software renderer

This commit is contained in:
Olivier Goffart 2022-12-08 16:38:37 +01:00
parent b2ebac63c2
commit ccf3e8e9e9
6 changed files with 117 additions and 33 deletions

View file

@ -74,6 +74,13 @@ inline Image load_image_from_embedded_data(std::span<const uint8_t> data,
&img);
return Image(img);
}
inline Image image_from_embedded_textures(const cbindgen_private::types::StaticTextures *textures)
{
cbindgen_private::types::Image img(cbindgen_private::types::Image::ImageInner_None());
cbindgen_private::types::slint_image_from_embedded_textures(textures, &img);
return Image(img);
}
}
}