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
 Suggestion for improvement
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
354 Posts

Posted - Sep 05 2021 :  04:43:54  Show Profile  Reply
Hello,
I use a lot of shadow and glow. Both have the following properties: OffsetX and OffsetY. It is not very nice for the user to enter the offset as OffsetX = 3 and OffsetY = 2. It is better to enter an angle and a width. That is more logical for the user. I do this in my programs and it has worked. Perhaps you can add the two properties of angle and width. If one of these properties is changed, OffsetX and OffsetY are recalculated. If you want to continue working with OffsetX/Y, you could do this too. Only the angle and the width are then not changed. Here is my procedure that I use:
procedure SetAngleDis2XY (angle, Distance: integer; var xpos, ypos: integer);
var
fDegToRad: Real;
begin
fDegToRad: = angle / 180 * pi;
xpos: = round (cos (fDegToRad) * Distance);
ypos: = round (sin (fDegToRad) * Distance);
end;
Unfortunately, it cannot be calculated backwards, so it is better if the properties are added. I am now realizing it with the Lyr.UserData.
Maybe you can realize it, e.g.
TIEVSoftShadow.angle
TIEVSoftShadow.width
Many users would definitely be happy.
This is what it looks like, see the see red ellipse.


Klaus
DigiFoto
www.klausdoege.de

xequte

6332 Posts

Posted - Sep 06 2021 :  00:33:18  Show Profile  Reply
Thanks Klaus,

I'll add this to the to-do list.

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

klausdoege

Germany
354 Posts

Posted - Sep 06 2021 :  04:04:10  Show Profile  Reply
Hello Nigel,
I'm very happy, thank you.

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

xequte

6332 Posts

Posted - Sep 07 2021 :  18:31:23  Show Profile  Reply
Hi Klaus

In 10.1.1 you can use:

// Add a soft shadow to the current layer angled toward the bottom-right
ImageEnView1.CurrentLayer.SoftShadow.SetByAngleAndDist( -45, 5 );
ImageEnView1.CurrentLayer.SoftShadow.Enabled := True;
ImageEnView1.Update;

// Display the current soft offset values
ImageEnView1.CurrentLayer.SoftShadow.GetAngleAndDist( ang, dist );
UpDown1.Value := ang;
UpDown2.Value := dist;


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

klausdoege

Germany
354 Posts

Posted - Sep 11 2021 :  05:46:35  Show Profile  Reply
Hello Nigel,
that's great, I'm very happy.

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

klausdoege

Germany
354 Posts

Posted - Sep 12 2021 :  06:08:06  Show Profile  Reply
Hi Nigel,
the same by Textlayer shadow and glow ??

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

xequte

6332 Posts

Posted - Sep 12 2021 :  16:41:58  Show Profile  Reply
Yes, they are methods of TIEVSoftShadow

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