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
 Layer in ImageEn
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tiago

Brazil
3 Posts

Posted - Jul 03 2012 :  06:11:56  Show Profile  Reply
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

w2m

USA
1990 Posts

Posted - Jul 03 2012 :  07:30:10  Show Profile  Reply
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
Go to Top of Page

tiago

Brazil
3 Posts

Posted - Jul 03 2012 :  12:09:06  Show Profile  Reply
Hello thanks for answering the problem was solved with the code that you sent, thanks.

Tiago Melo
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: