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
 SetByAngleAndDist question
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
389 Posts

Posted - Sep 26 2021 :  07:39:56  Show Profile  Reply
Hi Nigel,
the procedure, SetByAngleAndDist works perfect.
My question, you can also do this for Proc.AddSoftShadow ?

Klaus
DigiFoto
www.klausdoege.de

xequte

38222 Posts

Posted - Sep 26 2021 :  17:28:11  Show Profile  Reply
Hi Klaus

Unfortunately that is not practical to do as an overload (params would be the same), but the math is pretty straightforward:

// Add a soft shadow to the current image using an angle
angle := 45; // angled toward the bottom-right
dist  := 5;
offX := cos( IEDegreesToRadians( angle )) * dist;
offY := sin( IEDegreesToRadians( angle )) * dist;
ImageEnView1.Proc.AddSoftShadow( 5, offX, offY );



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

klausdoege

Germany
389 Posts

Posted - Sep 27 2021 :  05:34:09  Show Profile  Reply
Hi Nigel,
ok, i have been doing that for a long time.
Thanks

Klaus
DigiFoto
www.klausdoege.de
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Sep 27 2021 :  10:53:42  Show Profile  Reply
Hi Nigel,
Why are ImageEn angles are counterclockwise 0..-360 °.
I think that's a bit illogical. It would be better 0..360 ° or not?

Klaus
DigiFoto
www.klausdoege.de
Go to Top of Page

xequte

38222 Posts

Posted - Sep 27 2021 :  19:20:41  Show Profile  Reply
Yes, I agree. Unfortunately that decision was made long before we were took over the ImageEn project.

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