ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Position TImageEnVect1 to show lower right image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

stwizard

USA
39 Posts

Posted - Mar 17 2017 :  09:54:26  Show Profile  Reply
Greetings All,

I load the image of a Bank Check into a TImageEnVect component, set the zoom to 75% and show just the upper right portion of the check where the payor name and address is shown.

procedure TfrmBalanceInnovationsImport.LoadImage;
var
  sFileName: String;
begin
  inherited;
  if bProcessingImport then
    Exit;

  sFileName := sReceiveDir + cdsBalanceInnovationsProcessingIMAGE_FILENAME.AsString + '.tif';

  ImageEnVect1.IO.LoadFromFileTIFF(sFileName);
  ImageEnVect1.AutoFit := False;
  ImageEnVect1.Zoom := 75;

  //* Position to top left of image
  ImageEnVect1.ViewX := 0;
  ImageEnVect1.ViewY := 0;

  Application.ProcessMessages;
end;

I would then like to be able to show at the zoom level the lower right corner of the check where the signature line is. How do I code this?

I tried the following and it did drop to the bottom of the check fine, but only scroll over to the right about 3/4 of the check image. So I have to manually finish moving the check image to the left to see this information.

procedure TfrmBalanceInnovationsImport.btnSignatureClick(Sender: TObject);
begin
  inherited;
  //* Position to bottom right of image
  ImageEnVect1.ViewX := ImageEnVect1.Height;
  ImageEnVect1.ViewY := ImageEnVect1.Width;
end;

stwizard

USA
39 Posts

Posted - Mar 17 2017 :  09:57:15  Show Profile  Reply
Shortly after posting this I figured it out and thought I would share in case others would like to know:

  //* Position to bottom right of image
  ImageEnVect1.ViewX := ImageEnVect1.IEBitmap.Height -1;
  ImageEnVect1.ViewY := ImageEnVect1.IEBitmap.Width -1;
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: