How to change the canvas FillMode in Delphi (FireMonkey)

  

Please, look at this TPathData in FireMonkey which holds two subpaths: the first one an external rectangle and the second another rectangle inside the first one:

TmpPathData := TPathData.Create;
TmpPathData.Data := ‘M1,1 H100 V100 H1 Z M30,30 H70 V70 H30 Z’;

Then I want to fill this path on a Bitmap so:

TmpBmp := TBitmap.Create(200, 200);
TmpBmp.Canvas.Fill.Kind := TBrushKind.Solid;
TmpBmp.Canvas.Fill.Color := TAlphaColors.Blue;
TmpBmp.Canvas.BeginScene;
TmpBmp.Canvas.FillPath(TmpPathData, 1);
TmpBmp.Canvas.EndScene;

The result is this:

but I want to get this:

so: How can I change the FillMode in FireMonkey from “Alternate” to “Winding”.

Note: I’m using Delphi 10.3.3

Comments are closed.