Struct pixelar::PixelPaper
source · Implementations§
source§impl<const H: usize, const W: usize> PixelPaper<H, W>
impl<const H: usize, const W: usize> PixelPaper<H, W>
pub fn new<C1, C2>(
block_width: usize,
separator_width: usize,
background: C1,
separator_color: C2
) -> Selfwhere
C1: ColorSelector,
C2: ColorSelector,
pub fn save(&self, path: &str) -> Result<(), ImageError>
Trait Implementations§
source§impl<const H: usize, const W: usize> Clone for PixelPaper<H, W>
impl<const H: usize, const W: usize> Clone for PixelPaper<H, W>
source§fn clone(&self) -> PixelPaper<H, W>
fn clone(&self) -> PixelPaper<H, W>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<const H: usize, const W: usize> PixelsTable<H, W> for PixelPaper<H, W>
impl<const H: usize, const W: usize> PixelsTable<H, W> for PixelPaper<H, W>
fn table(&self) -> &[[PixelDescriptor; H]; W]
fn table_mut(&mut self) -> &mut [[PixelDescriptor; H]; W]
fn pixel_at<P: ToPosition<H, W>>(
&self,
pos: P
) -> Result<&PixelDescriptor, PixelNotFound>
fn pixel_at_mut<P: ToPosition<H, W>>(
&mut self,
pos: P
) -> Result<&mut PixelDescriptor, PixelNotFound>
fn change_pixel_at<P: ToPosition<H, W>>(
&mut self,
pos: P,
pd: PixelDescriptor
) -> Result<(), PixelNotFound>
fn draw_from_table<const H1: usize, const W1: usize, P: PixelsTable<H1, W1>, P1: ToPosition<H, W>>(
&mut self,
other: &P,
pos: P1
)
fn draw_from_table_exact<P: PixelsTable<H, W>>(&mut self, pixel_table: &P)
fn draw<const H1: usize, const W1: usize, D: Drawable<H1, W1>, P: ToPosition<H, W>>(
&mut self,
drawable: D,
pos: P
)where
Self: Sized,
fn draw_exact<D: Drawable<H, W>, P: ToPosition<H, W>>(
&mut self,
drawable: D,
pos: P
)where
Self: Sized,
fn draw_on_table<const H1: usize, const W1: usize, P: PixelsTable<H1, W1>, P1: ToPosition<H1, W1>>(
&self,
other: &mut P,
pos: P1
)where
Self: Sized,
fn draw_on_exact<P: PixelsTable<H, W>>(&self, other: &mut P)where
Self: Sized,
fn default_table() -> [[PixelDescriptor; H]; W]
fn filled_table<C: ColorSelector>(color: C) -> [[PixelDescriptor; H]; W]
Auto Trait Implementations§
impl<const H: usize, const W: usize> RefUnwindSafe for PixelPaper<H, W>
impl<const H: usize, const W: usize> Send for PixelPaper<H, W>
impl<const H: usize, const W: usize> Sync for PixelPaper<H, W>
impl<const H: usize, const W: usize> Unpin for PixelPaper<H, W>
impl<const H: usize, const W: usize> UnwindSafe for PixelPaper<H, W>
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.§impl<Src> TryFrom<Src> for Src
impl<Src> TryFrom<Src> for Src
§impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
impl<Src, Dst> TryInto<Dst> for Srcwhere
Dst: TryFrom<Src>,
§impl<Src> ValueFrom<Src> for Src
impl<Src> ValueFrom<Src> for Src
§fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
Convert the given value into an exactly equivalent representation.