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
 Center-aligned text?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Oct 24 2022 :  15:34:42  Show Profile  Reply
I create transparent outlined text with this code:

ImageEnView1.LayersAdd(ielkText, 100, 100);
  var txtLayer := TIETextLayer(ImageEnView1.CurrentLayer);
  txtLayer.Font.Size := 32;
  txtLayer.Font.Style := [fsBold];
  txtLayer.Font.Color := clWhite;
  txtLayer.TextStyling.BorderWidth := 3;
  txtLayer.Alignment := iejCenter;
  txtLayer.TextStyling.BorderColor := clGray;
  txtLayer.TextStyling.BorderLineJoin := ieljRound;
  txtLayer.TextStyling.FillTransparency1 := 0; 
  txtLayer.Text := 'Buy' +#13#10+ 'Transparent' +#13#10+ 'Glass!';
  txtLayer.SizeToText();
  ImageEnView1.Update();


This is the result:



However, the lines are LEFT-ALIGNED although I wrote:

txtLayer.Alignment := iejCenter;

Is it possible to center-align each line?

xequte

38610 Posts

Posted - Oct 24 2022 :  22:12:09  Show Profile  Reply
Hi

At this time, the hard returns are not supported, so only the whole text block is centered.

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