pub struct PdcCommand<const MAX_POINTS: usize = 16> {
pub command_type: PdcCommandType,
pub stroke_color: Option<Rgb565>,
pub fill_color: Option<Rgb565>,
pub stroke_width: u8,
pub radius: u16,
pub is_closed: bool,
pub points: Vec<PdcPrecisePoint, MAX_POINTS>,
}Expand description
A single Precise Draw Command encoding stroke, fill, and geometry.
Fields§
§command_type: PdcCommandType§stroke_color: Option<Rgb565>§fill_color: Option<Rgb565>§stroke_width: u8§radius: u16§is_closed: bool§points: Vec<PdcPrecisePoint, MAX_POINTS>Implementations§
Source§impl<const MAX_POINTS: usize> PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> PdcCommand<MAX_POINTS>
pub const fn new(command_type: PdcCommandType) -> Self
pub fn circle( center: Point, radius: u16, stroke: Option<Rgb565>, fill: Option<Rgb565>, stroke_width: u8, ) -> Self
pub fn add_point(&mut self, pt: Point) -> Result<(), PdcError>
pub fn add_subpixel_point( &mut self, x_fixed: i16, y_fixed: i16, ) -> Result<(), PdcError>
Trait Implementations§
Source§impl<const MAX_POINTS: usize> Clone for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> Clone for PdcCommand<MAX_POINTS>
Source§fn clone(&self) -> PdcCommand<MAX_POINTS>
fn clone(&self) -> PdcCommand<MAX_POINTS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const MAX_POINTS: usize> Debug for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> Debug for PdcCommand<MAX_POINTS>
Source§impl<const MAX_POINTS: usize> PartialEq for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> PartialEq for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> StructuralPartialEq for PdcCommand<MAX_POINTS>
Auto Trait Implementations§
impl<const MAX_POINTS: usize> Freeze for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> RefUnwindSafe for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> Send for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> Sync for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> Unpin for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> UnsafeUnpin for PdcCommand<MAX_POINTS>
impl<const MAX_POINTS: usize> UnwindSafe for PdcCommand<MAX_POINTS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.