Skip to content

Add headless multi-layer symbol rendering example using Vello Classic#1642

Open
qianxiaoming wants to merge 4 commits into
linebender:mainfrom
qianxiaoming:examples/symbols
Open

Add headless multi-layer symbol rendering example using Vello Classic#1642
qianxiaoming wants to merge 4 commits into
linebender:mainfrom
qianxiaoming:examples/symbols

Conversation

@qianxiaoming
Copy link
Copy Markdown

This PR adds a new headless rendering example demonstrating how to use Vello Classic crate to render complex multi-layer symbols into a PNG image.

Features demonstrated

  • Polygon, polyline, and point symbol rendering
  • Multi-pass layered road styling
  • Gradient fills and hatch patterns
  • Dashed strokes and clipping layers
  • Affine transforms and scene composition
  • PNG export through offscreen rendering

@DJMcNab
Copy link
Copy Markdown
Member

DJMcNab commented May 15, 2026

Welcome! It isn't completely clear from your PR description what motivation this example serves (beyond that which our existing headless example also shows). As this is quite a lot of code to review, such guidance would be helpful.

A potential motivation could be a simpler demonstration of headless rendering than our existing headless example; specifically in avoiding the use of the scenes crate, which does obscure how to actually use the drawing somewhat. However, I suspect that (edit - added later: the fact that there's such a large amount of code make that less likely)

I do also think that we would be well served by an impressive demo scene showing our capabilities. I'm definitely excited to see something like that if that's the case. In that case I'd recommend that we should mention this example in the README, up to potentially even replacing the existing Tiger demonstration image.

No matter the motivation, I'd quite like to see an image of what this outputs in the PR description, which will help discussion later at #office hours > 2026-05-15 (which I unfortunately won't be attending).

@qianxiaoming
Copy link
Copy Markdown
Author

I tried using Vello as the underlying rendering engine for my map application. In this example, I attempted to draw some common map symbols, which were actually tests I did while learning to use Vello. I'm not sure if my approach is appropriate, as I generally use Vello as a drawing tool similar to QPainter, which is the GUI drawing tool in QT.
symbols

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants