Héctor Ramón
ac737cb6e9
Merge pull request #1494 from tarkah/fix/padding
...
Constrain padding to resolved inner / outer widget sizes
2022-11-08 04:39:55 +01:00
Héctor Ramón
acb520a4a8
Merge pull request #1505 from ids1024/weak-dep-feature
...
Combine `glow_default_system_font` and `default_system_font` features
2022-11-08 04:24:48 +01:00
Héctor Ramón Jiménez
04087b2a86
Remove redundant std::convert namespace in padding
2022-11-08 04:11:45 +01:00
Héctor Ramón Jiménez
24d031b51c
Cast to u16 first then divide by 2 in Padding::fit
2022-11-08 04:11:06 +01:00
Héctor Ramón Jiménez
914f099342
Rearrange layout code to improve readability
2022-11-08 04:04:01 +01:00
Héctor Ramón Jiménez
7476663069
Rename Padding::constrain to fit
2022-11-08 03:56:05 +01:00
Héctor Ramón
da2325d18d
Merge pull request #1507 from ids1024/rgba-svg
...
Don't convert svg to BGRA before passing to shader
2022-11-05 08:12:27 +01:00
Ian Douglas Scott
a250aab958
Don't convert svg to BGRA before passing to shader
...
Now that the shader is using RGBA, this incorrectly swaps the
components.
2022-11-04 23:25:01 -07:00
Héctor Ramón
370fa14efb
Merge pull request #1485 from ids1024/glow-image
...
Glow image rendering support; move image/svg code to iced_graphics
2022-11-05 04:37:59 +01:00
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
Ian Douglas Scott
4d42ca2452
Combine glow_default_system_font and default_system_font features
...
Apparently "weak dependency features" have been stable since Rust
1.60.0, allowing a feature to enable a feature of a dependency only if
that dependency is enabled elsewhere. So having a separate feature for
this with glow is unnecessary now.
Also remove the `resolver` setting which is redundant on edition 2021.
2022-11-03 14:53:22 -07: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