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
 Creating ImageEn at runtime and assigning a bitmap
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BobSmith

9 Posts

Posted - Nov 12 2025 :  14:54:07  Show Profile  Reply
OK, so I purchased ImageEn.

1. Downloaded the installer and installed it.
2. Copied the source directory under my project.
3. Added the source path to my project search path.
4. Added imageenview to my uses.
5. Declared ImageEnView1:TImageEnView;
6. Created it at startup inside main form OnCreate
ImageEnView1 := TImageEnView.Create(form1);
ImageEnView1.Parent := ScrollBox1;

At this point if I start my app it shows the grey imageen square. All good so far.

Now when I go to draw a bitmap (specifically a graphics32 bitmap) to the imageenview using
tbm.drawto(destimage.canvas.handle,0,0);
It complains that the imageenview has no canvas?
If I try
tbm.drawto(ImageEnView1.bitmap.canvas.handle,0,0);
that compiles, but does not seem to display anything to the ImageEnView.

How should I handle outputting a graphics32 bitmap to an imageenview?

Thanks.

xequte

39245 Posts

Posted - Nov 12 2025 :  16:15:03  Show Profile  Reply
Hi Bob

Thank you for your order.

Ensure that you initialize the bitmap:

ImageEnView1.IEBitmap.Allocate( 500, 500, clWhite );
... Draw to the canvas ...
ImageEnView1.Update(); // Show the changes

http://www.imageen.com/help/TIEBitmap.Allocate.html


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: