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
 ImageEnView Grouped Layers (2 Layers:1 image, 1 text) How Can I Get Text Value ?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
133 Posts

Posted - May 31 2023 :  02:26:06  Show Profile  Reply
ImageEnView contains multiple Grouped Layer Sets.

First Layer is Image, Second Layer is Text (grouped together) created one after the other in code then grouped.

I have two situations:-

1) ImageEnView1MouseUp Event
if GetKeyState(VK_SHIFT) < 0 then begin
ALayer:= ImageEnView1.CurrentLayer;
do something with the bound Text Layer text

2) Procedure Iterating ALL Layers, read the Text Value of the Bound Layer Set ?
if ( (ALayer.LayerIndex > 0)
and ((ALayer.Kind = ielkImage) or (ALayer.Kind = ielkText))
) then begin
do something with the bound Text Layer

DOES A PARENT LAYER HAVE A DEPENDANT CHILD/CHILDREN LAYER(S) ?



Andy

xequte

38682 Posts

Posted - Jun 01 2023 :  03:59:38  Show Profile  Reply
Hi Andy

To find other layers grouped with the current one, you need to iterate through all the layers to find the ones with a matching GroupIndex:

http://www.imageen.com/help/TIELayer.GroupIndex.html





Nigel
Xequte Software
www.imageen.com
Go to Top of Page

andyhill

Australia
133 Posts

Posted - Jun 02 2023 :  19:10:53  Show Profile  Reply
Do I set GroupIndex only for the ChildLayer which then points to ParentLayer as owner
-or-
do I set both Parent & Child Layers to have the same GroupIndex ?

How do I control the Z order ?

Andy
Go to Top of Page

xequte

38682 Posts

Posted - Jun 03 2023 :  04:00:21  Show Profile  Reply
Hi Andy

You set the GroupIndex for all layers that are grouped.

The layer index specifies the z value, i.e. layer 0 is the background image, layer 1 is the bottom most layer, up to Layers[LayerCount-1] which is the top-most layer. You can change the order using:

https://www.imageen.com/help/TImageEnView.LayersArrange.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

andyhill

Australia
133 Posts

Posted - Jun 03 2023 :  15:12:01  Show Profile  Reply
Yes I thought that would be the case HOWEVER I believe I have identified a bug - will advise.

Andy
Go to Top of Page

xequte

38682 Posts

Posted - Jun 04 2023 :  13:12:03  Show Profile  Reply
Hi Andy

Thanks, I've received your message. I don't think that is a bug; I've emailed you.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

andyhill

Australia
133 Posts

Posted - Jun 07 2023 :  15:59:21  Show Profile  Reply
Nigel, after a rewrite from a different perspective it is working for me - sorry for the concern :(

The lesson I learnt, the Highest LayerIndex within a grouped object becomes the Group Click Layer (obvious when you consider the "Z" order).

Andy
Go to Top of Page

xequte

38682 Posts

Posted - Jun 08 2023 :  02:20:19  Show Profile  Reply
Hi Andy

Yes, that is correct. Glad you got to the bottom of it.

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