img-gen 0.2.2

A convenience library that re-exports public API from img-gen-spec and img-gen-renderer
Documentation
use pyo3::prelude::*;

use crate::{
    Arc, Background, Border, ColorGradient, ColorKind, ConicalGradient, Corners, Debug, Ellipse,
    Font, Generator, Icon, Image, IrregularPolygonSides, Layer, LayerOffset, Layout, Line,
    LinearGradient, Mask, Polygon, PolygonSides, PreserveAspect, Presets, RadialGradient,
    Rectangle, RegularPolygonSides, Size, SolidColor, Spread, Typography, TypographyAlign, Weight,
};

/// This module exposes all the public Python API needed to generate images.
#[pymodule]
fn img_gen(m: &Bound<'_, PyModule>) -> PyResult<()> {
    m.add_class::<Border>()?;
    m.add_class::<Background>()?;
    m.add_class::<Icon>()?;
    m.add_class::<PreserveAspect>()?;
    m.add_class::<SolidColor>()?;
    m.add_class::<Debug>()?;
    m.add_class::<Ellipse>()?;
    m.add_class::<Arc>()?;
    m.add_class::<Polygon>()?;
    m.add_class::<PolygonSides>()?;
    m.add_class::<RegularPolygonSides>()?;
    m.add_class::<IrregularPolygonSides>()?;
    m.add_class::<Font>()?;
    m.add_class::<LayerOffset>()?;
    m.add_class::<Layer>()?;
    m.add_class::<Layout>()?;
    m.add_class::<Line>()?;
    m.add_class::<Mask>()?;
    m.add_class::<Rectangle>()?;
    m.add_class::<Corners>()?;
    m.add_class::<Size>()?;
    m.add_class::<Typography>()?;
    m.add_class::<TypographyAlign>()?;
    m.add_class::<Weight>()?;
    m.add_class::<ColorKind>()?;
    m.add_class::<SolidColor>()?;
    m.add_class::<ColorGradient>()?;
    m.add_class::<LinearGradient>()?;
    m.add_class::<RadialGradient>()?;
    m.add_class::<ConicalGradient>()?;
    m.add_class::<Presets>()?;
    m.add_class::<Spread>()?;
    m.add_class::<Image>()?;
    m.add_class::<Generator>()?;
    Ok(())
}