SVG icon indicating copy to clipboard operation
SVG copied to clipboard

#482 - Masks are now rendered

Open thenkles opened this issue 3 years ago • 9 comments

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.

thenkles avatar Feb 03 '21 18:02 thenkles

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.

mrbean-bremen avatar Feb 18 '21 20:02 mrbean-bremen

Regarding disposing bitmaps, I'll have a look into it later.

thenkles avatar Feb 19 '21 12:02 thenkles

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.

tebjan avatar Feb 19 '21 12:02 tebjan

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?

thenkles avatar Feb 19 '21 12:02 thenkles

How about using Span ? I don't know if can completely remove unsafe.

H1Gdev avatar Feb 19 '21 13:02 H1Gdev

@tebjan , @H1Gdev - did you have another look after the latest changes? It's been a while...

mrbean-bremen avatar Aug 12 '21 11:08 mrbean-bremen

@mrbean-bremen

I will check source files, but it will take some time because there are many changes...

H1Gdev avatar Aug 19 '21 02:08 H1Gdev

@thenkles Sorry for the delay is resolving this PR. Please can you rework and repost this for consideration?

paulushub avatar Dec 28 '23 12:12 paulushub

@thenkles Sorry for the delay, please can you update this project for consideration?

paulushub avatar Jan 14 '24 14:01 paulushub