Skip to main content

CursorImage

Struct CursorImage 

Source
pub struct CursorImage { /* private fields */ }
Expand description

A imagem de um cursor: pixels RGBA sem pré-multiplicar, em pixels de tela (sem escala), e o ponto de clique.

Implementations§

Source§

impl CursorImage

Source

pub fn id(&self) -> u64

O mesmo id para os mesmos pixels e o mesmo ponto: a chave do cursor guardado na plataforma.

Source

pub fn width(&self) -> u32

Source

pub fn height(&self) -> u32

Source

pub fn hotspot(&self) -> (u32, u32)

O ponto de clique, em pixels da imagem a partir do canto de cima à esquerda.

Source

pub fn rgba(&self) -> &[u8] ⓘ

Os pixels RGBA, linha a linha.

Trait Implementations§

Source§

impl Debug for CursorImage

Source§

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

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

impl Eq for CursorImage

Source§

impl PartialEq for CursorImage

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CursorImage

Auto Trait Implementations§

§

impl Forget for CursorImage

§

impl Freeze for CursorImage
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for CursorImage

§

impl RefUnwindSafe for CursorImage

§

impl Send for CursorImage
where RawVecInner: Send,

§

impl Sync for CursorImage
where RawVecInner: Sync,

§

impl Unpin for CursorImage
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for CursorImage

§

impl UnwindSafe for CursorImage
where RawVecInner: 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<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<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<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.