|
Sorry, is there a simple and clear example of how to draw text in a clipped rectangle? |
Replies: 1 comment
|
your looking for the
Here is the sample from out samples repo https://github.com/SixLabors/Samples/blob/main/ImageSharp/ApplyEffectInsideShape/Program.cs for this api. |
your looking for the
Clipprocessor. You use it by passing any polygon as the first argument and then what ever processing you want applied inside that polygon as the 2nd.img.Mutate(i=>i.Clip(new RectangularPolygon(10, 10, 100, 100) , j =>j.DrawText(...)))Here is the sample from out samples repo https://github.com/SixLabors/Samples/blob/main/ImageSharp/ApplyEffectInsideShape/Program.cs for this api.