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
 How to get TextOut to wrap text to fit it on 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
yogiyang Posted - Nov 18 2015 : 04:03:31
I am using text out to print text on ImageEn.

ProjectDetails := '';
  ProjectDetails := ProjectDetails + 'Project Name: ' + txtProjectName.Text;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Project Comments: ' + txtComments.Text;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Project Type: ' + ProjectTypeName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Project Settings: ' + ProjectSettingsName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Project Options: ' +
    ProjectSettingsSubOptionsName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Other Settings:';
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Size:' + ProjectSizeName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Paper:' + ProjectPaperName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Cover:' + ProjectCoverName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Binding:' + ProjectBindingName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Coating:' + ProjectCoatingName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Sub Product: ' + ProjectSubProductName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + 'Starts From: ' + ProjectStartsFromName;
  ProjectDetails := ProjectDetails + #13;
  ProjectDetails := ProjectDetails + '--------------------------'


I am using the following code to print the text in ImageEn

ieMain.Proc.TextOut(10,10,ProjectDetails,'Arial',16,clBlack,[],0,True,True);

The text is printing in one straight line instead of multiple lines.

Again this TextOut is not wrapping the text to fit withing the image from right side.

If I set last parameter to False then the text that falls out side of image width gets truncated.

My question is how can I get the Text to wrap around?

TIA



Yogi Yang
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 19 2015 : 17:03:02
Hi Yogi,

Not EditMemo, but an object of kind iekMemo:

http://www.imageen.com/help/TImageEnVect.ObjKind.html

Please see the vectorial demo to get a better understanding of TImageEnVect. Of course you will be creating and adding the memo programatically, so also consult the "Object Properties" at:

http://www.imageen.com/help/TImageEnVect.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
yogiyang Posted - Nov 19 2015 : 02:11:09
Nigel,

Thanks for reply.

I checked out EditMemo object help but it says undocumented.

So how do I use this.

Can you please guide me?

TIA



Yogi Yang
xequte Posted - Nov 18 2015 : 16:49:40
Hi Yogi

TImageEnProc.TextOut() does not support multiple lines of text.

Either make multiple calls to TextOut for each line of text (using TCanvas.TextExtent() to establish the next Y value) or use a TImageEnVect memo object and then copy it to the background image:

http://www.imageen.com/help/TImageEnVect.CopyObjectToBack.html

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