Welcome Guest! You need to login or register to make posts.



Go to last post Go to first unread
#1 Posted : Wednesday, July 2, 2014 12:44:58 PM(UTC)

Rank: Newbie

Groups: Member
Joined: 7/2/2014(UTC)
Posts: 3

I'm trying to use the .NET component to draw multi-line text. Here is my code:

graphics.DrawText(text, font, brush, rect, false, 3); 

The problem is that the line feeds are ignored and the text appears on the same line. What am I doing wrong?

Edited by moderator Thursday, July 3, 2014 1:21:04 AM(UTC)  | Reason: Not specified

#2 Posted : Thursday, July 3, 2014 1:39:16 AM(UTC)

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,658

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
You should use the class BoundedText for it. I have attached the result as well.

var a = new Aurigma.GraphicsMill.Bitmap(320, 320, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb
	, Aurigma.GraphicsMill.RgbColor.White);

var gr = a.GetAdvancedGraphics();

var content = @"Graphis Mill

One area of focus is pre-press processing, and Graphics Mill is popular among customers in both the traditional and specialty printing industries.";

var text = new Aurigma.GraphicsMill.AdvancedDrawing.BoundedText(content, gr.CreateFont("Segoe UI", 20))
	Rectangle = new System.Drawing.RectangleF(10, 10, gr.Width - 20, gr.Height - 20)

gr.DrawRectangle(new Aurigma.GraphicsMill.AdvancedDrawing.Pen(Aurigma.GraphicsMill.RgbColor.Blue, 0.3f)
	, text.Rectangle);



Edited by user Thursday, July 3, 2014 1:41:08 AM(UTC)  | Reason: Not specified

Fedor attached the following image(s):
Best regards,

Fedor Skvortsov

Users browsing this topic
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.