Cleaned up namespaces re: PR comments.

This commit is contained in:
bungoboingo 2022-10-18 15:18:37 -07:00
parent bb8d46a3fd
commit c4565759e4
13 changed files with 158 additions and 161 deletions

View file

@ -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| {

View file

@ -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>,
}