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
 Make layer moveable/sizeable again

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
aleatprog Posted - Jul 10 2019 : 11:06:51
I create a textlayer using:

function LayersAdd(Text: String; FontSize : Integer; FontColor : TColor; FontName : string; FontStyle : TFontStyles = []; PosX: Integer = -1; PosY: Integer = -1): integer; overload;

Later on this layer may be moved or resized manually. Thus I identify the layer with a unique layer name (ULN):

for i := 0 to ImageEnView1.LayersCount - 1 do
    ln := CompareStr(ImageEnView1.Layers[i].Name, ULN);
  if ln = 0 then
    begin
      idx := ImageEnView1.LayersNameToIndex(ULN, False);
      ImageEnView1.LayersCurrent := idx;
    end;


and set the mouse interact layer options:

ImageEnView1.LayerOptions := ImageEnView1.LayerOptions + [ loAllowMultiSelect, loAutoSelectMask ];
ImageEnView1.MouseInteractLayers := [ mlMoveLayers, mlResizeLayers ];

As result, the layer is selected correctly with the eight yellow circles but is neither moveable nor sizeable. The only operation which is allowed is the creation of new layers inside the layer area.

May you give me a hint what I'm missing?

Al
3   L A T E S T    R E P L I E S    (Newest First)
aleatprog Posted - Jul 13 2019 : 09:37:40
Hi Nigel,

the error should've been caused by wrong MouseInteractLayers parameters. I solved it by resetting the parameters using ImageEnView1.MouseInteractLayers := [] as shown in the Layers demo.

Thank you,
Al
aleatprog Posted - Jul 11 2019 : 04:23:20
Hi Nigel,

behaviour doesn't change using ImageEnView1.LayersDeselectAll();

I just tried "Rotate Layers Demo" which works fine but it is limited in calling the parameters, same thing my code does. I'll try to simplify my code and continue to dig to find the cause.

PS: "Rotate Layers Demo" contains an error. Both procedures, Move and Rotate, use the same parameters [ mlMoveLayers, mlResizeLayers ]. You should modify the ones in the Rotate procedures in [ mlMoveLayers, mlRotateLayers ].

Al
xequte Posted - Jul 10 2019 : 19:44:03
Hi Al

I cannot reproduce that. Ensure you call ImageEnView1.LayersDeselectAll(); before setting LayersCurrent to clear the existing selection.

Are you able to reproduce in our Layer editing demos?


Nigel
Xequte Software
www.imageen.com