Declaration
procedure LockUpdate();
Description
Increment the
lock update counter. While
LockUpdateCount is greater than zero all component updating is disabled.
Use
UnlockUpdate to unlock.
Returns the lock count.
// Disable updating of component
ImageEnMView1.LockUpdate();
try
... Perform activities, e.g. appending many files
finally
// Re-enable Updating and refresh view
ImageEnMView1.UnlockUpdate();
end;
// Paint frame number on each thumbnail
ImageEnMView1.LockUpdate();
for I := 0 to ImageEnMView1.ImageCount - 1 do
begin
ImageEnMView1.SelectedImage := I;
ImageEnMView1.Proc.TextOut(Align_text_near_top,
Align_text_near_left,
'#' + IntToStr( I + 1 ),
'Arial',
32,
clRed,
[fsBold]);
end;
ImageEnMView1.UnlockUpdate();
// Deskew all selected scanned documents
ImageEnMView1.LockUpdate();
try
for i := 0 to ImageEnMView1.MultiSelectedImagesCount-1 do
begin
selIdx := ImageEnMView1.MultiSelectedImages[i];
bmp := ImageEnMView1.GetTIEBitmap( selIdx );
try
proc := TImageEnProc.CreateFromBitmap( bmp );
try
nAngle := proc.SkewDetection();
proc.RotateAndCrop( nAngle, ierBilinear, bmp.Height / bmp.Width, iecaSkewedDocument );
finally
FreeAndNil(proc);
end;
finally
ImageEnMView1.ReleaseBitmap( selIdx, True );
end;
end;
finally
ImageEnMView1.UnlockUpdate();
end;