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
 Spotlight layer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

email_toan

USA
5 Posts

Posted - Jun 12 2019 :  22:22:02  Show Profile  Reply
Help! I'd like to add a "spotlight" feature into my program. I'd like the user to be able to: add as many spotlight as needed, be able to adjust the outside brightness (shared value with other spotlights), be able to resize, be able to relocate each light as needed, and be able to set its borders.

I was thinking each spotlight would be its own layer. During on the OnPaint event of the TImageEnView object, I'd make a selection copy to bitmap and update the appropriate spotlight layer. I'd use a black layer the size of the background layer and change its opacity to adjust darkness of the background image.

How would you go about implementing this? I'd prefer it to be as little taxing on the computer as possible. Any guidance would be greatly appreciated.

Here's an example I mocked up in Photoshop.

xequte

4538 Posts

Posted - Jun 13 2019 :  01:26:00  Show Profile  Reply
Hi

I'd like to create a demo for this. Do you have an up-to-date license?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

email_toan

USA
5 Posts

Posted - Jun 13 2019 :  02:54:01  Show Profile  Reply
Nigel,

I'm currently using 8.5, but I can update to 8.6 if needed.
Go to Top of Page

xequte

4538 Posts

Posted - Jun 13 2019 :  03:57:47  Show Profile  Reply
Hi

Please try this demo:

attach/xequte/201961335725_Layers_CustomDraw.zip
2970.59 KB







Nigel
Xequte Software
www.imageen.com
Go to Top of Page

email_toan

USA
5 Posts

Posted - Jun 13 2019 :  10:44:55  Show Profile  Reply
Wow, you are amazing Nigel. Your coding is so clean and comments were perfect. I'm learning from your demo program. Thank you so much!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: