title: Delphi Firemonkey/FMX - Get TImage to fill out a TRoundRect
body: <p>Probably pretty simple but I was trying to figure out how to get an Image to fill a <code>TRoundRect</code> in Delphi FMX. I've got a roundrect on my form, got an image assigned to it but when I load a rectangle shaped bitmap into the image it displays in its usual width/height ratio so overlays the roundrect which sits underneath it. The relevant bit of my code looks like this:</p>
  
  <pre><code>Rec := TRoundRect.Create(Self);
  Rec.Height := 180;
  Rec.Width := 250;
  Rec.Corners := [TCorner.TopLeft, TCorner.TopRight, TCorner.BottomLeft];
  
  Image := TImage.Create(Self);
  Image.Parent := Rec;
  Image.Bitmap := TBitmap.Create;
  Image.Align := TAlignLayout.Client;
  Image.WrapMode := TImageWrapMode.Stretch;
  Image.Bitmap.LoadFromFile('C:\temp\test.bmp');
  Image.Bitmap := FAllProgrammes[I].Image;
  
  FlowLayout1.AddObject(Rec);
  </code></pre>
  
  <p>Does anyone have any suggestions/pointers on how I can clip the image to fit and fill out the <code>TRoundRect</code> either through using some property of the parent or the <code>TRoundRect</code> canvas? Cheers</p>