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
 TextLayer issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterNu

Germany
4 Posts

Posted - Oct 23 2024 :  06:56:12  Show Profile  Reply
I want to put a vertical stamp on the bottom left of a image.

Everything looks correct when I output a border around the text.
If the border is invisible (BorderWidth:=0 or BorderColor:=clNone),
then the stamp text will be positioned incorrectly and clipped.





Code sample

with ImageCtrl do
begin
  LayersAdd(ielkText);
  with TIETextLayer(CurrentLayer) do
  begin
    Layout := ielBottom;
    Alignment := iejLeft;

    Rotate := 90;
    TextOverflow := ieoShrink;
    Opacity := 1.0;

    WordWrap := False;
    AutoSize := True;
    Text := 'This is my stamp';

    Font.Name := 'Arial';
    Font.Size := 60;
    Font.Color := clBlack;
    Font.Style := [fsBold];

    BorderColor := clBlack;         
    BorderWidth := 6;               // <-- if border ist set, all looks fine

    SizeToText;

    PosX := IELayer_Pos_Left;
    PosY := IELayer_Pos_Bottom;

    LayersMergeAll;
  end;
  Update;
 end;



PeterNu

xequte

38541 Posts

Posted - Oct 23 2024 :  17:52:22  Show Profile  Reply
Hi Peter

Your code looks correct. I presume TextOverflow := ieoTruncate; offers no improvement?

I will need to check this when I am back in the office in early November.

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