ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 iejRight and right aligned text

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
yeohray2 Posted - Dec 09 2020 : 02:42:19
When using a text layer with multiple lines of text and Alignment := iejRight, only the longest line is right aligned. All other lines start on the same x position as the longest line e.g.



instead of ending on the right. How can I get the text to align on the right margin this way?



Thank you.
5   L A T E S T    R E P L I E S    (Newest First)
yeohray2 Posted - Dec 11 2020 : 06:25:50
Thank you for the prompt fix and support.
xequte Posted - Dec 10 2020 : 20:53:12
Thank you for the good bug report with detailed steps to reproduce.

Please email me for a fix.

Nigel
Xequte Software
www.imageen.com
yeohray2 Posted - Dec 10 2020 : 19:45:46
This image is when the Windows theme is used, and the above code is ran:



Next image is when the application is using the Carbon theme, same code (if you look really hard at the top right, you can just about make out the text):



Still in Carbon theme, but using a FillColor for the layer:



However, I need the non-text area to be transparent, which is why I can't set the FillColor.

Thank you.
yeohray2 Posted - Dec 10 2020 : 10:51:53
Got it, thanks. However, I ran into another issue.

Using the rich edit formatting to set my font to white, the text appears fine when running using the Windows theme. However, when switching to the Carbon theme, the text is a dark-grayish color - the font color in the rich edit formatting is ignored.

Code to create the text is like this:

procedure TestLayer;
var
  WorkImage: TImageEnView;
  LayerIndex: Integer;
begin
  WorkImage := TImageEnView.Create(nil);
  try
    WorkImage.IO.LoadFromFile('C:\sample\image.png'); 

    LayerIndex := WorkImage.LayersAdd(ielkText);
    WorkImage.LayersCurrent := LayerIndex;
    TIETextLayer(WorkImage.CurrentLayer).Width := WorkImage.IEBitmap.Width;
    TIETextLayer(WorkImage.CurrentLayer).EnableFormatting := True;
    TIETextLayer(WorkImage.CurrentLayer).RichText := '{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}' +
      '{\colortbl ;\red255\green255\blue255;} ' +
      '{\*\generator Riched20 10.0.18362}\viewkind4\uc1' +
      '\pard\sa200\sl276\slmult1\qr\cf1\fs24\lang9 Line 1\line Line 2\line A longer line 3 here\par' +
      '}';

    WorkImage.LayersMergeAll;
    WorkImage.IO.SaveToFilePNG('C:\sample\overlay.png');


  finally
    WorkImage.Free;
  end;
end;


How can I make the text color in the rich edit text consistent, regardless of the theme used? Thank you.
xequte Posted - Dec 09 2020 : 16:30:01
Hi

Unformatted text in TIETextLayer does not support text line-by-line alignment. You will need to enable formatting:

https://www.imageen.com/help/TIETextLayer.EnableFormatting.html

Nigel
Xequte Software
www.imageen.com