GetRgnPerimeterLength example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
   nRet: L_INT;
   uPerimeter: L_UINT;
begin
   { Load a bitmap at its own bits per pixel }
   //LEADImage1.Load ('image3.cmp', 0, 1, 1 );
   LEADImage1.SetRgnEllipse( Trunc(LEADImage1.BitmapHeight /3), Trunc(LEADImage1.BitmapWidth /3), Trunc(LEADImage1.BitmapWidth), Trunc(LEADImage1.BitmapHeight), L_RGN_SET);

   nRet:= LEADImage1.GetRgnPerimeterLength(uPerimeter);
   if(nRet = SUCCESS)then
   begin
      ShowMessage('Length of the perimeter' + IntToStr(uPerimeter));
   end;
end;