mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
Add API to Rust sixtyfps::Image to enable creation from user supplied image buffers
This adds an ImageBuffer and PixelBuffer type for SharedVector backed images. The documentation explains how to use this with low-level rendering functions and the popular image crate. Fixes #387
This commit is contained in:
parent
76de53cead
commit
8a3a68a4fa
11 changed files with 349 additions and 56 deletions
|
@ -255,7 +255,7 @@ fn to_js_value<'cx>(
|
|||
&ImageInner::AbsoluteFilePath(ref path) => {
|
||||
JsString::new(cx, path.as_str()).as_value(cx)
|
||||
}
|
||||
&ImageInner::EmbeddedData { .. } | &ImageInner::EmbeddedRgbaImage { .. } => {
|
||||
&ImageInner::EmbeddedData { .. } | &ImageInner::EmbeddedImage { .. } => {
|
||||
JsNull::new().as_value(cx)
|
||||
} // TODO: maybe pass around node buffers?
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue