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
 TImageEnVect HDC
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

fisad

Sweden
13 Posts

Posted - Aug 02 2013 :  07:21:24  Show Profile  Reply
Is possible draw on a TImageEnVect as a HDC?
For example: I have a procedure "RenderObjectsToDC" to obtain the objects drawn on a component and would like to transfer these objects to an TImageEnVect.

PD: I try ImageEnVect.Bitmap.Canvas.Handle and ImageEnVect.IEBitmap.Bitmap.Canvas.Handle, but nothing happen!.

Thanks in advance!

Cocodrilo

6 Posts

Posted - Aug 05 2013 :  00:53:27  Show Profile  Reply
maybe ImageEnVect.Update will help?
Go to Top of Page

xequte

39067 Posts

Posted - Aug 05 2013 :  13:46:50  Show Profile  Reply
Have you tried copying the content to a bitmap, and adding that as an object to TImageEnVect?

c := TCanvas.Create;
c.Handle := Your HDC...
try
  Bitmap.Width := ...;
  Bitmap.Height := ...;
  r := Rect(0, 0, Bitmap.Width, Bitmap.Height);
  Bitmap.Canvas.CopyRect(r, c, r);
finally
  c.Free;
end;

ImageEnVect1.AddNewObject;
ImageEnVect1.ObjKind[IEV_PREVIOUS_INSERTED_OBJECT] := iekBitmap;
ImageEnVect1.SetObjRect(IEV_PREVIOUS_INSERTED_OBJECT, Rect(10, 10, 100, 100));
ImageEnVect1.ObjSetTBitmap(IEV_PREVIOUS_INSERTED_OBJECT, Bitmap);


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

fisad

Sweden
13 Posts

Posted - Aug 09 2013 :  13:36:40  Show Profile  Reply
Thanks to all.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: