Menu

#138 The paint event is called several times

v1.9.1
open
nobody
Library (20)
5
2013-01-28
2013-01-28
Anonymous
No

If I called once TImageDraw.Draw method then the PaintControlPoints is called several times, and why? This is normal?

constructor TImageDraw.Create(AOwner: TImgView32);
begin
//Create layer object
FControlLayer := TPositionedLayer.Create(AOwner.Layers);
FControlLayer.LayerOptions := LOB_VISIBLE;
FControlLayer.OnPaint := PaintControlPoints;
end;

procedure TImageDraw.PaintControlPoints(Sender: TObject; Buffer: TBitmap32);
begin
//Draw control points
//.....
end;

procedure TImageDraw.Draw;
begin
//Draw something
//.....

FControlLayer.Changed;
end;

Discussion

Monday.com Logo