-
Sorry, is there a simple and clear example of how to draw text in a clipped rectangle? |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
your looking for the
Clip
processor. 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.