[go: up one dir, main page]

texture_packer 0.24.0

A texture packing library using the skyline heuristic
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Defines a trait for exporting [Texture]s to arbitrary data.
pub use self::image_exporter::ImageExporter;
use crate::texture::Texture;

mod image_exporter;

/// Result of exporting a texture.
pub type ExportResult<T> = Result<T, String>;

/// Converter for a [Texture] to type `Output`.
pub trait Exporter<T: Texture> {
    /// Output type to use.
    type Output;

    /// Export a texture object to an `Output`.
    fn export(texture: &T) -> ExportResult<Self::Output>;
}