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
 Save multi selection

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
giancarlo Posted - Apr 06 2013 : 14:58:08
Hello,
i have to save/export a multi selection on a scanned image.
ImageEn 4 do support multi selections of rectangle areas?
If not, is possibile to save on file the clipboard content?
Some suggestion?

Thank you
Giancarlo
4   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Apr 07 2013 : 07:59:19
No, because there is still only 1 selection.

You could try creating a layer from a selection, so then you could make a selection, create a layer from the selection, copy it to the clipboard, then make another selection, create a layer from the selection, then copy it to the clipboard.

The currently selected layer is the layer that will be copied to the clipboard.

This is possible because you can have many layers and each layer is selectable.

For example using the layers demo from the samples folder you could add a check box to toggle selections or select layer, and a button to create the layer from the selection then add:

procedure Tfmain.Select1Click(Sender: TObject);
begin
  if Select1.Checked then
    ImageEnView1.MouseInteract := [miSelect]
  else
    ImageEnView1.MouseInteract := [miMoveLayers, miResizeLayers];
end;

procedure Tfmain.CreateLayerFromSelection1Click(Sender: TObject);
var
  ilayer: integer;
begin
  // copy selected area and create a new layer
  ilayer := ImageEnView1.LayersCreateFromSelection;
  ImageEnView1.LayersCurrent := ilayer;
  ImageEnView1.CurrentLayer.name := AnsiString('Layer ' + IntToStr(ilayer));
  ImageEnView1.CurrentLayer.VisibleBox := True;
  ImageEnView1.CurrentLayer.Selectable := True;
  ImageEnView1.LayersDrawBox := True;
  // move the new layer to top left
  ImageEnView1.CurrentLayer.PosX := 0;
  ImageEnView1.CurrentLayer.PosY := 0;
  // remove the selection
  ImageEnView1.DeSelect;
  ImageEnView1.LayersCurrent := 0;
  RefreshControls;
  RefreshLayerViewer;
end;

procedure Tfmain.CopyToClipboard1Click(Sender: TObject);
begin
  ImageEnView1.Proc.CopyToClipboard()
end;

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
giancarlo Posted - Apr 07 2013 : 06:56:08
Ok, now i understand.
Best solution is allow user make the (single) selection, then save on file and deselect.
Is possibile lock only one selection area?
Thank you.
w2m Posted - Apr 07 2013 : 06:46:57
No you are incorrect. It may appear to be a multi-selection, but it is all the same selection. If you move the "selections" with the mouse all the selections move... You can not select one area, then select another area and independently move the selections. Presently there is no way to handle each selected area as an independent selection.

If you copy the "selections" to the clipboard you will see all of the selections with whitespace between the selected areas. You can not specify which rectangle to copy.

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
giancarlo Posted - Apr 07 2013 : 06:13:53
i've discovered that imageenview do support multi selection, but i cannot find the way to get all the coordinates to copy each selection.
see the attach.
i need something like: ImageEnView1.Selections[i] :)

thank you