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
 Jagged edges when rotate large text as overlay.

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
mvbobj Posted - Jul 05 2016 : 09:36:19
I am displaying examples of specific reports and am trying to add a rotated 'stamp' of the text 'E X A M P L E' on top. I'm getting some fairly jagged results. I'm using the code:

ImageEnVect.LayersSync := True;

iLayer := ImageEnVect.LayersAdd;

ImageEnVect.Proc.Fill(TColor2TRGB(clWhite));

ImageEnVect.Proc.TextOut(Align_Text_Horz_Center, Align_Text_Vert_Center,
'E X A M P L E', 'Arial Black', 48, clBlue, [fsBold]);

ImageEnVect.Proc.SetTransparentColors(TColor2TRGB(clWhite), TColor2TRGB(clWhite), 0);

ImageEnVect.Layers[iLayer].Transparency := ATransparency;

ImageEnVect.LayersCurrent := 0;

ImageEnVect.Layers[iLayer].Rotate := 30;
ImageEnVect.Refresh;

How do I do this without the jagged edges of the rotated text?

Thanks.
7   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 18 2016 : 19:33:30
Hi

We've fixed the overcropping issue for 6.3.1, which will be released shortly.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Jul 07 2016 : 20:06:41
Hmmm,

The over-cropping of layer seems to be an issue in our anti-alias feature. We'll need to investigate that.

TextOut does not support multiple lines. You should have a look at the source for LayersCreateFromText(). Use that to create your own method that outputs three lines.

I would be keen to add support for multiple lines to LayersCreateFromText(), but with the coming support for native text layers in TImageEnView, I feel that would be unnecessary.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
mvbobj Posted - Jul 07 2016 : 13:00:32
Nigel,

You asked:

"The method you use has been superceded by the LayersCreateFromText method. Can you advise its source so I can update it."

The source is:
http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1811

Thanks,
Robert
mvbobj Posted - Jul 07 2016 : 12:25:59
When using LayersCreateFromText - if I add carriage return + line feed + a second line of text - only the first line appears.

At some point I will need to apply a rotated stamp layer with the words:
"PAID"
" IN "
"FULL"
on three lines.

How would I do that?
mvbobj Posted - Jul 07 2016 : 09:41:16
After rotation, the top left corner and bottom left corner of the first "E" in E X A M P L E has a few pixels shaved off - also the top right corner and bottom right corner of the last "E". This is true even if I add a space to the beginning and end of the text.

It looks like in resizing the layer to fit the rotated text, the new layer size is just a bit too small.

Is there anything that can be done about this?
xequte Posted - Jul 07 2016 : 01:40:56
 
How do I rotate the text so that the center of the rotated text is at the center of the background layer?


You can do it as follows:

procedure Tfmain.Button7Click(Sender: TObject);
var
  iLayer: Integer;
begin
  with ImageEnView1 do
  begin
    iLayer := LayersCreateFromText('E X A M P L E', 'Arial Black', 42, clBlue, [fsBold], False, 0, 0, 0, False);
    Layers[ iLayer ].PosY := Layers[ 0 ].PosY + Layers[ 0 ].Height div 2 - Layers[ iLayer ].Height div 2;
    Layers[ iLayer ].PosX := Layers[ 0 ].PosX + Layers[ 0 ].Width div 2 - Layers[ iLayer ].Width div 2;
    Layers[iLayer].Rotate := 30;
    LayersRotationAntialias := True;
    LayersRotationFilter := ierBilinear;
    LayersFixRotations( iLayer );
  end;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Jul 05 2016 : 16:46:30
Hi

You probably just need to apply the rotation:

http://www.imageen.com/help/TImageEnView.LayersFixRotations.html

Just ensure that you have specified a quality filter:

http://www.imageen.com/help/TImageEnView.LayersRotationFilter.html


But you should get better quality by outputing the text at an angle (rather than rotating it). See the angle parameter of:

http://www.imageen.com/help/TImageEnView.LayersCreateFromText.html

The method you use has been superceded by the LayersCreateFromText method. Can you advise its source so I can update it.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com