Crate hvif

Source
Expand description

This crate implements a parser for the Haiku Vector Icon Format, or HVIF.

use hvif::Hvif;

fn main() {
    let data = b"ncif\0\0\0";
    if let Ok((_, hvif)) = Hvif::parse(data) {
        println!("{:?}", hvif);
    }
}

Modules§

path
Describes how a path is formed.
shape
Describes how a shape is made, from one or more paths with a style applied.
style
Describes the style of each shape.

Structs§

Coord
The base type for a coordinate in HVIF, it can go from -128. to 192., while the inner canvas goes from 0. to 64.
Float24
The base type of a transform matrix.
Hvif
Entry point of this crate, this struct represents a HVIF file in memory.
Point
Represents a point in the HVIF, which can only be between -128. to 192. in each direction (with the canvas being from 0. to 64.).
Transform
A 3×2 transform matrix.

Functions§

render
Render a parsed HVIF file into a Cairo surface.