So, I have two images,
Base
Overlay
You can see on the overlay that the bottom left corner is chamfered, I'd like to apply the same chamfering to the base image so the image doesn't bleed through in the corner.
Expected example output with a different overlay
I've taken a look at the examples and can see a way to make round corners, but am unsure how to create a straight cut.
If you take the example with the Round Corners (see https://github.com/SixLabors/Samples/blob/master/ImageSharp/AvatarWithRoundedCorner/Program.cs ), all that should be necesssary is to change the IPathCollection created by "BuildCorners()"
If you read the BuildCorners method in there, you'd see that it returns a PathCollection of 4 paths.
In your case you'd need only one.
Each of those four paths's describes a rectangle "minus" an ellipse.
In your case you need only one single triangle, so BuildCorners would return a PathCollection containing a single Path that is a Triangle with the corners (0, height-triangleSize), (width, height), (triangleSize, height).
the mutation code applied in ApplyRoundedCorners stays the same.
Thanks @jongleur1983 That's exactly what we need here.
Cheers! That's exactly the answer I was looking for. Works perfectly.
Most helpful comment
If you take the example with the Round Corners (see https://github.com/SixLabors/Samples/blob/master/ImageSharp/AvatarWithRoundedCorner/Program.cs ), all that should be necesssary is to change the IPathCollection created by "BuildCorners()"
If you read the BuildCorners method in there, you'd see that it returns a PathCollection of 4 paths.
In your case you'd need only one.
Each of those four paths's describes a rectangle "minus" an ellipse.
In your case you need only one single triangle, so BuildCorners would return a PathCollection containing a single Path that is a Triangle with the corners (0, height-triangleSize), (width, height), (triangleSize, height).
the mutation code applied in ApplyRoundedCorners stays the same.