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;
}