Merge pull request #2475 from vladh/impl-copy-fill-stroke
Implement Copy on Fill and Stroke
This commit is contained in:
commit
7344a31010
4 changed files with 4 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ use crate::core::Color;
|
||||||
use crate::gradient::{self, Gradient};
|
use crate::gradient::{self, Gradient};
|
||||||
|
|
||||||
/// The style used to fill geometry.
|
/// The style used to fill geometry.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Fill {
|
pub struct Fill {
|
||||||
/// The color or gradient of the fill.
|
/// The color or gradient of the fill.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ pub use crate::geometry::Style;
|
||||||
use iced_core::Color;
|
use iced_core::Color;
|
||||||
|
|
||||||
/// The style of a stroke.
|
/// The style of a stroke.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Stroke<'a> {
|
pub struct Stroke<'a> {
|
||||||
/// The color or gradient of the stroke.
|
/// The color or gradient of the stroke.
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use crate::core::Color;
|
||||||
use crate::geometry::Gradient;
|
use crate::geometry::Gradient;
|
||||||
|
|
||||||
/// The coloring style of some drawing.
|
/// The coloring style of some drawing.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
pub enum Style {
|
pub enum Style {
|
||||||
/// A solid [`Color`].
|
/// A solid [`Color`].
|
||||||
Solid(Color),
|
Solid(Color),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use bytemuck::{Pod, Zeroable};
|
||||||
use half::f16;
|
use half::f16;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||||
/// A fill which linearly interpolates colors along a direction.
|
/// 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`].
|
/// For a gradient which can be used as a fill for a background of a widget, see [`crate::core::Gradient`].
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue