I need to draw an image on the canvas (GDI+) with transparency and a transparent color. That works with StrechDraw, however, it is SUPER slow!
My code is something like this:
Code: Select all
var
Blend : TTeeBlend;
Bitmap : TBitmap;
begin
...
Blend := Chart.Canvas.BeginBlending(Chart.ChartRect, 50);
Chart.Canvas.StretchDraw(Chart.ChartRect, Bitmap);
Chart.Canvas.EndBlending(Blend);
end;
// Very slow operation.
// Transparent "ABitmap" should be converted before arriving here.
Yes, so true, but how should I do that? It seems that StretchDraw will convert the image regardless of bitmap class?
\Lars