Type Definition skia_safe::paint::Paint

source ·
pub type Paint = Handle<SkPaint>;

Implementations§

source§

impl Paint

source

pub fn new<'a>( color: impl AsRef<Color4f>, color_space: impl Into<Option<&'a ColorSpace>> ) -> Paint

source

pub fn reset(&mut self) -> &mut Self

source

pub fn is_anti_alias(&self) -> bool

source

pub fn set_anti_alias(&mut self, anti_alias: bool) -> &mut Self

source

pub fn is_dither(&self) -> bool

source

pub fn set_dither(&mut self, dither: bool) -> &mut Self

source

pub fn style(&self) -> Style

source

pub fn set_style(&mut self, style: Style) -> &mut Self

source

pub fn set_stroke(&mut self, stroke: bool) -> &mut Self

source

pub fn color(&self) -> Color

source

pub fn color4f(&self) -> Color4f

source

pub fn set_color(&mut self, color: impl Into<Color>) -> &mut Self

source

pub fn set_color4f<'a>( &mut self, color: impl AsRef<Color4f>, color_space: impl Into<Option<&'a ColorSpace>> ) -> &mut Self

source

pub fn alpha_f(&self) -> f32

source

pub fn alpha(&self) -> u8

source

pub fn set_alpha_f(&mut self, alpha: f32) -> &mut Self

source

pub fn set_alpha(&mut self, alpha: u8) -> &mut Self

source

pub fn set_argb(&mut self, a: u8, r: u8, g: u8, b: u8) -> &mut Self

source

pub fn stroke_width(&self) -> scalar

source

pub fn set_stroke_width(&mut self, width: scalar) -> &mut Self

source

pub fn stroke_miter(&self) -> scalar

source

pub fn set_stroke_miter(&mut self, miter: scalar) -> &mut Self

source

pub fn stroke_cap(&self) -> Cap

source

pub fn set_stroke_cap(&mut self, cap: Cap) -> &mut Self

source

pub fn stroke_join(&self) -> Join

source

pub fn set_stroke_join(&mut self, join: Join) -> &mut Self

source

pub fn shader(&self) -> Option<Shader>

source

pub fn set_shader(&mut self, shader: impl Into<Option<Shader>>) -> &mut Self

source

pub fn color_filter(&self) -> Option<ColorFilter>

source

pub fn set_color_filter( &mut self, color_filter: impl Into<Option<ColorFilter>> ) -> &mut Self

source

pub fn as_blend_mode(&self) -> Option<BlendMode>

source

pub fn blend_mode_or(&self, default_mode: BlendMode) -> BlendMode

source

pub fn blend_mode(&self) -> BlendMode

👎Deprecated since 0.42.0: Use as_blend_mode() or blend_mode_or() instead.
source

pub fn is_src_over(&self) -> bool

source

pub fn set_blend_mode(&mut self, mode: BlendMode) -> &mut Self

source

pub fn blender(&self) -> Option<Blender>

source

pub fn set_blender(&mut self, blender: impl Into<Option<Blender>>) -> &mut Self

source

pub fn path_effect(&self) -> Option<PathEffect>

source

pub fn set_path_effect( &mut self, path_effect: impl Into<Option<PathEffect>> ) -> &mut Self

source

pub fn mask_filter(&self) -> Option<MaskFilter>

source

pub fn set_mask_filter( &mut self, mask_filter: impl Into<Option<MaskFilter>> ) -> &mut Self

source

pub fn image_filter(&self) -> Option<ImageFilter>

source

pub fn set_image_filter( &mut self, image_filter: impl Into<Option<ImageFilter>> ) -> &mut Self

source

pub fn nothing_to_draw(&self) -> bool

Trait Implementations§

source§

impl Debug for Paint

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Send for Paint

source§

impl Sync for Paint