Add shape-rendering SVG attribute support
Partially Resolves #2775
Adds shape_rendering attribute to the PathStyle struct, adds support for writing it out when rendering the SVG, and adds a node that allows the user to set it on vectors.
Exact behavior varies by rendering engine. Tested:
- Vello: Not supported. Does nothing.
- Chrome: Functions for normal display and export. Does not function when using the Rasterize node.
- Firefox: Functions for normal display, export, and when using the Rasterize node.
This isn't a clean AA on/off toggle, however. There are four options, and it's up to the renderer what it wants to do with each. Outside of the Rasterize node difference, so far I'm seeing identical behavior between Chrome and FF, but it isn't logically consistent. Here is an example:
The top example can be set to Auto (the default if not overridden) or Geometric Precision and get the same output as before this was implemented. The bottom can be set to Crisp Edges or Optimize Speed to get the result shown. Notably, on the bottom, AA is off for stroke and fill edges on the flower, along with the interface between the fill and stroke on the red shape. The outer edge of the stroke is still antialiased. If I change the stroke from Inside to Center or Outside, the anti-aliasing goes away.
Useful function for a technical user, but consistency in support is lacking.