[−][src]Struct glfw::Cursor
Represents a window cursor that can be used to display any of the standard cursors or load a custom cursor from an image.
Note that the cursor object has a lifetime and will not display correctly after it has been dropped.
Methods
impl Cursor
[src]
pub fn standard(cursor: StandardCursor) -> Cursor
[src]
Create a new cursor using glfwCreateStandardCursor
pub fn create_from_pixels(
image: PixelImage,
x_hotspot: u32,
y_hotspot: u32
) -> Cursor
[src]
image: PixelImage,
x_hotspot: u32,
y_hotspot: u32
) -> Cursor
Creates a new cursor from the PixelImage
provided via glfwCreateCursor
Note that the cursor image will be the same size as the image provided, so scaling it beforehand may be required.
The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cursor
impl !Send for Cursor
impl !Sync for Cursor
impl Unpin for Cursor
impl UnwindSafe for Cursor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,