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
 Copy ImageEnVect Selected Object to ImageEnView

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
sparkz Posted - Mar 06 2016 : 16:28:52
Hi

Sorry, this is a pretty basic question but I can't figure it out and can't find an example of it.

How do I update an ImageEnView component with a selected object from ImageEnVect?

Basically, when I select a bitmap object I want to show a copy of the image elsewhere.

Thanks
Mark
2   L A T E S T    R E P L I E S    (Newest First)
sparkz Posted - Mar 06 2016 : 19:18:00
Brilliant. Many thanks Bill
w2m Posted - Mar 06 2016 : 18:17:47
procedure TForm1.ImageEnVect1ImageChange(Sender: TObject);
{OnImageChange occurs after the image is modified using TImageEnProc (Proc property) or TImageEnIO (IO property).}
begin
  { Update the background image }
  ImageEnView2.IEBitmap.Assign(ImageEnVect1.IEBitmap);
  ImageEnView2.Update;
end;

procedure TForm1.ImageEnVect1VectorialChanged(Sender: TObject);
{OnVectorialChanged occurs whenever an object is added, removed, moved, resized or modified by a user's action.}
begin
  { Update the background image }
  ImageEnView2.IEBitmap.Assign(ImageEnVect1.IEBitmap);
  ImageEnView2.Update;
  { Show the objects in ImageEnView2 }
  ImageEnVect1.DrawObjectsToBitmap(ImageEnView2.IEBitmap);
  ImageEnView2.Update;
end;

If you only want to show the objects when selected then eliminate the code in the ImageEnVect1VectorialChanged event and add the code to the ImageEnVect1SelectObject event:
procedure TForm1.ImageEnVect1SelectObject(Sender: TObject);
{OnSelectObject event occurs whenever an object is selected or deselected.}
begin
  { Show the objects in ImageEnView2 }
  ImageEnVect1.DrawObjectsToBitmap(ImageEnView2.IEBitmap);
  ImageEnView2.Update;
end;

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