kahlo 0.0.3

Optimized software rendering library.
Documentation
//! kahlo is a software drawing library designed for speed and flexibility.
//!
//! The main goal for kahlo is to provide _fast_ drawing of simple 2D shapes and paths onto
//! Rgba32 surfaces. Contrary to other libraries such as
//! [tiny-skia](https://lib.rs/crates/tiny-skia), functionality is aimed more at blitting than
//! rendering paths.
//!
//! [Many operations](_accelerated) in kahlo will use an optimized SIMD implementation, if present
//! and supported on the current platform, though all operations have fallback SISD implementations.
//! Note that the SISD implementations are mostly present for automated testing and
//! verification purposes, and are written for clarity over speed.

mod bitmap;
mod ext;
mod op;

/// Colour-related functionality.
pub mod colour;
/// Aliased name for Americans
pub use colour as color;
/// Standard groups of named colours
pub mod palette;

/// Pixel format definitions.
pub mod formats;

/// Trait re-exports.
pub mod prelude {
    pub use crate::bitmap::{BitmapAccess, BitmapAccessMut, BitmapRawData, BitmapRawDataMut};
    pub use crate::op::KahloOps;

    pub use crate::ext::BitmapExt;
}

pub mod math;

pub use bitmap::{Bitmap, BitmapMut, BitmapRef};

/// Helper type alias for a Rgba32 bitmap.
pub type RgbaBitmap = Bitmap<formats::Rgba32>;
/// Helper type alias for a Rgba32 bitmap with premultiplied alpha.
pub type PremultRgbaBitmap = Bitmap<formats::Rgba32P>;
/// Helper type alias for an A8 bitmap.
pub type Alphamap = Bitmap<formats::A8>;

#[doc = include_str!("../ACCELERATED.md")]
pub mod _accelerated {}

#[cfg(feature = "benchmark")]
pub fn collect_op_benchmarks(cri: &mut criterion::Criterion) {
    op::benchmark::op_benchmarks(cri);
}