diff options
author | 2022-10-18 15:18:37 -0700 | |
---|---|---|
committer | 2022-10-18 15:18:37 -0700 | |
commit | c4565759e4294540f54a81e4d91ddea7a769d3d4 (patch) | |
tree | d326dca32fb327b81ef67fae565b88f386431792 /graphics | |
parent | bb8d46a3fdf925b4b2fa9e7db76e48caf020b212 (diff) | |
download | iced-c4565759e4294540f54a81e4d91ddea7a769d3d4.tar.gz iced-c4565759e4294540f54a81e4d91ddea7a769d3d4.tar.bz2 iced-c4565759e4294540f54a81e4d91ddea7a769d3d4.zip |
Cleaned up namespaces re: PR comments.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/src/gradient/linear.rs | 7 | ||||
-rw-r--r-- | graphics/src/triangle.rs | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/graphics/src/gradient/linear.rs b/graphics/src/gradient/linear.rs index a9cfd55d..020c65db 100644 --- a/graphics/src/gradient/linear.rs +++ b/graphics/src/gradient/linear.rs @@ -134,10 +134,13 @@ impl Builder { /// /// `offset` must be between `0.0` and `1.0` or the gradient cannot be built. /// - /// Note: when using the [Glow] backend, any color stop added after the 16th + /// Note: when using the [`glow`] backend, any color stop added after the 16th /// will not be displayed. /// - /// On [backend::Wgpu] backend this limitation does not exist (technical limit is 524,288 stops). + /// On the [`wgpu`] backend this limitation does not exist (technical limit is 524,288 stops). + /// + /// [`glow`]: https://docs.rs/iced_glow + /// [`wgpu`]: https://docs.rs/iced_wgpu pub fn add_stop(mut self, offset: f32, color: Color) -> Self { if offset.is_finite() && (0.0..=1.0).contains(&offset) { match self.stops.binary_search_by(|stop| { diff --git a/graphics/src/triangle.rs b/graphics/src/triangle.rs index f019d55d..39359cfb 100644 --- a/graphics/src/triangle.rs +++ b/graphics/src/triangle.rs @@ -7,6 +7,8 @@ pub struct Mesh2D { /// The vertices of the mesh pub vertices: Vec<Vertex2D>, /// The list of vertex indices that defines the triangles of the mesh. + /// + /// Therefore, this list should always have a length that is a multiple of 3. pub indices: Vec<u32>, } |