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
 Layer in ImageEn

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
tiago Posted - Jul 03 2012 : 06:11:56
hi I added a layer (LayersAdd) to ImageEnView
But I need to move the layer added on the ImageEnView
for this I used the MouseMove event of the ImageEnView, but the motion of the layer on the imageenview not work as expected, the coordinates are not accurate, this would be a bug of the component?

Tiago Melo
2   L A T E S T    R E P L I E S    (Newest First)
tiago Posted - Jul 03 2012 : 12:09:06
Hello thanks for answering the problem was solved with the code that you sent, thanks.

Tiago Melo
w2m Posted - Jul 03 2012 : 07:30:10
How are you moving the layer?

Do not use the OnMouseMove event. Just set MouseInteract to [miMoveLayers, miResizeLayers] and moving and resizing layers is automatic. There is no bug in ImageEn with respect to moving a layer. If the layer has a particially transparent bitmap then you also should add ImageENView.SelectionOptions := ImageENView.SelectionOptions + [iesoSelectTranspLayers].

Remove the code you use to move layers and try this:

iLayer := ImageENView.LayersAdd;
ImageENView.CurrentLayer.PosX := ImageENView.Layers[iLayer].ConvXScr2Bmp(X);
ImageENView.CurrentLayer.PosY := ImageENView.Layers[iLayer].ConvYScr2Bmp(Y);
ImageENView.CurrentLayer.Width := ImageENView.Bitmap.Width;
ImageENView.CurrentLayer.Height := ImageENView.Bitmap.Height;
ImageENView.CurrentLayer.VisibleBox := True;
ImageENView.CurrentLayer.Selectable := True;
ImageENView.LayersDrawBox := True;
ImageENView.AutoCursors := True;
ImageENView.MouseInteract := [miMoveLayers, miResizeLayers];


William Miller