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
 Dragging image-layer placed on line-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
WIZZs Posted - Nov 20 2018 : 07:46:48
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.
7   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 29 2018 : 15:03:00
Excellent

Nigel
Xequte Software
www.imageen.com
WIZZs Posted - Nov 29 2018 : 02:19:41
I've tested this and it works perfectly now. Thanks.
WIZZs Posted - Nov 21 2018 : 23:20:56
I don't understand your answer, but nice to hear that you know what to do to solve it :-)
xequte Posted - Nov 21 2018 : 19:53:21
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
WIZZs Posted - Nov 20 2018 : 21:52:24
// 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.
xequte Posted - Nov 20 2018 : 16:48:49
I also cannot reproduce this. Does the image layer contain an alpha or opaque image?



Nigel
Xequte Software
www.imageen.com
w2m Posted - Nov 20 2018 : 10:13:21
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