Skip to content

Commit

Permalink
Merge pull request #2475 from vladh/impl-copy-fill-stroke
Browse files Browse the repository at this point in the history
Implement Copy on Fill and Stroke
  • Loading branch information
hecrj authored Jun 21, 2024
2 parents e8b1e5a + a7224a7 commit 7344a31
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion graphics/src/geometry/fill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::core::Color;
use crate::gradient::{self, Gradient};

/// The style used to fill geometry.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy)]
pub struct Fill {
/// The color or gradient of the fill.
///
Expand Down
2 changes: 1 addition & 1 deletion graphics/src/geometry/stroke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub use crate::geometry::Style;
use iced_core::Color;

/// The style of a stroke.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Copy)]
pub struct Stroke<'a> {
/// The color or gradient of the stroke.
///
Expand Down
2 changes: 1 addition & 1 deletion graphics/src/geometry/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::core::Color;
use crate::geometry::Gradient;

/// The coloring style of some drawing.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Style {
/// A solid [`Color`].
Solid(Color),
Expand Down
2 changes: 1 addition & 1 deletion graphics/src/gradient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use bytemuck::{Pod, Zeroable};
use half::f16;
use std::cmp::Ordering;

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq)]
/// A fill which linearly interpolates colors along a direction.
///
/// For a gradient which can be used as a fill for a background of a widget, see [`crate::core::Gradient`].
Expand Down

0 comments on commit 7344a31

Please sign in to comment.