How to Assign a TBitmap to a TPath.Data

538 Views Asked by At

I would like to fill a TPath.Data from a TBitmap.

Delphi FMX provides a FillPath on a Bitmap Canvas:- http://docwiki.embarcadero.com/CodeExamples/Rio/en/FMXTCanvasFillFunctions_(Delphi)

Image1.Bitmap.Canvas.FillPath(path, 200);

But I'm looking fill the Path Data from the Bitmap.

Any code examples? tia

1

There are 1 best solutions below

2
Doug Rudd On

You mean how do you fill an enclosed TPath with a bitmap instead of a solid color. You change the Fill property to a Bitmap:

path1.Fill.Bitmap:=mybitmap;
path1.Fill.Kind:=TBrushKind.Bitmap;