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
 Shadow on text in Obj
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PietH

South Africa
10 Posts

Posted - Oct 16 2012 :  11:31:49  Show Profile  Reply
I need to put shadow to the text I put as object.

This works for the text:
imageenvect1.ObjPenWidth[-1]:= StrToInt(EditpenW.text);
ImageEnVect1.ObjTransparency[-1]:=TrackbarTransP.Position;
This does not compile:
ImageEnVect1.EnableAlphaChannel:=True; //help file tells me to do this, but is it right like I apply it to an object?
ImageEnVect1.ObjID[-1].AddSoftShadow(5, 3,3,False,clRed,100); This does not work.

This compiles but does not do anything:
ImageEnVect1.EnableAlphaChannel:=True; //help file tells me to do this, but is it right like I apply it to an object?
ImageEnVect1.Proc.AddSoftShadow(5, 3,3,False,0,100);

Any help?
Thanks

Kind regards
Piet Henning

fab

1310 Posts

Posted - Oct 17 2012 :  11:30:35  Show Profile  Reply
Hi Piet,
you should set ObjSoftShadow[] property. Example:

ImageEnVect1.ObjText[-1] := 'Hello World!';
ImageEnVect1.ObjKind[-1] := iekTEXT;
ImageEnVect1.ObjSoftShadow[-1].Enabled := true;
ImageEnVect1.AddNewObject();
Go to Top of Page

PietH

South Africa
10 Posts

Posted - Oct 17 2012 :  13:32:21  Show Profile  Reply
Molto grazie Fabrizio.

It puts a shadow. Next step is to set the shadow color and intensity, radius etc. Is it possible?

Kind regards
Piet Henning
Go to Top of Page

fab

1310 Posts

Posted - Oct 17 2012 :  14:39:13  Show Profile  Reply
Piet,
other shadow options are still in ObjSoftShadow object. So you can set, for example:
ImageEnVect1.ObjSoftShadow[-1].Radius := ....
Color depends by the object pen color.
Go to Top of Page

PietH

South Africa
10 Posts

Posted - Oct 18 2012 :  01:01:28  Show Profile  Reply
Thanx Fabrizio
I set the color with this code: ImageEnVect1.ObjSoftShadow[-1].ShadowColor:=TColor2TRGB(clred);

BUT:
The whole object shows as a shadowed color, not just the text.
Is it possible to clean up?

Look at the sample I attach.
Thanks



Kind regards
Piet Henning
Go to Top of Page

fab

1310 Posts

Posted - Oct 18 2012 :  10:10:10  Show Profile  Reply
Shadows applies only to the whole object. Of course you can leave only the text (in order to apply shadow to the text only) removing the object border and object background.
Go to Top of Page

PietH

South Africa
10 Posts

Posted - Oct 18 2012 :  13:30:06  Show Profile  Reply
Thnks but do not get the property to set. Also nothing in your help file.
Can you put some code here please?
Thanks

Kind regards
Piet Henning
Go to Top of Page

fab

1310 Posts

Posted - Oct 18 2012 :  23:57:10  Show Profile  Reply
You should set ObjPenStyle to psClear and ObjBrushStyle to bsClear.
Go to Top of Page

PietH

South Africa
10 Posts

Posted - Oct 19 2012 :  11:15:51  Show Profile  Reply
Fabrizio,
It does nothing about the shadows background. Can you adjust your sample with text and arrows to add shadows that work well?
OR
Write a small code to duplicate the above sample, but without the shadow on the whole object.
Thanks
Piet


Kind regards
Piet Henning
Go to Top of Page

exodus

Germany
2 Posts

Posted - Feb 04 2013 :  08:52:31  Show Profile  Reply
I have the same problem, not getting rid of that background shadow when setting a softshadow for a line object. Can anyone give me a hint how to do this please? Did you solve it in the meanwhile, PietH?

Thank you.

Kind regards
Sven
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: