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
 miSelectZoom problem

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
PeterPanino Posted - Aug 25 2017 : 12:36:49
The TIEMouseInteractItems documentation says:

"miSelectZoom: If the user selects an area, it will be automatically zoomed into (and become the new display view). Click and move the mouse to select the zoom rectangle"

So I use this button:

procedure TFormMain.btnImageSelectionZoomClick(Sender: TObject);
begin
  ImageEnView1.MouseInteract := [miSelectZoom];
end;


But when I click on it and then draw a selection with the mouse, nothing is zoomed!
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 28 2017 : 03:01:41
Hi

In the next release (7.0.2) you will be able to set:

ImageEnView1.DisplayOptions := ImageEnView1.DisplayOptions + [iedoDisableAutoFitWhenZoom];


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Aug 25 2017 : 16:56:54
As long as it works without problems as you indicate it is ok.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
PeterPanino Posted - Aug 25 2017 : 16:53:50
Meanwhile I've found this other solution which works very well:

procedure TFormMain.btnImageEnViewClick(Sender: TObject);
begin
  ImageEnView1.MouseInteract := [miSelectZoom];             
end;

procedure TFormMain.ImageEnView1MouseUp(Sender: TObject; Button:
    TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if ImageEnView1.MouseInteract = [miSelectZoom] then
  begin
    ImageEnView1.AutoShrink := False; 
    ImageEnView1.ZoomSelection();
  end;    
end;


And then I reset the Zoom with this button:

procedure TFormMain.btnImageEnViewResetAutoShrinkClick(Sender: TObject);
begin
  ImageEnView1.AutoShrink := True;
  ImageEnView1.Update;
end;


What do you think?
w2m Posted - Aug 25 2017 : 13:20:04
You can not use both at the same time because both affect zoom. You can fit the image when loading the image and then use SelectZoom after that. So when the image appears after loading it is set to the fit. When the zoom is changed with SelectZoom, and later want to refit the image just call Fit(True).

You can also add a Fit Speedbutton to toggle fitting and setting zoom level to 100%. This will produce the same effect as autoshrink and both can be used at the same time which will produce the same effect.
procedure TForm1.Fit1Click(Sender: TObject);
begin
  if Fit1.Down then
    ImageEnView1.Fit(True) // this is the same as AutoShrink
  else
    ImageEnView1.Zoom := 100;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
PeterPanino Posted - Aug 25 2017 : 12:56:17
Unfortunately, the documentation does not mention that [miSelectZoom] does not work if TImageEnView.AutoShrink = True!!

But I need AutoShrink to fit the whole image inside the Client area!

So how can I use [miSelectZoom] together with AutoShrink?