2
votes

On Delphi FireMonkey when we draw on the canvas we have

Canvas.IntersectClipRect(ARect) 

to make that all paint done outside aRect will be ignored.

It works great but for rectangular area. Is there any way to set a clipping area with a non-rectangular area?

Thank you by advance.

Upd: I noted FireMonkey because i would like to find some cross-platform solution. I found some Windows-related answers like this one. But unfortunately it will be not applicable for Android etc.

1

1 Answers

1
votes

You can use TPathData to define non-rectangular paths for use with TCanvas.DrawPath() and TCanvas.FillPath().