TTeeBlend.Create

TTeeBlend.Create
TTeeBlend

constructor Create(Const ACanvas: TTeeCanvas; Const R: TRect);

Unit
TeCanvas

Description
Using the R rectangle, an internal bitmap is allocated containing the zone defined by R.

After doing normal drawing over ACanvas parameter, call the DoBlend method to add transparency to the area defined by R.

procedure TForm1.Chart1AfterDraw(Sender: TObject);
var Blend : TTeeBlend ;
begin
Blend := TTeeBlend.Create( Chart1.Canvas, Chart1.ChartRect );
try
Chart1.Canvas.Ellipse( Chart1.ChartRect );
Blend.DoBlend( 50 ); // 50 % of transparency
finally
Blend.Free;
end;
end;