embedded_graphics/primitives/
mod.rs1pub mod arc;
4pub mod circle;
5mod common;
6pub mod ellipse;
7pub mod line;
8pub mod polyline;
9mod primitive_style;
10pub mod rectangle;
11pub mod rounded_rectangle;
12pub mod sector;
13mod styled;
14pub mod triangle;
15
16#[doc(no_inline)]
17pub use self::rectangle::Rectangle;
18pub use self::{
19 arc::Arc,
20 circle::Circle,
21 ellipse::Ellipse,
22 line::Line,
23 polyline::Polyline,
24 primitive_style::{PrimitiveStyle, PrimitiveStyleBuilder, StrokeAlignment},
25 rounded_rectangle::{CornerRadii, CornerRadiiBuilder, RoundedRectangle},
26 sector::Sector,
27 triangle::Triangle,
28};
29use crate::geometry::{Dimensions, Point};
30pub use embedded_graphics_core::primitives::PointsIter;
31pub use styled::{Styled, StyledDimensions, StyledDrawable};
32
33pub trait Primitive: Dimensions {
35 fn into_styled<S>(self, style: S) -> Styled<Self, S>
37 where
38 Self: Sized,
39 {
40 Styled::new(self, style)
41 }
42}
43
44pub trait ContainsPoint {
46 fn contains(&self, point: Point) -> bool;
48}
49
50pub trait OffsetOutline {
52 fn offset(&self, offset: i32) -> Self;
58}