mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-11 04:51:32 +11:00
24 lines
570 B
Rust
24 lines
570 B
Rust
|
use piet_gpu_derive::piet_gpu;
|
||
|
|
||
|
piet_gpu! {
|
||
|
#[gpu_write]
|
||
|
mod annotated {
|
||
|
struct AnnoFill {
|
||
|
rgba_color: u32,
|
||
|
bbox: [f32; 4],
|
||
|
}
|
||
|
struct AnnoStroke {
|
||
|
rgba_color: u32,
|
||
|
bbox: [f32; 4],
|
||
|
// 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,
|
||
|
}
|
||
|
enum Annotated {
|
||
|
Nop,
|
||
|
Stroke(AnnoStroke),
|
||
|
Fill(AnnoFill),
|
||
|
}
|
||
|
}
|
||
|
}
|