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
 Dragging image-layer placed on line-layer
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

WIZZs

Netherlands
23 Posts

Posted - Nov 20 2018 :  07:46:48  Show Profile  Reply
Hi,

On a background-image I first placed a Line-Layer and on that I placed an Image-layer.
The Line-Layer is mostly transparent, but I can still select the Image-Layer.
So the Image-Layer is the top-most layer, but when I try to drag it, the Line-Layer gets selected.

I've tried changing some settings like:
iesoSelectTranspLAyers = False or True
Layerscaching = -1 or 0
Switching layer positions of Image-Layer and Line-Layer.

But I just can't drag the Image-Layer if it is placed on a transparent part of the Line-Layer.

Do you have any solution to solve this without having to lock the Line-Layer?

Thanks.

w2m

USA
1990 Posts

Posted - Nov 20 2018 :  10:13:21  Show Profile  Reply
Try my Brush Tools and Layers Demo and let me know if you have the same problem.
I tried a couple of my layers apps and I can not duplicate what you reported.
I can select any layer and each selected layer can be dragged.
You can download the demo here: attach/w2m/201810585148_BrushTools.zip br /

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

xequte

38180 Posts

Posted - Nov 20 2018 :  16:48:49  Show Profile  Reply
I also cannot reproduce this. Does the image layer contain an alpha or opaque image?



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

WIZZs

Netherlands
23 Posts

Posted - Nov 20 2018 :  21:52:24  Show Profile  Reply
// The Line-Layer is added by this code:
// PS: The line is drawn diagonal.
Procedure TMainForm.DrawLineClick(Sender: TObject);
begin
  ImageEnView1.LayerDefaults.Add(IELP_LineEndShape   + ' = ' + IntToStr(ord(ieesNone)));
  ImageEnView1.MouseInteract := [miClickCreateLineLayers, miMoveLayers, miResizeLayers];
end;


// The Image-Layer (*.png in color) is added by this code:
procedure TMainForm.AddImageClick(Sender: TObject);
var idx : Integer;
    bmp : TIEBitmap;
begin
  idx := (Sender AS TdxBarLargeButton).ImageIndex;
  if idx >= 0 then
  begin
    bmp := ImageEnMView2.GetTIEBitmap(idx);
    ImageEnView1.LayersAdd(bmp);
    // Position Image-Layer in the center of mouseclick.
    ImageEnView1.CurrentLayer.PosX        := Round(ImageEnView1.ClientWidth / 2);
    ImageEnView1.CurrentLayer.PosY        := Round(ImageEnView1.ClientHeight / 2);
    ImageEnView1.CurrentLayer.BorderColor := clNone;
    ImageEnMView2.ReleaseBitmap(idx, False);
  end;
  ClearMouseActions;
  ImageEnView1.Update();
end;


// Button to select layers
Procedure TMainForm.SelectLayerClick(Sender: TObject);
begin
  ClearMouseActions;
end;


// After drawing MouseInteract is set to:
procedure TMainForm.ClearMouseActions;
begin
  ImageEnView1.MouseInteract := [miZoom, miMovingScroll, miEditLayerPoints, miMoveLayers, miResizeLayers, miRotateLayers];
end;


In your demos, selecting and dragging only seems to work when the Image-Layer is placed on top of the Line-Layer.

In my example the Image-Layer can always be selected (through the transparent part of the Line-Layer, but I can't drag it. The moment I drag it it will select the Line-Layer.
Go to Top of Page

xequte

38180 Posts

Posted - Nov 21 2018 :  19:53:21  Show Profile  Reply
Thanks, I see the issue.

With miEditLayerPoints it is too generous in letting you select line layers. I will fix for 8.1.2.



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

WIZZs

Netherlands
23 Posts

Posted - Nov 21 2018 :  23:20:56  Show Profile  Reply
I don't understand your answer, but nice to hear that you know what to do to solve it :-)
Go to Top of Page

WIZZs

Netherlands
23 Posts

Posted - Nov 29 2018 :  02:19:41  Show Profile  Reply
I've tested this and it works perfectly now. Thanks.
Go to Top of Page

xequte

38180 Posts

Posted - Nov 29 2018 :  15:03:00  Show Profile  Reply
Excellent

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