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
 RichEdit / memo to image

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
donwalsh Posted - Mar 18 2013 : 04:41:45
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


2   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Mar 27 2013 : 03:13:18
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();
donwalsh Posted - Mar 19 2013 : 03:43:29
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