Skip to main content

yog_graphics/
lib.rs

1//! yog-graphics — the graphics primitives every Yog crate shares, so a
2//! color, a rectangle or a picture is one type everywhere: [`Color`],
3//! [`Vec2`]/[`Vec3`]/[`Mat4`], [`Rect`], vector [`Seg`] paths, RGBA
4//! [`Image`]s, drawings ([`Op`]: paths filled and stroked, images) and a
5//! [`Canvas`] that paints them to pixels.
6
7mod geometry;
8mod painting;
9mod pixels;
10
11pub use geometry::{math, path, rect};
12pub use painting::{draw, raster};
13pub use pixels::{color, image, mask};
14
15pub use geometry::math::{Mat4, Vec2, Vec3, rad};
16pub use geometry::path::Seg;
17pub use geometry::rect::Rect;
18pub use painting::draw::{Fill, ImageOp, MaskOp, Op, Stroke};
19pub use painting::raster::Canvas;
20pub use pixels::color::Color;
21pub use pixels::image::{BYTES_PER_PIXEL, Image, PlacedImage, Rgba8};
22pub use pixels::mask::Mask;