chore: Appease clippy
This commit is contained in:
parent
648e14e057
commit
15c1cf5bf6
|
@ -46,8 +46,12 @@ impl ShapeTessellator {
|
||||||
match path {
|
match path {
|
||||||
DrawPath::Fill { style, commands } => match style {
|
DrawPath::Fill { style, commands } => match style {
|
||||||
swf::FillStyle::Color(color) => {
|
swf::FillStyle::Color(color) => {
|
||||||
let mut buffers_builder =
|
let mut buffers_builder = BuffersBuilder::new(
|
||||||
BuffersBuilder::new(&mut lyon_mesh, RuffleVertexCtor { color: *color });
|
&mut lyon_mesh,
|
||||||
|
RuffleVertexCtor {
|
||||||
|
color: color.clone(),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
if let Err(e) = self.fill_tess.tessellate_path(
|
if let Err(e) = self.fill_tess.tessellate_path(
|
||||||
&ruffle_path_to_lyon_path(commands, true),
|
&ruffle_path_to_lyon_path(commands, true),
|
||||||
|
@ -202,7 +206,9 @@ impl ShapeTessellator {
|
||||||
} => {
|
} => {
|
||||||
let mut buffers_builder = BuffersBuilder::new(
|
let mut buffers_builder = BuffersBuilder::new(
|
||||||
&mut lyon_mesh,
|
&mut lyon_mesh,
|
||||||
RuffleVertexCtor { color: style.color },
|
RuffleVertexCtor {
|
||||||
|
color: style.color.clone(),
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO(Herschel): 0 width indicates "hairline".
|
// TODO(Herschel): 0 width indicates "hairline".
|
||||||
|
@ -453,7 +459,7 @@ impl FillVertexConstructor<Vertex> for RuffleVertexCtor {
|
||||||
Vertex {
|
Vertex {
|
||||||
x: vertex.position().x,
|
x: vertex.position().x,
|
||||||
y: vertex.position().y,
|
y: vertex.position().y,
|
||||||
color: self.color,
|
color: self.color.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -463,7 +469,7 @@ impl StrokeVertexConstructor<Vertex> for RuffleVertexCtor {
|
||||||
Vertex {
|
Vertex {
|
||||||
x: vertex.position().x,
|
x: vertex.position().x,
|
||||||
y: vertex.position().y,
|
y: vertex.position().y,
|
||||||
color: self.color,
|
color: self.color.clone(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ pub struct Rectangle {
|
||||||
/// An RGBA (red, green, blue, alpha) color.
|
/// An RGBA (red, green, blue, alpha) color.
|
||||||
///
|
///
|
||||||
/// All components are stored as [`u8`] and have a color range of 0-255.
|
/// All components are stored as [`u8`] and have a color range of 0-255.
|
||||||
#[derive(Debug, PartialEq, Clone, Copy)]
|
#[derive(Debug, PartialEq, Clone)]
|
||||||
pub struct Color {
|
pub struct Color {
|
||||||
/// The red component value.
|
/// The red component value.
|
||||||
pub r: u8,
|
pub r: u8,
|
||||||
|
|
Loading…
Reference in New Issue