Draw string to region

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Josh Argent
    New Member
    • Dec 2010
    • 28

    Draw string to region

    Hi,

    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:
    [IMGnothumb]http://s11.postimage.o rg/ww8xicr03/bubble.png[/IMGnothumb]

    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,
    Josh
    Last edited by zmbd; Feb 2 '13, 06:58 PM. Reason: [z{made image visible}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    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.

    Next:
    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.
    Last edited by zmbd; Feb 2 '13, 07:02 PM.

    Comment

    • Josh Argent
      New Member
      • Dec 2010
      • 28

      #3
      There's not really much code to show really. I'm using something like this:
      Code:
      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)

      Comment

      Working...