This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
Michel  
#1 Posted : Wednesday, May 11, 2005 10:12:00 PM(UTC)
Michel

Rank: Member

Groups: Guest
Joined: 4/24/2005(UTC)
Posts: 15

Hello!!

It's me again ^_^!
I have another problem : I want to draw a multiline text on a image. When the width of the text is longer than the image, I divide the text until it fits in my image. To do so, I store the dimension of my text with the MeasureText method but depending on the length of the words in my text, the cuts are different.
Is there any methods or functions which allow to know if the text fits in the rectangle? or to know the length of each line in the rectangle?

I tried with the different values of TextTrimmingMode but it didn't work.

Thank you,

Michel
Alex Kon  
#2 Posted : Thursday, May 12, 2005 12:38:00 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello, Michel!

Unfortunately Graphics Mill for .NET doesn't support measuring of multi-line text. In the case when your task is just to draw text on the image - you may try to set bounding rectangle equal to the image's dimensions using the following method:
Code:
GdiGraphics.DrawString(String, Font, SolidBrush, Rectangle, TextTrimmingMode, HotkeyPrefix, Clipping, WordWrap)

With Clipping = true and WordWrap = true.

Edited by user Monday, December 24, 2007 3:18:46 PM(UTC)  | Reason: Not specified

Michel  
#3 Posted : Monday, May 16, 2005 5:35:00 PM(UTC)
Michel

Rank: Member

Groups: Guest
Joined: 4/24/2005(UTC)
Posts: 15

ok thank you!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.