Rotate

Struct Rotate 

Source
pub struct Rotate<S>(/* private fields */);
Expand description

Rotate a surface

Implementations§

Source§

impl<S> Rotate<S>

Source

pub fn by90(surface: S) -> Rotate<S>

Rotate by 90 degrees clockwise

Source

pub fn by180(surface: S) -> Rotate<Rotate<S>>

Rotate by 180 degrees clockwise

Source

pub fn by270(surface: S) -> Rotate<Rotate<Rotate<S>>>

Rotate by 270 degrees clockwise

Trait Implementations§

Source§

impl<S: Debug> Debug for Rotate<S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S> Deref for Rotate<S>

Source§

type Target = S

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<S> DerefMut for Rotate<S>

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<S: Surface> Surface for Rotate<S>

Source§

fn clear(&mut self)

Clear all pixels
Source§

fn height(&self) -> i32

Get the height of the surface
Source§

fn width(&self) -> i32

Get the width of the surface
Source§

fn pixel(&mut self, x: i32, y: i32)

Fill a pixel
Source§

fn line(&mut self, x1: i32, y1: i32, x2: i32, y2: i32)

Draw a line

Auto Trait Implementations§

§

impl<S> Freeze for Rotate<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Rotate<S>
where S: RefUnwindSafe,

§

impl<S> Send for Rotate<S>
where S: Send,

§

impl<S> Sync for Rotate<S>
where S: Sync,

§

impl<S> Unpin for Rotate<S>
where S: Unpin,

§

impl<S> UnwindSafe for Rotate<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<S> Awakening for S
where S: Surface,

Source§

fn awakening(&mut self, x: i32, y: i32, text: &str) -> i32

Write the text with the baseline starting at the given position. Returns the width of the text in pixels.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S> DigitsLarge for S
where S: Surface,

Source§

fn digits_large(&mut self, x: i32, y: i32, text: &str) -> i32

Write the text with the baseline starting at the given position. Returns the width of the text in pixels.
Source§

impl<S> DigitsMedium for S
where S: Surface,

Source§

fn digits_medium(&mut self, x: i32, y: i32, text: &str) -> i32

Write the text with the baseline starting at the given position. Returns the width of the text in pixels.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<S> Premium for S
where S: Surface,

Source§

fn premium(&mut self, x: i32, y: i32, text: &str) -> i32

Write the text with the baseline starting at the given position. Returns the width of the text in pixels.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.