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
8 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

38607 Posts

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

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

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

PeterNu

Germany
8 Posts

Posted - Oct 24 2024 :  02:33:35  Show Profile  Reply
Hi Nigel,

ieoTruncate has the same result.

Thanks,
Peter

PeterNu
Go to Top of Page

xequte

38607 Posts

Posted - Nov 04 2024 :  01:03:58  Show Profile  Reply
Hi Peter

I'm not seeing that, can you confirm what version of ImageEn and Delphi you are using?

Try emailing me for the latest release.



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

PeterNu

Germany
8 Posts

Posted - Nov 05 2024 :  07:49:54  Show Profile  Reply
Hi Nigel,

I'm using Delphi 11 Alexandria.



PeterNu
Go to Top of Page

xequte

38607 Posts

Posted - Nov 05 2024 :  16:56:26  Show Profile  Reply
Hi Peter

Also need to know what version of ImageEn you're using?

You can display it like this:

Label1.Caption := 'ImageEn Version: ' + IEGlobalSettings().ImageEnVersion.VersionStr;



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

PeterNu

Germany
8 Posts

Posted - Nov 07 2024 :  02:20:23  Show Profile  Reply
Hi Nigel,

I'm using ImageEN Version: 13.5.0

Peter

PeterNu
Go to Top of Page

xequte

38607 Posts

Posted - Nov 07 2024 :  16:32:34  Show Profile  Reply
Hi Peter

There were a lot of changes to text layer sizing in v13.6.0, please try that version.

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

PeterNu

Germany
8 Posts

Posted - Nov 11 2024 :  08:49:00  Show Profile  Reply
Hi Nigel

Same result, but I have an workaround.

When I use the component TJvFontcombobox everything works as expected.

FontCombo.FontName:='Arial';
FontCombo.Font.Size:=60;
FontCombo.Font.Color:=clBlack;
FontCombo.Font.Quality:=fqDefault;
FontCombo.Font.Style:=[fsBold];
Font.Assign(FontCombo.Font);

Maybe this will help to identify the problem.

Peter

PeterNu
Go to Top of Page

xequte

38607 Posts

Posted - Nov 11 2024 :  13:04:39  Show Profile  Reply
Hi Peter

And it fails if you do it this way?

FontCombo.FontName:='Arial';
FontCombo.Font.Size:=60;
FontCombo.Font.Color:=clBlack;
FontCombo.Font.Quality:=fqDefault;
FontCombo.Font.Style:=[fsBold];

Font.FontName := FontCombo.FontName;
Font.Size := FontCombo.Font.Size;
Font.Color := FontCombo.Font.Color;
Font.Quality := FontCombo.Font.Quality;
Font.Style := FontCombo.Font.Style;


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