pub struct Stroke {
pub width: f32,
pub rounded: bool,
pub space: StrokeSpace,
}Fields§
§width: f32§rounded: bool§space: StrokeSpaceImplementations§
Source§impl Stroke
impl Stroke
pub fn new(width: f32) -> Self
Sourcepub fn round(width: f32) -> Self
pub fn round(width: f32) -> Self
A local-space stroke whose width scales with the painter transform.
Sourcepub fn screen(width: f32) -> Self
pub fn screen(width: f32) -> Self
A stroke whose width is in screen pixels and ignores the transform scale.
Sourcepub fn screen_round(width: f32) -> Self
pub fn screen_round(width: f32) -> Self
A rounded, screen-space stroke.
Sourcepub fn in_screen_space(self) -> Self
pub fn in_screen_space(self) -> Self
Converts this stroke to screen-space pixels.
pub fn is_visible(self) -> bool
Trait Implementations§
impl Copy for Stroke
impl StructuralPartialEq for Stroke
Auto Trait Implementations§
impl Freeze for Stroke
impl RefUnwindSafe for Stroke
impl Send for Stroke
impl Sync for Stroke
impl Unpin for Stroke
impl UnsafeUnpin for Stroke
impl UnwindSafe for Stroke
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