2
votes

Any way around this?

When I put a TRectangle with a TBlurEffect inside a TLayout, and next to it a TImage (with WrapMode iwOriginal), then assign the bitmap result of a Layout1.MakeScreenshot to the image's bitmap, the stroke of the rectangle is painted unblurred (but the blur effect outside the stroke is still visible).

The form

procedure TForm7.Button1Click(Sender: TObject);
begin
  Image1.Bitmap := Layout1.MakeScreenshot
end;

enter image description here

Any way to make this function as desired?

1

1 Answers

2
votes

Use the ProcessEffect procedure of the effect on the image after assigning the screenshot:

procedure TForm3.Button1Click(Sender: TObject);
begin
  Image1.Bitmap := Layout1.MakeScreenshot;
  BlurEffect1.ProcessEffect(Image1.Bitmap.Canvas, Image1.Bitmap, 1);
end;

enter image description here