skia-rs-core

Crates.ioskia-rs-core
lib.rsskia-rs-core
version0.2.0
created_at2026-01-02 20:20:48.748041+00
updated_at2026-01-03 18:44:24.447781+00
descriptionCore types for skia-rs: geometry, color, and pixel storage
homepagehttps://github.com/pegasusheavy/skia-rs
repositoryhttps://github.com/pegasusheavy/skia-rs
max_upload_size
id2019156
size152,482
Joseph R. Quinn (quinnjr)

documentation

https://docs.rs/skia-rs-core

README

skia-rs-core

Core types for skia-rs, a pure Rust implementation of the Skia 2D graphics library.

Features

  • Geometry primitives: Point, IPoint, Rect, IRect, RRect
  • Transformations: Matrix (3x3), Matrix44 (4x4)
  • Color: Color, Color4f, ColorSpace, ICC profiles
  • Pixel storage: ImageInfo, Pixmap, Bitmap
  • Clipping: Region with boolean operations

Usage

use skia_rs_core::{Point, Rect, Matrix, Color};

// Create points and rectangles
let p = Point::new(10.0, 20.0);
let rect = Rect::from_xywh(0.0, 0.0, 100.0, 50.0);

// Transform with matrices
let m = Matrix::rotate(45.0);
let rotated_point = m.map_point(p);

// Work with colors
let red = Color::from_rgb(255, 0, 0);
let transparent_red = red.with_alpha(128);

License

MIT OR Apache-2.0

See the main repository for more information.

Commit count: 0

cargo fmt