Reputation: 1279
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).
procedure TForm7.Button1Click(Sender: TObject);
begin
Image1.Bitmap := Layout1.MakeScreenshot
end;
Any way to make this function as desired?
Upvotes: 2
Views: 204
Reputation: 21045
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;
Upvotes: 2