mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-11 04:51:32 +11:00
df055563bd
No functionality changes, just different encoding. Updates #70 Signed-off-by: Elias Naur <mail@eliasnaur.com>
31 lines
779 B
Rust
31 lines
779 B
Rust
use piet_gpu_derive::piet_gpu;
|
|
|
|
piet_gpu! {
|
|
#[gpu_write]
|
|
mod annotated {
|
|
struct AnnoFillImage {
|
|
bbox: [f32; 4],
|
|
index: u32,
|
|
offset: [i16; 2],
|
|
}
|
|
struct AnnoColor {
|
|
bbox: [f32; 4],
|
|
rgba_color: u32,
|
|
// For stroked fills.
|
|
// For the nonuniform scale case, this needs to be a 2x2 matrix.
|
|
// That's expected to be uncommon, so we could special-case it.
|
|
linewidth: f32,
|
|
}
|
|
struct AnnoClip {
|
|
bbox: [f32; 4],
|
|
}
|
|
enum Annotated {
|
|
Nop,
|
|
Color(TagFlags, AnnoColor),
|
|
FillImage(AnnoFillImage),
|
|
BeginClip(AnnoClip),
|
|
EndClip(AnnoClip),
|
|
}
|
|
}
|
|
}
|