There can be such cases where it fails to find intersection points for
a given position, especially when the polygon is small.
Such an input would result in an error previously, but now it renders
correctly.
* Implement gradient brush similar to PathGradientBrush (#969)
A gradient brush implementation that works similar to
System.Drawing.Drawing2D.PathGradientBrush.
This fixes#969, but only convex paths are supported for now.
* Update submodule to add test fixtures for #989
* Performance optimization
Use LengthSquared() instead of Length() when it's possible.
Avoid unnecessary ordering of elements.
* Avoid using LINQ in a hotspot
* Validate arguments for the public constructor
* Updating the repo to use Directory.Build.props/targets files
* Adding an InternalsVisibleTo for DynamicProxyGenAssembly2, PublicKeyToken=null
* Removing duplicate includes from the ImageSharp.csproj
* Updating the .gitattributes file to explicitly list the line endings
* Removing the ImageSharp.ruleset file, as the one from standards should be used instead
* Updating the package version management to use `PackageReference Update`
* temporarily disable target frameworks
* drop DelegateProcessor
* drop IImageProcessingContext<TPixel>
* drop NamedColors<T>
* drop ColorBuilder<T>
* drop the *Base postfix for clean class hierarchies
* re-enable target frameworks
* use MathF in gradient brushes
* Move PngFilterMethod to the correct namespace.
* No longer throws when DrawImage source does not overlap target
Previously, when DrawImage was used to overlay an image, in cases where the source image did not overlap the target image, a very confusing error was reported: "System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: MaxDegreeOfParallelism"
Now, when this case happens, the DrawImage method will simply not affect the target image, which is the same way FillRegionProcessor handles such cases.
ParallelHelper.IterRows also now does more validation of the input rectangle so that any further cases of this kind of problem throw a more relvant exception. Note I switched from DebugGuard to Guard because IterRows is a public API and thus should always validate its inputs.
Fixes#875
* Refines DrawImage non-overlap error logic
Adresses PR feedback in #877.
Changes DrawImage shortcut to be less than or equal to. Also changes maxX calculation to use `Right` over `Width`. This is a semantic change that reflects intention better. No actual change because Top,Left for that rectanngle should always be 0,0.
And adds more informative argument names to ParallelHelper.IterRows error message.
* Non-overlapping DrawImage now throws
Adressing PR feedback from #877
DrawImage now throws when the source image does not overlap, with a useful error message.
Also improved the error messages for IterRows (and added validation to the other IterRows method)
* DrawImage overlap test changed to support RELEASE
The tests on the CI server are run in RELEASE which wrap the expected exception with an ImageProcessingException.
* Adress feedback for DrawImage exception
DrawImage throws an ImageProcessor exception which makes it easier to catch.
And reverted IterRows to use Guard helpers
* Read from underlying stream less often
* Update benchmark dependencies
* Experimental mango port
Currently broken
* Populate table, 64byte buffer
Still broken.
* Baseline, non RST works
* 15/19 baseline tests pass now.
* Optimize position change.
* 18/19 pass
* 19/19 baseline decoded
* Can now decode all images.
* Now faster and much cleaner.
* Cleanup
* Fix reader, update benchmarks
* Update dependencies
* Remove unused method
* No need to clean initial buffer
* Remove bounds check on ReadByte()
* Refactor from feedback
* Remove multiple premultiplication.
* Use in DenseMatrix everywhere.
* Make private
* Dont convert vector row on first pass
* Remove incorrectly assigned alpha.
* Remove boxing.
* Use correct min row.
* Reorder parameters
* Correctly handle alpha component.
* Update tests
* Use dedicated methods over branching.