pub struct PathStroke {
pub width: f32,
pub color: ColorMode,
pub kind: StrokeKind,
}
Expand description
Describes the width and color of paths. The color can either be solid or provided by a callback. For more information, see ColorMode
The default stroke is the same as Stroke::NONE
.
Fields§
§width: f32
§color: ColorMode
§kind: StrokeKind
Implementations§
source§impl PathStroke
impl PathStroke
sourcepub const NONE: Self = _
pub const NONE: Self = _
Same as PathStroke::default
.
pub fn new(width: impl Into<f32>, color: impl Into<Color32>) -> Self
sourcepub fn new_uv(
width: impl Into<f32>,
callback: impl Fn(Rect, Pos2) -> Color32 + Send + Sync + 'static,
) -> Self
pub fn new_uv( width: impl Into<f32>, callback: impl Fn(Rect, Pos2) -> Color32 + Send + Sync + 'static, ) -> Self
Create a new PathStroke
with a UV function
The bounding box passed to the callback will have a margin of TessellationOptions::feathering_size_in_pixels
Trait Implementations§
source§impl Clone for PathStroke
impl Clone for PathStroke
source§fn clone(&self) -> PathStroke
fn clone(&self) -> PathStroke
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PathStroke
impl Debug for PathStroke
source§impl Default for PathStroke
impl Default for PathStroke
source§fn default() -> PathStroke
fn default() -> PathStroke
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PathStroke
impl<'de> Deserialize<'de> for PathStroke
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<Color> From<(f32, Color)> for PathStroke
impl<Color> From<(f32, Color)> for PathStroke
source§impl From<Stroke> for PathStroke
impl From<Stroke> for PathStroke
source§impl PartialEq for PathStroke
impl PartialEq for PathStroke
source§impl Serialize for PathStroke
impl Serialize for PathStroke
impl StructuralPartialEq for PathStroke
Auto Trait Implementations§
impl Freeze for PathStroke
impl !RefUnwindSafe for PathStroke
impl Send for PathStroke
impl Sync for PathStroke
impl Unpin for PathStroke
impl !UnwindSafe for PathStroke
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more