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
 Fill with color from code
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

esprd

2 Posts

Posted - Nov 10 2023 :  03:06:09  Show Profile  Reply
Hi,

I have a transparent layer with edges delimiting a closed area (Attached "Edge.png").
Knowing the position of one pixel within the area, I want to fill the area with a single color, in the same way someone would select the "fill color" tool and click in the area, but I want to do this from the code. (Result wanted : attached "Area filled.png")
Is there a way to do this?

attach/esprd/20231110354_Edges.png

attach/esprd/202311103523_Area filled.png

ep

xequte

38322 Posts

Posted - Nov 10 2023 :  03:48:02  Show Profile  Reply
Hi
You can do a flood fill, but it does not take the alpha channel into account:

http://www.imageen.com/help/TImageEnProc.CastColor.html

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