FillColor

Trait FillColor 

Source
pub trait FillColor {
    // Required methods
    fn fill_color(&self) -> AlphaColor<Srgb>;
    fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self;
    fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self;
}
Expand description

A trait for items that have fill color

Required Methods§

Source

fn fill_color(&self) -> AlphaColor<Srgb>

Getting fill color of an item

Source

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self

Setting fill opacity of an item

Source

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self

Setting fill color(rgba) of an item

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FillColor for Sphere

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Sphere

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Sphere

Source§

impl FillColor for MeshItem

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut MeshItem

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut MeshItem

Source§

impl FillColor for Surface

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Surface

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Surface

Source§

impl FillColor for Circle

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Circle

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Circle

Source§

impl FillColor for Ellipse

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Ellipse

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Ellipse

Source§

impl FillColor for Parallelogram

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Parallelogram

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Parallelogram

Source§

impl FillColor for Polygon

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Polygon

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Polygon

Source§

impl FillColor for Rectangle

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Rectangle

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Rectangle

Source§

impl FillColor for RegularPolygon

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut RegularPolygon

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut RegularPolygon

Source§

impl FillColor for Square

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Square

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut Square

Source§

impl FillColor for VItem

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut VItem

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut VItem

Source§

impl FillColor for SvgItem

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut SvgItem

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut SvgItem

Source§

impl FillColor for TextItem

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut TextItem

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut TextItem

Source§

impl FillColor for TypstText

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut TypstText

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut TypstText

Source§

impl<T> FillColor for [T]
where T: FillColor,

Source§

fn fill_color(&self) -> AlphaColor<Srgb>

Source§

fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut [T]

Source§

fn set_fill_opacity(&mut self, opacity: f32) -> &mut [T]

Implementors§

Source§

impl FillColor for ranim_core::core_item::mesh_item::MeshItem

Source§

impl FillColor for ranim_core::core_item::vitem::VItem