Redth / ResizetizerNT

Add SVG's and PNG's to your shared Xamarin Project
MIT License
318 stars 31 forks source link

Fix the double draw error #46

Closed mattleibow closed 3 years ago

mattleibow commented 3 years ago

The provided paint object should only be used on the first draw. If it is re-used, then the transformations will be applied again. For example, the failing unit tests drew with a 50% transparency. I we draw again, then it will end up with a 50% of a 50% transparency - or 25%.

Also, the scaling doesn't need the complex double draw if the scale is exactly 1. It will be the same either way, so avoid more work.