Commit graph

5 commits

Author SHA1 Message Date
Ian Douglas Scott
6ce12fc0c6 Use Cow<'static, [u8]> in image/svg, add constructors taking &[u8]`
This should resolve https://github.com/iced-rs/iced/issues/580 by
providing a way to use an image included with `include_bytes!` without
needing to copy it to a `Vec` to create an image handle.

It would be nice if these methods could also be `const`, but that isn't
possible due to the hashing being done.

This is technically a breaking change since `Handle::data()` is public.
But if that is used, it's most likely in used somewhere that only relies
on the type derefing to `&[u8]`.
2022-10-03 15:58:43 -07:00
Héctor Ramón Jiménez
68e9eb0a9b
Fix broken intra-doc links in documentation 2022-04-30 14:20:52 +02:00
Olivier Pinon
a7bcd65bb8 Decouple the image Handle type from the iced_native implementation 2021-12-10 23:33:58 +01:00
Héctor Ramón Jiménez
597ef7d5fc
Write documentation for iced_native::image 2021-11-04 19:24:25 +07:00
Héctor Ramón Jiménez
c4186a71b7
Introduce first-class image module in iced_native 2021-10-31 16:20:50 +07:00