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
 Text Layer Font Border
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

HeartWare

Denmark
50 Posts

Posted - Jul 19 2018 :  03:06:38  Show Profile  Reply

I am trying to use a TextLayer with a text that has a "border" around it, in some graphics programs this is called "Stroke Width":



I can't seem to figure out how to do this with ImageEn's TIETextLayer...

xequte

39053 Posts

Posted - Jul 20 2018 :  21:23:36  Show Profile  Reply
I'm afraid that is not yet supported, but on the to-do list.



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

klausdoege

Germany
389 Posts

Posted - Jul 23 2018 :  08:47:13  Show Profile  Reply
Hi,
you can make follow, try different values
// Inner Glow
for z := 0 to GlowInOverflow_AdvSpinEdit.Value do
ImageEnVect.Proc.AddInnerShadow(GlowSizeIn_AdvSpinEdit.Value, 0, 0, clblack);
The PictureExample is:
for z := 0 to 5 do
ImageEnVect.Proc.AddInnerShadow(13, 0, 0, clblack);



Klaus
www.klausdoege.de
Go to Top of Page

HeartWare

Denmark
50 Posts

Posted - Jul 23 2018 :  09:00:44  Show Profile  Reply
Sorry - I don't get what you're trying to say.

Anyway, I have currently solved it by making an Image Layer where I first draw the text (+stroke) to a transparent PNG and then load that into the Layer.

This is the function protoype I currently have (so you can see what parameters are required):

FUNCTION MakeImage(CONST FontName : STRING ; FontSize : Cardinal ; FontColor : TColor ; FontStyle : TFontStyles ; StrokeWidth : BYTE ; StrokeColor : TColor ; CONST Text : STRING ; MaxW,MaxH : Cardinal ; CONST Margins : TMargins) : TIEBitmap;

It returns a transparent TIEBitmap with the specified Text written in the specified font with the specified Stroke width and color (if StrokeWidth=0 or StrokeColor=clNone, no stroke effect is done). There is a transparent "border" around the text the size of which is specified in Margins. MaxW and MaxH specifies the maximum width and height of the returned image. Any text that goes beyond this is cropped. There is - currently - no autowrap, but CR/LF are supported within the string.

This returned image is then loaded into a n Image Layer.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: