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
 Add an Image Layer that contains the current image from the clipboard?

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
PeterPanino Posted - Oct 24 2022 : 10:04:02
I am trying to add an Image Layer that contains the current image from the clipboard:

ImageEnViewDummy.Proc.PasteFromClipboard();
  var NewLayer := ImageEnViewMain.LayersAdd(ielkImage);
  ImageEnViewMain.Layers[NewLayer].Assign(ImageEnViewDummy.Layers[0]);
  ImageEnViewMain.Layers[NewLayer].Selectable := True;
  ImageEnViewMain.Layers[NewLayer].Selected := True;
  ImageEnViewMain.MouseInteractLayers := [mlMoveLayers, mlResizeLayers, mlRotateLayers];


1. The Image Layer is created with the image from the clipboard. However, the Layer cannot be moved, resized, or rotated. Nor does it have any handles. Why?

2. Isn't there a simple built-in method to add an Image Layer that contains the current image from the clipboard?

2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 24 2022 : 22:24:10
Hi Peter

By default, Layer 0 (background) does not have a visible selection border (VisibleBox = False). Your call:

  ImageEnView1.Layers[NewLayer].Assign(ImageEnViewDummy.Layers[0]);


Assigns the layer properties of the ImageEnViewDummy background to the new layer, so VisibleBox = False. You could just assign the bitmap:

  ImageEnView1.Layers[NewLayer].Bitmap.Assign(ImageEnViewDummy.Layers[0].Bitmap);


But an easier method is just:

  ImageEnView1.LayersCreateFromClipboard();



Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Oct 24 2022 : 10:20:16
I've solved the problem. This now works:

ImageEnViewDummy.Proc.PasteFromClipboard();
  var NewLayer := ImageEnViewMain.LayersAdd(ielkImage);
  ImageEnViewMain.Layers[NewLayer].Bitmap.Assign(ImageEnViewDummy.IEBitmap);
  ImageEnViewMain.MouseInteractLayers := [mlMoveLayers, mlResizeLayers, mlRotateLayers];


1. Why the previous version didn't work?

2. The question remains: Isn't there a simple built-in method to add an Image Layer that contains the current image from the clipboard?