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
 Interactive Zooming With Layers

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
Elemental Posted - Nov 25 2020 : 21:27:46
Please see attached Delphi XE7 project written with ImageEn 9.2.6. The form has a TImageEnView and four buttons which 1) load an image, 2) enable layer drawing, 3) enable interactive zooming, and 4) zoom to the whole image. Compile and run the program.

When the zoom tool is active, you can draw a rectangle and zoom in to any part of an image. But once you draw one or more layers, the zoom tool exhibits odd behavior. If you draw a zoom rectangle that does NOT overlap a layer, nothing happens; you get no closer to the image. If you draw a zoom rectangle that DOES overlap a layer, the view will zoom to that layer only.

On a related note, you can see the dotted zoom rectangle when there are no layers on the map, as you draw the zoom area. But if there are one or more layers on the image and the zoom tool does not cross one, you can't see this dotted line rectangle. But if you cross a layer, you can only see the dotted line within the layer.

To me, this is unexpected behavior. The miSelectZoom should allow the user to draw a rectangle anywhere they want and the image should zoom to that area.

Is there a property I'm not setting or am supposed to set? I've tried several combinations of LayerOptions, SelectionOptions, MouseInteractGeneral, and MouseInteractLayers values.

"Roj"

attach/Elemental/20201125212546_ZoomingWithLayers.zip
6.7 KB
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 01 2020 : 04:34:53
No worries, that's what we're here for.



Nigel
Xequte Software
www.imageen.com
Elemental Posted - Nov 30 2020 : 13:24:35
That solved it. I apologize for not noticing that. I really did do a lot of research to try and figure this out on my own. I opened the Magnify, SoftPan, PanZoom, and Layers demos for examples, searched the help documents, but had not seen or noticed that critical line of code. Thank you.
xequte Posted - Nov 27 2020 : 13:41:05
Hi Roj

Selections are limited to the active layer, so if you are using miSelectZoom then you can only select a zoom within that layer.

If you want to be able to select a zoom over the whole image, ensure the background layer is active:

procedure TForm1.btnZoomClick(Sender: TObject);
begin
  ImageEnView1.LayersCurrent := 0;
  ImageEnView1.MouseInteractGeneral := [ miSelectZoom ];
end;


Nigel
Xequte Software
www.imageen.com