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 draw a border around Marquee Selection?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
728 Posts

Posted - Feb 24 2018 :  05:43:30  Show Profile  Reply
Hello,

I am trying to draw a border which is 3 pix thick around existing Marquee Selection. This border has to be drawn 7 pix away.

Please help as to how we can do this?

TIA


Yogi Yang

xequte

39061 Posts

Posted - Feb 25 2018 :  17:24:39  Show Profile  Reply
Hi Yogi

Why not just do a standard TCanvas.Rectangle() or TIECanvas.Rectangle() with a pen.width of 7?

Of course the selected rect will be TImageEnView.SelectedRect, which will you need to inflate by 7 pixels.

Don't forget to call TImageEnView.Update after modifying the bitmap.



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

yogiyang

India
728 Posts

Posted - Feb 26 2018 :  05:26:59  Show Profile  Reply
Hello Nigel,

Thanks for your suggestion. But that is not possible as the selection created by user can be of any shape as the user will be allowed to use Lasso for making selection.

Is it possible to get an array of all the locations/points of a selection?

If this is possible then I can draw a line by adding required amount of pixels!

TIA


Yogi Yang
Go to Top of Page

xequte

39061 Posts

Posted - Feb 26 2018 :  14:30:02  Show Profile  Reply
Hi Yogi

You can use the PolySel property to iterate through the points of the selection:

https://www.imageen.com/help/TImageEnView.PolySel.html

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

yogiyang

India
728 Posts

Posted - Feb 27 2018 :  09:36:58  Show Profile  Reply
Hello Nigel,

Thanks for the tip. I will check it out.


Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: