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§
Sourcefn fill_color(&self) -> AlphaColor<Srgb>
fn fill_color(&self) -> AlphaColor<Srgb>
Getting fill color of an item
Sourcefn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Self
Setting fill opacity of an item
Sourcefn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
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".
Implementations on Foreign Types§
Source§impl FillColor for Circle
impl FillColor for Circle
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Circle
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Circle
Source§impl FillColor for Ellipse
impl FillColor for Ellipse
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Ellipse
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Ellipse
Source§impl FillColor for MeshItem
impl FillColor for MeshItem
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut MeshItem
fn set_fill_opacity(&mut self, opacity: f32) -> &mut MeshItem
Source§impl FillColor for Parallelogram
impl FillColor for Parallelogram
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Parallelogram
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Parallelogram
Source§impl FillColor for Polygon
impl FillColor for Polygon
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Polygon
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Polygon
Source§impl FillColor for Rectangle
impl FillColor for Rectangle
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Rectangle
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Rectangle
Source§impl FillColor for RegularPolygon
impl FillColor for RegularPolygon
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut RegularPolygon
fn set_fill_opacity(&mut self, opacity: f32) -> &mut RegularPolygon
Source§impl FillColor for Sphere
impl FillColor for Sphere
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Sphere
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Sphere
Source§impl FillColor for Square
impl FillColor for Square
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Square
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Square
Source§impl FillColor for Surface
impl FillColor for Surface
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut Surface
fn set_fill_opacity(&mut self, opacity: f32) -> &mut Surface
Source§impl FillColor for SvgItem
impl FillColor for SvgItem
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut SvgItem
fn set_fill_opacity(&mut self, opacity: f32) -> &mut SvgItem
Source§impl FillColor for TextItem
impl FillColor for TextItem
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut TextItem
fn set_fill_opacity(&mut self, opacity: f32) -> &mut TextItem
Source§impl FillColor for TypstText
impl FillColor for TypstText
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut TypstText
fn set_fill_opacity(&mut self, opacity: f32) -> &mut TypstText
Source§impl FillColor for VItem
impl FillColor for VItem
fn fill_color(&self) -> AlphaColor<Srgb>
fn set_fill_color(&mut self, color: AlphaColor<Srgb>) -> &mut VItem
fn set_fill_opacity(&mut self, opacity: f32) -> &mut VItem
Source§impl<I, G> FillColor for Node<I, G>where
I: FillColor,
impl<I, G> FillColor for Node<I, G>where
I: FillColor,
Source§fn fill_color(&self) -> AlphaColor<Srgb>
fn fill_color(&self) -> AlphaColor<Srgb>
The fill color of the first leaf in DFS order; an empty tree warns and reports white.