decal

Crates.iodecal
lib.rsdecal
version0.1.3
created_at2025-07-04 14:17:35.000336+00
updated_at2026-01-24 19:54:15.498589+00
descriptionDeclarative SVG rendering with layout and rasterization
homepage
repositoryhttps://github.com/mem-red/decal
max_upload_size
id1738046
size415,944
core (github:mem-red:core)

documentation

README

Decal

Latest Version Rust Documentation

A declarative library for building and rendering vector graphics.

Markup

decal! {
  Root(None, None) {
    Row {
      Image("https://avatars.githubusercontent.com/u/9919?s=256", 256.0, 256.0)
        .corner_radius(48.0)
      Column {
        Text("GitHub")
          .font_size(112.0)
          .line_height(124.0)
        Text("Where the world builds software")
          .opacity(0.65)
          .font_size(86.0)
          .line_height(92.0)
      }
    }
      .gap(48)
      .padding(42)
      .align_items(AlignItems::Center)
      .background(
        LinearGradient::bottom_left().stops([
          (0.0, rgb(0xf9ffdb)),
          (1.0, rgb(0xa6c6ff)),
        ])
      )
  }
}

Render

Rendered image

Explore more examples.

License

MIT or Apache-2.0

Commit count: 377

cargo fmt