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
 Dragging a selection on TImageEnView
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

HeartWare

Denmark
18 Posts

Posted - Jan 07 2020 :  03:04:41  Show Profile  Reply

I am trying to make a program where the program pre-defines a selection area on a loaded image in a TImageEnView viewer, using

ImageView.SelectionAspectRatio:=1/Aspect;
ImageView.MouseInteract:=ImageView.MouseInteract+[ImageEnView.miSelect];
ImageView.Select(Value.Left,Value.Top,Value.Right,Value.Bottom);

I also have

ImageView.SelectionBase:=iesbBitmap
ImageView.AutoFit:=TRUE
ImageView.AutoShrink:=TRUE

But after this, I cannot drag the selection rectangle around the image. Nothing happens when I try to do so (not even a new selection).

What I'd like to be able to do is to resize the selection (but keeping the aspect) and move the selection area around on the image.

Could you tell me what property settings I need to set in order to be able to move the selection rectangle around the image, and resize it (while keeping the aspect ratio)?

xequte

4977 Posts

Posted - Jan 08 2020 :  16:23:00  Show Profile  Reply
Hi

What version of ImageEn are you using?

I placed a TImageEnView on a form and put this code into a button click event:

  ImageEnView1.SelectionBase := iesbBitmap;
  ImageEnView1.AutoShrink := TRUE ;

  ImageEnView1.IO.LoadFromFile(ImagePath);

  ImageEnView1.SelectionAspectRatio := 1/2;
  ImageEnView1.MouseInteractGeneral := ImageEnView1.MouseInteractGeneral + [ImageEnView.miSelect];
  ImageEnView1.Select(100, 100, 200, 200);

I could drag and resize the selection. Can you give me more information?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: