Struct ico::IconImage [] [src]

pub struct IconImage { /* fields omitted */ }

A decoded image.

Methods

impl IconImage
[src]

[src]

Creates a new image with the given dimensions and RGBA data. The width and height must each be between 1 and 256 inclusive, and rgba_data must have 4 * width * height bytes and be in row-major order from top to bottom. Panics if the dimensions are out of range or if rgba_data is the wrong length.

[src]

Decodes an image from a PNG file. The width and height of the image must each be between 1 and 256 inclusive. Returns an error if the PNG data is malformed or can't be decoded, or if the size of the PNG image is out of range.

[src]

Encodes the image as a PNG file.

[src]

Returns the width of the image, in pixels.

[src]

Returns the height of the image, in pixels.

[src]

Returns the coordinates of the cursor hotspot (pixels right from the left edge of the image, and pixels down from the top edge), or None if this image is an icon rather than a cursor.

[src]

Sets or clears the cursor hotspot coordinates.

[src]

Returns the RGBA data for this image, in row-major order from top to bottom.

Trait Implementations

impl Clone for IconImage
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more