Commit graph

2760 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
078cadfed0
Update image dependency to 0.24 2022-11-05 03:47:08 +01:00
Héctor Ramón Jiménez
7a24b4ba69
Replace texture_store and store with storage 2022-11-05 03:39:59 +01:00
Héctor Ramón Jiménez
0a23f518c7
Remove redundant features in iced_wgpu and iced_glow 2022-11-05 03:26:19 +01:00
Héctor Ramón Jiménez
d3b613df44
Remove unnecessary dependencies from iced_glow 2022-11-05 03:22:06 +01:00
Héctor Ramón Jiménez
438f97a6d0
Use RGBA texture for image and svg pipelines 2022-11-05 03:20:00 +01:00
Héctor Ramón Jiménez
8ce8d374b1
Refactor some image traits a bit
- Use `Size<u32>` were applicable.
- Rename `TextureStore` to `image::Storage`.
- Rename `TextureStoreEntry` to `image::storage::Entry`.
- Wire up `viewport_dimensions` to `iced_glow` for `Svg`.
2022-11-05 03:19:38 +01:00
Ian Douglas Scott
5575e6ea08
Add image/svg support to iced_glow
https://github.com/iced-rs/iced/issues/674

Uses image/svg support in `iced_graphics`. The is not currently using an
atlas, and uses one texture/draw per image. This should be good enough
for now; supporting images with glow is better than not supporting them,
and if something else performs better, that improvement can be made
without any change to the public API.
2022-11-05 03:19:38 +01:00
Ian Douglas Scott
2c7c42ee93
Move image/svg handling into iced_graphics
The `TextureStore` trait is implemented by the atlas, and can also be
implemented in the glow renderer or in a software renderer.

The API here may be improved in the future, but API stability is
presumably not a huge issue since these types will only be used by
renderer backends.
2022-11-05 03:19:37 +01:00
Héctor Ramón
7b12991728
Merge pull request #1453 from ids1024/cow
Use `Cow<'static, [u8]>` in image/svg, add constructors taking &[u8]`
2022-11-05 02:19:13 +01:00
Héctor Ramón
1632826c8e
Merge pull request #1443 from traxys/div_canvas
Allow to replace an element instead of append to body for web rendering
2022-11-05 01:56:25 +01:00
Héctor Ramón Jiménez
bc5986c7c6
Unify methods by leveraging Into<Cow> in image and svg 2022-11-05 01:53:24 +01:00
Héctor Ramón Jiménez
d8d57a800a
Allow providing a DOM identifier as a target for Wasm 2022-11-05 01:43:28 +01:00
traxys
ab2872fe2b
Allow to replace an element instead of append to body 2022-11-05 01:28:16 +01:00
Héctor Ramón
d222b5c8b0
Merge pull request #1448 from bungoboingo/fear/linear-gradients
Add linear gradient support to canvas widget
2022-11-03 18:57:09 +01:00
Héctor Ramón Jiménez
f31c8f2504
Refactor imports of triangle modules in iced_glow and iced_wgpu 2022-11-03 06:05:23 +01:00
Héctor Ramón Jiménez
68cddd6468
Remove unnecessary pub(crate) in widget::canvas::frame 2022-11-03 06:05:06 +01:00
Héctor Ramón Jiménez
4ef778aff3
Refactor imports of widget::canvas::frame in iced_graphics 2022-11-03 06:01:34 +01:00
Héctor Ramón Jiménez
75b05ed42d
Move re-export in widget::canvas in iced_graphics 2022-11-03 06:00:32 +01:00
Héctor Ramón Jiménez
a8c3b2ddf7
Fix documentation example of Canvas
... so it makes sense when seen from the `iced` crate.
2022-11-03 05:59:13 +01:00
Héctor Ramón Jiménez
e9e2657791
Refactor imports in widget::canvas in iced_graphics 2022-11-03 05:57:22 +01:00
Héctor Ramón Jiménez
84d1b79fef
Move mesh::Style to triangle and reuse it in fill and stroke 2022-11-03 05:50:53 +01:00
Héctor Ramón Jiménez
e0bb707f1e
Export Gradient in iced_graphics root 2022-11-03 05:24:51 +01:00
Héctor Ramón Jiménez
0b806235f6
Remove blank line if layer::mesh in iced_graphics 2022-11-03 05:23:43 +01:00
Héctor Ramón Jiménez
610dae4877
Refactor exports in graphics::layer 2022-11-03 05:22:58 +01:00
Héctor Ramón Jiménez
e07344428d
Refactor imports in solar_system example 2022-11-03 05:19:58 +01:00
Héctor Ramón Jiménez
d8045e2dc3
Move Position and Location to gradient module 2022-11-03 05:15:32 +01:00
Héctor Ramón Jiménez
921c94162e
Merge branch 'master' into fear/linear-gradients 2022-11-03 05:09:07 +01:00
Héctor Ramón Jiménez
93e309f491
Reuse last set pipeline for triangle in iced_wgpu 2022-11-03 05:06:09 +01:00
Héctor Ramón Jiménez
99cf98971d
Rename buffers module to buffer
... and move `StaticBuffer` to nested `static` module
2022-11-03 05:00:35 +01:00
Héctor Ramón
a8f510c399
Merge pull request #1432 from wash2/custom-theme
Add custom palette to built in theme
2022-11-03 04:54:46 +01:00
Héctor Ramón Jiménez
7e22e2d452
Fix lints by clippy 2022-11-03 04:53:27 +01:00
Héctor Ramón Jiménez
edce457365
Fix multitouch example 2022-11-03 04:42:46 +01:00
Héctor Ramón Jiménez
9a02d60ba5
Convert colors to linear RGB in gradient pipelines 2022-11-03 04:41:27 +01:00
Héctor Ramón Jiménez
6246584209
Convert colors to linear RGB before uploading in solid pipelines 2022-11-03 04:37:23 +01:00
Héctor Ramón Jiménez
b957453404
Run cargo fmt 2022-11-03 04:35:16 +01:00
Héctor Ramón Jiménez
20a0577034
Reuse last buffer in Frame if mesh_style matches 2022-11-03 04:33:54 +01:00
Héctor Ramón Jiménez
df78777675
Box Custom in Theme 2022-11-03 03:27:55 +01:00
Héctor Ramón Jiménez
f04336dd5c
Remove unnecessary clone in scrollable example 2022-11-03 03:26:10 +01:00
Héctor Ramón Jiménez
3517dece26
Run cargo fmt 2022-11-03 03:25:27 +01:00
Héctor Ramón Jiménez
708be32e3d
Derive Copy for Theme 2022-11-03 03:23:36 +01:00
Héctor Ramón Jiménez
9966c6f883
Make Theme::Custom fields opaque 2022-11-03 03:23:36 +01:00
Ashley Wulber
09a531cd44
fix: arc example 2022-11-03 03:23:36 +01:00
Ashley Wulber
4f3215f48e
fix: clippy lint https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant 2022-11-03 03:23:36 +01:00
Ashley Wulber
d5a933b047
refactor: remove once_cell from styling example 2022-11-03 03:23:36 +01:00
Ashley Wulber
269d6f9a3f
fix: scrollable example 2022-11-03 03:23:35 +01:00
Ashley Wulber
bc26dff2ca
refactor: undo changes to radio 2022-11-03 03:23:35 +01:00
Ashley Wulber
e2166ecad0
wip: Custom palette for built in theme 2022-11-03 03:23:35 +01:00
Héctor Ramón
231d2fd845
Merge pull request #1400 from nicksenger/lazy/cached
`Lazy` widget
2022-11-03 03:12:23 +01:00
Héctor Ramón
3b8669ae94
Merge pull request #1502 from icedrocket/master
fix: enable `application` feature required in `iced_glutin`
2022-11-03 03:05:54 +01:00
Héctor Ramón Jiménez
415978b807
Rename cached example to lazy 2022-11-03 02:55:22 +01:00