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
 Magnetically attach Layer to ImageEnView?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Sep 01 2020 :  12:41:39  Show Profile  Reply
I add a Layer to ImageEnView1 which has the same dimensions as ImageEnView1 to cover it completely:

imgMain.LayersAdd(iesRectangle, 0, 0, imgMain.IEBitmap.Width, imgMain.IEBitmap.Height);


Then, when I zoom-in or zoom-out ImageEnView1, the Layer dimensions seem to follow the dimensions of ImageEnView1, as if the Layer was "magnetically" attached to the ImageEnView1.

1. Is this magnetic attachment of the Layer to ImageEnView1 the normal behavior and will this behavior occur under all circumstances?

But then, when I load another image in ImageEnView1, the Layer keeps its size from the previous image but staying at the same top-left position.

2. Is there a way to automatically set the dimensions of the Layer to the new image loaded in ImageEnView1 or do I have to do that manually?

yogiyang

India
727 Posts

Posted - Sep 02 2020 :  00:38:30  Show Profile  Reply
 
2. Is there a way to automatically set the dimensions of the Layer to the new image loaded in ImageEnView1 or do I have to do that manually?

You will have to do it manually.


Yogi Yang
Go to Top of Page

xequte

38616 Posts

Posted - Sep 02 2020 :  02:14:35  Show Profile  Reply
Hi

A layer is zoomed as an image is zoomed. It's size and position are fixed (position is relative to layer 0). It does not follow the size of the layer 0 (background) image. if you want it to do this, just update its size after loading an image.

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