diff options
author | 2023-01-04 19:32:03 +0100 | |
---|---|---|
committer | 2023-01-04 19:32:03 +0100 | |
commit | dca3d1fa7cef2c6e560b8165e3c474859a41e2ea (patch) | |
tree | 87f72bd1b2606f63f155c0148419031c5aabc0b6 /graphics | |
parent | b5e4e0e2f52a1c329214a9a00f03f0ab0992fdb6 (diff) | |
parent | e8aee70a69a0e10a3288875997f7403453b2d352 (diff) | |
download | iced-dca3d1fa7cef2c6e560b8165e3c474859a41e2ea.tar.gz iced-dca3d1fa7cef2c6e560b8165e3c474859a41e2ea.tar.bz2 iced-dca3d1fa7cef2c6e560b8165e3c474859a41e2ea.zip |
Merge pull request #1636 from tarkah/fix/location-copy
Make location copy
Diffstat (limited to '')
-rw-r--r-- | graphics/src/gradient.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/src/gradient.rs b/graphics/src/gradient.rs index 83f25238..61e919d6 100644 --- a/graphics/src/gradient.rs +++ b/graphics/src/gradient.rs @@ -64,7 +64,7 @@ impl From<(Point, Point)> for Position { } } -#[derive(Debug)] +#[derive(Debug, Clone, Copy)] /// The location of a relatively-positioned gradient. pub enum Location { /// Top left. @@ -86,7 +86,7 @@ pub enum Location { } impl Location { - fn to_absolute(&self, top_left: Point, size: Size) -> Point { + fn to_absolute(self, top_left: Point, size: Size) -> Point { match self { Location::TopLeft => top_left, Location::Top => { |