pub trait StrokeColor {
// Required methods
fn stroke_color(&self) -> AlphaColor<Srgb>;
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Self;
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self;
}Expand description
A trait for items that have stroke color
Required Methods§
Sourcefn stroke_color(&self) -> AlphaColor<Srgb>
fn stroke_color(&self) -> AlphaColor<Srgb>
Getting stroke color of an item
Sourcefn set_stroke_opacity(&mut self, opacity: f32) -> &mut Self
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Self
Setting stroke opacity of an item
Sourcefn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Self
Setting stroke 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 StrokeColor for Arc
impl StrokeColor for Arc
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Arc
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Arc
Source§impl StrokeColor for ArcBetweenPoints
impl StrokeColor for ArcBetweenPoints
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut ArcBetweenPoints
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut ArcBetweenPoints
Source§impl StrokeColor for Circle
impl StrokeColor for Circle
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Circle
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Circle
Source§impl StrokeColor for Ellipse
impl StrokeColor for Ellipse
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Ellipse
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Ellipse
Source§impl StrokeColor for EllipticArc
impl StrokeColor for EllipticArc
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut EllipticArc
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut EllipticArc
Source§impl StrokeColor for Line
impl StrokeColor for Line
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Line
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Line
Source§impl StrokeColor for Parallelogram
impl StrokeColor for Parallelogram
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Parallelogram
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Parallelogram
Source§impl StrokeColor for Polygon
impl StrokeColor for Polygon
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Polygon
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Polygon
Source§impl StrokeColor for Rectangle
impl StrokeColor for Rectangle
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Rectangle
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Rectangle
Source§impl StrokeColor for RegularPolygon
impl StrokeColor for RegularPolygon
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut RegularPolygon
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut RegularPolygon
Source§impl StrokeColor for Square
impl StrokeColor for Square
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut Square
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut Square
Source§impl StrokeColor for SvgItem
impl StrokeColor for SvgItem
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut SvgItem
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut SvgItem
Source§impl StrokeColor for TextItem
impl StrokeColor for TextItem
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut TextItem
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut TextItem
Source§impl StrokeColor for TypstText
impl StrokeColor for TypstText
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut TypstText
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut TypstText
Source§impl StrokeColor for VItem
impl StrokeColor for VItem
fn stroke_color(&self) -> AlphaColor<Srgb>
fn set_stroke_color(&mut self, color: AlphaColor<Srgb>) -> &mut VItem
fn set_stroke_opacity(&mut self, opacity: f32) -> &mut VItem
Source§impl<I, G> StrokeColor for Node<I, G>where
I: StrokeColor,
impl<I, G> StrokeColor for Node<I, G>where
I: StrokeColor,
Source§fn stroke_color(&self) -> AlphaColor<Srgb>
fn stroke_color(&self) -> AlphaColor<Srgb>
The stroke color of the first leaf in DFS order; an empty tree warns and reports white.