Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Copy on Fill and Stroke #2475

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading