Struct epaint::stroke::PathStroke
source · 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.0.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<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
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
)