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
 How to unlink normal layer and mask layer

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
yogiyang Posted - Jun 16 2016 : 05:14:37
Hello,

I have set LayerOptions to loAllowMultiSelect and loAutoSelectMask. This will automatically select Mask Layer when we select a normal layer. This is just fine.

But under some situations I would want to prevent ImageEn from selecting the Mask Layer. Like for example when a user presses Ctrl Key and clicks on a Layer the mask layer if associated with that layer should not get selected so when the user moves or resizes layer the mask should not move or resize with it.

Is it possible to do this?

If Yes then any ideas as to how to do this please.

TIA


Yogi Yang
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 19 2016 : 20:15:42
Hi Yogi

The "Selectable" property is ignored if you have enabled loAutoSelectMask.

You are better to disable loAutoSelectMask and automatically select the layer mask yourself when the user clicks a layer.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
yogiyang Posted - Jun 17 2016 : 11:09:13
Hello,

This code is not deselecting the mask layer.

if (layer > 0) and (layer < (ievMain.LayersCount - 1)) then
  begin
      if ievMain.Layers[layer + 1].IsMask then
      begin
        ievMain.Layers[layer + 1].Selectable := False;
      end;
  end;


I am saying this because when I move or resize an Image the mask is also getting resized!

TIA


Yogi Yang
xequte Posted - Jun 16 2016 : 18:48:28
Hi Yogi

Using the OnLayerNotify event you should be able to detect the selection of the mask layer and immediately deselect it:

http://www.imageen.com/help/TIELayerNotify.html


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com