summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/gradient/linear.rs7
-rw-r--r--graphics/src/triangle.rs2
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>,
}