Struct xcursor::parser::Image[][src]

pub struct Image {
    pub size: u32,
    pub width: u32,
    pub height: u32,
    pub xhot: u32,
    pub yhot: u32,
    pub delay: u32,
    pub pixels_rgba: Vec<u8>,
    pub pixels_argb: Vec<u8>,
}
Expand description

A struct representing an image. Pixels are in ARGB format, with each byte representing a single channel.

Fields

size: u32

The nominal size of the image.

width: u32

The actual width of the image. Doesn’t need to match size.

height: u32

The actual height of the image. Doesn’t need to match size.

xhot: u32

The X coordinate of the hotspot pixel (the pixel where the tip of the arrow is situated)

yhot: u32

The Y coordinate of the hotspot pixel (the pixel where the tip of the arrow is situated)

delay: u32

The amount of time (in milliseconds) that this image should be shown for, before switching to the next.

pixels_rgba: Vec<u8>

A slice containing the pixels’ bytes, in RGBA format (or, in the order of the file).

pixels_argb: Vec<u8>

A slice containing the pixels’ bytes, in ARGB format.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.