SVG
SVG copied to clipboard
#482 - Masks are now rendered
Fixes issue #482
What does this implement/fix? Explain your changes.
Adds support for alpha masks.
Any other comments?
The ImagesAreEqual method in SvgTestHelper has been updated to increase performance and additional parameter has been added: allowedDifference. This is the maximum deviation allowed for each pixel's component, i.e. if allowedDifference is 1, and the expected pixel is RGBA(100, 100, 100, 100), then RGBA(101, 101, 101, 101), RGBA(99, 99, 99, 99), etc. will also be accepted. This was required because the results are not always pixel perfect equal when tests are run on different targets.
If someone wants to review this, please go ahead! I was going to review it for some time now, but didn't get to it due to time constraints, so I would appreciate if someone else could have a look. At a first glance, it looked quite good.
Regarding disposing bitmaps, I'll have a look into it later.
I think we cannot introduce the unsafe flag, many bigger enterprise projects don't allow to reference assemblies with that flag.
New .NET versions have many new safe memory operations. Probably worth looking at them.
And for bitmap disposal, you should use using
statements, if possible.
I think we cannot introduce the unsafe flag, many bigger enterprise projects don't allow to reference assemblies with that flag.
New .NET versions have many new safe memory operations. Probably worth looking at them.
Ok, that's a fair point. Any details on these new memory operations I could read?
How about using Span ?
I don't know if can completely remove unsafe
.
@tebjan , @H1Gdev - did you have another look after the latest changes? It's been a while...
@mrbean-bremen
I will check source files, but it will take some time because there are many changes...
@thenkles Sorry for the delay is resolving this PR. Please can you rework and repost this for consideration?
@thenkles Sorry for the delay, please can you update this project for consideration?