StrechDraw is super slow
Posted: Fri Jan 26, 2018 10:05 am
Hi Steema
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:
Within the source code for TGDIPlusCanvas.StretchDraw, I see the following comment:
// 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
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