skia_safe::paint

Type Alias Paint

Source
pub type Paint = Handle<SkPaint>;

Aliased Type§

struct Paint(/* private fields */);

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