pub struct Paint {
pub fill_color: u32,
pub stroke_color: u32,
pub stroke_width: f32,
}Expand description
Fill and stroke state for an immediate drawing command.
Fields§
§fill_color: u32§stroke_color: u32§stroke_width: f32Implementations§
Source§impl Paint
impl Paint
Sourcepub fn stroke(color: u32, width: f32) -> Self
pub fn stroke(color: u32, width: f32) -> Self
Creates a stroke-only paint using packed RGBA color.
Sourcepub fn filled_stroke(
fill_color: u32,
stroke_color: u32,
stroke_width: f32,
) -> Self
pub fn filled_stroke( fill_color: u32, stroke_color: u32, stroke_width: f32, ) -> Self
Creates a paint with both fill and stroke.
Sourcepub fn has_stroke(self) -> bool
pub fn has_stroke(self) -> bool
Reports whether the stroke has positive width and non-zero alpha.
Trait Implementations§
impl Copy for Paint
impl StructuralPartialEq for Paint
Auto Trait Implementations§
impl Freeze for Paint
impl RefUnwindSafe for Paint
impl Send for Paint
impl Sync for Paint
impl Unpin for Paint
impl UnsafeUnpin for Paint
impl UnwindSafe for Paint
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