By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,344 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,344 IT Pros & Developers. It's quick & easy.

Draw string to region

P: 28

I'm wanting to draw a string to a region using the GDI+ classes. I currently have the text draw and then clipped however the text always 'seeps' out the edges of the shape:

As you can see the text is not wrapped properly in the circle and parts of the words are off the screen. I want the text to be able to wrap itself into the bounds of the shape without anything leaking out of the edges, unless it runs out of space.

Thanks in advances,
Feb 2 '13 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 5K+
P: 5,397
OP: Please be aware that most images linked to from outside sources may not be available to everyone. Indeed, if I had been at work instead of at the home PC today, I wouldn't have been able to see the image.

You have provided NOTHING in the way of what you've already done. Bytes is not a code nor homework service. Please read the FAQ and posting guidelines.

Basically, please show your work.
Feb 2 '13 #2

P: 28
There's not really much code to show really. I'm using something like this:
Expand|Select|Wrap|Line Numbers
  1. g.DrawString("long text here", f, blueBrush, x, y, rectangle)
That wraps the text to the rectangle but if the shape is anything else, like a cirlcle, the text runs out the edges. (Like on the image in the OP)
Feb 2 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.