Masks not rendered properly
Using this file as example testSvgMasks.zip
the generated jpeg looks like this

Is there a special setup to handle masks?
I will have a look later, but this is most certainly not supported or a bug.
Yes, masks are unsupported - the related W3C examples also fail. There is an empty class SvgMask, so I guess an implementation has been considered some time...
So I think you are out of luck here, as I doubt that mask implementation is something trivial enough to be added soon.
Yes, masks are unsupported - the related W3C examples also fail. There is an empty class
SvgMask, so I guess an implementation has been considered some time... So I think you are out of luck here, as I doubt that mask implementation is something trivial enough to be added soon.
Alright, thank you for your quick response.
I found a simple workaround, for anyone interested. To get masks to atleast be written into the .svg files, create a class like this:
[SvgElement("mask")] public class SvgMask2 : SvgMask { }
And use that instead of SvgMask. Remember to give it an ID so you can reference it later.
And to make a SvgElement use the said mask, simply add a custom attribute to it, using the ID you gave the mask:
element.CustomAttributes.Add("mask", "url(#maskID)");
This will obviously not render when converting to bitmap, but it won't throw an error either. Useful if all you care about is the .svg file.
Yes, I also added the attribute to the (empty) SvgMask class, and this fixes at least the writing (though not the functionality, of course). I thought it not worth a separate commit without the mask working, but that was obviously wrong. I will add this tomorrow.
@Zakkon: Thanks for the hint, I committed the change now!