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
 Imageenvect.objfontangle an Text with frame

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
klausdoege Posted - Feb 03 2012 : 06:17:55
Hello,
if I generate a text with frame,
and set Imageenvect.objfontangle[obj]:=45 or 67 ...
then runs the text out of the frame.
What can I do, that the text inner the frame


27.79 KB?

Klaus
www.klausdoege.de
2   L A T E S T    R E P L I E S    (Newest First)
klausdoege Posted - Feb 03 2012 : 15:40:40
Hello Fabrizio,
-> Imageenvect.objtextautosize := false;
that was the right tip.
Now, it works out great.


31.38 KB
And here my tip for the calculation of the objectborder.
Example:
ImageEnVect.ObjText[obj]:= 'Your Text...!';
ImageEnVect.ObjTextAlign[obj] := iejcenter ;
ImageEnVect.SetObjFont(obj, MyFont);
ImageEnVect.ieBitmap.Canvas.Font := MyFont;
tewi := ImageEnVect.ieBitmap.Canvas.TextWidth('Your Text...!');
tehi := ImageEnVect.ieBitmap.Canvas.TextHeight('Your Text...!');
if mytextangle<>0 then // calculate a new Objheight
tehi:= trunc(tehi + (tewi * sin(mytextangle * PI / 180)));
ImageEnVect.ObjHeight[obj] := tehi;
ImageEnVect.ObjWidth[obj] := tewi;


Klaus
www.klausdoege.de
fab Posted - Feb 03 2012 : 14:27:01
Hello,
there isn't a way to calculate the required rectangle size programmatically, you have to resize the rectangle using the mouse to match the right size. It is important that ObjTextAutoSize=false.