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 Jiménez
7a24b4ba69
Replace texture_store and store with storage
2022-11-05 03:39:59 +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
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 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
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
7e22e2d452
Fix lints by clippy
2022-11-03 04:53:27 +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
Wyatt Herkamp
0a12590b6f
Update wgpu to 0.14 and wgpu_glyph to 0.18
2022-11-01 19:20:23 +01:00
bungoboingo
d53e262425
Documentation changes
2022-10-19 10:13:07 -07:00
bungoboingo
ab311c9375
Changed gradient builder to be more clear about what caused certain errors.
2022-10-18 17:45:47 -07:00
bungoboingo
c4565759e4
Cleaned up namespaces re: PR comments.
2022-10-18 15:18:37 -07:00
Bingus
aabc4e87b5
Merge branch 'master' into fear/linear-gradients
2022-10-07 16:58:45 -07:00
shan
7a124476b1
Jumped the gun on pushing; one more readability update :P
2022-10-07 16:57:29 -07:00
shan
fd5e1e5ab0
Adjusted gradient transform function to be more readable.
2022-10-07 16:55:55 -07:00
shan
a4a1262fa2
Fixed import issue with canvas in the gradient mod for situations where canvas feature is not enabled.
2022-10-07 16:28:13 -07:00
shan
215e6c95be
More import adjusting.
2022-10-07 13:21:32 -07:00
shan
3e600fe775
Adjusted reexports for clarity.
2022-10-07 13:10:37 -07:00
shan
12a87c54eb
Added support for relative positioning of gradient fills. Addressed some PR feedback.
2022-10-07 12:01:07 -07:00
shan
f9a6efcaa0
Fixed some more imports/documentation.
2022-10-06 19:41:00 -07:00
shan
72feba51be
Fixed some imports/documentation.
2022-10-06 19:13:40 -07:00
shan
9c7bf417ac
Added support for gradients to respect current frame transform.
2022-10-06 18:59:54 -07:00
shan
f4878a1a66
Changed tesselation functions to take Vertex2D builder instead of using lyon's builtin Point type to avoid extra copies.
2022-10-06 08:04:43 -07:00
shan
cb7c467654
Fixed lint issues & cleaned up some documentation.
2022-10-06 07:28:05 -07:00
shan
1eb8d972ba
Reduced memory transfer of OpenGL gradient uniform upload. Rearranged gradient uniforms on OpenGL side to be more performant.
2022-10-05 16:07:43 -07:00
shan
30432cbade
Readjusted namespaces, removed Geometry example as it's no longer relevant.
2022-10-05 10:49:58 -07:00
shan
6e7b3ced0b
Reworked wgpu buffers, updated glow side to have proper transform location storage, attempting to fix visibility modifiers, implemented some of the feedback received in initial PR.
2022-10-04 18:24:46 -07:00
Artur Sapek
388b3c3b33
expose touch events in canvas widget
2022-10-04 11:15:35 +02:00
shan
5d0fffc626
Fixed some importing issues since you can use a Shader::Gradient outside a Canvas widget, where it was previously only accessible.
2022-09-30 10:27:00 -07:00
shan
734557bda5
Fixed issue where stops could be declared out of order in the builder but must be sorted before being passed to shader.
2022-09-29 14:01:57 -07:00
shan
40f45d7b7e
Adds linear gradient support to 2D meshes in the canvas widget.
2022-09-29 11:15:35 -07:00
Héctor Ramón Jiménez
4655411256
Make Cache::clear immutable
2022-09-13 17:38:44 +02:00
Cory Forsstrom
56ad3a3221
Don't double translate text clip
2022-08-15 09:29:53 -07:00
Héctor Ramón Jiménez
375386faa9
Remove pure leftovers in iced_graphics
2022-07-27 07:21:15 +02:00
Héctor Ramón Jiménez
ff2519b1d4
Replace stateful widgets with new iced_pure API
2022-07-27 06:49:20 +02:00
Héctor Ramón Jiménez
f7059a1c9a
Remove unnecessary let bindings in canvas::Frame
2022-07-11 15:59:38 +02:00
Héctor Ramón Jiménez
fe34b7a339
Update lyon to 1.0 🎉
...
Congrats and thanks to @nical!
2022-07-11 15:53:33 +02:00
ThatsNoMoon
53d93a37dd
fix another discrepancy with HTML5 arcTo
...
HTML5's arcTo does not draw a line from the end of the arc to `b`, so
this should not either.
2022-07-10 15:12:11 +02:00
ThatsNoMoon
20b58e0214
fix arc_to
...
Fixed `path::Builder::arc_to` to behave the same as [HTML5's `arcTo`]
( https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-arcto ).
2022-07-10 15:12:01 +02:00