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