The image illustrating the aliasing problem is:
https://www.dropbox.com/s/r1hlmpwuagdq8cj/hatch_rendering_zoom.png
> Do you have an idea of the performance of these options?
I think the main concern here is memory usage. In solution 2 if we had a hatch - filled object occupying whole canvas (let's say 1500x1000px)
the cairo pattern surface would take up 5.7MB. The question is if this can be accepted. I'm not sure but I suppose masks and clip paths work
this way.
The performance of third option does not really differ from what we have in current code. I'll have to play a bit with it to check if results are
satisfactory. I think it would be beneficial to turn off antialiasing when rendering the oversampled image. It it possible to do so?
By the way, how can I get to know what SVG area is displayed on canvas?
> Can pattern rendering be handled the same way?
Patterns and hatches share the rendering code. They can be handled the same way.
> I don't see a way to cleanly export an arbitrary SVG 2 hatch fill/stroke
> to any of these formats, since they do not have user defined hatch
> patterns, only pre-defined hatch patterns.
What if I added a hatch palette "WMF" representing the six predefined WMF hatches? They could
have an specific attribute like inkscape:wmf-type specifing the hatch type. Any other hatches could
be treated as patterns.
As for other file formats, except .dwg, I think it should be safe to convert hatches to patterns for output.
Regards,
Tomasz