Repository navigation
Add DrawImage(Image, Point, Rectangle) method to the DrawImage processor - #2322
Merged
Merged
Conversation
JimBobSquarePants
requested review from
antonfirsov,
brianpopow,
dlemstra and
tocsoft
January 22, 2023 12:35
tocsoft
reviewed
Jan 22, 2023
| public static IImageProcessingContext DrawImage( | ||
| this IImageProcessingContext source, | ||
| Image image, | ||
| Rectangle rectangle, |
Member
There was a problem hiding this comment.
worth calling this sourceRectangle to make is more obvious that it's not the destination to draw to.
might be worth renaming to sourceImage too to match.
which then leads to the question should we be refering to the image we are drawing to as destinationImage/targetImage with matching targetLocation etc paramaters. i.e. properly prefixing source/destination arguments.
Member
Author
There was a problem hiding this comment.
That might open a can of worms. I'm thinking just now about the TextOptions.Origin property in Fonts and all the PathBuilder parameters in Drawing.
I'll revisit the documentation parameters to make them super clear just now.
Co-authored-by: Scott Williams <[email protected]>
tocsoft
approved these changes
Jan 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Fixes #2112
In addition to the new overloads I've refactored the extensions to make each overload call another one to reduce the amount of refactoring work required in future updates and to improve test coverage.