Adds a paint feature to obscura-render (tiny-skia: pure Rust, CPU, deterministic, no system deps). paint_dom lays out the DOM and fills each element's border box with its parsed background-color over a white page, in tree order so descendants paint over ancestors. Style parsing now also extracts background-color (hex #rgb/#rgba/ later enhancements.
22 lines
623 B
TOML
22 lines
623 B
TOML
[package]
|
|
name = "obscura-render"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "Optional scoped render layer for Obscura: layout (taffy) and, with the paint feature, text and raster output for screenshots."
|
|
|
|
[features]
|
|
default = []
|
|
# Rasterize the laid-out tree to a pixmap (tiny-skia). Off by default; the
|
|
# layout core (getBoundingClientRect etc.) works without it.
|
|
paint = ["dep:tiny-skia"]
|
|
|
|
[dependencies]
|
|
taffy = { workspace = true }
|
|
obscura-dom = { workspace = true }
|
|
tiny-skia = { workspace = true, optional = true }
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|