Add Graphic::None and store paint choices as plain color, gradient, and no-paint values

This commit is contained in:
Keavon Chambers
2026-07-20 15:50:06 -07:00
committed by Dennis Kobert
parent 9dd1e2bdf9
commit 8e233d3229
15 changed files with 294 additions and 110 deletions

View File

@@ -256,6 +256,7 @@ impl RenderExt for List<Graphic<'_>> {
let gradient_id = render_gradient_paint(&core_types::lane::LeafLane::new(self, 0, gradient), svg_defs, item_transform, element_transform);
format!(r##" {paint_attr}="url(#{gradient_id})""##)
}
Some(Graphic::None) => format!(r#" {paint_attr}="none""#),
Some(Graphic::Vector(_)) | Some(Graphic::RasterCPU(_)) | Some(Graphic::RasterGPU(_)) | Some(Graphic::Graphic(_)) | Some(Graphic::Text(_)) | Some(Graphic::Group(_)) => {
let bounds = if target == PaintTarget::Stroke {
// To prevent a wraparound artefact occurring when the tile boundary and the stroke region are perfectly aligned, the local coordinate is expanded slightly.