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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnView.Select sets an incorrect selection

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
gui Posted - Dec 01 2019 : 04:13:52
Hi,

Great product, I'll purchase soon but I have a problem with the trial.

I do not understand why TImageEnView.Select here does not work as expected.

First, I store the initial user selection in the variable with:

InitialCaptureRect := ImageEnView1.SelectedRect;

when the window closes.

I then reopen the window, load the same bitmap, and try to restore the previous user selection with:

ImageEnView1.MouseInteractGeneral := [miSelect];
ImageEnView1.SelectionBase := iesbBitmap;
ImageEnView1.Select( InitialCaptureRect.x , InitialCaptureRect.y, InitialCaptureRect.x + InitialCaptureRect.width, InitialCaptureRect.y+ InitialCaptureRect.height);

The X and Y coordinates are correctly restored, but not the width and height: the restored selection appears smaller each time.

Since I'm using the trial, I can't debug the code. So I'm looking for your help.

Thanks!

gui

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 03 2019 : 03:30:37
Hi

We tried to replicate using following code:


var
  InitialCaptureRect: TIERectangle;

procedure TForm1.Button1Click(Sender: TObject);
begin
  imageenview1.io.loadfromfile('test.jpg');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  InitialCaptureRect := imageenview1.SelectedRect;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  imageenview1.MouseInteractGeneral := [miSelect];
  imageenview1.SelectionBase := iesbBitmap;
  imageenview1.Select( InitialCaptureRect.x , InitialCaptureRect.y, InitialCaptureRect.x + InitialCaptureRect.width, InitialCaptureRect.y+ InitialCaptureRect.height);
end;


Pressing Button1 loads the image. Repeating Button2 and Button3 sequence you always get the same selection, so I cannot reproduce the issue.



Nigel
Xequte Software
www.imageen.com