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
 How to insert image inside object
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

dracola

Argentina
37 Posts

Posted - Mar 23 2016 :  01:24:45  Show Profile  Reply
How to insert image inside object with transparent outside the object???

this my code so far :
//add object ellips
ImageEnVect1.AddNewObject(iekELLIPSE, Rect(50, 50, 500, 500), clRed);
ImageEnVect1.ObjPenWidth[0]:=22;

//insert image to object
ImageEnVect1.ObjKind[0]:= iekBITMAP;
ImageEnVect1.SetObjBitmapFromFile(0,'C:\Image1.jpg');
ImageEnVect1.Update;

result is like this:






What i want is like this :




How to make transparent outside the object?
Thank's & best rgds

w2m

USA
1990 Posts

Posted - Mar 23 2016 :  07:14:53  Show Profile  Reply
The image must be 32-bit transparent image and probably should be a png file type. jpeg file types are 24-bit with no alpha channel.

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

xequte

38948 Posts

Posted - Mar 27 2016 :  22:10:01  Show Profile  Reply
Hi

You should load the image into a TIEBitmap, then draw an ellipse on the alpha channel (see the demo code at http://www.imageen.com/help/TIEBitmap.CanvasCurrentAlpha.html ). Assign that image to your ImageEnVect object.

Let us know if you need more direction.

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

dracola

Argentina
37 Posts

Posted - Apr 03 2016 :  21:29:38  Show Profile  Reply
Thank you
I try it now.
Appreciate the good explanation.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: