SixLabors / ImageSharp.Drawing

:pen: Extensions to ImageSharp containing a cross-platform 2D polygon manipulation API and drawing operations.
https://sixlabors.com/products/imagesharp-drawing/
Other
282 stars 38 forks source link

Ensure the negatively offset shapes are correctly offset the ImageBrush Texture during rendering. #309

Closed tocsoft closed 9 months ago

tocsoft commented 9 months ago

Prerequisites

Description

This fixes up the fill with brush pipelines to ensure that the push gets the correct region its supposed to be filling, even if they are negatively offset.

It also exposes a new ImageBrush constructor overload to allow manually offsetting the texture independent to the drawn location. This is needed by the Clip processor as the texture its working with doesn't always line-up nicely when negative offsets are applied.

resolves #308

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3fb38a4) 80% compared to head (184fe2e) 80%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #309 +/- ## =================================== Coverage 80% 80% =================================== Files 97 97 Lines 4946 4960 +14 Branches 884 886 +2 =================================== + Hits 3997 4011 +14 Misses 754 754 Partials 195 195 ``` | [Flag](https://app.codecov.io/gh/SixLabors/ImageSharp.Drawing/pull/309/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/SixLabors/ImageSharp.Drawing/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors) | `80% <100%> (+<1%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=SixLabors#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.