Struct winit::Icon[][src]

pub struct Icon { /* fields omitted */ }

An icon used for the window titlebar, taskbar, etc.

Enabling the icon_loading feature provides you with several convenience methods for creating an Icon from any format supported by the image crate.

Methods

impl Icon
[src]

Creates an Icon from 32bpp RGBA data.

The length of rgba must be divisible by 4, and width * height must equal rgba.len() / 4. Otherwise, this will return a BadIcon error.

Loads an Icon from the path of an image on the filesystem.

Requires the icon_loading feature.

Loads an Icon from anything implementing BufRead and Seek.

Requires the icon_loading feature.

Loads an Icon from the unprocessed bytes of an image file. Uses heuristics to determine format.

Requires the icon_loading feature.

Loads an Icon from the unprocessed bytes of an image.

Requires the icon_loading feature.

Trait Implementations

impl Debug for Icon
[src]

Formats the value using the given formatter. Read more

impl Clone for Icon
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Icon
[src]

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

This method tests for !=.

impl Eq for Icon
[src]

impl From<DynamicImage> for Icon
[src]

Requires the icon_loading feature.

Performs the conversion.

impl From<RgbaImage> for Icon
[src]

Requires the icon_loading feature.

Performs the conversion.

Auto Trait Implementations

impl Send for Icon

impl Sync for Icon