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
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.
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;