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
 RichEdit / memo to image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

donwalsh

Canada
2 Posts

Posted - Mar 18 2013 :  04:41:45  Show Profile  Reply
Hi

I'm trying to add the contents of a RichEdit to an image. If the RichEdit contains multiple lines they are place on the image as one line. For example
Line1
Line2
Will be displayed on the image as
Line 1Line 2

The line of code is simple

ImageEnView1.LayersCurrent := ImageEnView1.LayersCreateFromText(RichEdit1.Text,'Arial', 28, clBlack, []);

Any help would be appreciated.

Thanks
Don


donwalsh

Canada
2 Posts

Posted - Mar 19 2013 :  03:43:29  Show Profile  Reply
I guess I should have added that I need both lines as they appear in the Richedit.
Both lines separated in the one layer

Line 1
Line 2

Thanks
Go to Top of Page

fab

1310 Posts

Posted - Mar 27 2013 :  03:13:18  Show Profile  Reply
LayersCreateFromText supports only one line.
You should use instead TImageEnVect: create a memo object, render on the canvas and then remove it. Example:

ImageEnVect1.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekMemo;
ImageEnVect1.ObjText[IEV_NEXT_INSERTED_OBJECT] := RichEdit1.Text;
ImageEnVect1.AddNewObject();
ImageEnVect1.AlphaChannel.Fill(0);
ImageEnVect1.CopyObjectsToBack(true, true);
ImageEnVect1.RemoveAllObjects();
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: